csharp
public sealed class CombatResolverTurns a completed ability into damage and effects on the things it hit.
Remarks
Separate from AbilityCaster, because a caster knows what an ability was aimed at and this knows what it hit. Resolving a cone into a list of victims needs a world, which is the caller's; what happens to that list is the same code whether there is one of them or forty.
⚠ The event id is the caller's and every roll comes out of it. One id per ability completion, salted by the victim's index, so a forty-target cleave is reproducible as a whole and each of its forty hits is reproducible on its own.
Fields and properties (2)
public DamagePipeline PipelineThe stages a hit passes through.
public CombatAttributes AttributesWhich stats the shipped rules read.
Methods (3)
public CombatResolver(DamagePipeline pipeline, CombatAttributes? attributes = null)Makes a resolver.
public void Resolve(AbilityTemplate ability, GameplaySubject? source, IReadOnlyList<AbilityTarget> targets, ulong eventId, ICollection<AbilityHit>? hits = null)Applies a completed ability to the things it hit.
public DamageEvent Strike(AbilityTemplate ability, GameplaySubject? source, GameplaySubject target, ulong eventId, ulong salt = 0)Runs one hit through the pipeline.
Used by (4)
- CombatResolverTestsVixen.Gameplay.Combat.Tests
- ContentVixen.Gameplay.Combat.Tests
- DamagePipelineTestsVixen.Gameplay.Combat.Tests
- DamageRuleTestsVixen.Gameplay.Combat.Tests