What It Is
A reusable damage calculation system that plugs into Gameplay Effects. It's the foundation for how damage gets processed and applied to characters in your game.
What It Does
When damage needs to be applied, this execution calculation processes it through a structured pipeline:
- Reads the damage value you set on the Gameplay Effect (via SetByCaller with tag
Data.Damage)
- Applies pre-damage bonuses (buffs, weapon scaling, world context modifiers)
- Calculates critical hits if enabled (reads crit chance/power from SetByCaller, applies world context crit modifiers)
- Applies mitigation (armor/resistance - handled by child classes)
- Applies post-mitigation effects (shields, damage absorption - handled by child classes)
- Applies diminishing returns (automatic magnitude reduction for repeated effects)
- Applies stack scaling (optional damage multiplier based on GE stack count)
- Tracks overflow (overkill damage for finishing blow mechanics)
- Applies lifesteal (heals attacker based on damage dealt)
- Applies final damage to the Health attribute
- Triggers notifications for UI feedback, achievements, and status effect synergies
Its Purpose
Provides a standardized, extensible damage system that works on top of GAS without requiring custom components. Instead of writing damage logic from scratch for every ability, you configure this once and reuse it. Child classes can add complexity (armor, shields) without breaking the core flow.
How It's Used
- Simple Damage: Add it directly to an Instant Gameplay Effect's Executions array. Set the damage amount using SetByCaller in your ability.
- Complex Damage: Use pre-built child classes like
WCGASExecCalc_DamageResist (adds armor/resistance) or create your own child class to customize specific steps.