More type conversion warning cleanup; some minor refactoring in the phase bar while I was cleaning up the warnings.

This commit is contained in:
wrenczes
2010-10-28 06:57:34 +00:00
parent 98627d96ba
commit fadd36c0c4
6 changed files with 68 additions and 67 deletions

View File

@@ -711,7 +711,7 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
if (hasX){
int xDiff = pMana->getConvertedCost() - currentCost;
if (xDiff < 0) xDiff = 0;
shouldPlayPercentage = shouldPlayPercentage - ((shouldPlayPercentage * 1.9f) / (1 + xDiff));
shouldPlayPercentage = shouldPlayPercentage - static_cast<int>((shouldPlayPercentage * 1.9f) / (1 + xDiff));
}
if (WRand() % 100 > shouldPlayPercentage) continue;