DiD S8: add variable handler for debug and old saves

This commit is contained in:
nemaara 2019-02-28 23:33:20 -05:00
parent 61380e44ad
commit 078180372a

View file

@ -328,6 +328,11 @@
[/command]
[/random_placement]
# this code is a handler in case this scenario is reached via debug or an old save which did not include this variable
[lua]
code = << if wesnoth.get_variable("S7_turns")==nil then wesnoth.set_variable("S7_turns",5) end >>
[/lua]
[set_variable]
name=S7_turns
value=$(min({ON_DIFFICULTY 7 6 5},($S7_turns)))