From dad64577f297f600627213798d9dcdd0a611ba42 Mon Sep 17 00:00:00 2001 From: Fayti1703 Date: Tue, 31 Dec 2024 02:22:38 +0100 Subject: [PATCH] Engine: Correct binlog on attacker victory draw This previously resulted in an erroneous unknown card id (the default value of CardID) appearing in the binlog, instead of the correct result of the draw not moving any cards (because victory) --- BinaryMatrixEngine/GameExecution.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BinaryMatrixEngine/GameExecution.cs b/BinaryMatrixEngine/GameExecution.cs index d8c16b9..e663423 100644 --- a/BinaryMatrixEngine/GameExecution.cs +++ b/BinaryMatrixEngine/GameExecution.cs @@ -82,13 +82,13 @@ public static OperationError ExecutePlayerAction(GameContext context, Player pla new ResolvedActionSet(ActionType.DRAW, action.lane), ImmutableList.Empty ); + } else { + log = new ActionLog( + log.whoDidThis, + new ResolvedActionSet(ActionType.DRAW, action.lane), + CardMoveLog.SingleMove(drawnCard, log.whoDidThis) + ); } - - log = new ActionLog( - log.whoDidThis, - new ResolvedActionSet(ActionType.DRAW, action.lane), - CardMoveLog.SingleMove(drawnCard, log.whoDidThis) - ); } } break; case ActionType.PLAY: