package org.project.entity.enemies;

import java.util.Random;

import org.project.entity.Entity;
import org.project.entity.players.Player;
import org.project.item.weapons.Dagger;
import org.project.item.weapons.Weapon;

public class Goblin extends Enemy{

    private static final int HEALTH_POINT = 100;

    public Goblin(){
        Weapon goblinDagger = new Dagger();
        super(HEALTH_POINT, goblinDagger);
    }

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

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

    // makes the next move critical with a probability of 80
    private void criticality(){
        Random random = new Random();
        int randNum = random.nextInt(100);
        if (randNum < 80){
            this.makeCritical(true);
        }
    }



}
