Module entities

Source

Functions§

apply_law_attribute_change
Moves entity’s attributes from one law contribution to another. Passing an empty next strips the contribution; passing an empty previous folds one in.
combatant_character_state
The durable CharacterState behind combatant entity_id in this session’s fight — the local hero’s, the party ally’s, or a human PvP opponent’s. None for mobs and for arena filler bots, which have no CharacterState.
combatant_character_state_of
combatant_character_state reading straight off one &OverlordState. Use where no mutable borrow of the state is alive; hooks that interleave mutable fight borrows call the field-split variant instead.
combatant_flip_threshold
The flip bar combatant entity_id plays against: ART-03 Halfway Bell lowers it for the combatant WEARING the bell, resolved from that combatant’s own artifacts. A combatant with no CharacterState plays at the configured threshold.
create_party_entity
create_player_entity
Leader-pet combat payload of one combatant: the pet to render beside it, its charge-driven ult state, and the ult entry for the entity’s ability list.
create_pve_entity
create_pvp_entity
event_from_entity_action
Rebuilds the event a drained queue entry stands for, carrying the provenance the entry was queued with.
law_attribute_snapshot
The law contribution currently folded into entity’s attributes: the active side’s slotted laws at their current level, scaled by whatever their bridge delivered at the last flip.
make_active_abilities_from_equipped
mirror_combatant_flip_state
Mirrors a combatant’s fight-local FlipState into the matching durable copy: the session’s own for the hero, the party / PvP snapshots for the others (those never persist past the viewer’s fight).
refresh_law_attributes
Recomputes the active side’s law contribution and moves the entity’s attributes from the previous contribution to the new one. Called on a flip, which changes both halves at once: which side is up AND how much charge each law just received.
seed_law_state
Installs the combatant’s whole law state on a freshly built combat entity — the cores snapshot the fight runs on plus the bridge charges built from it — and folds in the passive contribution of every law on the side that is currently up. Charges always start empty and unamplified: a fight begins with no Resonance banked and no law boosted.
sort_active_abilities
stamp_gauge_hp_shares
BAL-026: stamps each initial combatant’s gauge_hp_share — its share of its own team’s max-HP budget at this roster snapshot. The outgoing damage gauge multiplies by the VICTIM’s share, so removing a whole roster is worth the same gauge whatever its size. Deaths never re-normalize the stamped denominator, and summons are skipped (gauge_hp_share() reads them as 0). Wave mobs are stamped by mechanics::fight::spawn_wave instead — this covers the roster built directly at fight start.