package org.project.item.consumables;

import org.project.Colors;
import org.project.entity.Entity;
import org.project.entity.enemies.Skeleton;
import org.project.entity.enemies.Vampire;

public class HolyWater extends Consumable{

    public HolyWater() {
        super("Holy Water", 40, "Enemy");

    }

    @Override
    public void use(Entity entity) {
        if(entity instanceof Skeleton  || entity instanceof Vampire)
        {
            System.out.println("Holy water burns the enemy!");
            entity.takeDamage(50);
        }
        else
        {
            System.out.println("You can't use Holy Water on non-Skeleton|Vampire enemy!");
        }
    }

    @Override
    public String toString() {
        return "Holy water:\n" + Colors.COIN + "40 coins" +Colors.RESET + "\nDeals 50 holy damage to undead(Skeleton, Vampire).";
    }
}
