increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
903 stars 159 forks source link

Explicit win commands not executing in certain cases #574

Closed chz16 closed 3 years ago

chz16 commented 3 years ago

I suspect these are a result of the change to fix #553, but I don't know for sure so I'm just making this a new issue

Problem number 1: if a rule that calls win is run on level start, the win won't actually happen, even though it says "Win Condition Satisfied" in the log. Test cases (both a normal rule and a late rule): https://www.puzzlescript.net/editor.html?hack=9a150be4835c3902e1ef95767a7b0ea0

Problem number 2: if a rule that calls win is run on an again turn without making any tile changes (i.e. something like [Marker1] -> win or [Marker1] -> [Marker1] win), that rule won't execute at all. Both conditions are necessary; the rule will run on the next main turn if it's still valid, and if the rule does make a modification like [Marker1] -> [] win then it'll run on the again turn. Test case: https://www.puzzlescript.net/editor.html?hack=6591340f71df9a30980be848275f2557

increpare commented 3 years ago

sounds likely that it's due to #553 - good catch. I'll get on it asap. Thanks.

increpare commented 3 years ago

note to self: problem # 1 is not dependent on #553, just problem # 2