package org.project.entity.enemies;

import org.project.entity.Entity;

// TODO: UPDATE IMPLEMENTATION
public class Skeleton extends Enemy {

    private boolean hasRevived;

    public Skeleton() {

        super(
                80,
                30,
                null
        );

        this.hasRevived = false;
    }

    @Override
    public void attack(Entity target) {

    }

    @Override
    public void defend() {

    }

    @Override
    public void fillMana(int mana) {

    }

    // Skeleton revive ability (once per battle)
    @Override
    public void takeDamage(int damage) {

        super.takeDamage(damage);

        if (getHp() <= 0 && !hasRevived) {

            hasRevived = true;

            System.out.println("Skeleton revived!");

            heal(getMaxHP() / 2);
        }
    }
}