MrAnon
Chieftain
A ground unit that intercepts an aircraft also uses the combat logic in the resolveaircombat code posted above. Which means that if intercepted, the attacking aircraft actually combats the intercepting unit. Imagine a fighter doing an airstrike. If the defending ground unit manages to intercept, the fighter aborts it's airstrike to attack the interceptor (flak) in stead. I don't think this type of mission has ever happened in aviation history...
Oh, it's happened many, many times. Often the lead elements of a strike have both SEAD and normal attack ordnance onboard. If there is air defense, the a/c will try to suppress it and then continue the attack or go home.
What actually happens in gameplay is that an interception ends a mission; regardless of the outcome. If it's a CAP intercept, the a/c fight but if it's a G2A (ground to air) intercept then the a/c is damaged, aborts the mission and goes home. I've never seen a G2A intercept where the a/c attacked the shooter, they always abort.
From playing, it appears that if the ground unit makes it's intercept check it does the full amount of it's iCombat variable and if it fails the check, then the interception doesn't happen.
In a CAP intercept, however, it seems that making the intercept check initiates combat. Interestingly, iAirCombatLimit is set to 50% in the stock CIV4UnitInfos.xml. This means that unless an aircraft was fairly badly hurt before entering combat, it doesn't get shot down - it goes home damaged. Right now, I'm playing with the value to 100 because in modern air-to-air combat, you rarely survive a hit. It doesn't seem to have unbalanced anything; I still have a/c come home damaged, just not so many as before.
A much better approach would be to have an intercpetion check from air units, and a separate check from ground (non-air in this case) units. The interceptions made from ground units should result in low damage to the aircraft, and no damage to the interceptor. Evasion should be particular effective at preventing interception from ground (and sea).
That's pretty much what appears to be the case already. If there is an aircraft on CAP, even if already damaged, it gets the call. Ground units only get a shot if there isn't any a/c set to 'intercept'. I can't think of a way, off the top, to increase evasion effectiveness vs G2A without also increasing it vs A2A. Although...I wonder if increasing an a/c's defense vs domain_land might lower the ground unit's intercept probability...?
Something I found this weekend that might have some use in this discussion is the Ranged Combat Mode and UnitClass/CombatTargets. It would appear that setting a non-Domain_Air unit's iAirCombat enables Ranged Combat Mode. This is a named mode with it's own bombard icon that allows indirect fires on a tile in range. The game engine handles this as the unit "air striking" the target hex - damages a specific unit but not terrain/improvements. Range is set using iAirRange and the damage done is the value of iAirCombat. Max damage can be capped with iAirCombatLimit (100 = can kill) and setting the iCollateralDamage options adds that capability to the indirect fires.
As long as you do NOT set an interception probability, the unit will not engage aircraft. For units like ships that can both intercept and perform ranged fires, the game engine handles them as separate activities but references the same values for each. So if you bump up your iAirCombat to make bigger booms when you do shore bombardment, you are also bumping up the damage done to an aircraft if your ship makes it's interception probability check. Likewise for iAirRange; your interception range and bombardment range will be the same.
iUnitClassTargets and iUnitCombatTargets cause a unit to attack the declared UNITCLASS or UNITCOMBAT first if it's present in a defending stack outside of a city. For example, my mobile SAMs will single out gunships, if any are in a stack, when attacking regardless of whether the SAM is solo or part of a stack itself.
This leads to some interesting options for combined arms warfare. For example (I haven't tried this yet), logically you could set SAMs as targets for jet VF, bump up their combat vs SAMs and viola! Wild Weasels! Better yet, Wild Weasels that will conduct normal airstrikes if there isn't a SAM in the tile/stack.
Whew! I'm going to go treat my carpal tunnel now....