07-19-2021, 01:15 PM
I am trying to implement Murus Gallicus and Advanced Murus Gallicus. I've had some success with basic Murus Gallicus. AMG is very similar to MG but has catapults (stacks of 3). I am trying to use Slide to "throw" a stone two or three cells in forwards or lateral directions. It seems that the "to" conditions are not restricting target cells. Below is the code that I think is having a problem. Of course, the problem could be due to me, but after many hours trying I am starting to think something may be wrong because I am using using Slide with stacks. Below is the macro that I think is having the problem. I have also attached the complete lud file. You can just load the file and try moving one of the 3-stacks.
Thanks, Phil
(define "ThrowStone"
(move
Slide
(from if:(and (is Mover (who at:(from)))
((= (size Stack at:(from)) 3))
)
)
(directions {Forwards Rightward Leftward})
(between (range 2 3) if:True )
(to (sites Occupied by:NonMover)) // Problem: Still allows move to a mover stack
// (to (sites Empty)) // Same Problem: Still allows move to a mover stack
stack: False // << One token moves, True all tokens move
)
)
Thanks, Phil
(define "ThrowStone"
(move
Slide
(from if:(and (is Mover (who at:(from)))
((= (size Stack at:(from)) 3))
)
)
(directions {Forwards Rightward Leftward})
(between (range 2 3) if:True )
(to (sites Occupied by:NonMover)) // Problem: Still allows move to a mover stack
// (to (sites Empty)) // Same Problem: Still allows move to a mover stack
stack: False // << One token moves, True all tokens move
)
)