DefaultFaction.DefaultFactionChangeEvent
public static interface Faction.FactionChangeEvent
Modifier and Type | Interface | Description |
---|---|---|
static class |
Faction.FactionChangeEvent.MiscTrigger |
some non-ability-related event trigger ids
|
Modifier and Type | Field | Description |
---|---|---|
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
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
int |
getPctChance() |
Returns the pct chance 0-100 that this event will trigger
|
java.lang.String |
getTriggerParm(java.lang.String parmName) |
Returns the named trigger parameters defined
|
long |
getWaitBetweenMs() |
Returns the amount of time that must pass between uses of this event
by a particular player.
|
int |
getWithinTicks() |
Returns the num ticks after the reset of this event that the event
will be valid for.
|
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_.
|
long |
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.
|
Faction.FactionChangeEvent.MiscTrigger |
miscEvent() |
Returns the event trigger code, for non-ability related static-type triggers
|
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.
|
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
java.lang.String eventID()
Faction.ALL_CHANGE_EVENT_TYPES()
,
miscEvent()
,
setEventID(String)
,
IDclassFilter()
,
IDdomainFilter()
,
IDflagFilter()
Faction.FactionChangeEvent.MiscTrigger miscEvent()
Faction.ALL_CHANGE_EVENT_TYPES()
,
eventID()
,
setEventID(String)
,
IDclassFilter()
,
IDdomainFilter()
,
IDflagFilter()
boolean setEventID(java.lang.String newID)
newID
- the new event trigger idFaction.ALL_CHANGE_EVENT_TYPES()
,
eventID()
,
miscEvent()
,
IDclassFilter()
,
IDdomainFilter()
,
IDflagFilter()
int getWithinTicks()
long getWaitBetweenMs()
int getPctChance()
int IDclassFilter()
Ability.ACODE_DESCS
,
miscEvent()
,
eventID()
,
IDdomainFilter()
,
IDflagFilter()
long IDflagFilter()
Ability.FLAG_DESCS
,
eventID()
,
miscEvent()
,
IDclassFilter()
,
IDdomainFilter()
int IDdomainFilter()
Ability.DOMAIN_DESCS
,
eventID()
,
miscEvent()
,
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 upint 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 forsetTriggerParameters(String)
void setTriggerParameters(java.lang.String newVal)
newVal
- the trigger parameterstriggerParameters()
java.lang.Object stateVariable(int x)
x
- which internal state variable to getsetStateVariable(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, String)
boolean applies(MOB source, MOB target)
source
- the source to evaluatetarget
- the target to evaluateFaction getFaction()