Files
sor/Server
f60457b716 Fix: implement Passive ability execution with per-target conditions
Passive abilities (e.g. 'All Merfolk +1 attack') were never executed
because AbilityType.Passive had no runtime processing.

Three root causes fixed:

1. Passive abilities are now applied when units enter the battlefield
   and reversed when they leave (new DurationType.WhileSourceOnBattlefield).
   - ApplyPassivesForSource: runs a unit's passives against all current targets
   - ApplyPassivesToNewTarget: applies existing passives to a newly-entered unit
   - RevokePassivesForSource: reverses all passive effects on source death/leave
   - Hooked into GameEngine.Channel, Transition and AbilitySystem
     ReturnToBattlefield, SummonToken, KillUnit, SendToDiscard

2. Action conditions with Subject="Target" now filter per-target instead of
   aborting the entire action (which evaluated against ctx.Source).
   Source-level conditions still gate the whole action; target-level ones
   are evaluated individually and skip non-matching targets.

3. ExecuteActions/ResolveTargets gain a restrictTargets parameter used by
   ApplyPassivesToNewTarget to avoid double-applying existing passive buffs
   to units that already received them when the passive source entered.

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-17 15:54:00 -04:00
..