c692d8ec64 Implement UnitSentToDiscard trigger — enables Bloodlust abilities
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>
2026-03-25 21:14:44 -04:00
2026-02-28 16:31:01 -05:00
2026-03-07 10:28:32 -05:00
2026-02-28 16:31:01 -05:00
S
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%