|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Behavior
A Behavior is a pro-active modifier of Environmental objects. Behaviors are expected to do their work in a Tickable.tick(Tickable,int) method which is called periodically by either the host object, or the serviceengine. Behaviors are also message listeners however, and can overlap Ability/properties in that way.
Environmental,
Tickable| Field Summary | |
|---|---|
static int |
CAN_AREAS
constant mask for the canImprove() and canImproveCode() methods. |
static int |
CAN_EXITS
constant mask for the canImprove() and canImproveCode() methods. |
static int |
CAN_ITEMS
constant mask for the canImprove() and canImproveCode() methods. |
static int |
CAN_MOBS
constant mask for the canImprove() and canImproveCode() methods. |
static int |
CAN_ROOMS
constant mask for the canImprove() and canImproveCode() methods. |
static long |
FLAG_LEGALBEHAVIOR
constant mask for the flags() method designating that this behavior makes the host inforce laws @see Behavior#flags() |
static long |
FLAG_MOBILITY
constant mask for the flags() method designating that this behavior makes the host move @see Behavior#flags() |
static long |
FLAG_POTENTIALLYAGGRESSIVE
constant mask for the flags() method designating that this behavior makes the host aggressive @see Behavior#flags() |
static long |
FLAG_TROUBLEMAKING
constant mask for the flags() method designating that this behavior makes the host a trouble-maker @see Behavior#flags() |
| Method Summary | |
|---|---|
boolean |
canImprove(int can_code)
Returns whether this behavior is capable of enhancing the given type of object designated by the can_code. |
boolean |
canImprove(PhysicalAgent E)
Returns whether this behavior is capable of enhancing the given type of object designated by E. |
java.util.List<java.lang.String> |
externalFiles()
Returns a string list of any external files which may be required to make this ability work. |
long |
flags()
Returns a bitmap made of up Behavior.FLAG_* constant masks which designates certain aspects about this behavior the rest of the system may need to know. |
java.lang.String |
getParms()
Returns the raw parameter string for this behavior. |
boolean |
grantsAggressivenessTo(MOB M)
Returns the result of a very specific test, namely whether this behavior would be the direct cause of a malicious act against the given MOB object. |
java.lang.String |
parmsFormat()
Unimplemented as of yet, but will hold a string telling the system what the proper format of any parms data. |
void |
registerDefaultQuest(java.lang.String questName)
Called after a behavior is added to an Environmental object. |
void |
setParms(java.lang.String parameters)
Sets the raw parameter string for this behavior. |
void |
setSavable(boolean truefalse)
Sets whether this behavior can be saved as a permanent aspect of its host. |
void |
startBehavior(PhysicalAgent forMe)
Called after a behavior is added to a Behavable object. |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
|---|
getTickStatus, name, tick |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener |
|---|
executeMsg, okMessage |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent |
|---|
amDestroyed, destroy, isSavable |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable |
|---|
getSaveStatIndex, getStat, getStatCodes, isStat, setStat |
| Field Detail |
|---|
static final int CAN_MOBS
static final int CAN_ITEMS
static final int CAN_AREAS
static final int CAN_ROOMS
static final int CAN_EXITS
static final long FLAG_MOBILITY
static final long FLAG_TROUBLEMAKING
static final long FLAG_POTENTIALLYAGGRESSIVE
static final long FLAG_LEGALBEHAVIOR
| Method Detail |
|---|
void startBehavior(PhysicalAgent forMe)
forMe - the object to which this behavior has been addedBehavable.addBehavior(Behavior),
setParms(String)void registerDefaultQuest(java.lang.String questName)
questName - the Quest nameQuestjava.lang.String getParms()
setParms(String)void setParms(java.lang.String parameters)
parameters - the parameter string for this behaviorgetParms()java.lang.String parmsFormat()
CMParms,
getParms(),
setParms(String)java.util.List<java.lang.String> externalFiles()
setParms(String)void setSavable(boolean truefalse)
setSavable in interface Contingenttruefalse - whether this behavior can be saved as part of its host.Contingent.isSavable()boolean canImprove(PhysicalAgent E)
E - the object to evaluate for this behavior
StdBehavior.canImproveCode()boolean canImprove(int can_code)
can_code - the Behavior.CAN_* mask to evaluate for this behavior
StdBehavior.canImproveCode(),
Behaviorlong flags()
boolean grantsAggressivenessTo(MOB M)
M - the target to test for maliciousness to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||