package org.project.entity.players;

import org.project.entity.Entity;
import org.project.item.armors.LeatherArmor;
import org.project.item.weapons.Dagger;
import org.project.util.ConsoleColors;

/**
 * The Assassin 🗡️ — the nimble skirmisher. Highest max mana/stamina so it can
 * chain abilities, with average damage and low HP.
 *
 * Special: Vanish — turns invisible, dodging the enemy's next attack entirely
 * and guaranteeing a critical hit on the Assassin's next strike.
 */
public class Assassin extends Player {

    public Assassin(String name) {
        // Highest Mana/Stamina (55); low HP (45).
        super(name, 45, 55, 6, new Dagger(), new LeatherArmor());
    }

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

    @Override
    public String getSpecialName() {
        return "Vanish";
    }

    @Override
    public void specialAbility(Entity target) {
        spendMana(SPECIAL_COST);
        // Flip the two combat-state flags the base class already knows about.
        dodgeNext = true;
        guaranteedCrit = true;
        System.out.println(ConsoleColors.purple("🌫️ " + name + " VANISHES into the shadows! "
                + ConsoleColors.blue("(-" + SPECIAL_COST + " Mana)")));
        System.out.println(ConsoleColors.purple("   The next enemy attack will miss, and the next strike is a guaranteed crit!"));
    }
}
