Class CaptureTheFlagFlag

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

public class CaptureTheFlagFlag extends Item
represents the flag in Capture the Flag games - when player holds flag in hand, outfit displays flag. when player drops flag, outfit reverts to previous.
Author:
sjtsp2008
  • Constructor Details

    • CaptureTheFlagFlag

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

      public CaptureTheFlagFlag()
      default constructor. maybe just for test harness, maybe for simpler xml
  • Method Details

    • getColorValue

      public String getColorValue()
    • getDetailValue

      public int getDetailValue()
      return the detail id for flag
      Returns:
      detail id
    • isDroppable

      public boolean isDroppable()
    • onEquipped

      public boolean onEquipped(RPEntity equipper, String slot)
      if flag is held, update player's outfit. XXX current api returns boolean, but that has little value
      Overrides:
      onEquipped in class Item
      Parameters:
      equipper - entity equipping the item
      slot - slot where the item is equipped
      Returns:
      unknown, see the note above
    • onUnequipped

      public boolean onUnequipped()
      item is being removed from owner - remove flag from players outfit this is called in the process of removing item from original owner, perhaps just before giving it to a new owner (or maybe just dropping it). at this point, the item still "belongs" to the original owner.
      Overrides:
      onUnequipped in class Item
      Returns:
      needs documenting