//  • ▌ ▄ ·.  ▄▄▄·  ▄▄ • ▪   ▄▄· ▄▄▄▄·  ▄▄▄·  ▐▄▄▄  ▄▄▄ .
//  ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
//  ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
//  ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
//  ▀▀  █▪▀▀▀ ▀  ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀  ▀  ▀ ▀▀  █▪ ▀▀▀
//      Magicbane Emulator Project © 2013 - 2026
//                https://www.magicbane.com


package engine.devcmd.cmds;

import engine.devcmd.AbstractDevCmd;
import engine.objects.AbstractCharacter;
import engine.objects.AbstractGameObject;
import engine.objects.CharacterRune;
import engine.objects.PlayerCharacter;

/**
 *
 */

public class PrintRunesCmd extends AbstractDevCmd {

    public PrintRunesCmd() {
        super("printrunes");
        //		super("printstats", MBServerStatics.ACCESS_LEVEL_ADMIN);
    }

    @Override
    protected void _doCmd(PlayerCharacter pc, String[] words,
                          AbstractGameObject target) {

        AbstractCharacter tar;

        if (target != null && target instanceof AbstractCharacter) {
            tar = (AbstractCharacter) target;

            String newline = "\r\n ";
            String output = "Applied Runes For Character: " + ((AbstractCharacter) target).getName() + newline;

            for (CharacterRune rune : ((AbstractCharacter) target).runes) {
                output += rune.getRuneBaseID() + " " + rune.getRuneBase().getName() + newline;
            }
            throwbackInfo(pc, output);
        }
    }

    @Override
    protected String _getHelpString() {
        return "Returns the player's current stats";
    }

    @Override
    protected String _getUsageString() {
        return "' /printstats'";
    }

}
