From 47ab0b03122be14ab46fc307e936178b8e62cc22 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 24 Jul 2015 23:55:35 +0200 Subject: [PATCH] Fix bridge capture of Lions Clearing the kill square for the check test had broken the test for it being empty or containing a Pawn. We now also test for Go Between, which was not done at all. --- moves.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/moves.c b/moves.c index 4158ea5..b5b6ffe 100644 --- a/moves.c +++ b/moves.c @@ -1673,10 +1673,11 @@ CheckTest (Board board, int flags, int rf, int ff, int rt, int ft, int enPassant } ep = board[EP_STATUS]; if( captured == WhiteLion || captured == BlackLion ) { // [HGM] lion: Chu Lion-capture rules - ChessSquare victim = killX < 0 ? EmptySquare : trampled; + ChessSquare victim = saveKill < 0 ? EmptySquare : trampled; if( (board[rt][ft] == WhiteLion || board[rt][ft] == BlackLion) && // capturer is Lion (ff - ft > 1 || ft - ff > 1 || rf - rt > 1 || rt - rf > 1) && // captures from a distance - (victim == EmptySquare || victim == WhitePawn || victim == BlackPawn) ) // no or worthless 'bridge' + (victim == EmptySquare || victim == WhitePawn || victim == BlackPawn // no or worthless 'bridge' + || victim == WhiteCobra || victim == BlackCobra) ) // (Pawn or Go Between) board[EP_STATUS] = EP_ROYAL_LION; // on distant Lion x Lion victim must not be pseudo-legally protected } } -- 1.7.0.4