Fix Teleport bug on subturn 2
authorBenjamin Auder <benjamin.auder@somewhere>
Mon, 2 May 2022 12:42:05 +0000 (14:42 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Mon, 2 May 2022 12:42:05 +0000 (14:42 +0200)
base_rules.js

index 5d91c72..2b2ecfa 100644 (file)
@@ -1238,6 +1238,8 @@ export default class ChessRules {
 
   // All possible moves from selected square
   getPotentialMovesFrom(sq, color) {
+    if (this.subTurnTeleport == 2)
+      return [];
     if (typeof sq[0] == "string")
       return this.getDropMovesFrom(sq);
     if (this.isImmobilized(sq))