I was able to get rid of my syntax error by moving my conditional to the "ColumnHopSequence" define. So now the if statement that sets whether another hop can occur requires that no capture happened:
Unfortunately this has no effect, I think because the enemy piece has already been removed by default. I believe it might work if I can change the remove to happen at:EndOfTurn, but I don't know where to do that since there is no explicit remove.
I tried using at:EndOfTurn in my capture define for Slide and it removed the player piece—which I guess means the enemy piece was already gone, or it removed every piece on the (to).
The define works without that apply line, so I guess I need a global meta setting to override the automatic "landing on an enemy piece applies immediate removal of that piece" and change it to "leave captured piece in place so it can be checked, then remove at end of turn".
Am I right, or have I simply written the code wrong?
Code:
(define "ColumnHopSequence"
("ColumnHop"
#1
#2
(then
(if
(and
(can Move ("ColumnHop" (last To) #2))
(not (is Enemy (who at:(last From))))
)
#3
)
)
)
)
Unfortunately this has no effect, I think because the enemy piece has already been removed by default. I believe it might work if I can change the remove to happen at:EndOfTurn, but I don't know where to do that since there is no explicit remove.
I tried using at:EndOfTurn in my capture define for Slide and it removed the player piece—which I guess means the enemy piece was already gone, or it removed every piece on the (to).
Code:
(define "CaptureToPiece"
if:(and
(is Enemy (who at:(to)))
(not (is In (to) ("EnemyBase")))
)
(apply (remove (to) at:EndOfTurn))
)
The define works without that apply line, so I guess I need a global meta setting to override the automatic "landing on an enemy piece applies immediate removal of that piece" and change it to "leave captured piece in place so it can be checked, then remove at end of turn".
Am I right, or have I simply written the code wrong?