From acf207122fb8aa86ea9fb8ae1b34d9d301995414 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 16 Feb 2021 23:09:43 +0100
Subject: [PATCH] Fix Pandemonium updateCastleFlags()

---
 client/src/variants/Pandemonium.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/src/variants/Pandemonium.js b/client/src/variants/Pandemonium.js
index dae08861..287aa3bf 100644
--- a/client/src/variants/Pandemonium.js
+++ b/client/src/variants/Pandemonium.js
@@ -648,7 +648,7 @@ export class PandemoniumRules extends ChessRules {
   }
 
   updateCastleFlags(move, piece) {
-    if (move.appear.length == 2) {
+    if (piece == V.KING && move.appear.length == 2) {
       // Castling (only move which disable flags)
       this.castleFlags[move.appear[0].c][0] = 10;
       this.castleFlags[move.appear[0].c][1] = 10;
-- 
2.44.0