Vixen
caa30e12
csharp
public record class EffectDefinition

Anything with a duration: a buff, a debuff, a stun, a shield, a stance, a mount.

Read the guide page for this →

Remarks

One type, and doc 28 means it literally. "Everything with a duration in this document is an effect: a mount is an effect that grants State.Mounted and swaps a model; a resurrection sickness, a crafting station's attunement, a PvP flag, a raid buff, a quest's timed escort — all of them."

"Until a condition" is CancelOn. Doc 28's duration column offers finite, infinite or until-a-condition; the first two are Duration and the third is a tag query over gameplay events, because that is what every such condition actually is — until damaged, until they move, until they die, until they cast. Giving it a second mechanism would mean two ways to write the same rule and two places to fix it.

Fields and properties (11)

  • public string DisplayName

    What it is called in the UI.

  • public float Duration

    How long it lasts, in seconds. Zero or less is forever.

  • public float Period

    How often it ticks, in seconds. Zero is never — the effect is not periodic.

  • public EffectStacking Stacking

    What a second application does.

  • public int MaximumStacks

    How high StackTo counts. Ignored by the other policies.

  • public List<ModifierDefinition> Modifiers

    What it does to the target's stats. Values scale with the stack count.

  • public List<string> Tags

    What this effect is — Effect.Control.Stun. What an immunity matches.

  • public List<string> GrantedTags

    Tags the target has for as long as this is active — State.Stunned.

  • public List<string> BlockedTags

    Tag prefixes the target may not do while this is active — a stun blocks Ability.Cast.

  • public List<string> Immunities

    Tag prefixes of effects that cannot be applied while this is active.

  • public List<string> CancelOn

    Tag prefixes of gameplay events that end this — Event.Damaged, Event.Moved.

Methods (1)

  • public override void CollectTags(ICollection<string> tags)

    Every tag this definition mentions, so the content build can bake the tag table.

Used by (16)

  • DefinitionImporterTestsVixen.Editor.Assets.Tests
  • AbilityCasterTestsVixen.Gameplay.Combat.Tests
  • AbilityLibraryVixen.Gameplay.Combat
  • AbilityLibraryTestsVixen.Gameplay.Combat.Tests
  • CombatResolverTestsVixen.Gameplay.Combat.Tests
  • ContentVixen.Gameplay.Combat.Tests
  • DefinitionCatalogTestsVixen.Gameplay.Tests
  • DefinitionRegistryTestsVixen.Gameplay.Tests
  • DefinitionSerializationTestsVixen.Gameplay.Tests
  • EffectSetTestsVixen.Gameplay.Tests
  • EffectTemplateVixen.Gameplay
  • GameplayConfigTestsVixen.Gameplay.Tests
  • GameplayKernelModuleVixen.Gameplay
  • GameplaySubjectTestsVixen.Gameplay.Tests
  • TypeRegistrationVixen.Gameplay
  • Vixen_Gameplay_EffectDefinitionSerializerVixen.Gameplay