Zero-K
Zero-K copied to clipboard
AA weapons never get the bomber target priority (isaa read from the unit weapon entry)
LuaRules/Configs/target_priority_defs.lua reads wd.customParams.isaa, but wd is the unit's weapon entry (UnitDefs[i].weapons[j]), which has no customParams. So weaponIsAA is never set, and the unitIsBomber[uid] and weaponIsAA[wid] case (priority x0.3) never applies: AA weapons do not prefer bombers. 19 unit files set isaa.
The fix would be to read WeaponDefs[realWD].customParams.isaa. This changes AA targeting that has been like this since 2013 or earlier, so it is a gameplay decision.
Found with Claude Code (AI).