Faction.FactionChangeEvent
public class DefaultFaction.DefaultFactionChangeEvent extends java.lang.Object implements Faction.FactionChangeEvent
Faction.FactionChangeEvent.MiscTrigger
CHANGE_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.FactionChangeEvent
eventID
in interface Faction.FactionChangeEvent
Faction.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.FactionChangeEvent
miscEvent
in interface Faction.FactionChangeEvent
Faction.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.FactionChangeEvent
flagCache
in interface Faction.FactionChangeEvent
Faction.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.FactionChangeEvent
IDclassFilter
in interface Faction.FactionChangeEvent
Ability.ACODE_DESCS
,
Faction.FactionChangeEvent.miscEvent()
,
Faction.FactionChangeEvent.eventID()
,
Faction.FactionChangeEvent.IDdomainFilter()
,
Faction.FactionChangeEvent.IDflagFilter()
public long IDflagFilter()
Faction.FactionChangeEvent
IDflagFilter
in interface Faction.FactionChangeEvent
Ability.FLAG_DESCS
,
Faction.FactionChangeEvent.eventID()
,
Faction.FactionChangeEvent.miscEvent()
,
Faction.FactionChangeEvent.IDclassFilter()
,
Faction.FactionChangeEvent.IDdomainFilter()
public int IDdomainFilter()
Faction.FactionChangeEvent
IDdomainFilter
in interface Faction.FactionChangeEvent
Ability.DOMAIN_DESCS
,
Faction.FactionChangeEvent.eventID()
,
Faction.FactionChangeEvent.miscEvent()
,
Faction.FactionChangeEvent.IDclassFilter()
,
Faction.FactionChangeEvent.IDflagFilter()
public int direction()
Faction.FactionChangeEvent
direction
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.CHANGE_DIRECTION_DESCS
,
Faction.FactionChangeEvent.setDirection(int)
public double factor()
Faction.FactionChangeEvent
factor
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.direction()
,
Faction.FactionChangeEvent.setFactor(double)
public int getBonusXP()
Faction.FactionChangeEvent
getBonusXP
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.flagCache()
,
Faction.FactionChangeEvent.outsiderTargetOK()
,
Faction.FactionChangeEvent.selfTargetOK()
,
Faction.FactionChangeEvent.just100()
,
Faction.FactionChangeEvent.getBonusRoleplayXP()
,
Faction.FactionChangeEvent.getFlagValue(String)
public int getWithinTicks()
Faction.FactionChangeEvent
getWithinTicks
in interface Faction.FactionChangeEvent
public long getWaitBetweenMs()
Faction.FactionChangeEvent
getWaitBetweenMs
in interface Faction.FactionChangeEvent
public int getPctChance()
Faction.FactionChangeEvent
getPctChance
in interface Faction.FactionChangeEvent
public int getBonusRoleplayXP()
Faction.FactionChangeEvent
getBonusRoleplayXP
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.flagCache()
,
Faction.FactionChangeEvent.outsiderTargetOK()
,
Faction.FactionChangeEvent.selfTargetOK()
,
Faction.FactionChangeEvent.just100()
,
Faction.FactionChangeEvent.getBonusXP()
,
Faction.FactionChangeEvent.getFlagValue(String)
public java.lang.String targetZapper()
Faction.FactionChangeEvent
targetZapper
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.setTargetZapper(String)
,
MaskingLibrary
public boolean outsiderTargetOK()
Faction.FactionChangeEvent
outsiderTargetOK
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.flagCache()
,
Faction.FactionChangeEvent.selfTargetOK()
,
Faction.FactionChangeEvent.just100()
,
Faction.FactionChangeEvent.getBonusRoleplayXP()
,
Faction.FactionChangeEvent.getBonusXP()
,
Faction.FactionChangeEvent.getFlagValue(String)
public boolean selfTargetOK()
Faction.FactionChangeEvent
selfTargetOK
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.flagCache()
,
Faction.FactionChangeEvent.outsiderTargetOK()
,
Faction.FactionChangeEvent.just100()
,
Faction.FactionChangeEvent.getBonusRoleplayXP()
,
Faction.FactionChangeEvent.getBonusXP()
,
Faction.FactionChangeEvent.getFlagValue(String)
public boolean just100()
Faction.FactionChangeEvent
just100
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.flagCache()
,
Faction.FactionChangeEvent.outsiderTargetOK()
,
Faction.FactionChangeEvent.selfTargetOK()
,
Faction.FactionChangeEvent.getBonusRoleplayXP()
,
Faction.FactionChangeEvent.getBonusXP()
,
Faction.FactionChangeEvent.getFlagValue(String)
public void setDirection(int newVal)
Faction.FactionChangeEvent
setDirection
in interface Faction.FactionChangeEvent
newVal
- a new FactionChangeEvent#CHANGE_DIRECTION_ constantFaction.FactionChangeEvent.CHANGE_DIRECTION_DESCS
,
Faction.FactionChangeEvent.direction()
public void setFactor(double newVal)
Faction.FactionChangeEvent
setFactor
in interface Faction.FactionChangeEvent
newVal
- the new faction change factor amountFaction.FactionChangeEvent.direction()
,
Faction.FactionChangeEvent.factor()
public void setTargetZapper(java.lang.String newVal)
Faction.FactionChangeEvent
setTargetZapper
in interface Faction.FactionChangeEvent
newVal
- the new zapper mask stringFaction.FactionChangeEvent.targetZapper()
,
MaskingLibrary
public MaskingLibrary.CompiledZMask compiledTargetZapper()
Faction.FactionChangeEvent
compiledTargetZapper
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.setTargetZapper(String)
,
MaskingLibrary
public MaskingLibrary.CompiledZMask compiledSourceZapper()
Faction.FactionChangeEvent
compiledSourceZapper
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.setTriggerParameters(String)
,
MaskingLibrary
public java.lang.String getTriggerParm(java.lang.String parmName)
Faction.FactionChangeEvent
getTriggerParm
in interface Faction.FactionChangeEvent
parmName
- the name of the trigger parm to look forFaction.FactionChangeEvent.setTriggerParameters(String)
public java.lang.String toString()
Faction.FactionChangeEvent
toString
in interface Faction.FactionChangeEvent
toString
in class java.lang.Object
Faction.createChangeEvent(String, String)
public boolean setEventID(java.lang.String newID)
Faction.FactionChangeEvent
setEventID
in interface Faction.FactionChangeEvent
newID
- 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.FactionChangeEvent
setFlags
in interface Faction.FactionChangeEvent
newFlagCache
- 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.FactionChangeEvent
getFlagValue
in interface Faction.FactionChangeEvent
key
- the key to look uppublic boolean applies(MOB source, MOB target)
Faction.FactionChangeEvent
applies
in interface Faction.FactionChangeEvent
source
- the source to evaluatetarget
- the target to evaluatepublic java.lang.String triggerParameters()
Faction.FactionChangeEvent
triggerParameters
in interface Faction.FactionChangeEvent
Faction.FactionChangeEvent.setTriggerParameters(String)
public void setTriggerParameters(java.lang.String newVal)
Faction.FactionChangeEvent
setTriggerParameters
in interface Faction.FactionChangeEvent
newVal
- the trigger parametersFaction.FactionChangeEvent.triggerParameters()
public java.lang.Object stateVariable(int x)
Faction.FactionChangeEvent
stateVariable
in interface Faction.FactionChangeEvent
x
- which internal state variable to getFaction.FactionChangeEvent.setStateVariable(int,Object)
public void setStateVariable(int x, java.lang.Object newVal)
Faction.FactionChangeEvent
setStateVariable
in interface Faction.FactionChangeEvent
x
- which internal state variable to setnewVal
- the state variableFaction.FactionChangeEvent.stateVariable(int)
public Faction getFaction()
Faction.FactionChangeEvent
getFaction
in interface Faction.FactionChangeEvent