package org.project.entity.enemies;

import org.project.item.weapons.Sword;

public class Skeleton extends Enemy {
    private boolean hasResurrected = false;

    public Skeleton() {
        super("Skeleton", 35, 0, new Sword(), "Skeleton Key");
        this.xpReward = 25;
    }

    @Override
    public void takeDamage(int damage) {
        super.takeDamage(damage);
        if (hp <= 0 && !hasResurrected) {
            hasResurrected = true;
            hp = maxHp / 2;
            System.out.println("☠️ \u001B[33mSkeleton Resurrected with 50% HP!\u001B[0m");
        }
    }
}