package org.project.item.consumables;

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

import java.util.Collections;

public class ElixirOfLife extends Consumable{


    public ElixirOfLife() {
        super("Elixir Of Life", 100, "Player");
    }

    @Override
    public void use(Entity entity) {
        System.out.println(Colors.RED +"Life" +Colors.RESET+ " and " + Colors.BLUE+  "Mana"+ Colors.RESET+ "restored.");
        Player p = (Player) entity;
        p.setHp(p.getMaxHP());
        p.setMp(p.getMaxMP());
    }

    @Override
    public String toString() {
        return "Elixir Of Life:\n" + Colors.COIN + "100 coins" +Colors.RESET +"\nFully restores HP and Mana.";
    }
}
