phungus,
I'm not sure why you want first strikes in the display since they're shown at the bottom anyway, but using them in the code is not hard. The thing is, you have to be careful whether the opponent is immune to first strikes. Here's what I used in CvGameCoreUtils:
I'm not sure why you want first strikes in the display since they're shown at the bottom anyway, but using them in the code is not hard. The thing is, you have to be careful whether the opponent is immune to first strikes. Here's what I used in CvGameCoreUtils:
Code:
AttFSnet = ( (pDefender->immuneToFirstStrikes()) ? 0 : pAttacker->firstStrikes() ) - ((pAttacker->immuneToFirstStrikes()) ? 0 : pDefender->firstStrikes());
AttFSC = (pDefender->immuneToFirstStrikes()) ? 0 : (pAttacker->chanceFirstStrikes());
DefFSC = (pAttacker->immuneToFirstStrikes()) ? 0 : (pDefender->chanceFirstStrikes());