Module class_passives

Source
Expand description

The always-on rule of a class (BAL-033/BAL-034).

A passive belongs to the COMBATANT, not to the session: the hero, a party ally and a human PvP opponent each play their own class’s rule at their own Class Level. So the resolved numbers are baked onto the entity when it is built — the same shape the stone and artifact runtimes use — and every hook afterwards reads them off whoever is acting.

Baking rather than looking the class up per hook is what keeps the rule honest in PvP: the opponent’s entity carries the opponent’s magnitudes even though the session’s config lookups would happily answer with the hero’s class.

Constants§

MULTICAST_MARK
Marks the NEXT Core skill cast of this entity as the copy produced by Multicast, so it does not roll another one.
PASSIVE_DUE
Fight tick the periodic passive fires next, plus one — 0 means “not scheduled”, which is what an entity with no periodic passive reads as.
PASSIVE_KIND
Which passive this combatant plays, as the enum’s ordinal plus one (0 = none, so an untouched attribute reads as “no passive”).
PASSIVE_PCT
The passive’s magnitude at this combatant’s Class Level, in permyriad (200 = 2%).
REPEAT_MARK
Marks the NEXT Core basic cast of this entity as the repeat produced by Double Strike, so it does not roll another one. A repeat is otherwise a completely ordinary Core swing.

Functions§

block_heal
How much this combatant heals on a successful Block, or 0.0 when Block heals them nothing.
double_strike_chance
The chance this combatant’s original Basic Attack repeats itself, in 0.0..=1.0.
magnitude_permyriad
The magnitude at class_level, interpolated linearly between the authored L1 and L20 endpoints and expressed in permyriad.
mark_multicast
Sets the one-shot Multicast mark.
mark_repeat
Sets the one-shot repeat mark.
next_due
The tick the periodic passive should next fire at, given it just fired at tick.
periodic_heal_share
(heal amount share, period) of a periodic ally heal, or None.
periodic_is_due
Whether the periodic passive is due at tick.
seed
Bakes class’s passive onto a freshly built combatant. A class with no passive writes nothing, so an entity that never had one stays clean.
take_multicast_mark
Consumes the Multicast mark, answering whether this cast IS the copy.
take_repeat_mark
Consumes the repeat mark, answering whether this cast IS the repeat.