com.planet_ink.coffee_mud.Exits
Class StdExit

java.lang.Object
  extended by com.planet_ink.coffee_mud.Exits.StdExit
All Implemented Interfaces:
Behavable, CMModifiable, CMObject, Environmental, MsgListener, StatsAffecting, Tickable, Exit, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
ClimbableExit, FlyingExit, GapExit, GenExit, OpenDescriptable, StdClosedDoorway, StdOpenDoorway

public class StdExit
extends java.lang.Object
implements Exit


Field Summary
protected  java.util.Vector affects
           
protected  boolean amDestroyed
           
protected  EnvStats baseEnvStats
           
protected  java.util.Vector behaviors
           
protected  EnvStats envStats
           
protected  java.lang.String imageName
           
protected  boolean isLocked
           
protected  boolean isOpen
           
protected  java.lang.String miscText
           
protected  java.util.Vector scripts
           
protected  short usage
           
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MOB, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SPELL_AFFECT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET, TICKMASK_SOLITARY, TICKS_PER_RLMIN, TIME_MILIS_PER_MUDHOUR, TIME_TICK, TIME_TICK_DOUBLE
 
Constructor Summary
StdExit()
           
 
Method Summary
 void addBehavior(Behavior to)
          Manipulation of Behavior objects, which includes movement, speech, spellcasting, etc, etc.
 void addEffect(Ability to)
          Add a new effect to this object, whether permanent or temporary.
 void addNonUninvokableEffect(Ability to)
          Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked.
 void addScript(ScriptingEngine S)
          Manipulation of the scripts list
 void affectCharState(MOB affectedMob, CharState affectableMaxState)
          This method is called by the recoverCharState() method on other MOB objects.
 void affectCharStats(MOB affectedMob, CharStats affectableStats)
          This method is called by the recoverCharStats() method on other MOB objects.
 void affectEnvStats(Environmental affected, EnvStats affectableStats)
          This method is called by the recoverEnvStats() method on other Environmental objects.
 boolean amDestroyed()
          Whether the destroy() method has been previousy called on this object.
 EnvStats baseEnvStats()
          Object containing a set of base, unmodified, mostly numeric fields.
protected  void cloneFix(Exit E)
           
 java.lang.String closedText()
          Returns a text description of what this exit looks like when closed.
 java.lang.String closeWord()
          Returns the verb used for describing closing this exit, e.g.
protected  java.lang.String closeWordPastTense()
           
 int compareTo(CMObject o)
           
 CMObject copyOf()
          Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.
 boolean defaultsClosed()
          For exits with a door, this returns whether the door defaults in a closed state.
 boolean defaultsLocked()
          For exits with a door and lock, this returns whether the door defaults in a closed and locked state.
 void delBehavior(Behavior to)
          Delete a behavior from this object.
 void delEffect(Ability to)
          Delete an effect from this object, whether permanent or temporary.
 void delScript(ScriptingEngine S)
          Remove a running script from this object.
 java.lang.String description()
          The basic description of this object, as shown when the item is directly LOOKed at.
 void destroy()
          Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java.
 java.lang.String displayText()
          Gets the raw string used to show what this object looks like in the room.
 java.lang.String doorName()
          Returns the short name of this door, e.g.
 EnvStats envStats()
          Object containing a set of current, modified, usable, mostly numeric fields.
 void executeMsg(Environmental myHost, CMMsg msg)
          The general message event handler for the object.
 short exitUsage(short change)
          Both reads and optionally modifies an internal reference counter for this exit.
 long expirationDate()
          If this object expires, it should have a timestamp saying when it expires, in real time.
 Behavior fetchBehavior(int index)
          Returns a behavior object on this object.
 Behavior fetchBehavior(java.lang.String ID)
          Returns a behavior object listed on this object.
 Ability fetchEffect(int index)
          Returns an ability object listed as an effect on this object.
 Ability fetchEffect(java.lang.String ID)
          Returns an ability object listed as an effect on this object.
 ScriptingEngine fetchScript(int x)
          Retreive one of the enumerated scripts running on this object
protected  void finalize()
           
protected  Rideable findALadder(MOB mob, Room room)
           
protected  int getCodeNum(java.lang.String code)
           
 int getSaveStatIndex()
          Returns the index into the stat codes array where extra savable fields begins.
 java.lang.String getStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 java.lang.String[] getStatCodes()
          Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.
 long getTickStatus()
          A coded status for this object during the period where its tick method is being called.
 boolean hasADoor()
          Returns whether this exit has a door, and must be opened before being used.
 boolean hasALock()
          Returns whether this exit has a lock on its door, and, if locked, must be unlocked before being used.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 java.lang.String image()
          Returns the fully qualified and determined name of the image file displayed for this object when MXP is used.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean isGeneric()
          Whether the fields of this item are set in code, or set by builders.
 boolean isLocked()
          Returns whether this exit is LOCKED, and must be unlocked before being used.
 boolean isOpen()
          Returns whether this exit is OPEN and may be travelled through
 boolean isReadable()
          Returns whether this exit is readable when the player uses the READ command and targets it.
 boolean isStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 java.lang.String keyName()
          For Exits with doors and locks, this returns the unique string representing the key code required to unlock/lock the door.
 int maxRange()
          the maximum range of this object, if applicable.
 int minRange()
          the minimum range of this object, if applicable.
 java.lang.String miscTextFormat()
          Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data.
protected  void mountLadder(MOB mob, Rideable ladder)
           
 java.lang.String name()
          The displayable name of this object.
 java.lang.String Name()
          The raw unmodified name of this object as stored in the database.
 CMObject newInstance()
          Returns a new instance of this class.
 int numBehaviors()
          The number of behaviors this object has.
 int numEffects()
          Returns the number of ability objects listed as effects on this object.
 int numScripts()
          Return the number of scripts running on this object
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
 int openDelayTicks()
          Returns the number of ticks that this exit remains open when a mob or player changes it from a closed to an open state, and the door defaults in a closed state.
 java.lang.String openWord()
          Returns the verb used for describing opening this exit, e.g.
protected  java.lang.String openWordPastTense()
           
 java.lang.String rawImage()
          Returns the raw name of the image file to display for this object when MXP is used.
 java.lang.String readableText()
          For Exits that are readable, this returns the readable string for this exit.
 void recoverEnvStats()
          This method copies the baseEnvStats() object into the envStats() object, then makes repeated calls to all surrounding objects with affectEnvStats(Environmental,EnvStats) method.
 boolean sameAs(Environmental E)
          Whether this object instance is functionally identical to the object passed in.
 boolean savable()
          Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container.
 void setBaseEnvStats(EnvStats newBaseEnvStats)
          Re-sets the object containing a set of base, unmodified, mostly numeric fields.
 void setDescription(java.lang.String newDescription)
          Sets the basic description of this object, as shown when the item is directly LOOKed at.
 void setDisplayText(java.lang.String newDisplayText)
          Sets the raw string used to show what this object looks like in the room.
 void setDoorsNLocks(boolean newHasADoor, boolean newIsOpen, boolean newDefaultsClosed, boolean newHasALock, boolean newIsLocked, boolean newDefaultsLocked)
          Modifies the various door/lock settings for this exit.
 void setExitParams(java.lang.String newDoorName, java.lang.String newCloseWord, java.lang.String newOpenWord, java.lang.String newClosedText)
          Sets various word descriptions used when doing some dynamic manipulations of this exit.
 void setExpirationDate(long time)
          If this object expires, it should have a timestamp saying when it expires, in real time.
 void setImage(java.lang.String newImage)
          Sets the raw name of the image file to display for this object when MXP is used.
 void setKeyName(java.lang.String newKeyName)
          For Exits with doors and locks, this sets the unique string representing the key code required to unlock/lock the door.
 void setMiscText(java.lang.String newMiscText)
          For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object.
 void setName(java.lang.String newName)
          Sets the raw unmodified name of this object as stored in the database.
 void setOpenDelayTicks(int numTicks)
          Sets the number of ticks that this exit will remain open when a mob or player changes it from a closed to an open state, and the door defaults in a closed state.
 void setReadable(boolean isTrue)
          Returns whether this exit is readable when the player uses the READ command and targets it.
 void setReadableText(java.lang.String text)
          For Exits that are readable, this set the readable string for this exit.
 void setStat(java.lang.String code, java.lang.String val)
          An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders.
 void setTemporaryDoorLink(java.lang.String link)
          If this exit represents a route to a room not yet created, but whose room id is already known, this will set that designated room id.
 java.lang.String temporaryDoorLink()
          If this exit represents a route to a room not yet created, but whose room id is already known, this will return that designated room id.
 java.lang.String text()
          For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object.
 boolean tick(Tickable ticking, int tickID)
          this is the method which is called periodically by the threading engine.
 java.lang.StringBuffer viewableText(MOB mob, Room room)
          Returns the modified and qualified player-viewed description of this exit.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

envStats

protected EnvStats envStats

baseEnvStats

protected EnvStats baseEnvStats

isOpen

protected boolean isOpen

isLocked

protected boolean isLocked

miscText

protected java.lang.String miscText

imageName

protected java.lang.String imageName

affects

protected java.util.Vector affects

behaviors

protected java.util.Vector behaviors

scripts

protected java.util.Vector scripts

amDestroyed

protected boolean amDestroyed

usage

protected short usage
Constructor Detail

StdExit

public StdExit()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, MiscTech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

Name

public java.lang.String Name()
Description copied from interface: Environmental
The raw unmodified name of this object as stored in the database. This is the name set by builders and used as a basis for the name() method.

Specified by:
Name in interface Environmental
Returns:
the raw base name of this object on the map.
See Also:
Environmental.name()

hasADoor

public boolean hasADoor()
Description copied from interface: Exit
Returns whether this exit has a door, and must be opened before being used.

Specified by:
hasADoor in interface Exit
Returns:
true if a door is present, false otherwise.
See Also:
Exit.isOpen(), Exit.isLocked()

hasALock

public boolean hasALock()
Description copied from interface: Exit
Returns whether this exit has a lock on its door, and, if locked, must be unlocked before being used.

Specified by:
hasALock in interface Exit
Returns:
whether a lock is present
See Also:
Exit.isOpen(), Exit.isLocked(), Exit.hasADoor()

defaultsLocked

public boolean defaultsLocked()
Description copied from interface: Exit
For exits with a door and lock, this returns whether the door defaults in a closed and locked state.

Specified by:
defaultsLocked in interface Exit
Returns:
true if defaults closed and locked, false otherwise
See Also:
Exit.hasADoor(), Exit.defaultsClosed()

defaultsClosed

public boolean defaultsClosed()
Description copied from interface: Exit
For exits with a door, this returns whether the door defaults in a closed state.

Specified by:
defaultsClosed in interface Exit
Returns:
true if defaults closed, false otherwise
See Also:
Exit.hasADoor(), Exit.defaultsLocked()

displayText

public java.lang.String displayText()
Description copied from interface: Environmental
Gets the raw string used to show what this object looks like in the room. May be used as a basis for other methods, such as the title of rooms, and what an exit looks like when open. The value for Items may be null if the item is not displayed when the room is seen.

Specified by:
displayText in interface Environmental
Returns:
the string describing how this object looks in the room

description

public java.lang.String description()
Description copied from interface: Environmental
The basic description of this object, as shown when the item is directly LOOKed at.

Specified by:
description in interface Environmental
Returns:
the basic detail description of this object

doorName

public java.lang.String doorName()
Description copied from interface: Exit
Returns the short name of this door, e.g. gate, door, portal, etc..

Specified by:
doorName in interface Exit
Returns:
the short name of this door.
See Also:
Exit.setExitParams(String, String, String, String)

closedText

public java.lang.String closedText()
Description copied from interface: Exit
Returns a text description of what this exit looks like when closed.

Specified by:
closedText in interface Exit
Returns:
A description of this exit when closed.
See Also:
Exit.hasADoor(), Exit.defaultsClosed()

closeWord

public java.lang.String closeWord()
Description copied from interface: Exit
Returns the verb used for describing closing this exit, e.g. close, lower, drop, etc..

Specified by:
closeWord in interface Exit
Returns:
the short name of a verb used when closing this door.
See Also:
Exit.openWord(), Exit.hasADoor(), Exit.defaultsClosed(), Exit.setExitParams(String, String, String, String)

openWord

public java.lang.String openWord()
Description copied from interface: Exit
Returns the verb used for describing opening this exit, e.g. open, raise, lift, etc..

Specified by:
openWord in interface Exit
Returns:
the short name of a verb used when opening this door.
See Also:
Exit.closeWord(), Exit.hasADoor(), Exit.defaultsClosed(), Exit.setExitParams(String, String, String, String)

getTickStatus

public long getTickStatus()
Description copied from interface: Tickable
A coded status for this object during the period where its tick method is being called. The statis is defined, at least in part, by constants in this interface STATUS_*. STATUS_NOT should be returned when the objects tick method is not currently in execution. It should never return STATUS_NOT when the objects tick method is in execution.

Specified by:
getTickStatus in interface Tickable
Returns:
the numeric status of this object
See Also:
Tickable.tick(Tickable, int)

exitUsage

public short exitUsage(short change)
Description copied from interface: Exit
Both reads and optionally modifies an internal reference counter for this exit. Not currently functional.

Specified by:
exitUsage in interface Exit
Parameters:
change - 0 to make no change, or a positive or negative number
Returns:
the value of the usage counter after the change is applied

setName

public void setName(java.lang.String newName)
Description copied from interface: Environmental
Sets the raw unmodified name of this object as stored in the database. This is the name set by builders and used as a basis for the name() method.

Specified by:
setName in interface Environmental
Parameters:
newName - the raw base name of this object on the map.
See Also:
Environmental.Name()

name

public java.lang.String name()
Description copied from interface: Environmental
The displayable name of this object. May be modified by envStats() object. Is derived from the Name().

Specified by:
name in interface Environmental
Specified by:
name in interface Tickable
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

envStats

public EnvStats envStats()
Description copied from interface: Environmental
Object containing a set of current, modified, usable, mostly numeric fields. This object is based on the object from baseEnvStats() and then updated and modified by the recoverEnvStats() method. See the EnvStats interface for information on the fields herein.

Specified by:
envStats in interface Environmental
Returns:
the current set of state fields
See Also:
Environmental.baseEnvStats(), Environmental.recoverEnvStats(), EnvStats

baseEnvStats

public EnvStats baseEnvStats()
Description copied from interface: Environmental
Object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverEnvStats() method. See the EnvStats interface for information on the fields herein.

Specified by:
baseEnvStats in interface Environmental
Returns:
a set of state fields
See Also:
Environmental.envStats(), Environmental.recoverEnvStats(), EnvStats

recoverEnvStats

public void recoverEnvStats()
Description copied from interface: Environmental
This method copies the baseEnvStats() object into the envStats() object, then makes repeated calls to all surrounding objects with affectEnvStats(Environmental,EnvStats) method. Surrounding objects include the room where the object is located, the Ability objects in the Effects list, the Behaviors in the behaviors list, and race/charclass/area if applicable. Those methods will then make all necessary adjustments to the values in the new envStats() object. When it returns, envStats() will have a totally updated object. This method must be called in code whenever the object is placed on the map, or when anything changes in its environment, such as location, effects, or other states.

Specified by:
recoverEnvStats in interface Environmental
See Also:
Environmental.baseEnvStats(), Environmental.envStats(), Environmental.addEffect(Ability), Behavable.addBehavior(Behavior), EnvStats

setBaseEnvStats

public void setBaseEnvStats(EnvStats newBaseEnvStats)
Description copied from interface: Environmental
Re-sets the object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverEnvStats() method. See the EnvStats interface for information on the fields herein. This method is rarely called -- the fields therein are usually set using setter methods from the EnvStats interface on the object itself.

Specified by:
setBaseEnvStats in interface Environmental
Parameters:
newBaseEnvStats - a set of state fields
See Also:
Environmental.envStats(), Environmental.recoverEnvStats(), EnvStats

destroy

public void destroy()
Description copied from interface: Environmental
Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java. Containers, rooms. and mobs who have their destroy() method called will also call the destroy() methods on all items and other objects listed as content, recursively.

Specified by:
destroy in interface Environmental

amDestroyed

public boolean amDestroyed()
Description copied from interface: Environmental
Whether the destroy() method has been previousy called on this object.

Specified by:
amDestroyed in interface Environmental
Returns:
whether the object is destroy()ed.

savable

public boolean savable()
Description copied from interface: Environmental
Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container. It always returns true except under unique circumstances.

Specified by:
savable in interface Environmental
Returns:
true, usually.

image

public java.lang.String image()
Description copied from interface: Environmental
Returns the fully qualified and determined name of the image file displayed for this object when MXP is used. If rawImage() is non-empty, it will return rawImage, and otherwise use the mxp default data file.

Specified by:
image in interface Environmental
Returns:
the name of the mxp image to display for this object.

rawImage

public java.lang.String rawImage()
Description copied from interface: Environmental
Returns the raw name of the image file to display for this object when MXP is used. This is the value set by the builder, and may be returned by image() if it is non-empty.

Specified by:
rawImage in interface Environmental
Returns:
the raw name of the mxp image file

setImage

public void setImage(java.lang.String newImage)
Description copied from interface: Environmental
Sets the raw name of the image file to display for this object when MXP is used. This is the value set by the builder, and may be returned by image() if it is non-empty.

Specified by:
setImage in interface Environmental
Parameters:
newImage - the raw name of the mxp image file

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

isGeneric

public boolean isGeneric()
Description copied from interface: Environmental
Whether the fields of this item are set in code, or set by builders. Generic means that they are set by builders, in which case XML is returned by the text() method containing all of the values for all the fields.

Specified by:
isGeneric in interface Environmental
Returns:
whether this item is modifiable by builders
See Also:
Environmental.text()

cloneFix

protected void cloneFix(Exit E)

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

setMiscText

public void setMiscText(java.lang.String newMiscText)
Description copied from interface: Environmental
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. For objects which have true for their isGeneric method, this is used to set and parse the XML which will be used to fill out the fields in this object. Since Ability objects are never Generic, this will always be where parameters are read from an Ability instance.

Specified by:
setMiscText in interface Environmental
Parameters:
newMiscText - either an open internal text string, or XML

text

public java.lang.String text()
Description copied from interface: Environmental
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. For objects which have true for their isGeneric method, this is used to set and parse the XML which will be used to fill out the fields in this object. Since Ability objects are never Generic, this will always be where parameters are read from an Ability instance.

Specified by:
text in interface Environmental
Returns:
either an open internal text string, or XML

miscTextFormat

public java.lang.String miscTextFormat()
Description copied from interface: Environmental
Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data. Will use the CMParms.MTFORMAT_* constants for definition.

Specified by:
miscTextFormat in interface Environmental
Returns:
the format expected for the miscText field
See Also:
CMParms, Environmental.text(), Environmental.setMiscText(String)

expirationDate

public long expirationDate()
Description copied from interface: Environmental
If this object expires, it should have a timestamp saying when it expires, in real time. When it expires, a MSG_EXPIRE message will be sent to it.

Specified by:
expirationDate in interface Environmental
Returns:
the time stamp when this thing expires
See Also:
Environmental.setExpirationDate(long)

setExpirationDate

public void setExpirationDate(long time)
Description copied from interface: Environmental
If this object expires, it should have a timestamp saying when it expires, in real time. When it expires, a MSG_EXPIRE message will be sent to it.

Specified by:
setExpirationDate in interface Environmental
Parameters:
time - the time stamp when this thing expires
See Also:
Environmental.expirationDate()

setDisplayText

public void setDisplayText(java.lang.String newDisplayText)
Description copied from interface: Environmental
Sets the raw string used to show what this object looks like in the room. May be used as a basis for other methods, such as the title of rooms, and what an exit looks like when open. The value for Items may be null if the item is not displayed when the room is seen.

Specified by:
setDisplayText in interface Environmental
Parameters:
newDisplayText - the string describing how this object looks in the room

setDescription

public void setDescription(java.lang.String newDescription)
Description copied from interface: Environmental
Sets the basic description of this object, as shown when the item is directly LOOKed at.

Specified by:
setDescription in interface Environmental
Parameters:
newDescription - the basic detail description of this object

maxRange

public int maxRange()
Description copied from interface: Environmental
the maximum range of this object, if applicable. Can refer to the size of a room, the range of a weapon, or the calculated range of a mob in combat.

Specified by:
maxRange in interface Environmental
Returns:
the maximum range

minRange

public int minRange()
Description copied from interface: Environmental
the minimum range of this object, if applicable. Can refer to the size of a room, the range of a weapon, or the calculated range of a mob in combat. Usually 0.

Specified by:
minRange in interface Environmental
Returns:
the minimum range

findALadder

protected Rideable findALadder(MOB mob,
                               Room room)

mountLadder

protected void mountLadder(MOB mob,
                           Rideable ladder)

closeWordPastTense

protected final java.lang.String closeWordPastTense()

openWordPastTense

protected final java.lang.String openWordPastTense()

okMessage

public boolean okMessage(Environmental myHost,
                         CMMsg msg)
Description copied from interface: MsgListener
The general message event previewer for the object. Messages passed herein are in a pending state, and may be safely modified or rejected without fear that they might be in the middle of being executed. Messages passed herein may not necessarily be FOR or FROM this object, but will almost always represent events which want to happen in the same rom. This method should always always return true UNLESS this message needs to be canceled, in which case it is necessary to tell the mob initiating the event (CMMsg.source()) why it is being cancelled. Every game event goes through these methods.

Specified by:
okMessage in interface MsgListener
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that wants to be executed
Returns:
whether this message is allowed to execute
See Also:
CMMsg, CMMsg.source()

viewableText

public java.lang.StringBuffer viewableText(MOB mob,
                                           Room room)
Description copied from interface: Exit
Returns the modified and qualified player-viewed description of this exit.

Specified by:
viewableText in interface Exit
Parameters:
mob - the mob doing the viewing
room - the room from which the mob sees the exit
Returns:
the description of this exit from the given player pov

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

isOpen

public boolean isOpen()
Description copied from interface: Exit
Returns whether this exit is OPEN and may be travelled through

Specified by:
isOpen in interface Exit
Returns:
whether this exit is OPEN and may be travelled through

isLocked

public boolean isLocked()
Description copied from interface: Exit
Returns whether this exit is LOCKED, and must be unlocked before being used.

Specified by:
isLocked in interface Exit
Returns:
true if locked, false otherwise
See Also:
Exit.hasADoor(), Exit.hasALock()

setDoorsNLocks

public void setDoorsNLocks(boolean newHasADoor,
                           boolean newIsOpen,
                           boolean newDefaultsClosed,
                           boolean newHasALock,
                           boolean newIsLocked,
                           boolean newDefaultsLocked)
Description copied from interface: Exit
Modifies the various door/lock settings for this exit.

Specified by:
setDoorsNLocks in interface Exit
Parameters:
newHasADoor - whether this exit has a door
newIsOpen - whether this exit is open for travel
newDefaultsClosed - whether this exit defaults closed
newHasALock - whether this exit has a door lock
newIsLocked - whether this exit is presently locked
newDefaultsLocked - whether this exit defaults closed and locked.
See Also:
Exit.isOpen(), Exit.isLocked(), Exit.hasADoor(), Exit.hasALock(), Exit.defaultsClosed(), Exit.defaultsLocked()

readableText

public java.lang.String readableText()
Description copied from interface: