related to issue 655. The change to bitwise representation of mana required some changes in the deck output methods.

This commit is contained in:
techdragon.nguyen@gmail.com
2011-05-13 03:40:38 +00:00
parent 28cd4acaf8
commit ff6d6e56fe
2 changed files with 4 additions and 3 deletions

View File

@@ -1074,7 +1074,8 @@ void MTGDeck::printDetailedDeckText(std::ofstream& file )
for (size_t x = 0; x < card->data->basicAbilities.size(); ++x) for (size_t x = 0; x < card->data->basicAbilities.size(); ++x)
{ {
currentCard << Constants::MTGBasicAbilities[x] << "; "; if ( card->data->basicAbilities[x] == 1 )
currentCard << Constants::MTGBasicAbilities[x] << "; ";
} }
currentCard <<endl; currentCard <<endl;

View File

@@ -735,9 +735,9 @@ string ManaCost::toString()
if (cost[i]) if (cost[i])
{ {
if ( i == Constants::MTG_COLOR_ARTIFACT) if ( i == Constants::MTG_COLOR_ARTIFACT)
oss << "{" << cost[i] << "}"; oss << "{" << getCost(i) << "}";
else else
for (int colorCount = 0; colorCount < cost[i]; colorCount++ ) for (int colorCount = 0; colorCount < getCost(i); colorCount++ )
oss << "{" << Constants::MTGColorChars[i] << "}"; oss << "{" << Constants::MTGColorChars[i] << "}";
} }
} }