package inf101.v18.rogue101.items;

import inf101.v18.rogue101.game.IGame;
import inf101.v18.rogue101.objects.IItem;

import java.util.Random;

public class Staff implements IMagicWeapon {
    private static final Random random = new Random();
    private final int damage = 5 + random.nextInt(25);
    private int hp = getMaxHealth();

    @Override
    public int getWeaponDamage() {
        return damage;
    }

    @Override
    public int getWeaponAttack() {
        return 10;
    }

    @Override
    public int getCurrentHealth() {
        return hp;
    }

    @Override
    public int getDefence() {
        return 0;
    }

    @Override
    public int getMaxHealth() {
        return 90;
    }

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

    @Override
    public int getSize() {
        return 0;
    }

    @Override
    public String getPrintSymbol() {
        return "⚚";
    }

    @Override
    public String getSymbol() {
        return "s";
    }

    @Override
    public int handleDamage(IGame game, IItem source, int amount) {
        hp -= amount;
        return amount;
    }
}
