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
86b043348c
commit
ae8017d8d2
1 changed files with 3 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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue