|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Faction.FactionChangeEvent
A Faction Change Event is an event that triggers an automatic change in a mob or players faction value. Triggers can be the use of abilities, or certain specific coded events (such as killing another mob).
Faction.ALL_CHANGE_EVENT_TYPES()
,
Faction.executeChange(MOB, MOB, com.planet_ink.coffee_mud.Common.interfaces.Faction.FactionChangeEvent)
Field Summary | |
---|---|
static int |
CHANGE_DIRECTION_ADD
a direction constant meaning this event adds the faction with a default value |
static int |
CHANGE_DIRECTION_AWAY
a direction constant meaning this event changes the factions value away from targets value |
static java.lang.String[] |
CHANGE_DIRECTION_DESCS
the code words for the various direction flags that describe the direction and amount of faction change |
static int |
CHANGE_DIRECTION_DOWN
a direction constant meaning this event changes the factions value downward |
static int |
CHANGE_DIRECTION_MAXIMUM
a direction constant meaning this event changes the factions value directly to highest value |
static int |
CHANGE_DIRECTION_MINIMUM
a direction constant meaning this event changes the factions value directly to lowest value |
static int |
CHANGE_DIRECTION_OPPOSITE
a direction constant meaning this event changes the factions value opposite of targets faction leanings |
static int |
CHANGE_DIRECTION_REMOVE
a direction constant meaning this event removes the faction altogether |
static int |
CHANGE_DIRECTION_TOWARD
a direction constant meaning this event changes the factions value towards the targets value |
static int |
CHANGE_DIRECTION_UP
a direction constant meaning this event changes the factions value upward |
static java.lang.String[] |
FLAG_DESCS
the code words for the various evaluation flags to decide if this event applies and other things |
static java.lang.String[] |
FLAG_KEYVALS
the code words for the various flags to set miscellaneous change event values, such as xp grants |
static java.lang.String[] |
MISC_TRIGGERS
some non-ability-related event trigger ids |
Method Summary | |
---|---|
boolean |
applies(MOB source,
MOB target)
Returns whether the given mob is a valid source and target of this event. |
MaskingLibrary.CompiledZMask |
compiledSourceZapper()
Returns the zapper mask that is used to see if the source of the event qualifies in order to trigger a faction change by this defined event. |
MaskingLibrary.CompiledZMask |
compiledTargetZapper()
Returns the zapper mask that is used to see if the target of the event qualifies in order to trigger a faction change by this defined event. |
int |
direction()
Returns a code for a description of how an event, if applicable, will affect this factions value. |
java.lang.String |
eventID()
Returns the event trigger id |
double |
factor()
Returns the factor to multiply the base faction change amount (100) by, to determine the amount of this faction changed by this event, in accordance with the given direction. |
java.lang.String |
flagCache()
Returns the list of flags that apply to this event. |
int |
getBonusRoleplayXP()
Returns any bonus roleplay xp granted by this change event in addition to faction changes. |
int |
getBonusXP()
Returns any bonus xp granted by this change event in addition to faction changes. |
Faction |
getFaction()
Return the parent faction for which this data stands. |
java.lang.String |
getFlagValue(java.lang.String key)
Returns one of the raw key=value pairs from the flag cache. |
java.lang.String |
getTriggerParm(java.lang.String parmName)
Returns the named trigger parameters defined |
int |
IDclassFilter()
A derivative of the event id, this will return a value of 0 or above if the event id was of a particular Ability ACODE_. |
int |
IDdomainFilter()
A derivative of the event id, this will return a value of 0 or above if the event id was of a particular Ability DOMAIN_. |
int |
IDflagFilter()
A derivative of the event id, this will return a value of 0 or above if the event id was of a particular Ability FLAG_. |
boolean |
just100()
A derivative of the flag cache, this method returns whether the flag was set that causes the determination of the amount of faction move to apply to NOT take the difference between the source and targets levels into account. |
boolean |
outsiderTargetOK()
A derivative of the flag cache, this method returns whether the flag was set that allows this event to trigger when the target of the event does not have any value with this faction |
boolean |
selfTargetOK()
A derivative of the flag cache, this method returns whether the flag was set that allows this event to trigger when the target and source of the event are the same. |
void |
setDirection(int newVal)
Sets a code for a description of how an event, if applicable, will affect this factions value. |
boolean |
setEventID(java.lang.String newID)
Sets the event trigger id |
void |
setFactor(double newVal)
Sets the factor to multiply the base faction change amount (100) by, to determine the amount of this faction changed by this event, in accordance with the given direction. |
void |
setFlags(java.lang.String newFlagCache)
Sets the list of flags that apply to this event. |
void |
setStateVariable(int x,
java.lang.Object newVal)
Sets an internal state variable stored for this change event. |
void |
setTargetZapper(java.lang.String newVal)
Sets the zapper mask that is used to see if the target of the event qualifies in order to trigger a faction change by this defined event. |
void |
setTriggerParameters(java.lang.String newVal)
Sets any trigger parameters defined that modify the way the trigger behaves. |
java.lang.Object |
stateVariable(int x)
Returns the internal state variable stored for this change event. |
java.lang.String |
targetZapper()
Returns the zapper mask that is used to see if the target of the event qualifies in order to trigger a faction change by this defined event. |
java.lang.String |
toString()
Returns a semicolon delimited list of all the settings in this change event |
java.lang.String |
triggerParameters()
Returns any trigger parameters defined that modify the way the trigger behaves. |
Field Detail |
---|
static final int CHANGE_DIRECTION_UP
static final int CHANGE_DIRECTION_DOWN
static final int CHANGE_DIRECTION_OPPOSITE
static final int CHANGE_DIRECTION_MINIMUM
static final int CHANGE_DIRECTION_MAXIMUM
static final int CHANGE_DIRECTION_REMOVE
static final int CHANGE_DIRECTION_ADD
static final int CHANGE_DIRECTION_AWAY
static final int CHANGE_DIRECTION_TOWARD
static final java.lang.String[] CHANGE_DIRECTION_DESCS
static final java.lang.String[] FLAG_DESCS
static final java.lang.String[] FLAG_KEYVALS
static final java.lang.String[] MISC_TRIGGERS
Method Detail |
---|
java.lang.String eventID()
Faction.ALL_CHANGE_EVENT_TYPES()
,
setEventID(String)
,
IDclassFilter()
,
IDdomainFilter()
,
IDflagFilter()
boolean setEventID(java.lang.String newID)
newID
- the new event trigger id
Faction.ALL_CHANGE_EVENT_TYPES()
,
eventID()
,
IDclassFilter()
,
IDdomainFilter()
,
IDflagFilter()
int IDclassFilter()
Ability.ACODE_DESCS
,
eventID()
,
IDdomainFilter()
,
IDflagFilter()
int IDflagFilter()
Ability.FLAG_DESCS
,
eventID()
,
IDclassFilter()
,
IDdomainFilter()
int IDdomainFilter()
Ability.DOMAIN_DESCS
,
eventID()
,
IDclassFilter()
,
IDflagFilter()
java.lang.String flagCache()
FLAG_DESCS
,
FLAG_KEYVALS
,
setFlags(String)
,
outsiderTargetOK()
,
selfTargetOK()
,
just100()
,
getBonusRoleplayXP()
,
getBonusXP()
,
getFlagValue(String)
void setFlags(java.lang.String newFlagCache)
newFlagCache
- the new list of applicable flagsFLAG_DESCS
,
FLAG_KEYVALS
,
flagCache()
,
outsiderTargetOK()
,
selfTargetOK()
,
just100()
,
getBonusRoleplayXP()
,
getBonusXP()
,
getFlagValue(String)
boolean outsiderTargetOK()
flagCache()
,
selfTargetOK()
,
just100()
,
getBonusRoleplayXP()
,
getBonusXP()
,
getFlagValue(String)
boolean selfTargetOK()
flagCache()
,
outsiderTargetOK()
,
just100()
,
getBonusRoleplayXP()
,
getBonusXP()
,
getFlagValue(String)
boolean just100()
flagCache()
,
outsiderTargetOK()
,
selfTargetOK()
,
getBonusRoleplayXP()
,
getBonusXP()
,
getFlagValue(String)
int getBonusXP()
flagCache()
,
outsiderTargetOK()
,
selfTargetOK()
,
just100()
,
getBonusRoleplayXP()
,
getFlagValue(String)
int getBonusRoleplayXP()
flagCache()
,
outsiderTargetOK()
,
selfTargetOK()
,
just100()
,
getBonusXP()
,
getFlagValue(String)
java.lang.String getFlagValue(java.lang.String key)
key
- the key to look up
int direction()
CHANGE_DIRECTION_DESCS
,
setDirection(int)
void setDirection(int newVal)
newVal
- a new FactionChangeEvent#CHANGE_DIRECTION_ constantCHANGE_DIRECTION_DESCS
,
direction()
double factor()
direction()
,
setFactor(double)
void setFactor(double newVal)
newVal
- the new faction change factor amountdirection()
,
factor()
java.lang.String targetZapper()
setTargetZapper(String)
,
MaskingLibrary
MaskingLibrary.CompiledZMask compiledTargetZapper()
setTargetZapper(String)
,
MaskingLibrary
MaskingLibrary.CompiledZMask compiledSourceZapper()
setTriggerParameters(String)
,
MaskingLibrary
void setTargetZapper(java.lang.String newVal)
newVal
- the new zapper mask stringtargetZapper()
,
MaskingLibrary
java.lang.String triggerParameters()
setTriggerParameters(String)
java.lang.String getTriggerParm(java.lang.String parmName)
parmName
- the name of the trigger parm to look for
setTriggerParameters(String)
void setTriggerParameters(java.lang.String newVal)
newVal
- the trigger parameterstriggerParameters()
java.lang.Object stateVariable(int x)
x
- which internal state variable to get
setStateVariable(int,Object)
void setStateVariable(int x, java.lang.Object newVal)
x
- which internal state variable to setnewVal
- the state variablestateVariable(int)
java.lang.String toString()
toString
in class java.lang.Object
Faction.createChangeEvent(String)
boolean applies(MOB source, MOB target)
source
- the source to evaluatetarget
- the target to evaluate
Faction getFaction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |