Class BreakableItem

All Implemented Interfaces:
EquipListener, TurnListener, UseListener, Killer, Cloneable, Iterable<String>, Serializable

public class BreakableItem extends Item
An item that wears & breaks.
  • Constructor Details

  • Method Details

    • getDescription

      public String getDescription()
      Overrides:
      getDescription in class Entity
    • repair

      public void repair()
      Sets the item's state back to new.
      Overrides:
      repair in class Item
    • isUsed

      public boolean isUsed()
      Checks the used state of the item.
      Returns:
      true if the item has deteriorated.
    • deteriorate

      public void deteriorate()
      Increment number of times used.
      Overrides:
      deteriorate in class Item
    • deteriorate

      public void deteriorate(RPEntity user)
      Description copied from class: Item
      Can be overridden to handle actions on user entity.
      Overrides:
      deteriorate in class Item
      Parameters:
      user - Entity using the item.
    • getConditionName

      public String getConditionName()
    • isBroken

      public boolean isBroken()
      Checks if the item has no uses remaining.
      Returns:
      true if uses are as much or more than base_uses.
    • getDurability

      public int getDurability()
    • getUses

      public int getUses()