Damage Source Tags
Damage events carry a sourceKind tag identifying who or what produced the hit. Enums in use today: 'player', 'enemy', 'boss', 'environment'.
The tag travels with the damage call as a separate parameter from the damage amount — it is metadata about origin, not magnitude.
Sharers only take player damage
Shared-health boss bodies (sharesHealthWithBoss) ignore any incoming hit whose sourceKind is not 'player'. Friendly-fire, environmental ticks, and enemy-on-enemy splash all bounce off sharer bodies. Only the player can drain a shared boss bar.
This guards the encounter math: scripted boss DPS targets assume the bar is drained by the player’s outgoing damage alone, so non-player sources cannot contaminate the smoke/balance numbers.
Used by affix filter chains
Affix damage filters read sourceKind to decide whether to pass, redirect, or absorb an incoming hit. An affix can, for example, only react to 'player' hits, or grant immunity against 'environment' ticks. The chain runs before the damage cap, so a filter can short-circuit the bar drain entirely with no flash, no shake, and no cap accounting.
Distinct from damage tag
sourceKind answers who hit? — it does not describe the damage itself.
The orthogonal damage tag (bullet, energy, fire, etc.) describes what kind of damage the hit carries. Tag-conditional effects (resistances, on-hit triggers, tagged-kill counters) read the damage tag, not the source tag.
Both labels travel with the same hit. A player railgun shot is sourceKind='player' AND damageTag='energy'. An environmental hazard tick might be sourceKind='environment' AND damageTag='fire'. Affixes and filters can branch on either axis independently.
Gauntlet kill-switch
The gauntlet runner uses sourceKind='player' as a gate: when _gauntletPlayerDamageDisabled is true, all player-sourced damage is dropped at the entry of damageEnemy. Non-player sources (scripted DPS) still land. This keeps the encounter’s measured throughput sourced exclusively from the runner’s scripted hits.