MsgListener
, StatsAffecting
DefaultFaction.DefaultFactionData
public static interface Faction.FData extends MsgListener, StatsAffecting
Faction.makeFactionData(MOB)
Modifier and Type | Method | Description |
---|---|---|
void |
addHandlers(java.util.List<Ability> abilities,
java.util.List<Behavior> behaviors) |
Clears and re-adds all the necessary message listeners and tickers
and stat affecting objects for this faction data reference.
|
int |
getCounter(java.lang.String key) |
Returns the counter value for the given key/event id
|
long |
getEventTime(java.lang.String eventID) |
Returns the creation time of this data object, or the
last time the event with the given id was reset,
whichever is later.
|
Faction |
getFaction() |
Return the parent faction for which this data stands.
|
long |
getNextChangeTimers(Faction.FactionChangeEvent event) |
Returns a timestamp for the given event denoting when that event can
next take place.
|
Faction.FRange |
getRange() |
Returns the current faction range for the current value.
|
boolean |
requiresUpdating() |
Returns true if this object requires updating by the parent
faction for some reason.
|
void |
resetEventTimers(java.lang.String eventID) |
Resets the event timer with the given event id to
the current time.
|
void |
resetFactionData(Faction F) |
Cleans out the internal data structures of this faction
to denote that a new context is entered.
|
void |
setCounter(java.lang.String key,
int newValue) |
Sets the counter value for the given key/event id
|
void |
setNextChangeTimers(Faction.FactionChangeEvent event,
long time) |
Sets a timestamp for the given event denoting when that event can
next take place.
|
void |
setValue(int newValue) |
Sets the actual value that the holding object has in this faction.
|
boolean |
tick(Tickable ticking,
int tickID) |
A mirror implementation of Tickable
|
int |
value() |
Returns the actual value that the holding object has in this faction.
|
executeMsg, okMessage
affectCharState, affectCharStats, affectPhyStats
void resetFactionData(Faction F)
F
- the faction to which this data belongs.boolean requiresUpdating()
boolean tick(Tickable ticking, int tickID)
ticking
- the ticking objecttickID
- the id code of the tick being doneTickable
long getEventTime(java.lang.String eventID)
eventID
- the event id to look forvoid resetEventTimers(java.lang.String eventID)
eventID
- the event id to reset the timer forFaction getFaction()
Faction.FRange getRange()
int value()
void setValue(int newValue)
newValue
- the faction valueint getCounter(java.lang.String key)
key
- the event idvoid setCounter(java.lang.String key, int newValue)
key
- the counter key/event idnewValue
- the counter valuevoid addHandlers(java.util.List<Ability> abilities, java.util.List<Behavior> behaviors)
abilities
- a vector of abilitiesbehaviors
- a vector of behaviorslong getNextChangeTimers(Faction.FactionChangeEvent event)
event
- the change event to get a time for.void setNextChangeTimers(Faction.FactionChangeEvent event, long time)
event
- the change event to get a time for.time
- the timestamp ro the next event, or 0