Expand description
One vocabulary for what a dispatched combat event established.
Laws (crate::logic::laws) and Trigger Stones (crate::logic::stones)
react to the same handful of Core outcomes, and each used to read them off
the raw event itself. Two readings of one design phrase drift apart
silently, and they had: “a hit on the hero” counted a poison tick for a
stone and not for a law, while “killed an enemy” was derived from Damage
on one side and from EntityDeath on the other.
The reading now lives here once. Both hooks consume CombatFacts and
neither parses OverlordEvent for combat meaning any more, so a
refinement to one definition reaches both systems or neither.
§The definitions
- A hit needs an attacker. Only
Damagecarryingby_entity_idis a hit. A poison tick, a bleed and environment damage are damage taken, but they are nobody’s hit, so they open no condition on either side. - A kill is attributed to the hit that made it, not to the corpse:
EntityDeathnames who died and never who did it, and it fires for allies too. Keying off the killingDamagegives an explicit killer and an explicit pair of teams. - Only Core counts. Everything a law, a stone, a bridge, an echo or a
pet produced arrives
Procand is refused here — the single anti-loop boundary both systems rest on.
Enums§
- Cast
Kind - Which family a cast belongs to. A Basic Attack and an original Skill are the
same wire event (
CastAbility); the caster’s class kit is what separates them, which is why this cannot be read off the event alone. - Combat
Fact - One fact a dispatched Core event established about one combatant.
Functions§
- cast_
kind - Which family
ability_idbelongs to forentity. - classify
- Everything
eventestablished, grouped by the combatant it is about. - clear_
paid_ mana - Drops the recorded payment for a cast that skips the mana gate (a pet ult, an entity with no pool), so its resolution cannot read the previous cast’s price. A no-op when nothing is recorded, keeping unused entities free of bookkeeping.
- current_
cast_ kind - The family of the cast this entity is currently resolving, or
Nonebefore its first cast of the fight. - facts_
for - The facts about one specific combatant, flattened.
- paid_
mana_ x100 - Mana the resolving cast paid, in x100 fixed point —
Some(0)for a cast the pool let through for free,Nonefor one that never paid (no pool, a pet ult, or nothing cast yet). - record_
cast_ kind - Records the family of the cast about to resolve, on the caster itself.
- record_
paid_ mana - Records what the cast about to resolve actually paid at the mana gate, in
x100 fixed point. Same contract as
record_cast_kind: written before the cast resolves, read once by each condition that prices it.