package org.project.entity.enemies;
import org.project.item.weapons.Weapon;

// TODO: UPDATE IMPLEMENTATION
public class Skeleton extends Enemy{
    // TODO: DESIGN ENEMY AND IMPLEMENT THE CONSTRUCTOR
        private boolean resurrected = false;

        public Skeleton(Weapon weapon) {
            //A low-tier enemy with moderate HP and low mana.
            super(80, 20, weapon);
        }

        @Override
        public void takeDamage(int damage) {
            //Apply damage
            super.takeDamage(damage);

            //If dies for the first time, resurrect with 50% HP.
            if (hp <= 0 && !resurrected) {
                resurrected = true;
                hp = maxHp / 2;
            }
        }
}
