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

// TODO: UPDATE IMPLEMENTATION
/*public abstract class Enemy {
    Weapon weapon;
    private int hp;
    private int mp;*/
public abstract class Enemy extends Entity {

    protected Weapon weapon;
    //protected int hp;
    //protected int mp;
    protected String name;


    public Enemy(String name,int hp, int mp, Weapon weapon) {

        super(name, hp, mp);

        this.weapon = weapon;
    }

    @Override
    public void takeDamage(int damage) {
        hp -= damage;
        if (hp < 0) hp = 0;
    }
    @Override
    public boolean isAlive() {
        return hp > 0;
    }
    @Override
    public abstract void attack(Entity target);

    public int getHp() {
        return hp;
    }

    public int getMp() {
        return mp;
    }

    public Weapon getWeapon() {
        return weapon;
    }
    public String getName() {
        return name;
    }
}
