package org.project.item.weapons;

import org.project.entity.Entity;

import java.util.ArrayList;

// TODO: UPDATE IMPLEMENTATION
public class Sword extends Weapon {
    /*
    THIS IS AN EXAMPLE OF A WEAPON DESIGN.
    */

    private int abilityCharge;

    public Sword() {
        // TODO: DESIGN SWORD'S ATTRIBUTES IMPLEMENT THE CONSTRUCTOR
    super(15,5);
    this.abilityCharge = 0;
    }

    public Sword(int damage, int manaCost)
    {
        super(damage, manaCost);
        this.abilityCharge = 0;
    }

    // TODO: (BONUS) UPDATE THE UNIQUE ABILITY
    public void uniqueAbility(ArrayList<Entity> targets) {
        abilityCharge += 2;
        for (Entity target : targets) {
            target.takeDamage(getDamage() + abilityCharge);
        }
        System.out.println("Sword's unique ability! Damage: " + (getDamage() + abilityCharge));
    }

    public int getAbilityCharge()
    {
        return abilityCharge;
    }
}
