Allow [modify_unit] to modify [advancement]

This commit is contained in:
Charles Dang 2015-09-03 01:24:14 +11:00
parent 1d4bde10f6
commit 1a606a51b1

View file

@ -711,7 +711,7 @@ function wml_actions.modify_unit(cfg)
local current_tag = current_table[1]
if current_tag == "filter" then
-- nothing
elseif current_tag == "object" or current_tag == "trait" then
elseif current_tag == "object" or current_tag == "trait" or current_tag == "advancement" then
local unit = wesnoth.get_variable(unit_path)
unit = wesnoth.create_unit(unit)
wesnoth.add_modification(unit, current_tag, current_table[2])