package org.project.item.consumables;

import org.project.Colors;
import org.project.entity.Entity;
import org.project.entity.players.Player;

public class HealthPotion extends Consumable{

    public HealthPotion() {
        super("Health Potion", 20, "Player");
    }

    @Override
    public void use(Entity entity) {
        System.out.println("You drink The potion. +20 " + Colors.HEAL + "HP" + Colors.RESET + ".");
        Player p = (Player) entity;
        p.setHp(p.getHp() + 30);
    }

    @Override
    public String toString() {
        return "Health Potion:\n" + Colors.COIN + "20 coins" +Colors.RESET +"\nRestores 30 HP instantly.";
    }
}
