H. G. Muller wrote on Wed, Sep 14, 2016 02:24 PM UTC:
The WeidPromotion script says that promotion to pieces > 4 should be refused (when not on last rank). I wrote itthat way, because I assumed the order P, N, B, R, Q, ...But you defined the piece in the order P, B, R, Q, ... and the Knight last. So then only B, R and Q are <= 4. You should edit the definition of the diagram toorder the piece definitionlines such that allpieces you want to allow promotion to on 8th/9th rank immediately follow Pawn, and put the forbidden pieces behind them. And then you might have to adapt the 4 in the WeirdPromotion script to the size of the allowed subset.
The WeidPromotion script says that promotion to pieces > 4 should be refused (when not on last rank). I wrote itthat way, because I assumed the order P, N, B, R, Q, ...But you defined the piece in the order P, B, R, Q, ... and the Knight last. So then only B, R and Q are <= 4. You should edit the definition of the diagram toorder the piece definitionlines such that allpieces you want to allow promotion to on 8th/9th rank immediately follow Pawn, and put the forbidden pieces behind them. And then you might have to adapt the 4 in the WeirdPromotion script to the size of the allowed subset.