Update deprecated lua
This commit is contained in:
parent
1cacd12a89
commit
5fe043c288
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ function wesnoth.effects.wc2_min_defense(u, cfg)
|
|||
local defense_new = {}
|
||||
local defense_old = wml.parsed(wml.get_child(cfg, "defense"))
|
||||
for k,v in pairs(defense_old) do
|
||||
if type(k) == "string" and type(v) == "number" and wesnoth.unit_defense(u, terrain_map[k] or "") >= v then
|
||||
if type(k) == "string" and type(v) == "number" and wesnoth.units.defense_on(u, terrain_map[k] or "") >= v then
|
||||
defense_new[k] = v
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue