About giving Royal attribute to pieces
Compact/ Chess Interchange Format
Status: Pre-Alpha
Brought to you by:
gcramer
In Ko Shogi https://en.wikipedia.org/wiki/Ko_shogi?wprov=sfti1 There is a multi-royal-pieces game.
In this game. When the General is captured, if the Middle troop and Banner on the player's field, the player is not lose. But when Banner or Middle troop is captured, the player is lose. When the Middle troop promote to Governor, it have the attribute of royal piece. I think when Banner on the field, Middle troop have the attribute of royal piece, but when Banner is captured, Middle troop is lose it's royal attribute.
How can I achieve it in C/CIF?
Ko Shogi has very complex rules, especially the promotion rules are very complex, and I need to invent some more board rules:
royal{PieceSet}
This means that only N of the royal piece types have to be captured to win the game. Per default all royal pieces have to be captured to win the game. Note that this attribute is useful only if also attribute "expose" will be applied. Example:
royal{KM}=expose,capture(1)
As soon as one of the pieces K or M will be captured, the game is won.
promotion
If any pair of the given pieces are fulfilling the underlying rule then the associated piece promotion rules will be applied. Example:
promotion-=range{:FF::IM:}{:Q5:} -:FF:==:TB: @:Q5:=Q5
If piece :FF: and :IM: ever find themselves within five open intersections of each other in a queen's direction (rule associated with :Q5:), piece :FF: immediately reverts to :TB: (with rule system "-").
Remove this promotion rule for the side that has moved as soon as one of the given pieces have been captured. This implies that all the promoted pieces of the side that has moved will demote, if their promotion was caused by this promotion rule. Example:
promotion*=annulling{:TB:} *B==:RA:
As soon as the opponent is capturing piece :TB:, all friendly pieces of type :RA: will demote to B immediately, and the promotion rule "*B==:RA:" is not applicable anymore for the side who has lost piece :TB:.
All enemy pieces in given piece set will die (removed from board) as soon as any associated piece promotion rule will be applied. Example:
promotion+{:SC:}=die{:PF:} +:SC:==:MM:
As soon as a piece :SC: is promoting to :MM: (with rule system "+"), all enemy pieces :PF: will be removed from board.
Only promote if also at least one piece of each piece type is inside the promotion zone. Example:
promotion+{:SC:}=withinzone{:FD:R} +:SC:==:MM:
As soon as piece :SC: is entering the last rank (promotion zone), it will promote to :MM:, but only if either a piece of type :FD: or of type R is already located on last rank.
Promote all pieces belonging to given piece types on the spot with associated piece promotion rule if any of the pieces belonging to the piece type set of the board rule is promoting. Example:
promotion+{A}=promote{B} +A==C +B==D
Promote pieces of type B as well on the spot concurrently when a piece of type A is promoting to C (with rule system "+").
Now we are ready for defining the rules of Ko Shogi:
Last edit: Gregor Cramer 2020-03-02
there is a little wrong, Pawn could not go foward only if the drum has captured.