package org.project.entity.enemies;

import java.util.Random;

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

public class Goblin extends  Enemy{

    private static  int HP = 80;
    private static  int goblinDamage = 20;

    public Goblin () {
        super(HP , goblinDamage);
    }

    @Override
    public void specialAbility(Player target) {
        this.criticality();
        super.attack(target);
    }

    @Override
    public String getName() {
        return "Goblin";
    }

    private void criticality(){
        Random random = new Random();
        int randNum = random.nextInt(100);
        if (randNum < 80){
            this.makeCritical(true);
        }
    }

}
