📝H. G. Muller wrote on Mon, Jun 8, 2020 05:31 PM UTC:
In an engine I solve this by making a Lion that captured a Lion (from a distance, etc.) a temporary absolute royal for one turn. Then playing Ln x protected Ln is considered exposing yourself to check. (In my Crazyhouse engine I do something similar to enforce the ban on castling through check: castling initially ends up with the Rook replaced by a second King. After move generation of the opponent (which would detect the King capture) I then replace that by the Rook it should be. After Other x Lion I make the opponent's Lion iron for one move.
All you need is the concept of 'temporary promotion', piece types that at the beginning of their own turn revert to the unpromoted form. And then have some extra types that are royal and iron.
Btw, note that the counter-strike rule on Lions does not hold when the two Lions are captured on the same square. If a Kirin captures a Lion and promotes in that same move (to Lion), it is allowed to recapture it.
In an engine I solve this by making a Lion that captured a Lion (from a distance, etc.) a temporary absolute royal for one turn. Then playing Ln x protected Ln is considered exposing yourself to check. (In my Crazyhouse engine I do something similar to enforce the ban on castling through check: castling initially ends up with the Rook replaced by a second King. After move generation of the opponent (which would detect the King capture) I then replace that by the Rook it should be. After Other x Lion I make the opponent's Lion iron for one move.
All you need is the concept of 'temporary promotion', piece types that at the beginning of their own turn revert to the unpromoted form. And then have some extra types that are royal and iron.
Btw, note that the counter-strike rule on Lions does not hold when the two Lions are captured on the same square. If a Kirin captures a Lion and promotes in that same move (to Lion), it is allowed to recapture it.