if flag f2:
if == moved K:
if sub checked $origin:;
if not or checkleap $origin $dest 1 0 checkleap $origin $dest 1 1:
die A King may not use the special moves out of check.;
endif;
endif;
endif;
endif;
There is still the problem that the special moves are displayed as legal when a king is in check. Is that solvable?
@Fergus,
I have remade the code to work as expected for the king to not be able to use the special moves out of check:
http://play.chessvariants.com/pbm/play.php?game%3DApothecary+Chess+1%26settings%3DApothecary1working
The relevant piece of code for white is:
if flag f2:
if == moved K:
if sub checked $origin:;
if not or checkleap $origin $dest 1 0 checkleap $origin $dest 1 1:
die A King may not use the special moves out of check.;
endif;
endif;
endif;
endif;
There is still the problem that the special moves are displayed as legal when a king is in check. Is that solvable?