package org.project.entity.enemies;

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

// TODO: UPDATE IMPLEMENTATION
public class Enemy implements Entity{
    Weapon weapon;
    private int hp;
    private int maxHP;

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

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

    @Override
    public void LightAttack(Entity target) {
        target.takeDamage(weapon.getLightDamage());
    }

    public void HeavyAttack(Entity target)
    {
        System.out.println("poof");
    }

    @Override
    public void heal() {
        hp += 20;
        if (hp > maxHP) {
            hp = maxHP;
        }
        hp -= 20;

    }

    public int getHp() {
        return hp;
    }

    @Override
    public int getMaxHP() {
        return maxHP;
    }

    public Weapon getWeapon() {
        return weapon;
    }
}
