package org.project.entity.players;

import org.project.entity.enemies.Enemy;
import org.project.utilities.Colors;

public class Wizard extends Player
{
    public Wizard(String name)
    {
        super(name, 140, 80, 14);
    }

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

    @Override
    public void lightAttack(Enemy enemy)
    {
        enemy.takeDamage(damage);
    }

    @Override
    public void heavyAttack(Enemy enemy)
    {
        if (mana < 10) return;

        mana -= 10;

        enemy.takeDamage(damage + 12);
    }

    @Override
    public void defend()
    {
        if (mana < 8) return;

        mana -= 8;
        defending = true;

        System.out.println("🔮 Wizard raised magical shield!");
    }

    @Override
    public void heal()
    {
        if (mana < 12) return;

        mana -= 12;

        health += 25;

        if (health > maxHealth)
            health = maxHealth;

        System.out.println(Colors.GREEN + "Wizard healed!" + Colors.RESET);
    }

    @Override
    public void specialAbility(Enemy enemy)
    {
        if (mana < 20) return;

        mana -= 20;

        enemy.takeDamage(damage + 25);

        health += 15;

        if (health > maxHealth)
            health = maxHealth;

        System.out.println(Colors.PURPLE + "🔥 Arcane Blast activated!" + Colors.RESET);
    }
}
