package org.project.entity.players;

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

public class Wizard extends Player
{
    public Wizard(String name)
    {
        super(name, 90, 70, null, null, "Wizard", 0, 90, 70);
    }

    public Wizard(String name, Weapon weapon, Armor armor)
    {
        super(name, 90, 70, weapon, armor, "WIZARD", 0, 90, 70);
    }

    @Override
    public void lightAttack(Entity target)
    {
        int damage = 18;
        System.out.println(name + " (Wizard) used Light Attack! (0 MP)");
        target.takeDamage(damage);
        System.out.println(name + " MP: " + getMP() + "/" + getMaxMP());
    }

    @Override
    public void specialAbility(Entity target)
    {
        if (getMP() >= 18) {
            fillMana(-18);
            target.takeDamage(35);
            super.heal(20);
            System.out.println("ARCANE NOVA! 35 damage + 20 heal (-18 MP)");
        } else {
            System.out.println("Not enough MP for Special Ability!");
        }
        System.out.println("MP: " + getMP() + "/" + getMaxMP());
    }

    @Override
    public void heavyAttack(Entity target)
    {
        if (getMP() >= 10)
        {
            fillMana(-10);
            System.out.println(name + " used Heavy Attack! (-10 MP)");
            target.takeDamage(30);
        }
        else
            System.out.println("Not enough MP!");

        System.out.println("MP: " + getMP() + "/" + getMaxMP());
    }

    @Override
    public void defend()
    {
        if (getMP() >= 6)
        {
            fillMana(-6);
            super.defend();
            System.out.println("Defensive stance! (-6 MP)");
        }
        else
            System.out.println("Not enough MP!");

        System.out.println("MP: " + getMP() + "/" + getMaxMP());
    }

    @Override
    public void heal(int health)
    {
        if (getMP() >= 12)
        {
            fillMana(-12);
            super.heal(health);
            System.out.println("Healed! (-12 MP)");
        }
        else
            System.out.println("Not enough MP!");

        System.out.println("MP: " + getMP() + "/" + getMaxMP());
    }
}
