DiD S6: fixed previously stored orc leader ending up in the wrong place (fixes #3304)

[ci skip]
This commit is contained in:
Charles Dang 2018-07-03 06:47:30 +11:00
parent e2fd9749a6
commit 78076941a0

View file

@ -198,25 +198,21 @@
# Replace the fallback orcish leader with the stored one from the # Replace the fallback orcish leader with the stored one from the
# previous scenario # previous scenario
[if] [lua]
[variable] code = <<
name=orc_leader_store.side local saved_orc_leader = wml.variables.orc_leader_store
not_equals=$empty
[/variable]
[then] if saved_orc_leader ~= nil then
{VARIABLE orc_leader_store.x 29} saved_orc_leader.side = 2
{VARIABLE orc_leader_store.y 2} saved_orc_leader.facing = se
{VARIABLE orc_leader_store.side 2}
[unstore_unit] local loc = wesnoth.get_starting_location(2)
variable=orc_leader_store wesnoth.put_unit(saved_orc_leader, loc[1], loc[2])
find_vacant=no
[/unstore_unit]
{CLEAR_VARIABLE orc_leader_store} wml.variables.orc_leader_store = nil
[/then] end
[/if] >>
[/lua]
[/event] [/event]
[event] [event]