Class LifeSupportGear

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

public class LifeSupportGear extends Item
an item to survive in some environments (e. g. scuba gear)
  • Constructor Details

    • LifeSupportGear

      public LifeSupportGear(LifeSupportGear item)
      copy constructor
      Parameters:
      item - item to copy
    • LifeSupportGear

      public LifeSupportGear(String name, String clazz, String subclass, Map<String,​String> attributes)
      creates a new item
      Parameters:
      name - item name
      clazz - item class
      subclass - item subclass
      attributes - attributes
  • Method Details

    • onUnequipped

      public boolean onUnequipped()
      Description copied from class: Item
      item is about to be removed from owner. at this time, we are still owned by the original owner. opportunity to affect the player when equipped note: use this.getContainerOwner(), rather than the equipper param TODO: i don't think the parameters are necessary. can get owner and slot from Item api
      Overrides:
      onUnequipped in class Item
      Returns:
      needs documenting
    • getDefense

      public int getDefense()
      Description copied from class: Item
      Returns the defense points of this item. Positive and negative values are allowed. If this item doesn't modify the defense it should return '0'.
      Overrides:
      getDefense in class Item
      Returns:
      defense points