Fix some variants and improve a few other things a little bit
[vchess.git] / client / src / variants / Knightrelay.js
index eebb0f2..de1e89a 100644 (file)
@@ -29,7 +29,7 @@ export const VariantRules = class KnightrelayRules extends ChessRules {
             // Potential promotions:
             const finalPieces = piece == V.PAWN && x + step[0] == lastRank
               ? [V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN]
-              : [V.PAWN];
+              : [piece];
             for (let p of finalPieces) {
               moves.push(
                 this.getBasicMove([x,y], [x+step[0],y+step[1]], {