From 9e4f9c8c9d0dccc11c3522a67ad7a26c87912e5c Mon Sep 17 00:00:00 2001 From: dingo Date: Fri, 27 Feb 2026 00:22:25 +0000 Subject: [PATCH] Allow Instinct quick-play on any turn; keep other cards main-phase only --- Server/src/SOR.Game/GameEngine.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Server/src/SOR.Game/GameEngine.cs b/Server/src/SOR.Game/GameEngine.cs index a2b4800..2046b52 100644 --- a/Server/src/SOR.Game/GameEngine.cs +++ b/Server/src/SOR.Game/GameEngine.cs @@ -189,13 +189,23 @@ public static class GameEngine public static GameState ChannelCard( GameState state, string actorId, string cardInstanceId, IReadOnlyList? targetTiles) { - ValidateActivePlayer(state, actorId); - ValidatePhase(state, GamePhase.Main); - var player = state.Players[actorId]; var card = player.Hand.FirstOrDefault(c => c.InstanceId == cardInstanceId) ?? throw new GameException("CARD_NOT_IN_HAND"); + // Instinct is quick-play: it may be channeled on any turn (including opponent turn), + // but never during Setup/Placement/GameOver. + if (card.CardType == "Instinct") + { + if (state.Phase is GamePhase.Setup or GamePhase.Placement or GamePhase.GameOver) + throw new GameException($"INVALID_PHASE:{state.Phase}"); + } + else + { + ValidateActivePlayer(state, actorId); + ValidatePhase(state, GamePhase.Main); + } + if (player.CurrentSp < card.SpCost) throw new GameException("INSUFFICIENT_SP"); if (player.CurrentSt < card.StCost) throw new GameException("INSUFFICIENT_ST");