[world conquest] Restored 2 instances of wml.parsed
1. removed the "cfg = cfg" thing 2. restored 2 instances of wml.parsed() As for the wml.parsed() in line 74 of effects.lua, I chose to not re-add it as it causes an error.
This commit is contained in:
parent
45d7372e69
commit
0547941b13
2 changed files with 2 additions and 3 deletions
|
@ -66,7 +66,7 @@ end
|
|||
-- Like apply_to=resistance with replace=true, but never decreases resistances.
|
||||
function wesnoth.effects.wc2_min_resistance(u, cfg)
|
||||
local resistance_new = {}
|
||||
local resistance_old = wml.get_child(cfg, "resistance")
|
||||
local resistance_old = wml.parsed(wml.get_child(cfg, "resistance"))
|
||||
local unit_resistance_cfg = nil
|
||||
for k,v in pairs(resistance_old) do
|
||||
if type(k) == "string" and type(v) == "number" then
|
||||
|
@ -91,7 +91,7 @@ end
|
|||
-- Like apply_to=defense with replace=true, but never decreases defense.
|
||||
function wesnoth.effects.wc2_min_defense(u, cfg)
|
||||
local defense_new = {}
|
||||
local defense_old = wml.get_child(cfg, "defense")
|
||||
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
|
||||
defense_new[k] = v
|
||||
|
|
|
@ -76,7 +76,6 @@ function set_terrain_impl(data)
|
|||
end
|
||||
|
||||
function set_terrain_simul(cfg)
|
||||
cfg = cfg
|
||||
local data = {}
|
||||
for i, r in ipairs(cfg) do
|
||||
r_new = {
|
||||
|
|
Loading…
Add table
Reference in a new issue