    package org.project.entity.enemies;

    import org.project.entity.Entity;

    import java.util.Random;

    public class Goblin extends Enemy {
        private final int attackDamage;
        private Random random;

        public Goblin(int hp, int mp, int attackDamage) {
            super(hp, mp);
            this.attackDamage = attackDamage;
            this.random = new Random();
        }

        public int getAttackDamage() {
            return attackDamage;
        }

        @Override
        public void LightAttack(Entity target, int damage) {
            int chance = random.nextInt(10) + 1;
            if (chance <= 3) {
                target.takeDamage(2 * attackDamage);
            } else {
                target.takeDamage(attackDamage);
            }
        }

        @Override
        public void SpecialAbility(Entity target) {

        }


    }
