The promotion popup would not be shown for HM and GB with legality testing
on because the piece types used for them were wild-card pieces. The Lance
was treated as a Pawn in HasPrmotionChoice().
promotionZoneSize = 3;
}
- // Treat Lance as Pawn when it is not representing Amazon
- if(gameInfo.variant != VariantSuper) {
+ // Treat Lance as Pawn when it is not representing Amazon or Lance
+ if(gameInfo.variant != VariantSuper && gameInfo.variant != VariantChu) {
if(piece == WhiteLance) piece = WhitePawn; else
if(piece == BlackLance) piece = BlackPawn;
}
/* [HGM] Cobra and Falcon are wildcard pieces; consider all their moves legal */
/* (perhaps we should disallow moves that obviously leave us in check?) */
- if(piece == WhiteFalcon || piece == BlackFalcon ||
- piece == WhiteCobra || piece == BlackCobra)
+ if((piece == WhiteFalcon || piece == BlackFalcon ||
+ piece == WhiteCobra || piece == BlackCobra) && gameInfo.variant != VariantChu)
return CheckTest(board, flags, rf, ff, rt, ft, FALSE) ? IllegalMove : NormalMove;
cl.rf = rf;