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.armors.WizardArmor;
import org.project.item.weapons.FireBall;
import org.project.item.weapons.Weapon;

public class Wizard extends Player{

    private static final int MAX_HP = 500;
    private static final int MAX_MP = 30;
    private static final int SPELL_DAMAGE = 40;
    private static final int SPELL_HEAL_AMOUNT = 20;
    private static final int SPECIAL_ABILITY_MANA_COST = 11;

    public Wizard(String name   ){
        Weapon wizardWeapon = new FireBall();
        Armor wizardArmor = new WizardArmor();
        super(name, MAX_HP, MAX_MP, wizardWeapon, wizardArmor, MAX_HP, MAX_MP);
    }

    @Override
    public void specialAbility(Enemy target) {
        mp -= SPECIAL_ABILITY_MANA_COST;
        System.out.println("Casting spell...");
        target.takeDamage(SPELL_DAMAGE);
        this.heal(SPELL_HEAL_AMOUNT);
    }

    @Override
    public int specialAblMPCost() {
        return SPECIAL_ABILITY_MANA_COST + HEAL_MP_COST;
    }
}
