From a90193c2d1b0aef2658c9903065ce85b280ee971 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Feb 2021 11:02:12 -0500 Subject: [PATCH] Fix --- commands/games-mp/chess.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index 4cfc0f4a..4aa2551c 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -210,6 +210,7 @@ module.exports = class ChessCommand extends Command { const possiblePieces = Object.keys(gameState.pieces).filter(piece => { if (gameState.pieces[piece] !== initial) return false; if (move[2] && !piece.startsWith(move[2])) return false; + if (!moves[piece]) return false; return moves[piece].includes(move[3]); }); if (possiblePieces.length === 1) return [possiblePieces[0], move[3]];