Vixen
c7401864
csharp
public sealed class DamagePipeline

The six stages, and the rules a game put in them.

Read the guide page for this →

Remarks

Built once at start-up and shared. Running a hit allocates nothing: the rules are an array per stage and the event is a struct.

Methods (5)

  • public DamagePipeline()

    Makes an empty pipeline. Nothing happens to a hit until rules are added.

  • public static DamagePipeline Standard(CombatAttributes? attributes = null)

    The pipeline every game starts from: the six shipped rules, in their stages.

  • public DamagePipeline Add(IDamageRule rule)

    Adds a rule.

  • public ReadOnlySpan<IDamageRule> Rules(DamageStage stage)

    The rules in one stage, in the order they run.

  • public void Run(ref DamageEvent hit)

    Runs a hit through every stage.

Used by (4)

  • CombatResolverVixen.Gameplay.Combat
  • CombatResolverTestsVixen.Gameplay.Combat.Tests
  • ContentVixen.Gameplay.Combat.Tests
  • DamagePipelineTestsVixen.Gameplay.Combat.Tests