diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index 44a490ba..3139c656 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -274,7 +274,7 @@ module.exports = class ChessCommand extends Command { const parsed = this.pickImage(piece); const img = this.images[parsed.color][parsed.name]; const { x, y, width, height } = centerImagePart(img, 62, 62, w, h); - if ((gameState.check || gameState.checkMate) && piece.toUpperCase() === 'K') { + if ((gameState.check || gameState.checkMate) && piece === gameState.turn === 'white' ? 'K' : 'k') { ctx.fillStyle = 'red'; ctx.globalAlpha = 0.5; ctx.fillRect(w, h, 62, 62);