Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

AA weapons never get the bomber target priority (isaa read from the unit weapon entry)

Open moss-orbit-9f339e opened this issue 1 month ago • 0 comments

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).

moss-orbit-9f339e avatar Oct 13 '26 17:10 moss-orbit-9f339e