No, this may work for potential moves, but it will not work for actual moves. I believe you should replace "empty where #0 0 -1" with "cond empty #0 capture empty #1". Also, the function would be better optimized for most legal moves, as well as for testing for check on the King, if you reversed its two parts. This will also allow you to use breaking logic all the way through.
def White_Elephant checkaleap #0 #1 0 -1 and cond empty #0 capture empty #1 or checkleap #0 #1 2 2;
def Black_Elephant checkaleap #0 #1 0 1 and cond empty #0 capture empty #1 or checkleap #0 #1 2 2;
No, this may work for potential moves, but it will not work for actual moves. I believe you should replace "empty where #0 0 -1" with "cond empty #0 capture empty #1". Also, the function would be better optimized for most legal moves, as well as for testing for check on the King, if you reversed its two parts. This will also allow you to use breaking logic all the way through.