package org.project.entity.enemies;

public class Vampire extends Enemy
{

    public Vampire()
    {
        super("Vampire", 60, 30);
    }

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

        System.out.println(name + " attacks for " + damage + " damage and absorbs health!");
        target.takeDamage(damage);

        int healAmount = damage / 2;
        hp += healAmount;
        if (hp > maxHP) hp = maxHP;
        System.out.println(name + " heals for " + healAmount + " HP.");
    }
}