Jeck - Resolve issue 183. Momir decks are now automatically generated.

This commit is contained in:
wagic.jeck
2009-11-18 02:07:33 +00:00
parent 5558cae58b
commit a2c8637a3e
2 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +0,0 @@
Swamp *12
Island *12
Plains *12
Mountain *12
Forest *12

View File

@@ -143,7 +143,13 @@ void GameStateDuel::loadPlayerRandom(int playerId, int isAI, int mode){
void GameStateDuel::loadPlayerMomir(int playerId, int isAI){
string deckFileSmall = "momir";
char empty[] = "";
MTGDeck * tempDeck = NEW MTGDeck(options.profileFile("momir.txt","",true).c_str(), mParent->collection);
MTGDeck * tempDeck = NEW MTGDeck(mParent->collection); //Autogenerate a momir deck. Leave the "momir.txt" bits below for stats.
tempDeck->addRandomCards(12, 0,0,Constants::RARITY_L,"Forest");
tempDeck->addRandomCards(12, 0,0,Constants::RARITY_L,"Plains");
tempDeck->addRandomCards(12, 0,0,Constants::RARITY_L,"Swamp");
tempDeck->addRandomCards(12, 0,0,Constants::RARITY_L,"Mountain");
tempDeck->addRandomCards(12, 0,0,Constants::RARITY_L,"Island");
deck[playerId] = NEW MTGPlayerCards(mParent->collection, tempDeck);
if (!isAI) // Human Player
mPlayers[playerId] = NEW HumanPlayer(deck[playerId], options.profileFile("momir.txt","",true).c_str(), deckFileSmall);