Class StatusResistantItem

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

public class StatusResistantItem extends SlotActivatedItem
An item that is resistant to status attacks when equipped.
Author:
AntumDeluge
  • Constructor Details

    • StatusResistantItem

      public StatusResistantItem(String name, String clazz, String subclass, Map<String,​String> attributes)
      Default constructor.
      Parameters:
      name - Item's name
      clazz - Item's class or type
      subclass - Item's subclass
      attributes - Attributes available to this item
    • StatusResistantItem

      public StatusResistantItem(StatusResistantItem item)
      Copy constructor.
      Parameters:
      item - Item to copy
  • Method Details

    • initializeStatusResistancesList

      public void initializeStatusResistancesList(Map<StatusType,​Double> list)
      Create or reset resistances to status types for this item.
      Overrides:
      initializeStatusResistancesList in class Item
      Parameters:
      list - Status types and resistant values
    • initializeStatusResistancesList

      public void initializeStatusResistancesList(StatusResistancesList list)
      Create or reset resistances to status types for this item.
      Parameters:
      list - Status types and resistant values
    • onActivate

      protected boolean onActivate()
      Actions to take when activated. Super class sets activationState by calling this method via onEquipped().
      Overrides:
      onActivate in class SlotActivatedItem
      Returns:
      Item activation state
    • onDeactivate

      protected boolean onDeactivate()
      Actions to take when deactivated. Super class sets activationState by calling this method via onUnequipped().
      Overrides:
      onDeactivate in class SlotActivatedItem
      Returns:
      Deactivated
    • describe

      public String describe()
      Add resistance values to description.
      Overrides:
      describe in class Item
      Returns:
      description from the players point of view
    • getStatusResistanceValue

      public double getStatusResistanceValue(StatusType type)
      Get the item's ability to resist a status attack.
      Parameters:
      type - The type of status to be resisted
      Returns:
      The resistance value
    • getStatusResistancesList

      public StatusResistancesList getStatusResistancesList()
      Gets all status types and resistance values for this item.
      Returns:
      List containing types and resistance values
    • toString

      public String toString()
      Description copied from class: RPObject
      This method returns a String that represent the object
      Overrides:
      toString in class SlotActivatedItem
      Returns:
      a string representing the object.