diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index a91bd24249d..c2497b79304 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -933,7 +933,7 @@ end function wml_actions.harm_unit(cfg) local filter = helper.get_child(cfg, "filter") or helper.wml_error("[harm_unit] missing required [filter] tag") -- we need to use shallow_literal field, to avoid raising an error if $this_unit (not yet assigned) is used - if not cfg.__shallow_literal.amount then helper.wml_error("[harm_unit] has missing required amount= attribute") end + if not helper.shallow_literal(cfg).amount then helper.wml_error("[harm_unit] has missing required amount= attribute") end local variable = cfg.variable -- kept out of the way to avoid problems local _ = wesnoth.textdomain "wesnoth" -- #textdomain wesnoth