From 52bba5a41ea04d89922d4a039e5aa405b72aff00 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 16 Mar 2021 10:25:36 +0100
Subject: [PATCH] Fix Spartan Chess: warlord attacks now detected

---
 client/src/variants/Spartan.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/src/variants/Spartan.js b/client/src/variants/Spartan.js
index acab8ad3..2400e040 100644
--- a/client/src/variants/Spartan.js
+++ b/client/src/variants/Spartan.js
@@ -274,9 +274,9 @@ export class SpartanRules extends ChessRules {
 
   isAttackedByWarlord(sq) {
     return (
-      super.isAttackedBySlideNJump(sq, 'b', V.GENERAL,
-        V.steps[V.ROOK].concat(V.steps[V.BISHOP]), "oneStep") ||
-      super.isAttackedBySlideNJump(sq, 'b', V.GENERAL, V.steps[V.ROOK])
+      super.isAttackedBySlideNJump(
+        sq, 'b', V.WARLORD, V.steps[V.KNIGHT], "oneStep") ||
+      super.isAttackedBySlideNJump(sq, 'b', V.WARLORD, V.steps[V.BISHOP])
     );
   }
 
-- 
2.44.0