(probably) iAnimalCombat

Duneflower

Warlord
Joined
Aug 6, 2006
Messages
290
Location
deep in the CA desert
I can't seem to find the code that activates the iAnimalCombat modifier when fighting an animal. That is...

[pseudocode]
Code:
if (isAnimal) then (power * 1+iAnimalCombat/100)
I can't find this. I suspect it's Python, but no idea where it is, and I've looked some in both that and the SDK...
 
The pseudocode you reference above will be in the SDK. Most likely in CvUnit. And it would look more like:
Code:
if (isAnimal) then (power * (1 + pUnit.[B]getAnimalCombatModifier[/B] ()/100)

In the Python API there are quite a few calls relating to animals, for instance there is this:
INT getAnimalCombatModifier () so you can pull the combat modifiers from a unit as the modifiers that are set up in CvUnit and defined in the XML are exposed to python by CyUnit. But you are incorrect in your assumption that the combat modifiers and their calculations as they relate to the game are done in python, this is all handled in the SDK (and most likely in CvUnit, but I'd have to search through the SDK to be sure which file it originates in, it's a pretty good bet though it's all in CvUnit, since the combat modifers are exposed to python through CyUnit)
 
Top Bottom