Reset 50-move counter on all pawn-like Lance moves
authorH.G. Muller <h.g.muller@hccnet.nl>
Tue, 11 Jan 2011 10:34:07 +0000 (11:34 +0100)
committerArun Persaud <arun@nubati.net>
Sat, 29 Jan 2011 02:13:15 +0000 (18:13 -0800)
Now the Lance represents a Pawn-like piece not only in variant fairy,
but anywhere outside Shogi / Superchess, its moves should also reset the
50-move counter in those cases. Especially important for Spartan Chess,
where the Lance actually participates.

backend.c

index 5224018..75fc9a1 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -8422,7 +8422,8 @@ ApplyMove(fromX, fromY, toX, toY, promoChar, board)
       int i;
 
       if( board[fromY][fromX] == WhiteLance || board[fromY][fromX] == BlackLance ) {
-           if( gameInfo.variant == VariantFairy ) board[EP_STATUS] = EP_PAWN_MOVE; // Lance in fairy is Pawn-like
+           if( gameInfo.variant != VariantSuper && gameInfo.variant != VariantShogi )
+               board[EP_STATUS] = EP_PAWN_MOVE; // Lance is Pawn-like in most variants
       } else
       if( board[fromY][fromX] == WhitePawn ) {
            if(fromY != toY) // [HGM] Xiangqi sideway Pawn moves should not count as 50-move breakers