sub Apothecary_King from to:
if checkleap #from #to 1 1 or checkleap #from #to 1 0:
return true;
endif;
move #to #from;
if checkleap #from #to 1 3
or checkleap #from #to 1 2
and match rankname #to 1 10
and flag #from :
if not sub checked #from:
move #from #to;
return true;
else die You may not perform the special moves out of check.;
endif;
endif;
return false;
endsub;
When trying to use regular moves out of check, I get the error "you cannot move into check.". This happens with or without the else part.
The new sub looks like this:
sub Apothecary_King from to:
if checkleap #from #to 1 1 or checkleap #from #to 1 0:
return true;
endif;
move #to #from;
if checkleap #from #to 1 3
or checkleap #from #to 1 2
and match rankname #to 1 10
and flag #from :
if not sub checked #from:
move #from #to;
return true;
else die You may not perform the special moves out of check.;
endif;
endif;
return false;
endsub;
When trying to use regular moves out of check, I get the error "you cannot move into check.". This happens with or without the else part.