package org.project.item.consumables;

import org.project.entity.Entity;
import org.project.entity.players.Player;
import org.project.location.NarrativeConsole;

public class ManaFlask extends Flask {
    public ManaFlask() {
        super("Mana Flask",30);  //30% mana increasing
    }

    @Override
    public void use(Entity target) {
        if (target instanceof Player) {
            Player player = (Player) target;
            int manaAmount = player.getMaxMP() / 3;
            player.setMp(Math.min(player.getMp() + manaAmount, player.getMaxMP()));
            NarrativeConsole.printMana("💙 Restored " + manaAmount + " Mana!");
        }
    }
}