Class MarkedScroll

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

public class MarkedScroll extends TeleportScroll
Represents a marked teleport scroll.
  • Constructor Details

    • MarkedScroll

      public MarkedScroll(String name, String clazz, String subclass, Map<String,​String> attributes)
      Creates a new marked teleport scroll.
      Parameters:
      name -
      clazz -
      subclass -
      attributes -
    • MarkedScroll

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

    • useTeleportScroll

      protected boolean useTeleportScroll(Player player)
      Is invoked when a teleporting scroll is used. Tries to put the player on the scroll's destination, or near it.
      Specified by:
      useTeleportScroll in class TeleportScroll
      Parameters:
      player - The player who used the scroll and who will be teleported
      Returns:
      true iff teleport was successful
    • describe

      public String describe()
      Description copied from class: Entity
      Describes the entity (if a players looks at it).
      Overrides:
      describe in class Item
      Returns:
      description from the players point of view