package org.project.entity.players;

import org.project.entity.Entity;
import org.project.item.armors.Armor;
import org.project.item.weapons.Weapon;

public class Wizard extends Player {

    public Wizard(String name, Weapon weapon, Armor armor) {
        super(name, 100, 30, weapon, armor);
    }

    @Override
    public void specialAbility(Entity target) {
        if (spendStamina(20)) {
            target.takeDamage(weapon.getDamage() * 2, this);
            if (!target.isDefending()) {
                this.fillHealth(getMaxHP() / 5);
                System.out.println(name + " Recites The Special Phrase!");
            }
        }
    }
}
