package org.project.entity.players;

import org.project.entity.Entity;
import org.project.entity.enemies.Enemy;
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,50, 40, weapon, armor, 50, 40);
    }

    //attacks the enemy and increases HP
    @Override
    public boolean specialAbility(Player player, Enemy target){
        //checks if player has enough mana
        if (getMP() >= 15) {
            spendMP(15);
            heal(target, 7);
            target.takeDamage(player.getWeapon().getDamage());
            return true;
        }
        return false;
    }

}
