package org.project.entity.enemies;

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

public class Goblin extends Enemy{

    private static int maxHP = 65;
    private int hp = maxHP;
    private int criticalHit_damage = 20;

    public Goblin(){
        Weapon goblinWeapon = new Dagger();
        super(maxHP, goblinWeapon);
    }

    @Override
    public void specialAbility(Entity target) {
        if(target.isDefending()){
            System.out.printf("\t%s is defending. %s lost his attack. \uD83D\uDEE1\uFE0F\n", target.getName(), getName());
            return;
        }
        System.out.printf("\t%s used critical hit! \uD83D\uDCA5\n", getName());
        target.takeDamage(criticalHit_damage);
    }

    public int getMaxHP() {
        return maxHP;
    }

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

}