package org.project.entity.players;

import org.project.entity.Entity;
import org.project.item.weapons.Weapon;
import org.project.utils.ConsoleColors;

public class Wizard extends Player {
    public Wizard(String name, Weapon weapon) {
        super(name, 140, 100, 12, weapon);
    }

    @Override
    public void specialAbility(Entity target) {
        if (mp < 25) {
            System.out.println(ConsoleColors.RED + "Not enough Mana!" + ConsoleColors.RESET);
            return;
        }
        mp -= 25;
        int totalDamage = damage * 4;
        if (weapon != null) {
            totalDamage += weapon.getDamage();
        }
        System.out.println(ConsoleColors.PURPLE_BOLD + "✨ Arcane Explosion!" + ConsoleColors.RESET);
        target.receiveAttack(totalDamage, false);
        heal(25);
        System.out.println(ConsoleColors.GREEN + name + " restored 25 HP." + ConsoleColors.RESET);
    }
}