package org.project.item.weapons;

import org.project.entity.Entity;

public class Staff extends Weapon {

    public Staff() {
        super(12, 5);
    }

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

    @Override
    public void use(Entity target) {
        int damage = getDamage();

        if (target.isDefending()) {
            damage /= 2;
        }

        target.setHp(target.getHp() - damage);

        System.out.println("Staff deals " + damage + " damage to " + target.getName());
    }
}
