From 0f50b753f41d035dc5c9e799cc2aa061a547d38e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 30 Apr 2023 18:22:59 +0200 Subject: Fix Riverines crash if impossible. --- events.txt | 2 +- rules.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/events.txt b/events.txt index 7ac5fef..489dbf0 100644 --- a/events.txt +++ b/events.txt @@ -1151,7 +1151,7 @@ EVENT 69 endspace endif prompt "Select destination Department." - space 1 (s !== game.vm.m[0]) && is_within_adjacent_depts(s, game.vm.m[0], 3) && can_stack_any(s, game.current) + space 1 game.vm.m && (s !== game.vm.m[0]) && is_within_adjacent_depts(s, game.vm.m[0], 3) && can_stack_any(s, game.current) if game.current === GOVT prompt "Move cubes to destination." piece_undo_opt all (s === game.vm.m[0]) && is_cube(p) && can_stack_any(s, GOVT) diff --git a/rules.js b/rules.js index 0b88ec9..7900f74 100644 --- a/rules.js +++ b/rules.js @@ -9753,7 +9753,7 @@ CODE[69 * 2 + 0] = [ [ vm_endspace ], [ vm_endif ], [ vm_prompt, "Select destination Department." ], - [ vm_space, true, 1, 1, (s)=>(s !== game.vm.m[0]) && is_within_adjacent_depts(s, game.vm.m[0], 3) && can_stack_any(s, game.current) ], + [ vm_space, true, 1, 1, (s)=>game.vm.m && (s !== game.vm.m[0]) && is_within_adjacent_depts(s, game.vm.m[0], 3) && can_stack_any(s, game.current) ], [ vm_if, ()=>game.current === GOVT ], [ vm_prompt, "Move cubes to destination." ], [ vm_piece, true, 0, 999, (p,s)=>(s === game.vm.m[0]) && is_cube(p) && can_stack_any(s, GOVT) ], -- cgit v1.2.3