package org.project.item.weapons;

import org.project.entity.Entity;
import org.project.item.Item;

// TODO: UPDATE IMPLEMENTATION
public abstract class Weapon implements Item {
    private int damage;
    private int manaCost;
    private int specialMana;

    /*
    TODO: ADD OTHER REQUIRED AND BONUS ATTRIBUTES
    */

    public Weapon(int damage, int manaCost, int specialMana) {
        this.damage = damage;
        this.manaCost = manaCost;
        this.specialMana = specialMana;
    }

    public void setManaCost(int manaCost) {
        this.manaCost = manaCost;
    }

    public void setDamage(int damage) {
        this.damage = damage;
    }

    public int getDamage() {
        return damage;
    }

    public int getManaCost() {
        return manaCost;
    }

    public int getSpecialMana() {
        return specialMana;
    }

    public void setSpecialMana(int specialMana) {
        this.specialMana = specialMana;
    }

    public void lightAttack(Entity target) {
        target.takeDamage(this.getDamage());
    }
    public void heavyAttack(Entity attacker, Entity target){
        target.takeDamage(this.getDamage() * 2);
        attacker.reduceMana(this.getManaCost());
    }
    public abstract void useSpecialAbility(Entity attacker, Entity target);
    /*
    TODO: ADD OTHER REQUIRED AND BONUS METHODS
    */
}
