Class AttackCues
java.lang.Object
privbot.mechanics.AttackCues
Maps the cues an NPC shows when it attacks (its animation id, its projectile id) to the
CombatStyle the
attack demands, plus the animation ids that are known to be harmless and how many cycles pass between an animation
and its projectile launching.
What it proves: only what the plugin author declared. An id that was not declared is unknown, and an unknown id
answers null, never a guessed style. Callers must act only on a known attack cue, because animation reads
can briefly report ids that are not attacks.
Unreadable looks like: null from animation(int) or projectile(int); there is no
default style.
Thread rule: immutable and pure. It reads nothing from the client and is safe on any thread.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionanimation(int id) static AttackCues.Builderbuilder()intstatic AttackCuesnone()Cues that know nothing: every lookup answers unknown.booleanpassive(int animationId) projectile(int id)
-
Method Details
-
builder
-
none
Cues that know nothing: every lookup answers unknown. -
animation
- Returns:
- the style for animation
id, ornullif it is not a declared attack animation.
-
projectile
- Returns:
- the style for projectile
id, ornullif it is not a declared attack projectile.
-
passive
public boolean passive(int animationId) - Returns:
- true when
animationIdwas declared as a harmless (non-attack) animation.
-
launchOffsetCycles
public int launchOffsetCycles()- Returns:
- cycles between an attack animation and its projectile launching (0 unless declared).
-