Fast Micro AI: 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 d4213371b1)
This commit is contained in:
mattsc 2018-08-10 07:05:01 -07:00
parent 7027930cf1
commit 35df7f6ba0

View file

@ -140,9 +140,9 @@ function ca_fast_attack_utils.single_unit_info(unit_proxy)
if (sp[2].id == 'charge') then a.charge = true end
end
else
-- magical, marksman
-- magical, marksman, custom chance-to-hit specials
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