Vixen
caa30e12
csharp
public record class CombatAttributes

Which stats the shipped rules read.

Read the guide page for this →

Remarks

Named here rather than hard-coded, because a game's stats are its own. The shipped rules need to know which attribute is health and which is crit chance; they do not need those to be called Health and CritChance.

⚠ Resistance is per school and therefore a map rather than a name. "Fire resistance reduces Damage.Fire.*" is a tag query, and building the attribute name by concatenating a school's name would be a string operation on the damage path.

Fields and properties (7)

  • public static CombatAttributes Default

    The obvious names, for a game that has no opinion yet.

  • public AttributeId Health

    What damage comes off and healing goes on to.

  • public AttributeId MaximumHealth

    The ceiling healing may not pass. Zero means no ceiling.

  • public AttributeId CriticalChance

    How often a hit crits, from zero to one.

  • public AttributeId CriticalMultiplier

    What a crit multiplies by. Below one is read as the shipped default of two.

  • public AttributeId Absorb

    What a shield soaks before health is touched.

  • public IReadOnlyList<(GameplayTagRange School, AttributeId Attribute)> Resistances

    Which stat resists which school. Each value is a fraction from zero to one.

Methods (1)

  • public CombatAttributes WithResistances(GameplayTagTable tags, params (string School, string Attribute)[] resistances)

    The same, with the resistances resolved against a tag table.

Used by (7)

  • CombatResolverVixen.Gameplay.Combat
  • ContentVixen.Gameplay.Combat.Tests
  • CriticalStrikeRuleVixen.Gameplay.Combat
  • DamagePipelineVixen.Gameplay.Combat
  • HealthRuleVixen.Gameplay.Combat
  • ResistanceRuleVixen.Gameplay.Combat
  • ShieldAbsorbRuleVixen.Gameplay.Combat