package org.project.entity.players;

import org.project.entity.Entity;
import org.project.item.armors.Robe;
import org.project.item.weapons.Staff;
import org.project.util.ConsoleColors;

/**
 * The Wizard 🧙 — the glass cannon caster. Highest max HP so it can survive long
 * fights, but weak basic attacks and flimsy armor.
 *
 * Special: Arcane Blast — blasts the enemy for heavy damage AND heals the Wizard
 * at the same time.
 */
public class Wizard extends Player {

    public Wizard(String name) {
        // Highest HP (65); low base damage (5).
        super(name, 65, 45, 5, new Staff(), new Robe());
    }

    @Override
    public String getClassName() {
        return "Wizard";
    }

    @Override
    public String getSpecialName() {
        return "Arcane Blast";
    }

    @Override
    public void specialAbility(Entity target) {
        spendMana(SPECIAL_COST);
        System.out.println(ConsoleColors.purple("🔮 " + name + " channels an ARCANE BLAST! "
                + ConsoleColors.blue("(-" + SPECIAL_COST + " Mana)")));
        dealDamage(target, (int) (getAttackPower() * 2.5));

        int lifeReturn = (int) (getMaxHP() * 0.25);
        heal(lifeReturn);
        System.out.println(ConsoleColors.green("🌿 The spell's energy restores " + lifeReturn + " HP to " + name
                + " (" + getHp() + "/" + getMaxHP() + ")."));
    }
}
