Minor Annoyance
Deity
After having discovered that ranged units don't benefit from the cover promotions when defending against a city bombardment, (http://forums.civfanatics.com/showthread.php?t=524038) but melee units do, I set out to find where that takes place so I can change it, but I'm not sure what's stopping it from working that way now.
The function CvUnit::GetMaxDefenseStrength
has this:
But I can't find which function is called when a city attacks. I've found lots of functions relating to combat damage and unit strength, but I'm not sure which is the specific city attacking ranged unit function I'm looking for so I can see why the ranged defense modifier isn't being applied to city on unit ranged unit attacks but if for city on melee unit attacks.
The function CvUnit::GetMaxDefenseStrength
has this:
Code:
// Defense against Ranged
if(bFromRangedAttack)
iModifier += rangedDefenseModifier();
But I can't find which function is called when a city attacks. I've found lots of functions relating to combat damage and unit strength, but I'm not sure which is the specific city attacking ranged unit function I'm looking for so I can see why the ranged defense modifier isn't being applied to city on unit ranged unit attacks but if for city on melee unit attacks.