X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FTitan.js;h=425e08d8c66b778183889ce44396c15c81d6c42d;hp=4d71b857fbfb522d96d4d6525db06d98aa5e5a17;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hpb=cee75a57d2f4f89c89d64cefbab55d839a238ed9 diff --git a/client/src/variants/Titan.js b/client/src/variants/Titan.js index 4d71b857..425e08d8 100644 --- a/client/src/variants/Titan.js +++ b/client/src/variants/Titan.js @@ -154,6 +154,8 @@ export class TitanRules extends ChessRules { const [x, y] = [square[0], square[1]]; if ((color == 'w' && x != 7) || (color == 'b' && x != 0)) return null; const selectedPiece = this.board[x][y][1]; + // Prevent re-augmenting a chosen piece: + if (!ChessRules.PIECES.includes(selectedPiece)) return null; return new Move({ appear: [ new PiPo({