I found something interesting in the source code: when a unit is next to two or more enemy improvements with NearbyEnemyDamage, it will get damage only from one of these improvements, and it's not guaranteed that it will be the one with the highest damage. The following function:
checks all adjacent plots, but when it finds one with an improvement that has nonzero NearbyEnemyDamage, it just returns true, and the amount of damage as the iCitadelDamage parameter, which means that it doesn't check the remaining plots. I think it should check all adjacent plots, and find one with an improvement that belongs to the enemy and does the highest damage.
It's an example of mod-unfriendly coding - they did it in a way that works in the base game where there is only one such improvement, and didn't care about mods
Is this fixed in the VMC/CP DLLs?
Code:
bool CvUnit::IsNearEnemyCitadel(int& iCitadelDamage)
It's an example of mod-unfriendly coding - they did it in a way that works in the base game where there is only one such improvement, and didn't care about mods
Is this fixed in the VMC/CP DLLs?