mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-19 12:45:00 +00:00
Lua AIs: fix bug occurring when number= in an attack is set to zero
Apparently, when this is the case, the number key is not included at all, rather than set to zero, when the Lua table containing the attack information is retrieved.
This commit is contained in:
parent
c538e5f984
commit
25e10121f5
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user