c692d8ec6404ea65fcbedb3f054745e895987cf7
New TriggerEventKind.UnitSentToDiscard fires whenever a unit is moved to the
discard pile, carrying SourceId = the killer unit's instance ID and
ActorId = the victim's player — consistent with UnitDeath convention.
Wired in 4 paths:
- GameEngine.cs attack: attacker killed by counterattack (SourceId = target)
- GameEngine.cs attack: target killed by attacker (SourceId = attacker)
- AbilitySystem KillUnit: ability/effect-driven death (SourceId = ctx.Source)
- AbilitySystem SendToDiscardEffect: direct discard effect (SourceId = ctx.Source)
OnUnitSentToDiscardTrigger is now matched in TriggerMatches. CausedBy field
acts as killer ownership scope; CausedBy="ExactSelf" checks SourceId == this
unit's InstanceId via the existing Own() helper, enabling:
Bloodlust Aggression:
{ type:"OnUnitSentToDiscard", unitType:"Spirit", ownership:"Enemy",
causedBy:"ExactSelf" }
→ ModifyDamageEffect { Amount:1 }, Duration: PermanentInMatch
Bloodlust Vitality:
{ type:"OnUnitSentToDiscard", unitType:"Spirit", ownership:"Enemy",
causedBy:"ExactSelf" }
→ ModifyMPEffect { Amount:1, StatTarget:"Max" }, Duration: UntilEndOfTurn
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Description
No description provided
53 MiB
Languages
C#
52.7%
HTML
24.9%
GDScript
21.2%
CSS
0.8%
Python
0.3%
Other
0.1%