X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FOrda.js;h=1ff4898a2bb7efc0e46d79c912d014a4ae6de6fe;hb=c3ff3a0c807d97c0311a06491318fe02440266db;hp=f1bfc911ef30ea6cf8d29c041199ee4282c1a84c;hpb=79e05a1ac8a396aa3655b195998ef1f07cdba68e;p=vchess.git diff --git a/client/src/variants/Orda.js b/client/src/variants/Orda.js index f1bfc911..1ff4898a 100644 --- a/client/src/variants/Orda.js +++ b/client/src/variants/Orda.js @@ -143,7 +143,7 @@ export class OrdaRules extends ChessRules { let j = y + step[1]; while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) { if (!options.onlyTake) moves.push(this.getBasicMove([x, y], [i, j])); - if (oneStep) continue outerLoop; + if (!!oneStep) continue outerLoop; i += step[0]; j += step[1]; } @@ -234,13 +234,14 @@ export class OrdaRules extends ChessRules { this.isAttackedByKheshig(sq, color) ); } - // Horde: only pawn and queen (if promotions) in common: + // Horde: only pawn, king and queen (if promotions) in common: return ( super.isAttackedByPawn(sq, color) || this.isAttackedByLancer(sq, color) || this.isAttackedByKheshig(sq, color) || this.isAttackedByArcher(sq, color) || this.isAttackedByYurt(sq, color) || + super.isAttackedByKing(sq, color) || super.isAttackedByQueen(sq, color) ); }