package org.project.entity.enemies;

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

public abstract class Enemy implements Entity {

    private int dragonDamage;
    private boolean resurrection = false;

    private Weapon weapon;
    private int hp;
    private int maxHP;
    private boolean isStunned = false;

    private int xpPrize;
    private int coinPrize;

    public Enemy(int maxHP, Weapon weapon, int xpPrize, int coinPrize) {
        this.maxHP = maxHP;
        this.hp = maxHP;
        this.weapon = weapon;
        this.xpPrize = xpPrize;
        this.coinPrize = coinPrize;
    }

    public void toBeStunned(boolean t) {
        isStunned = t;
    }

    public boolean isStunned() {
        return isStunned;
    }


    @Override
    public void takeDamage(int damage) {
        hp -= damage;
    }

    @Override
    public boolean isAlive() {
        if (hp <= 0) {
            return false;
        }
        return true;
    }

    @Override
    public int getHP() {
        return hp;
    }

    public int getMaxHP() { return maxHP; }

    public void addHP(int HP) {
        hp += HP;
    }

    public Weapon getWeapon() {
        return weapon;
    }

    public int getXpPrize() { return xpPrize; }

    public int getCoinPrize() { return coinPrize; }

    public int getDragonDamage() { return dragonDamage; }

    public void setDragonDamage(int d) { dragonDamage = d; }

    public boolean getResurrectionStatus() { return resurrection; }

    public void setResurrectionStatus(boolean t) { resurrection = t; }
}
