Merge branch 'master' of github.com:wesnoth/wesnoth
This commit is contained in:
commit
320f58cdde
2 changed files with 7 additions and 0 deletions
|
@ -67,6 +67,9 @@ function battle_calcs.unit_attack_info(unit, cache)
|
|||
end
|
||||
end
|
||||
|
||||
-- 'number' key is apparently not included in attack table if its value is zero
|
||||
a.number = a.number or 0
|
||||
|
||||
table.insert(unit_info.attacks, a)
|
||||
end
|
||||
|
||||
|
|
|
@ -50,6 +50,10 @@ function wesnoth.wml_actions.micro_ai(cfg)
|
|||
-- Check that the required common keys are all present and set correctly
|
||||
if (not cfg.ai_type) then H.wml_error("[micro_ai] is missing required ai_type= key") end
|
||||
if (not cfg.side) then H.wml_error("[micro_ai] is missing required side= key") end
|
||||
if (not wesnoth.sides[cfg.side]) then
|
||||
wesnoth.message("Warning", "[micro_ai] uses side=" .. cfg.side .. ": side does not exist")
|
||||
return
|
||||
end
|
||||
if (not cfg.action) then H.wml_error("[micro_ai] is missing required action= key") end
|
||||
|
||||
if (cfg.action ~= 'add') and (cfg.action ~= 'delete') and (cfg.action ~= 'change') then
|
||||
|
|
Loading…
Add table
Reference in a new issue