Class RingOfLife

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

public class RingOfLife extends Item
A ring that protects from XP loss.
  • Constructor Details

    • RingOfLife

      public RingOfLife(String name, String clazz, String subclass, Map<String,​String> attributes)
    • RingOfLife

      public RingOfLife(RingOfLife item)
      Copy constructor.
      Parameters:
      item - copied item
    • RingOfLife

      public RingOfLife()
      Create a RingOfLife.
  • Method Details

    • isBroken

      public boolean isBroken()
      Check if the ring is broken.
      Returns:
      true if the ring is broken, true if it's intact
    • damage

      public void damage()
      Use up the ring's power.
    • repair

      public void repair()
      Description copied from class: Item
      repair this item
      Overrides:
      repair in class Item
    • describe

      public String describe()
      Gets the description. The description of RingOfLife depends on the ring's state.
      Overrides:
      describe in class Item
      Returns:
      The description text.
    • onEquipped

      public boolean onEquipped(RPEntity entity, String slot)
      Notify the player that it is not required to carry this ring in the finger slot to get its benefits.
      Overrides:
      onEquipped in class Item
      Parameters:
      entity - entity equipping the item
      slot - slot where the item is equipped
      Returns:
      unknown, see the note above