- a few bug fixes with cards that bring other cards back to play (zombify, resurrection...)
- bug fix with abilities parsing "reachshadow"
- a few card fixes
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-04-19 07:47:52 +00:00
parent 33e79e234e
commit 0af938589b
13 changed files with 135 additions and 19 deletions

View File

@@ -225,8 +225,13 @@ MTGCardInstance * MTGMomirRule::genCreature( int id){
}
int MTGMomirRule::genRandomCreatureId(int convertedCost){
if (convertedCost > 20) return 0;
int total_cards = pool[convertedCost].size();
if (convertedCost > 20) convertedCost = 20;
int total_cards = 0;
int i = convertedCost;
while (!total_cards && i >=0){
total_cards = pool[i].size();
i--;
}
if (!total_cards) return 0;
int start = (rand() % total_cards);
return pool[convertedCost][start];