package org.project.item.consumables;

import org.project.entity.Entity;

// TODO: UPDATE IMPLEMENTATION
public abstract class Consumable {
    /*
    TODO: ADD OTHER REQUIRED AND BONUS METHODS
    */
    private String name;
    private int value;
    int numberOf;
    private final String targetType;
    public Consumable(String name, int value, String targetType) {
        this.name = name;
        this.value = value;
        this.targetType = targetType;
        this.numberOf = 1;
    }

    public abstract void use(Entity entity);
    public abstract String toString();

    public String getName() {
        return name;
    }


    public String getTargetType() {
        return targetType;
    }

    public void addOne()
    {
        numberOf++;
    }
    public void reduceOne(){numberOf--;}

    public int getNumberOf() {
        return numberOf;
    }

    public int getValue() {
        return value;
    }
}
