package org.project.item.weapons;

import org.project.entity.Entity;

import java.util.ArrayList;

public class Sword extends Weapon
{

    private int abilityCharge;

    public Sword()
    {
        super(25, 10, 1.2, 0.15, 100);
        this.abilityCharge = 0;
    }

    @Override
    public String getName()
    {
        return "Basic Sword";
    }

    @Override
    public String getDescription()
    {
        return "A sharp melee weapon with balanced damage and good critical chance.";
    }

    @Override
    public void uniqueAbility(Entity... targets)
    {
        abilityCharge += 2;

        System.out.println("Sword's unique ability activated! Hitting " + targets.length + " targets.");

        for (Entity target : targets)
        {
            if (target != null && target.isAlive())
            {
                target.takeDamage(getDamage() + 10);
            }
        }
    }
}