Indeed, a user promotion choice does overrule everything else. If a fixed promotion is required for pieces that would offer choice, the promotion query should be suppressed. Not only because it would prevail, but because it makes no sense at all to let the user choose and then do something else.
The mechanism the Diagram uses for this is to call WeirdPromotion() with the promo parameter set to 1021 (which is not a valid piece type), to inquire whether there is promotion choice. When this call returns 1001 the query will be suppressed, when it returns 1000 a query is forced, and in any other case it decides itself (based on maxPromote, promoZone and promoChoice).
In the AI it works slightly different; there (for a piece that could normally promote) WeirdPromotion() is called with promo equal to the promoted piece (as per promoOffset), and to suppress the promotion this would have to return 1022. It is the deferral (promo=0) that must be turned into a kamikaze move by returning 251, so that moves that would not naturally promote also get burned.
So when a passive burn is detected, WeirdPromotion() should return 1001 if promo == 1021, 251 if promo == 0 and 1022 otherwise.
Indeed, a user promotion choice does overrule everything else. If a fixed promotion is required for pieces that would offer choice, the promotion query should be suppressed. Not only because it would prevail, but because it makes no sense at all to let the user choose and then do something else.
The mechanism the Diagram uses for this is to call WeirdPromotion() with the promo parameter set to 1021 (which is not a valid piece type), to inquire whether there is promotion choice. When this call returns 1001 the query will be suppressed, when it returns 1000 a query is forced, and in any other case it decides itself (based on maxPromote, promoZone and promoChoice).
In the AI it works slightly different; there (for a piece that could normally promote) WeirdPromotion() is called with promo equal to the promoted piece (as per promoOffset), and to suppress the promotion this would have to return 1022. It is the deferral (promo=0) that must be turned into a kamikaze move by returning 251, so that moves that would not naturally promote also get burned.
So when a passive burn is detected, WeirdPromotion() should return 1001 if promo == 1021, 251 if promo == 0 and 1022 otherwise.