package org.project.entity.enemies;

import org.project.entity.Entity;
import org.project.item.weapons.ToothedHook;

public class Vampire extends Enemy {
    public Vampire() {
        super("Vampire", 50, 40, new ToothedHook());
    }

    @Override
    public void attack(Entity target) {
        int damage = 12;

        target.takeDamage(damage);

        //Adding to Vampire HP
        int healAmount = damage * 30 / 100;
        int newHp = getHp() + healAmount;
        if (newHp > getMaxHP()) {
            newHp = getMaxHP();
        }
        setHp(newHp);

        System.out.println("🦇 Vampire attacks " + getName(target) + "!");
        System.out.println("💥 Dealt " + damage + " damage!");
        System.out.println("🩸 Life steal: Vampire drains " + healAmount + " HP and regenerates!");
        System.out.println("💚 Vampire HP: " + getHp() + "/" + getMaxHP());

        if (getHp() == getMaxHP()) {
            System.out.println("🦇 Vampire is fully satiated!");
        }
    }

    @Override
    public int getMaxHP() {
        return 50;
    }

    @Override
    public int getMaxMP() {
        return 40;
    }
}
