com.planet_ink.coffee_mud.Common
Class DefaultMessage

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultMessage
All Implemented Interfaces:
CMCommon, CMMsg, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultMessage
extends java.lang.Object
implements CMMsg


Field Summary
protected static java.util.Hashtable MSGTYPE_DESCS
           
protected  MOB myAgent
           
protected  Environmental myTarget
           
protected  Environmental myTool
           
protected  int othersCode
           
protected  java.lang.String othersMsg
           
protected  int sourceCode
           
protected  java.lang.String sourceMsg
           
protected  int targetCode
           
protected  java.lang.String targetMsg
           
protected  java.util.Vector trailMsgs
           
protected  int value
           
 
Fields inherited from interface com.planet_ink.coffee_mud.Common.interfaces.CMMsg
MAJOR_MASK, MASK_ALWAYS, MASK_CHANNEL, MASK_DELICATE, MASK_DESCS, MASK_EYES, MASK_HANDS, MASK_MAGIC, MASK_MALICIOUS, MASK_MOUTH, MASK_MOVE, MASK_OPTIMIZE, MASK_SOUND, MINOR_MASK, MISC_DESCS, MSG_ACTIVATE, MSG_ADVANCE, MSG_AREAAFFECT, MSG_BID, MSG_BORROW, MSG_BRINGTOLIFE, MSG_BUY, MSG_CAST, MSG_CAST_ATTACK_SOMANTIC_SPELL, MSG_CAST_ATTACK_VERBAL_SPELL, MSG_CAST_MALICIOUS, MSG_CAST_SOMANTIC_SPELL, MSG_CAST_VERBAL_SPELL, MSG_CLOSE, MSG_DAMAGE, MSG_DEACTIVATE, MSG_DEATH, MSG_DELICATE_HANDS_ACT, MSG_DELICATE_SMALL_HANDS_ACT, MSG_DEPOSIT, MSG_DISMOUNT, MSG_DRINK, MSG_DROP, MSG_EAT, MSG_EAT_GROUND, MSG_EMOTE, MSG_ENTER, MSG_EXAMINE, MSG_EXPIRE, MSG_EXTINGUISH, MSG_FILL, MSG_FLEE, MSG_FOLLOW, MSG_GET, MSG_GIVE, MSG_HANDS, MSG_HEALING, MSG_HOLD, MSG_HUH, MSG_KNOCK, MSG_LEAVE, MSG_LEVEL, MSG_LIST, MSG_LOCK, MSG_LOGIN, MSG_LOOK, MSG_MOUNT, MSG_NOFOLLOW, MSG_NOISE, MSG_NOISYMOVEMENT, MSG_OK_ACTION, MSG_OK_VISUAL, MSG_OPEN, MSG_ORDER, MSG_PANIC, MSG_PRACTICE, MSG_PULL, MSG_PUSH, MSG_PUT, MSG_QUIETMOVEMENT, MSG_QUIT, MSG_READ, MSG_REBUKE, MSG_RECALL, MSG_RELOAD, MSG_REMOVE, MSG_RETIRE, MSG_RETREAT, MSG_ROOMRESET, MSG_SELL, MSG_SERVE, MSG_SHUTDOWN, MSG_SIT, MSG_SITMOVE, MSG_SLEEP, MSG_SNIFF, MSG_SPEAK, MSG_STAND, MSG_TEACH, MSG_TELL, MSG_THIEF_ACT, MSG_THROW, MSG_UNLOCK, MSG_VALUE, MSG_VIEW, MSG_WEAPONATTACK, MSG_WEAR, MSG_WIELD, MSG_WITHDRAW, MSG_WRITE, MSK_CAST, MSK_CAST_MALICIOUS, MSK_CAST_MALICIOUS_SOMANTIC, MSK_CAST_MALICIOUS_VERBAL, MSK_CAST_SOMANTIC, MSK_CAST_VERBAL, MSK_HAGGLE, MSK_MALICIOUS_MOVE, NO_EFFECT, TYP_ACID, TYP_ACTIVATE, TYP_ADVANCE, TYP_AREAAFFECT, TYP_BID, TYP_BORROW, TYP_BUY, TYP_CAST_SPELL, TYP_CHANNEL, TYP_CLOSE, TYP_COLD, TYP_DAMAGE, TYP_DEACTIVATE, TYP_DEATH, TYP_DELICATE_HANDS_ACT, TYP_DEPOSIT, TYP_DISEASE, TYP_DISMOUNT, TYP_DRINK, TYP_DROP, TYP_EAT, TYP_ELECTRIC, TYP_EMOTE, TYP_ENTER, TYP_EXAMINE, TYP_EXPCHANGE, TYP_EXPIRE, TYP_EXTINGUISH, TYP_FACTIONCHANGE, TYP_FILL, TYP_FIRE, TYP_FLEE, TYP_FOLLOW, TYP_GAS, TYP_GENERAL, TYP_GET, TYP_GIVE, TYP_HANDS, TYP_HEALING, TYP_HOLD, TYP_HUH, TYP_JUSTICE, TYP_KNOCK, TYP_LEAVE, TYP_LEVEL, TYP_LIFE, TYP_LIST, TYP_LOCK, TYP_LOGIN, TYP_LOOK, TYP_MIND, TYP_MOUNT, TYP_NOFOLLOW, TYP_NOISE, TYP_NOISYMOVEMENT, TYP_OK_ACTION, TYP_OK_VISUAL, TYP_OPEN, TYP_ORDER, TYP_PANIC, TYP_PARALYZE, TYP_POISON, TYP_PRACTICE, TYP_PULL, TYP_PUSH, TYP_PUT, TYP_QUIETMOVEMENT, TYP_QUIT, TYP_READ, TYP_REBUKE, TYP_RECALL, TYP_RELOAD, TYP_REMOVE, TYP_RETIRE, TYP_RETREAT, TYP_ROOMRESET, TYP_SELL, TYP_SERVE, TYP_SHUTDOWN, TYP_SIT, TYP_SITMOVE, TYP_SLEEP, TYP_SNIFF, TYP_SPEAK, TYP_STAND, TYP_TEACH, TYP_TELL, TYP_THROW, TYP_UNDEAD, TYP_UNLOCK, TYP_VALUE, TYP_VIEW, TYP_WAND_USE, TYP_WATER, TYP_WEAPONATTACK, TYP_WEAR, TYP_WIELD, TYP_WITHDRAW, TYP_WRITE, TYPE_DESCS
 
Constructor Summary
DefaultMessage()
           
 
Method Summary
 void addTrailerMsg(CMMsg msg)
          Appends to the Vector of other CMMsg events which are slated to be confirmed and executed AFTER this current message is handled.
 boolean amISource(MOB thisOne)
          Returns whether the given Environmental object is, in fact, the source of this message.
 boolean amITarget(Environmental thisOne)
          Returns whether the given Environmental object is, in fact, the target of this message.
 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.
 void finalize()
           
protected static java.util.Hashtable getMSGTYPE_DESCS()
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean isOthers(Environmental E)
          Returns whether the given Environmental object is neither the source nor the target of this message.
 boolean isOthers(int codeOrMask)
          Returns whether the given code or mask is either the minor code or a part of the major code of the othersCode
 boolean isOthers(java.lang.String codeOrMaskDesc)
          Returns whether the given code or mask string matches the minor code or a part of the major code of the othersCode.
 boolean isSource(Environmental E)
          Returns whether the given Environmental object is, in fact, the source of this message.
 boolean isSource(int codeOrMask)
          Returns whether the given code or mask is either the minor code or a part of the major code of the sourceCode
 boolean isSource(java.lang.String codeOrMaskDesc)
          Returns whether the given code or mask string matches the minor code or a part of the major code of the sourceCode.
 boolean isTarget(Environmental E)
          Returns whether the given Environmental object is, in fact, the target of this message.
 boolean isTarget(int codeOrMask)
          Returns whether the given code or mask is either the minor code or a part of the major code of the targetCode
 boolean isTarget(java.lang.String codeOrMaskDesc)
          Returns whether the given code or mask string matches the minor code or a part of the major code of the targetCode.
protected static boolean matches(int code1, int code2)
           
protected static boolean matches(int code1, java.lang.String code2)
           
 void modify(MOB source, Environmental target, Environmental tool, int newSourceCode, int newTargetCode, int newOthersCode, java.lang.String allMessage)
          Modifies one of more fields in this event.
 void modify(MOB source, Environmental target, Environmental tool, int newAllCode, java.lang.String allMessage)
          Modifies one of more fields in this event.
 void modify(MOB source, Environmental target, Environmental tool, int newSourceCode, java.lang.String sourceMessage, int newTargetCode, java.lang.String targetMessage, int newOthersCode, java.lang.String othersMessage)
          Modifies one of more fields in this event.
 void modify(MOB source, Environmental target, Environmental tool, int newAllCode, java.lang.String sourceMessage, java.lang.String targetMessage, java.lang.String othersMessage)
          Modifies one of more fields in this event.
 void modify(MOB source, Environmental target, int newAllCode, java.lang.String allMessage)
          Modifies one of more fields in this event.
 void modify(MOB source, int newAllCode, java.lang.String allMessage)
          Modifies one of more fields in this event.
 void modify(MOB source, int newAllCode, java.lang.String allMessage, int newValue)
          Modifies one of more fields in this event.
 CMObject newInstance()
          Returns a new instance of this class.
 int othersCode()
          A combination bitmask, action type integer that describes information about how this event affects or is perceived by the others of the action.
 int othersMajor()
          Returns high order bitmask for the others code (Others are everyone not source, not target)
 java.lang.String othersMessage()
          Returns the string seen by the others of the event, and only by the others of the event.
 int othersMinor()
          Returns low order action type integer for the others code (Others are everyone not source, not target)
 void setOthersCode(int code)
          A combination bitmask, action type integer that describes information about how this event affects or is perceived by the others of the action.
 void setOthersMessage(java.lang.String str)
          Sets the string seen by the others of the event, and only by the others of the event.
 void setSource(MOB mob)
          Sets the source of this event, a MOB object
 void setSourceCode(int code)
          A combination bitmask, action type integer that describes information about how this event affects or is perceived by the source of the action.
 void setSourceMessage(java.lang.String str)
          Sets the string seen by the source of the event, and only by the source of the event.
 void setTarget(Environmental E)
          Sets the target of this event, an Environmental object
 void setTargetCode(int code)
          A combination bitmask, action type integer that describes information about how this event affects or is perceived by the target of the action.
 void setTargetMessage(java.lang.String str)
          Sets the string seen by the target of the event, and only by the target of the event.
 void setTool(Environmental E)
          Sets the means, item, portal, or otherwise tool that helps the source affect the event upon the target.
 void setValue(int amount)
          Sets an arbitrary integer value associated with this event.
 MOB source()
          Returns the source of this event, a MOB object
 int sourceCode()
          A combination bitmask, action type integer that describes information about how this event affects or is perceived by the source of the action.
 int sourceMajor()
          Returns high order bitmask for the source code
 java.lang.String sourceMessage()
          Returns the string seen by the source of the event, and only by the source of the event.
 int sourceMinor()
          Returns low order action type integer for the target code
 Environmental target()
          Returns the target of this event, an Environmental object
 int targetCode()
          A combination bitmask, action type integer that describes information about how this event affects or is perceived by the target of the action.
 int targetMajor()
          Returns high order bitmask for the target code
 java.lang.String targetMessage()
          Returns the string seen by the target of the event, and only by the target of the event.
 int targetMinor()
          Returns low order action type integer for the target code
 Environmental tool()
          Returns the means, item, portal, or otherwise tool that helps the source affect the event upon the target.
 java.util.Vector trailerMsgs()
          Returns a Vector of other CMMsg events which are slated to be confirmed and executed AFTER this current message is handled.
 int value()
          Returns the arbitrary value integer associated with this event.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSGTYPE_DESCS

protected static final java.util.Hashtable MSGTYPE_DESCS

targetCode

protected int targetCode

sourceCode

protected int sourceCode

othersCode

protected int othersCode

targetMsg

protected java.lang.String targetMsg

othersMsg

protected java.lang.String othersMsg

sourceMsg

protected java.lang.String sourceMsg

myAgent

protected MOB myAgent

myTarget

protected Environmental myTarget

myTool

protected Environmental myTool

value

protected int value

trailMsgs

protected java.util.Vector trailMsgs
Constructor Detail

DefaultMessage

public DefaultMessage()
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

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

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

compareTo

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

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

finalize

public void finalize()
              throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

modify

public void modify(MOB source,
                   Environmental target,
                   int newAllCode,
                   java.lang.String allMessage)
Description copied from interface: CMMsg
Modifies one of more fields in this event.

Specified by:
modify in interface CMMsg
Parameters:
source - the source of the event
target - the target of the event
newAllCode - the source, target, and others code
allMessage - the source, target, and others message
See Also:
CMMsg.source(), CMMsg.target(), CMMsg.sourceCode(), CMMsg.targetCode(), CMMsg.othersCode(), CMMsg.sourceMessage(), CMMsg.targetMessage(), CMMsg.othersMessage()

modify

public void modify(MOB source,
                   int newAllCode,
                   java.lang.String allMessage)
Description copied from interface: CMMsg
Modifies one of more fields in this event. Sets target and tool to NULL.

Specified by:
modify in interface CMMsg
Parameters:
source - the new source of this event
newAllCode - the new source, target, and others code of this event
allMessage - the new source, target, and others message of this event
See Also:
CMMsg.source(), CMMsg.target(), CMMsg.sourceCode(), CMMsg.targetCode(), CMMsg.othersCode(), CMMsg.sourceMessage(), CMMsg.targetMessage(), CMMsg.othersMessage()

modify

public void modify(MOB source,
                   int newAllCode,
                   java.lang.String allMessage,
                   int newValue)
Description copied from interface: CMMsg
Modifies one of more fields in this event. Sets target and tool to NULL.

Specified by:
modify in interface CMMsg
Parameters:
source - the new source of this event
newAllCode - the new source, target, and others code of this event
allMessage - the new source, target, and others message of this event
newValue - the new value for this event
See Also:
CMMsg.source(), CMMsg.target(), CMMsg.sourceCode(), CMMsg.targetCode(), CMMsg.othersCode(), CMMsg.sourceMessage(), CMMsg.targetMessage(), CMMsg.othersMessage(), CMMsg.value()

modify

public void modify(MOB source,
                   Environmental target,
                   Environmental tool,
                   int newAllCode,
                   java.lang.String allMessage)
Description copied from interface: CMMsg
Modifies one of more fields in this event.

Specified by:
modify in interface CMMsg
Parameters:
source - the new source of this event
target - the new target of this event
tool - the new tool for this event
newAllCode - the new source, target, and others code of this event
allMessage - the new source, target, and others message of this event
See Also:
CMMsg.source(), CMMsg.target(), CMMsg.sourceCode(), CMMsg.targetCode(), CMMsg.othersCode(), CMMsg.sourceMessage(), CMMsg.targetMessage(), CMMsg.othersMessage()

modify

public void modify(MOB source,
                   Environmental target,
                   Environmental tool,
                   int newAllCode,
                   java.lang.String sourceMessage,
                   java.lang.String targetMessage,
                   java.lang.String othersMessage)
Description copied from interface: CMMsg
Modifies one of more fields in this event.

Specified by:
modify in interface CMMsg
Parameters:
source - the new source of this event
target - the new target of this event
tool - the new tool for this event
newAllCode - the new source, target, and others code of this event
sourceMessage - the new source message for this event
targetMessage - the new target message for this event
othersMessage - the new others message for this event
See Also:
CMMsg.source(), CMMsg.target(), CMMsg.sourceCode(), CMMsg.targetCode(), CMMsg.othersCode(), CMMsg.sourceMessage(), CMMsg.targetMessage(), CMMsg.othersMessage()

getMSGTYPE_DESCS

protected static java.util.Hashtable getMSGTYPE_DESCS()

setSourceCode

public void setSourceCode(int code)
Description copied from interface: CMMsg
A combination bitmask, action type integer that describes information about how this event affects or is perceived by the source of the action.

Specified by:
setSourceCode in interface CMMsg
Parameters:
code - the new full bitmask/action type source event code
See Also:
CMMsg.source(), CMMsg.sourceMessage(), CMMsg.sourceCode(), CMMsg.sourceMajor(), CMMsg.sourceMinor(), CMMsg.MASK_MAGIC, CMMsg.TYP_CAST_SPELL

setTargetCode

public void setTargetCode(int code)
Description copied from interface: CMMsg
A combination bitmask, action type integer that describes information about how this event affects or is perceived by the target of the action.

Specified by:
setTargetCode in interface CMMsg
Parameters:
code - the new full bitmask/action type target event code
See Also:
CMMsg.target(), CMMsg.targetMessage(), CMMsg.targetCode(), CMMsg.targetMajor(), CMMsg.targetMinor(), CMMsg.MASK_MAGIC, CMMsg.TYP_CAST_SPELL

setOthersCode

public void setOthersCode(int code)
Description copied from interface: CMMsg
A combination bitmask, action type integer that describes information about how this event affects or is perceived by the others of the action. (Others are everyone not source, not target)

Specified by:
setOthersCode in interface CMMsg
Parameters:
code - the new full bitmask/action type others event code
See Also:
CMMsg.othersMessage(), CMMsg.othersCode(), CMMsg.othersMajor(), CMMsg.othersMinor(), CMMsg.MASK_MAGIC, CMMsg.TYP_CAST_SPELL

setSourceMessage

public void setSourceMessage(java.lang.String str)
Description copied from interface: CMMsg
Sets the string seen by the source of the event, and only by the source of the event.

Specified by:
setSourceMessage in interface CMMsg
Parameters:
str - the string to show to the source, or NULL
See Also:
CMMsg.source(), CMMsg.sourceMessage(), CMMsg.sourceCode()

setTargetMessage

public void setTargetMessage(java.lang.String str)
Description copied from interface: CMMsg
Sets the string seen by the target of the event, and only by the target of the event.

Specified by:
setTargetMessage in interface CMMsg
Parameters:
str - the string to show to the target, or NULL
See Also:
CMMsg.target(), CMMsg.targetMessage(), CMMsg.targetCode()

setOthersMessage

public void setOthersMessage(java.lang.String str)
Description copied from interface: CMMsg
Sets the string seen by the others of the event, and only by the others of the event. (Others are everyone not source, not target)

Specified by:
setOthersMessage in interface CMMsg
Parameters:
str - the string to show to the others, or NULL
See Also:
CMMsg.othersMessage(), CMMsg.othersCode()

value

public int value()
Description copied from interface: CMMsg
Returns the arbitrary value integer associated with this event. Values tend to be defined in a event-action code specific way, so that it will mean nothing most of the time, and something different for each type of message. For custom messages therefore, it can be used for whatever one pleases, whereas for established codebase message types, you should understand its meaning before doing anything with it.

Specified by:
value in interface CMMsg
Returns:
the integer value of this event

setValue

public void setValue(int amount)
Description copied from interface: CMMsg
Sets an arbitrary integer value associated with this event. Values tend to be defined in a event-action code specific way, so that it will mean nothing most of the time, and something different for each type of message. For custom messages therefore, it can be used for whatever one pleases, whereas for established codebase message types, you should understand its meaning before doing anything with it.

Specified by:
setValue in interface CMMsg
Parameters:
amount - the integer value of this event

trailerMsgs

public java.util.Vector trailerMsgs()
Description copied from interface: CMMsg
Returns a Vector of other CMMsg events which are slated to be confirmed and executed AFTER this current message is handled. This is implemented by the Room object

Specified by:
trailerMsgs in interface CMMsg
Returns:
a Vector of CMMsg objects
See Also:
Room.send(MOB, CMMsg)

addTrailerMsg

public void addTrailerMsg(CMMsg msg)
Description copied from interface: CMMsg
Appends to the Vector of other CMMsg events which are slated to be confirmed and executed AFTER this current message is handled. This is implemented by the Room object

Specified by:
addTrailerMsg in interface CMMsg
Parameters:
msg - the CMMsg to append to this message.
See Also:
Room.send(MOB, CMMsg)

modify

public void modify(MOB source,
                   Environmental target,
                   Environmental tool,
                   int newSourceCode,
                   java.lang.String sourceMessage,
                   int newTargetCode,
                   java.lang.String targetMessage,
                   int newOthersCode,
                   java.lang.String othersMessage)
Description copied from interface: CMMsg
Modifies one of more fields in this event.

Specified by:
modify in interface CMMsg
Parameters:
source - the new source of this event
target - the new target of this event
tool - the new tool for this event
newSourceCode - the new source code for this event
sourceMessage - the new source message for this event
newTargetCode - the new target code for this event
targetMessage - the new target message for this event
newOthersCode - the new others code for this event
othersMessage - the new others message for this event
See Also:
CMMsg.source(), CMMsg.target(), CMMsg.sourceCode(), CMMsg.targetCode(), CMMsg.othersCode(), CMMsg.sourceMessage(), CMMsg.targetMessage(), CMMsg.othersMessage()

modify

public void modify(MOB source,
                   Environmental target,
                   Environmental tool,
                   int newSourceCode,
                   int newTargetCode,
                   int newOthersCode,
                   java.lang.String allMessage)
Description copied from interface: CMMsg
Modifies one of more fields in this event.

Specified by:
modify in interface CMMsg
Parameters:
source - the new source of this event
target - the new target of this event
tool - the new tool for this event
newSourceCode - the new source code for this event
newTargetCode - the new target code for this event
newOthersCode - the new others code for this event
allMessage - the new source, target, and others message of this event
See Also:
CMMsg.source(), CMMsg.target(), CMMsg.sourceCode(), CMMsg.targetCode(), CMMsg.othersCode(), CMMsg.sourceMessage(), CMMsg.targetMessage(), CMMsg.othersMessage()

source

public MOB source()
Description copied from interface: CMMsg
Returns the source of this event, a MOB object

Specified by:
source in interface CMMsg
Returns:
the source of this event
See Also:
CMMsg.setSource(MOB), MOB

setSource

public void setSource(MOB mob)
Description copied from interface: CMMsg
Sets the source of this event, a MOB object

Specified by:
setSource in interface CMMsg
Parameters:
mob - the new source of this event
See Also:
CMMsg.source(), MOB

target

public Environmental target()
Description copied from interface: CMMsg
Returns the target of this event, an Environmental object

Specified by:
target in interface CMMsg
Returns:
the target of this event
See Also:
CMMsg.setTarget(Environmental), Environmental

setTarget

public void setTarget(Environmental E)
Description copied from interface: CMMsg
Sets the target of this event, an Environmental object

Specified by:
setTarget in interface CMMsg
Parameters:
E - the new target of this event
See Also:
CMMsg.target(), Environmental

tool

public Environmental tool()
Description copied from interface: CMMsg
Returns the means, item, portal, or otherwise tool that helps the source affect the event upon the target.

Specified by:
tool in interface CMMsg
Returns:
the tool of this event
See Also:
Environmental, CMMsg.setTool(Environmental)

setTool

public void setTool(Environmental E)
Description copied from interface: CMMsg
Sets the means, item, portal, or otherwise tool that helps the source affect the event upon the target.

Specified by:
setTool in interface CMMsg
Parameters:
E - the new tool of this event
See Also:
Environmental, CMMsg.tool()

targetMajor

public int targetMajor()
Description copied from interface: CMMsg
Returns high order bitmask for the target code

Specified by:
targetMajor in interface CMMsg
Returns:
high order bitmask for the target code
See Also:
CMMsg.targetCode(), CMMsg.targetMinor(), CMMsg.MASK_MAGIC

targetMinor

public int targetMinor()
Description copied from interface: CMMsg
Returns low order action type integer for the target code

Specified by:
targetMinor in interface CMMsg
Returns:
low order action type integer for the target code
See Also:
CMMsg.targetCode(), CMMsg.targetMajor(), CMMsg.TYP_CAST_SPELL

targetCode

public int targetCode()
Description copied from interface: CMMsg
A combination bitmask, action type integer that describes information about how this event affects or is perceived by the target of the action.

Specified by:
targetCode in interface CMMsg
Returns:
the combination bitmask/action type integer for target of event
See Also:
CMMsg.target(), CMMsg.targetMessage(), CMMsg.targetMajor(), CMMsg.targetMinor(), CMMsg.MASK_MAGIC, CMMsg.TYP_CAST_SPELL, CMMsg.setTargetCode(int)

targetMessage

public java.lang.String targetMessage()
Description copied from interface: CMMsg
Returns the string seen by the target of the event, and only by the target of the event.

Specified by:
targetMessage in interface CMMsg
Returns:
a string to show to the target
See Also:
CMMsg.target(), CMMsg.setTargetMessage(String), CMMsg.targetCode()

sourceCode

public int sourceCode()
Description copied from interface: CMMsg
A combination bitmask, action type integer that describes information about how this event affects or is perceived by the source of the action.

Specified by:
sourceCode in interface CMMsg
Returns:
the combination bitmask/action type integer for source of event
See Also:
CMMsg.source(), CMMsg.sourceMessage(), CMMsg.sourceMajor(), CMMsg.sourceMinor(), CMMsg.MASK_MAGIC, CMMsg.TYP_CAST_SPELL, CMMsg.setSourceCode(int)

sourceMajor

public int sourceMajor()
Description copied from interface: CMMsg
Returns high order bitmask for the source code

Specified by:
sourceMajor in interface CMMsg
Returns:
high order bitmask for the source code
See Also:
CMMsg.sourceCode(), CMMsg.sourceMinor(), CMMsg.MASK_MAGIC

sourceMinor

public int sourceMinor()
Description copied from interface: CMMsg
Returns low order action type integer for the target code

Specified by:
sourceMinor in interface CMMsg
Returns:
low order action type integer for the target code
See Also:
CMMsg.targetCode(), CMMsg.targetMajor(), CMMsg.TYP_CAST_SPELL

sourceMessage

public java.lang.String sourceMessage()
Description copied from interface: CMMsg
Returns the string seen by the source of the event, and only by the source of the event.

Specified by:
sourceMessage in interface CMMsg
Returns:
a string to show to the source
See Also:
CMMsg.source(),