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:
mattsc 2015-05-19 19:54:09 -07:00
parent c538e5f984
commit 25e10121f5

View file

@ -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