From: Benjamin Auder Date: Tue, 16 Mar 2021 09:25:36 +0000 (+0100) Subject: Fix Spartan Chess: warlord attacks now detected X-Git-Url: https://git.auder.net/variants/img/current/assets/css/pieces/%7B%7B%20pkg.url%20%7D%7D?a=commitdiff_plain;h=52bba5a41ea04d89922d4a039e5aa405b72aff00;p=vchess.git Fix Spartan Chess: warlord attacks now detected --- 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]) ); }