Check out Atomic Chess, our featured variant for November, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
📝H. G. Muller wrote on Sun, Jan 29, 2023 10:38 AM UTC in reply to A. M. DeWitt from Sat Jan 28 09:36 PM:

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.