Class CombatEventRules
The rules each CombatEventKind carries through the pipeline: whether it moves health, whether it carries a damage type, and who is told about it.
public static class CombatEventRules
- Inheritance
-
CombatEventRules
- Inherited Members
Remarks
One place rather than a kind test at each of the four stages (coalesce, route, apply, draw), so a kind added later is classified once. Pure, so every rule is a truth table.
Methods
CarriesDamageType(CombatEventKind)
True when a report of this kind carries DamageTemplateID.
public static bool CarriesDamageType(this CombatEventKind kind)
Parameters
kindCombatEventKindThe kind to classify.
Returns
- bool
True when the damage type is meaningful for this kind.
Remarks
Damage of both kinds carries it for colouring. A refusal carries the type of the hit it refused, because the type is part of the key the caster's pending prediction is paired on — without it the refusal could only settle a typeless prediction. Heals carry none.
IsRefusal(CombatEventKind)
True for a report of a hit the target refused (Evade, Immune). Such a report has no amount; it exists to settle the attacker's prediction and tell them why nothing landed.
public static bool IsRefusal(this CombatEventKind kind)
Parameters
kindCombatEventKindThe kind to classify.
Returns
- bool
True for a refusal.
MovesHealth(CombatEventKind)
True when a report of this kind changes the target's health, so an observer may move the
bar from it (CharacterAttributeController.ApplyObservedHealthDelta).
public static bool MovesHealth(this CombatEventKind kind)
Parameters
kindCombatEventKindThe kind to classify.
Returns
- bool
False for a refusal: nothing landed.
ReachesBystanders(CombatEventKind)
Whether observers other than the attacker's own connection are told about a report of this kind.
public static bool ReachesBystanders(this CombatEventKind kind)
Parameters
kindCombatEventKindThe kind to classify.
Returns
- bool
True when bystanders receive it.
Remarks
A landed number is news to everyone watching the target. A refusal is feedback about one player's own action, and only that player has a prediction for it to settle, so it goes to the attacker alone — a training dummy under twenty players does not show every one of them everyone else's "Immune", and pays nothing on the wire for bystanders.
ResolveDelivery(CombatEventKind, bool)
Routes one report to one observer of its target.
public static CombatEventRules.Delivery ResolveDelivery(CombatEventKind kind, bool observerOwnsSource)
Parameters
kindCombatEventKindWhat the report describes.
observerOwnsSourceboolTrue when this observer is the connection that owns the source.
Returns
- CombatEventRules.Delivery
How this observer receives the report.
Remarks
Reliable to the connection that owns the SOURCE — for the caster, absence of a report is the prediction system's only rejection signal, so a lost packet would grey out a landed hit. Unreliable to every other observer for a kind that reaches bystanders, and nothing at all for one that does not.