#define FVAL 5000 /* piece value of Fire Demon. Used in code for recognizing moves with it and do burns */\r
\r
PieceDesc chuPieces[] = {\r
- {"LN", "", LVAL, { W,W,W,W,W,W,W,W }, 4 }, // lion\r
-// {"LN", "", LVAL, { T,T,T,T,T,T,T,T }, 4 }, // lion\r
-// {"LN", "", LVAL, { L,L,L,L,L,L,L,L }, 4 }, // lion\r
+ {"LN", "", LVAL, { L,L,L,L,L,L,L,L }, 4 }, // lion\r
{"FK", "", 600, { X,X,X,X,X,X,X,X }, 4 }, // free king\r
{"SE", "", 550, { X,D,X,X,X,X,X,D }, 4 }, // soaring eagle\r
{"HF", "", 500, { D,X,X,X,X,X,X,X }, 4 }, // horned falcon\r
\r
u->victim = board[u->to];\r
p[u->victim].pos = ABSENT;\r
- if(p[u->victim].ranking == 5 && p[u->piece].ranking != 4) { // contageous piece captured by non-royal\r
+ if(p[u->victim].ranking == 5 && p[u->piece].ranking < 4) { // contageous piece captured by non-royal\r
+ u->booty -= p[u->new].value;\r
u->new = u->piece & 1 | 2; // promote to it\r
- p[u->piece].pos = ABSENT;\r
- u->booty += p[u->new].value - p[u->piece].value;\r
if(p[u->new].pos != ABSENT) u->new += 2;\r
+ p[u->piece].pos = ABSENT;\r
+ u->booty += p[u->new].value;\r
}\r
\r
u->booty += PST[p[u->new].pst + u->to] - PST[p[u->piece].pst + u->from];\r
if(hit >= 0) {\r
bestScore = hashTable[index].score[hit];\r
hashMove = hashTable[index].move[hit];\r
+\r
if((bestScore <= alpha || hashTable[index].flag[hit] & H_LOWER) &&\r
(bestScore >= beta || hashTable[index].flag[hit] & H_UPPER) ) {\r
iterDep = resDep = hashTable[index].depth[hit]; bestMoveNr = 0;\r
}\r
t = g + toList[t - SPECIAL];\r
}\r
- if(move & PROMOTE) promoChar = currentVariant == V_MAKRUK ? "m" : repDraws ? "q" : "+";\r
+ if(move & PROMOTE) promoChar = currentVariant == V_MAKRUK ? "m" : currentVariant == V_WOLF ? "r" : repDraws ? "q" : "+";\r
sprintf(buf+strlen(buf), "%c%d%c%d%s", f%BW+'a', f/BW+ONE, t%BW+'a', t/BW+ONE, promoChar);\r
return buf;\r
}\r
for(i=listStart; i<msp && currentVariant == V_WOLF; i++) { // mark Werewolf captures as promotions\r
int to = moveStack[i] & SQUARE, from = moveStack[i] >> SQLEN & SQUARE;\r
if(to >= SPECIAL) continue;\r
- if(p[board[to]].ranking == 5 && p[board[from]].ranking != 4) moveStack[i] |= PROMOTE;\r
+ if(p[board[to]].ranking == 5 && p[board[from]].ranking < 4) moveStack[i] |= PROMOTE;\r
}\r
}\r
\r
if(t == f-2 && f > BW) t2 = CASTLE + 3;\r
}\r
ret = f<<SQLEN | t2;\r
+ if(currentVariant == V_WOLF && *moveText == 'w') *moveText = '\n';\r
if(*moveText != '\n' && *moveText != '=') ret |= PROMOTE;\r
printf("# suppress = %c%d\n", sup1%BW+'a', sup1/BW);\r
// ListMoves();\r
if(!(flags & promoBoard[t] & (CANT_DEFER | LAST_RANK))) { // but change it into a deferral if that is allowed\r
moveStack[i] &= ~PROMOTE;\r
if(p[board[f]].value == 40) p[board[f]].promoFlag &= LAST_RANK; else\r
- if(!(flags & promoBoard[f])) moveStack[i] |= DEFER; // came from outside zone, so essential deferral\r
+ if(!(flags & promoBoard[f]) && currentVariant != V_WOLF) moveStack[i] |= DEFER; // came from outside zone, so essential deferral\r
}\r
}\r
if(i >= listEnd) {\r
}\r
stm = MakeMove2(stm, move); // assumes MakeMove returns new side to move\r
gameMove[moveNr++] = move; // remember game\r
- printf("move %s%s\n", MoveToText(pMove, 1), p[undoInfo.victim].ranking == 5 && p[undoInfo.piece].ranking != 4 ? "w" : "");\r
+ printf("move %s%s\n", MoveToText(pMove, 1), p[undoInfo.victim].ranking == 5 && p[undoInfo.piece].ranking < 4 ? "w" : "");\r
listEnd = 0;\r
continue; // go check if we should ponder\r
}\r