From 8bcacc29d26e5f50ad6453e7d135a8f04d50bee9 Mon Sep 17 00:00:00 2001 From: dingo Date: Tue, 17 Mar 2026 21:27:37 -0400 Subject: [PATCH] Fix: passive effects not revoked on combat death or sacrifice The attack resolution and sacrifice paths in GameEngine.cs bypassed RevokePassivesForSource (and EvaluateAurasOnLeave for combat deaths). Now all three exit points call both aura/passive cleanup before removing the unit from the board. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Server/src/SOR.Game/GameEngine.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Server/src/SOR.Game/GameEngine.cs b/Server/src/SOR.Game/GameEngine.cs index a8540fd..c84e122 100644 --- a/Server/src/SOR.Game/GameEngine.cs +++ b/Server/src/SOR.Game/GameEngine.cs @@ -665,6 +665,8 @@ public static class GameEngine if (attacker.CurrentHealth <= 0) { + AbilitySystem.EvaluateAurasOnLeave(state, attacker.InstanceId); + AbilitySystem.RevokePassivesForSource(state, attacker.InstanceId); if (state.Board is not null) state.Board.RemoveUnit(attacker.InstanceId); MoveToDiscard(activePlayer, attacker); @@ -686,6 +688,8 @@ public static class GameEngine } else { + AbilitySystem.EvaluateAurasOnLeave(state, target.InstanceId); + AbilitySystem.RevokePassivesForSource(state, target.InstanceId); if (state.Board is not null) state.Board.RemoveUnit(target.InstanceId); MoveToDiscard(opponentPlayer, target); @@ -738,6 +742,7 @@ public static class GameEngine player.CurrentSt += stReturn; AbilitySystem.EvaluateAurasOnLeave(state, unitInstanceId); + AbilitySystem.RevokePassivesForSource(state, unitInstanceId); if (state.Board is not null) state.Board.RemoveUnit(unitInstanceId); player.Field.Remove(unit); player.Discard.Add(unit);