if(!occup & r < L) for(y=x+2*v; !NewNonCapture(x, y+=v, pFlag) && r == S; ); // BS and FF moves\r
v = nStep[j];\r
NewNonCapture(x, x + v, pFlag);\r
- }\r
+ } else if(r == T) NewNonCapture(x, x+3*v, pFlag); // Lion Dog, also triple step\r
} else if(r == I) NewNonCapture(x, x + v, pFlag); // also do step\r
} else\r
if(r == M) { // FIDE Pawn; check double-move\r
NewCapture(x, SPECIAL + 9*i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // hit and run\r
}\r
break;\r
+ case T: // Lion-Dog move (awful!)\r
+ if(d > 3) break;\r
+ NewCapture(x, sqr + victimValue - SORTKEY(attacker), p[attacker].promoFlag);\r
+ att -= one[i];\r
+ if(d == 3) { // check if we can take one or two intermediates (with higher piece index) with it\r
+ if((board[x-v] & TYPE) == xstm && board[x-v] > board[sqr]) {\r
+ NewCapture(x, SPECIAL + 64 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. first\r
+ if((board[x-2*v] & TYPE) == xstm && board[x-2*v] > board[sqr])\r
+ NewCapture(x, SPECIAL + 80 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. both\r
+ } else if((board[x-2*v] & TYPE) == xstm && board[x-2*v] > board[sqr])\r
+ NewCapture(x, SPECIAL + 72 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. second\r
+ } else if(d == 2) { // check if we can take intermediate with it\r
+ if((board[x-v] & TYPE) == xstm && board[x-v] > board[sqr]) {\r
+ NewCapture(x, SPECIAL + 9*i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. first, stop at 2nd\r
+ NewCapture(x, SPECIAL + 88 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // shoot 2nd, take 1st\r
+ if(board[sqr-v] == EMPTY || (board[sqr-v] & TYPE) == xstm && board[sqr-v] > board[sqr])\r
+ NewCapture(x, SPECIAL + 80 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. 1st and 2nd\r
+ } else if(board[sqr-v] == EMPTY || (board[sqr-v] & TYPE) == xstm && board[sqr-v] > board[sqr])\r
+ NewCapture(x, SPECIAL + 72 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. 2nd\r
+ } else { // d=1; can move on to second, or move back for igui\r
+ NewCapture(x, SPECIAL + 8*i + (i^4) + victimValue, p[attacker].promoFlag); // igui\r
+ if(board[sqr-v] == EMPTY) { // 2nd empty\r
+ NewCapture(x, SPECIAL + 9*i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. 1st and run to 2nd\r
+ if(board[sqr-2*v] == EMPTY || (board[sqr-2*v] & TYPE) == xstm && board[sqr-2*v] > board[sqr])\r
+ NewCapture(x, SPECIAL + 72 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. 1st, end on 3rd\r
+ } else if((board[sqr-v] & TYPE) == stm) { // 2nd own\r
+ if(board[sqr-2*v] == EMPTY || (board[sqr-2*v] & TYPE) == xstm && board[sqr-2*v] > board[sqr])\r
+ NewCapture(x, SPECIAL + 72 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. 1st, end on 3rd\r
+ } else if((board[sqr-v] & TYPE) == xstm && board[sqr-v] > board[sqr]) {\r
+ NewCapture(x, SPECIAL + 9*i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. 1st, capture and stop at 2nd\r
+ NewCapture(x, SPECIAL + 88 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // shoot 2nd\r
+ if(board[sqr-2*v] == EMPTY || (board[sqr-2*v] & TYPE) == xstm && board[sqr-2*v] > board[sqr])\r
+ NewCapture(x, SPECIAL + 80 + i + victimValue - SORTKEY(attacker), p[attacker].promoFlag); // e.p. 1st and 2nd\r
+ }\r
+ }\r
+ break;\r
case J: // plain jump (as in KY, PH)\r
if(d != 2) break;\r
case I: // jump + step (as in Wa TF)\r
sup2 = sup1; sup1 = sup0;\r
}\r
\r
-char fenNames[] = "RV....DKDEFL..DHGB......SMLNKN..FK....BT..VMSWPH..LN"; // pairs of char\r
+char fenNames[] = "RV....DKDEFL..DHGB......SMLNKN..FK....BT..VMEWPH..LN"; // pairs of char\r
char fenPromo[] = "WLDHSMSECPB R HFDE....WHFB..LNG ..DKVMFS..FO..FK...."; // pairs of char\r
\r
char *\r