package org.project.entity.enemies;
import org.project.entity.Entity;
import org.project.item.weapons.Weapon;
public class Skeleton extends Enemy {

    public Skeleton() {
        this("Skeleton", 50, 20, 10, null, 50);
    }

    public Skeleton(String name, int maxHP, int maxMP, int damage, Weapon weapon, int xpReward) {
        super(name, maxHP, maxMP, damage, weapon, xpReward);
    }

    @Override
    public void attack(Entity target) {
        if (stunned) {
            System.out.println(name + " is stunned and cannot attack!");
            return;
        }

        // Skeletons have a chance to miss
        if (Math.random() < 0.1) {
            System.out.println(name + " attacks but misses!");
            return;
        }

        super.attack(target);
    }
}