Skip to content

Commit

Permalink
Lua AI utility functions: fix for chance-to-hit specials without id
Browse files Browse the repository at this point in the history
All mainline chance-to-hit weapon specials have ids, but it is not required for UMC specials.
  • Loading branch information
mattsc committed Aug 29, 2018
1 parent aa59ac5 commit 5335a2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/ai/lua/battle_calcs.lua
Expand Up @@ -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
Expand Down

0 comments on commit 5335a2a

Please sign in to comment.