- Fixed Damage All (Ashen Firebeast/ See test)
- Fixed Momir crash if no card with corresponding mana cost exists
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-05-28 09:42:52 +00:00
parent 821a422149
commit 1a21ca454a
7 changed files with 92 additions and 11 deletions
+7 -1
View File
@@ -241,11 +241,17 @@ MTGCardInstance * MTGMomirRule::genCreature( int id){
}
int MTGMomirRule::genRandomCreatureId(int convertedCost){
if (convertedCost > 20) convertedCost = 20;
if (convertedCost >= 20) convertedCost = 19;
int total_cards = 0;
int i = convertedCost;
while (!total_cards && i >=0){
#ifdef WIN32
char buf[4096];
sprintf(buf,"Converted Cost in momir: %i\n", i);
OutputDebugString(buf);
#endif
total_cards = pool[i].size();
convertedCost = i;
i--;
}
if (!total_cards) return 0;