Faction.FactionChangeEventpublic class DefaultFaction.DefaultFactionChangeEvent extends java.lang.Object implements Faction.FactionChangeEvent
Faction.FactionChangeEvent.MiscTriggerCHANGE_DIRECTION_ADD, CHANGE_DIRECTION_AWAY, CHANGE_DIRECTION_DESCS, CHANGE_DIRECTION_DOWN, CHANGE_DIRECTION_MAXIMUM, CHANGE_DIRECTION_MINIMUM, CHANGE_DIRECTION_OPPOSITE, CHANGE_DIRECTION_REMOVE, CHANGE_DIRECTION_TOWARD, CHANGE_DIRECTION_UP, FLAG_DESCS, FLAG_KEYVALS| Constructor | Description |
|---|---|
DefaultFactionChangeEvent(Faction F) |
|
DefaultFactionChangeEvent(Faction F,
java.lang.String eventKey,
java.lang.String eventData) |
| 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 |
setDirection(java.lang.String d) |
|
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.
|
public DefaultFactionChangeEvent(Faction F)
public DefaultFactionChangeEvent(Faction F, java.lang.String eventKey, java.lang.String eventData)
public java.lang.String eventID()
Faction.FactionChangeEventeventID in interface Faction.FactionChangeEventFaction.ALL_CHANGE_EVENT_TYPES(),
Faction.FactionChangeEvent.miscEvent(),
Faction.FactionChangeEvent.setEventID(String),
Faction.FactionChangeEvent.IDclassFilter(),
Faction.FactionChangeEvent.IDdomainFilter(),
Faction.FactionChangeEvent.IDflagFilter()public Faction.FactionChangeEvent.MiscTrigger miscEvent()
Faction.FactionChangeEventmiscEvent in interface Faction.FactionChangeEventFaction.ALL_CHANGE_EVENT_TYPES(),
Faction.FactionChangeEvent.eventID(),
Faction.FactionChangeEvent.setEventID(String),
Faction.FactionChangeEvent.IDclassFilter(),
Faction.FactionChangeEvent.IDdomainFilter(),
Faction.FactionChangeEvent.IDflagFilter()public java.lang.String flagCache()
Faction.FactionChangeEventflagCache in interface Faction.FactionChangeEventFaction.FactionChangeEvent.FLAG_DESCS,
Faction.FactionChangeEvent.FLAG_KEYVALS,
Faction.FactionChangeEvent.setFlags(String),
Faction.FactionChangeEvent.outsiderTargetOK(),
Faction.FactionChangeEvent.selfTargetOK(),
Faction.FactionChangeEvent.just100(),
Faction.FactionChangeEvent.getBonusRoleplayXP(),
Faction.FactionChangeEvent.getBonusXP(),
Faction.FactionChangeEvent.getFlagValue(String)public int IDclassFilter()
Faction.FactionChangeEventIDclassFilter in interface Faction.FactionChangeEventAbility.ACODE_DESCS,
Faction.FactionChangeEvent.miscEvent(),
Faction.FactionChangeEvent.eventID(),
Faction.FactionChangeEvent.IDdomainFilter(),
Faction.FactionChangeEvent.IDflagFilter()public long IDflagFilter()
Faction.FactionChangeEventIDflagFilter in interface Faction.FactionChangeEventAbility.FLAG_DESCS,
Faction.FactionChangeEvent.eventID(),
Faction.FactionChangeEvent.miscEvent(),
Faction.FactionChangeEvent.IDclassFilter(),
Faction.FactionChangeEvent.IDdomainFilter()public int IDdomainFilter()
Faction.FactionChangeEventIDdomainFilter in interface Faction.FactionChangeEventAbility.DOMAIN_DESCS,
Faction.FactionChangeEvent.eventID(),
Faction.FactionChangeEvent.miscEvent(),
Faction.FactionChangeEvent.IDclassFilter(),
Faction.FactionChangeEvent.IDflagFilter()public int direction()
Faction.FactionChangeEventdirection in interface Faction.FactionChangeEventFaction.FactionChangeEvent.CHANGE_DIRECTION_DESCS,
Faction.FactionChangeEvent.setDirection(int)public double factor()
Faction.FactionChangeEventfactor in interface Faction.FactionChangeEventFaction.FactionChangeEvent.direction(),
Faction.FactionChangeEvent.setFactor(double)public int getBonusXP()
Faction.FactionChangeEventgetBonusXP in interface Faction.FactionChangeEventFaction.FactionChangeEvent.flagCache(),
Faction.FactionChangeEvent.outsiderTargetOK(),
Faction.FactionChangeEvent.selfTargetOK(),
Faction.FactionChangeEvent.just100(),
Faction.FactionChangeEvent.getBonusRoleplayXP(),
Faction.FactionChangeEvent.getFlagValue(String)public int getWithinTicks()
Faction.FactionChangeEventgetWithinTicks in interface Faction.FactionChangeEventpublic long getWaitBetweenMs()
Faction.FactionChangeEventgetWaitBetweenMs in interface Faction.FactionChangeEventpublic int getPctChance()
Faction.FactionChangeEventgetPctChance in interface Faction.FactionChangeEventpublic int getBonusRoleplayXP()
Faction.FactionChangeEventgetBonusRoleplayXP in interface Faction.FactionChangeEventFaction.FactionChangeEvent.flagCache(),
Faction.FactionChangeEvent.outsiderTargetOK(),
Faction.FactionChangeEvent.selfTargetOK(),
Faction.FactionChangeEvent.just100(),
Faction.FactionChangeEvent.getBonusXP(),
Faction.FactionChangeEvent.getFlagValue(String)public java.lang.String targetZapper()
Faction.FactionChangeEventtargetZapper in interface Faction.FactionChangeEventFaction.FactionChangeEvent.setTargetZapper(String),
MaskingLibrarypublic boolean outsiderTargetOK()
Faction.FactionChangeEventoutsiderTargetOK in interface Faction.FactionChangeEventFaction.FactionChangeEvent.flagCache(),
Faction.FactionChangeEvent.selfTargetOK(),
Faction.FactionChangeEvent.just100(),
Faction.FactionChangeEvent.getBonusRoleplayXP(),
Faction.FactionChangeEvent.getBonusXP(),
Faction.FactionChangeEvent.getFlagValue(String)public boolean selfTargetOK()
Faction.FactionChangeEventselfTargetOK in interface Faction.FactionChangeEventFaction.FactionChangeEvent.flagCache(),
Faction.FactionChangeEvent.outsiderTargetOK(),
Faction.FactionChangeEvent.just100(),
Faction.FactionChangeEvent.getBonusRoleplayXP(),
Faction.FactionChangeEvent.getBonusXP(),
Faction.FactionChangeEvent.getFlagValue(String)public boolean just100()
Faction.FactionChangeEventjust100 in interface Faction.FactionChangeEventFaction.FactionChangeEvent.flagCache(),
Faction.FactionChangeEvent.outsiderTargetOK(),
Faction.FactionChangeEvent.selfTargetOK(),
Faction.FactionChangeEvent.getBonusRoleplayXP(),
Faction.FactionChangeEvent.getBonusXP(),
Faction.FactionChangeEvent.getFlagValue(String)public void setDirection(int newVal)
Faction.FactionChangeEventsetDirection in interface Faction.FactionChangeEventnewVal - a new FactionChangeEvent#CHANGE_DIRECTION_ constantFaction.FactionChangeEvent.CHANGE_DIRECTION_DESCS,
Faction.FactionChangeEvent.direction()public void setFactor(double newVal)
Faction.FactionChangeEventsetFactor in interface Faction.FactionChangeEventnewVal - the new faction change factor amountFaction.FactionChangeEvent.direction(),
Faction.FactionChangeEvent.factor()public void setTargetZapper(java.lang.String newVal)
Faction.FactionChangeEventsetTargetZapper in interface Faction.FactionChangeEventnewVal - the new zapper mask stringFaction.FactionChangeEvent.targetZapper(),
MaskingLibrarypublic MaskingLibrary.CompiledZMask compiledTargetZapper()
Faction.FactionChangeEventcompiledTargetZapper in interface Faction.FactionChangeEventFaction.FactionChangeEvent.setTargetZapper(String),
MaskingLibrarypublic MaskingLibrary.CompiledZMask compiledSourceZapper()
Faction.FactionChangeEventcompiledSourceZapper in interface Faction.FactionChangeEventFaction.FactionChangeEvent.setTriggerParameters(String),
MaskingLibrarypublic java.lang.String getTriggerParm(java.lang.String parmName)
Faction.FactionChangeEventgetTriggerParm in interface Faction.FactionChangeEventparmName - the name of the trigger parm to look forFaction.FactionChangeEvent.setTriggerParameters(String)public java.lang.String toString()
Faction.FactionChangeEventtoString in interface Faction.FactionChangeEventtoString in class java.lang.ObjectFaction.createChangeEvent(String, String)public boolean setEventID(java.lang.String newID)
Faction.FactionChangeEventsetEventID in interface Faction.FactionChangeEventnewID - the new event trigger idFaction.ALL_CHANGE_EVENT_TYPES(),
Faction.FactionChangeEvent.eventID(),
Faction.FactionChangeEvent.miscEvent(),
Faction.FactionChangeEvent.IDclassFilter(),
Faction.FactionChangeEvent.IDdomainFilter(),
Faction.FactionChangeEvent.IDflagFilter()public boolean setDirection(java.lang.String d)
public void setFlags(java.lang.String newFlagCache)
Faction.FactionChangeEventsetFlags in interface Faction.FactionChangeEventnewFlagCache - the new list of applicable flagsFaction.FactionChangeEvent.FLAG_DESCS,
Faction.FactionChangeEvent.FLAG_KEYVALS,
Faction.FactionChangeEvent.flagCache(),
Faction.FactionChangeEvent.outsiderTargetOK(),
Faction.FactionChangeEvent.selfTargetOK(),
Faction.FactionChangeEvent.just100(),
Faction.FactionChangeEvent.getBonusRoleplayXP(),
Faction.FactionChangeEvent.getBonusXP(),
Faction.FactionChangeEvent.getFlagValue(String)public java.lang.String getFlagValue(java.lang.String key)
Faction.FactionChangeEventgetFlagValue in interface Faction.FactionChangeEventkey - the key to look uppublic boolean applies(MOB source, MOB target)
Faction.FactionChangeEventapplies in interface Faction.FactionChangeEventsource - the source to evaluatetarget - the target to evaluatepublic java.lang.String triggerParameters()
Faction.FactionChangeEventtriggerParameters in interface Faction.FactionChangeEventFaction.FactionChangeEvent.setTriggerParameters(String)public void setTriggerParameters(java.lang.String newVal)
Faction.FactionChangeEventsetTriggerParameters in interface Faction.FactionChangeEventnewVal - the trigger parametersFaction.FactionChangeEvent.triggerParameters()public java.lang.Object stateVariable(int x)
Faction.FactionChangeEventstateVariable in interface Faction.FactionChangeEventx - which internal state variable to getFaction.FactionChangeEvent.setStateVariable(int,Object)public void setStateVariable(int x,
java.lang.Object newVal)
Faction.FactionChangeEventsetStateVariable in interface Faction.FactionChangeEventx - which internal state variable to setnewVal - the state variableFaction.FactionChangeEvent.stateVariable(int)public Faction getFaction()
Faction.FactionChangeEventgetFaction in interface Faction.FactionChangeEvent