I have a simple condition for a trigger: {SumStack(“donkey”)=~“1|2”}
This works fine, preventing the action when 3 or more donkeys are in a stack, but after an undo, even a stack with just one donkey, for example, cannot do the action until the donkey is moved again.
SumStack is actually doing the correct thing. At that point in time, the single Donkey that can’t reproduce is a ‘Does Not Stack’ piece that does not have a Stack, so SumStack of any property will always be 0. Hence why changing your Trigger condition to include 0 solved the problem.
The real bug is that the Donkey is not actually a ‘Does Not Stack’ piece until the Undo is done. The Undo is moving the piece back to the correct location, but not linking it into a Stack at that location. When you move it, it fixes itself, because the PieceMover creates a new Stack for it at the destination. Refreshing the counters will also fix the problem.
I have been able to reproduce this ‘undo unstacking’ behaviour using your module and can investigate further. This is a bug we have suspected, but never been able to reproduce before. Thanks for the report and follow up.