package org.project.entity.enemies;
import org.project.entity.Entity;
import org.project.item.weapons.Weapon;
// TODO: UPDATE IMPLEMENTATION
public class Skeleton extends Enemy {
    private  boolean dead;
    private static final int Max_hp = 10 ;
    private static final int Max_mp = 2 ;

    public Skeleton (int hp, int mp, Weapon weapon) {
        super(Max_hp , Max_mp ,  weapon );
        this.dead = false ;

    }

    @Override
    public void check_hp ()

    {
        int x = getHp() ;
        if (x <= 0 && dead == false)
        {
            setNewHp(Max_hp/2) ;
        }
    }


    @Override
    public void defend() {

    }

    @Override
    public void heal(int health) {

    }

    @Override
    public void fillMana(int mana) {

    }

    @Override
    public int getMaxHP() {
        return super.getMaxHP() ;
    }

    @Override
    public int getMaxMP() {
        return super.getMaxMp() ;
    }

    @Override
    public boolean ISLive() {
        return false;
    }

    public void attack (Entity target)
    {

        int damage = getWeapon().getDamage();
        System.out.println("Skeleton use ----");
        target.takeDamage(damage);
    }

    @Override
    public void defend(Entity me, int damage) {

    }
    @Override
    public String getName()
    {
        return "Skeleton " ;
    }

}
