X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FChakart.js;h=0042bf1ac4f77af6fc07488d3958cf60f04da311;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hp=14e64b5c0e11fd3cac23c9c9a58c291a7e510f47;hpb=54879803f060e8243291735d02181f350c4dfe78;p=vchess.git diff --git a/client/src/variants/Chakart.js b/client/src/variants/Chakart.js index 14e64b5c..0042bf1a 100644 --- a/client/src/variants/Chakart.js +++ b/client/src/variants/Chakart.js @@ -1018,7 +1018,11 @@ export class ChakartRules extends ChessRules { if (move.end.effect == "toadette") this.reserve = this.captured; else this.reserve = undefined; const color = move.turn[0]; - if (move.vanish.length == 2 && move.vanish[1].c != 'a') { + if ( + move.vanish.length == 2 && + move.vanish[1].c != 'a' && + move.appear.length == 1 //avoid king Boo! + ) { // Capture: update this.captured let capturedPiece = move.vanish[1].p; if (capturedPiece == V.INVISIBLE_QUEEN) capturedPiece = V.QUEEN; @@ -1145,9 +1149,9 @@ export class ChakartRules extends ChessRules { return "*"; } - static GenRandInitFen(randomness) { + static GenRandInitFen(options) { return ( - SuicideRules.GenRandInitFen(randomness).slice(0, -1) + + SuicideRules.GenRandInitFen(options).slice(0, -1) + // Add Peach + Mario flags + capture counts "1111 000000000000" );