diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 7c45330ab..8152990b6 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -5762,7 +5762,7 @@ const string AManaProducer::getMenuText() menutext = _("Add "); char buffer[128]; int alreadyHasOne = 0; - for (int i = 0; i < 7; i++) + for (int i = 0; i < 8; i++) { int value = output->getCost(i); if (value) @@ -5771,10 +5771,11 @@ const string AManaProducer::getMenuText() menutext.append(","); sprintf(buffer, "%i ", value); menutext.append(buffer); - if (i >= Constants::MTG_COLOR_GREEN && i <= Constants::MTG_COLOR_WHITE) + if (i == Constants::MTG_COLOR_WASTE) + menutext.append(_(" colorless")); + else if (i >= Constants::MTG_COLOR_GREEN && i <= Constants::MTG_COLOR_WASTE) menutext.append(_(Constants::MTGColorStrings[i])); - //if (i == Constants::MTG_COLOR_LAND) - //menutext.append(_(" colorless")); + alreadyHasOne = 1; } } diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index f01fbbd14..e5dc513ba 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -4,7 +4,7 @@ using std::string; #include "MTGDefinitions.h" -char Constants::MTGColorChars[] = {'x','g','u','r','b','w','l'}; +char Constants::MTGColorChars[] = {'x','g','u','r','b','w','c','l'}; vector Constants::MTGColorStrings; const string Constants::kManaColorless = "colorless"; @@ -13,6 +13,7 @@ const string Constants::kManaBlue = "blue"; const string Constants::kManaRed = "red"; const string Constants::kManaBlack = "black"; const string Constants::kManaWhite = "white"; +const string Constants::kManaWaste = "waste"; int Constants::_r[7] = {75,20,20,200,50,255,128}; int Constants::_g[7] = {30,140,30,15,50,255,128}; diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index 1b33a694e..0c3a133b7 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -79,11 +79,6 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan { manaCost->add(Constants::MTG_COLOR_RED, 1); - } - else if (value == "c") - { - manaCost->add(Constants::MTG_COLOR_LAND, 1); - } else { @@ -295,6 +290,12 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan manaCost->addExtraCost(NEW UnattachCost(c)); break; } + if (value == "waste") + { + manaCost->add(Constants::MTG_COLOR_WASTE, 1); + break; + + } int intvalue = atoi(value.c_str()); int colors[2]; int values[2]; @@ -870,6 +871,7 @@ int ManaCost::pay(ManaCost * _cost) ManaCost * diff = Diff(toPay); for (int i = 0; i < Constants::NB_Colors; i++) { + cost[i] = diff->getCost(i); } delete diff;