Lua AI utility functions: fix for chance-to-hit specials without id
All mainline chance-to-hit weapon specials have ids, but it is not required for UMC specials.
(cherry-picked from commit 5335a2af33
)
This commit is contained in:
parent
3906d78abd
commit
6ad4c7e42d
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ function battle_calcs.unit_attack_info(unit, cache)
|
|||
else
|
||||
-- magical, marksman
|
||||
if (sp[1] == 'chance_to_hit') then
|
||||
a[sp[2].id] = true
|
||||
a[sp[2].id or 'no_id'] = true
|
||||
else
|
||||
a[sp[1]] = true
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue