package org.project.entity.enemies;

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

import java.util.Random;

public class Goblin extends Enemy
{
    Random random = new Random();

    public Goblin()
    {
        super("Goblin", 60, 12, 25);
    }

    @Override
    public void attack(Player player)
    {
        int dmg = damage;

        if (random.nextInt(100) < 40)
        {
            dmg *= 2;
            System.out.println(Colors.RED + "👹 Goblin landed CRITICAL HIT!" + Colors.RESET);
        }

        player.takeDamage(dmg);
    }
}
