CvUnit::testSpyIntercepted

vincentz

Programmer
Joined
Feb 4, 2009
Messages
3,614
Location
Denmark
First of all, sorry for spamming lots of threads, but I kinda like this little corner of CFC, and I feel I get very competent answers to my mostly stupid questions :D
So, Im lazy, and want to spice up my spies a bit. Since there already is an "Evasion" in promotions, I thought I could use it for my spies to increase their chance of getting caught.
Does this makes any sense? Im mostly worried that there is no "pointer" to which unit's evasion chance. Does it automatically grab the active units chance? And is 10% evasionProbability() really 0.1, 10 or something completely different?
And lastly, is it going to interfere with airstrikes?

if (GC.getGameINLINE().getSorenRandNum(10000, "Spy Interception") >= (getSpyInterceptPercent(kTargetPlayer.getTeam()) * (100 + iModifier)) - evasionProbability() * 100)

edit :
I saw this in cvplayer : pSpyUnit->
does it make more sense to add it like this :
if (GC.getGameINLINE().getSorenRandNum(10000, "Spy Interception") >= (getSpyInterceptPercent(kTargetPlayer.getTeam()) * (100 + iModifier)) - pSpyUnit->evasionProbability() * 100)
 
Back
Top Bottom