AI : T2 Static Artillery does not get assigned SurfaceThreatLevel
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
**Describe the bug**
In the SetUnitThreatValues function inside blueprints-ai.lua there is a line here.
`local mobileUnit = bp.CategoriesHash.MOBILE`
`local weaponIsEconomicThreat = (weapon.DamageType == 'Nuke' or weapon.ArtilleryShieldBlocks) and (not mobileUnit or weapon.MinRadius > 80)`
We did some work to it a while ago trying to get indirect fire units to get surface threat but not big strategic weapons. Turns out we didn't test T2 Static artillery as it falls into the weaponIsEconomicThreat bool. So it gets economic threat instead of surface threat. Which in turn stops units from being scared of them.
**To Reproduce**
Log blueprint function during startup to check blueprint values set for t2 static artillery.
**Expected behavior**
The T2 Static Artillery should emit SurfaceThreat so that units will know it is dangerous to approach.
**Additional context**
I had a think about it but there was nothing obvious that I could do to exclude them without having some silly TECH2 based exception for these specific unit types. Though thinking about it assigning economic AND surface threat to structures like this might not be a bad thing. A firebase isn't cheap.
Contributor guide
Assessment
This issue has not been assessed yet.