Optional canOptional canCalled when a creature tries to face a new direction
True if the creature can face a new direction, false if the creature can't face a new direction, or undefined to use the default logic
The x coordinate of the creature's facing direction
The y coordinate of the creature's facing direction
Optional canOptional canOptional changeCalled when the creature's AI is changed.
Optional changeCalled when the creature's AI masks are changed.
Optional changeOptional damageCalled when a creature is damaged
The amount of damage the creature should take (the creature will take this damage) or undefined to use the default logic
The damage info object
Optional dieOptional killCalled when an entity is killed by another entity.
Called when a stat changes, for any reason
An IStat object, the stat that was affected
Optional oldValue: numberThe value that the stat changed from
Optional info: IStatChangeInfo<any>An IStatChangeInfo object describing why the change occurred. It will always be passed with a reason
Called when a stat changes, for any reason
An IStat object, the stat that was affected
The value that the stat changed from
An IStatChangeInfo object describing why the change occurred. It will always be passed with a reason
Called when a stat's max value changes, for any reason
An IStat object, the stat that was affected
Optional oldValue: numberThe value that the stat changed from
Optional info: IStatChangeInfo<any>An IStatChangeInfo object describing why the change occurred. It will always be passed with a reason
Called when a stat timer will change
false to cancel the stat timer change, undefined otherwise.
An IStat object, the stat that will be affected
An object for manipulating how the new stat change timer will be set
Called when this entity gets or loses a status effect
The type of status effect that was gained or lost
Whether the entity now has the status effect
The reason for the change
Optional tameGenerated using TypeDoc
Called before a creature attacks
Returns
False if the creature cannot attack, or undefined to use the default logic