package org.project.entity.enemies;

import org.project.entity.Entity;
import org.project.item.weapons.Weapon;
import org.project.ConsoleColors;

public class Vampire extends Enemy {
    private double lifestealPercent;
    public Vampire() {
        super(50, 0, new Weapon(10, 0, "Dark Claw", 0) {
            @Override
            public void use(Entity target) {
                target.takeDamage(getDamage());
            }
        });
        this.lifestealPercent = 0.3;
    }
    @Override
    public void attack(Entity target) {
        int damage = getWeapon().getDamage();
        target.takeDamage(damage);
        int healed = (int)(damage * lifestealPercent);
        heal(healed);
        System.out.println(ConsoleColors.RED + "🦇 Vampire dealt " + damage + " damage and healed " + healed + " HP!" + ConsoleColors.RESET);
    }
}