package org.project.entity.enemies;

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

import java.util.Random;

public class Vampire extends Enemy{
    public Vampire() {
        super(75, 35);
    }

    @Override
    public boolean heal(int health) {
        super.setHp(super.getHp() + health);
        return false;
    }

    @Override
    public int attack() {

        System.out.println("Your HP is know VAMPIRE's HP!");
        super.heal(super.getDamage() / 2);
        return super.getDamage();
    }

    @Override
    public void dropKey(Player player) {
        if(!player.getVampireKey())
        {
            if (new Random().nextInt(100) < 40) {
                System.out.println("Vampire dropped a " + Colors.KEY +"KEY" +Colors.RESET +"!");
                player.setVampireKey(true);
            }
        }
    }

}
