whoops heres the other half. tested with following arbor elf test card

[card]
name=Arbor Elf
auto={0}:add{1}
auto={0}:add{r}
auto={0}:name(waste) add{waste}
auto={waste}:life:1
auto={3}:damage:1
auto={1}{waste}:moveto(mybattlefield) target(<2>*|mylibrary)
text={T}: Untap target Forest.
mana={0}
type=Creature
subtype=Elf Druid
power=12
toughness=12
[/card]
This commit is contained in:
zethfoxster
2016-05-30 17:46:51 -04:00
parent 80d0ee4dc3
commit 7639e18c39
3 changed files with 14 additions and 10 deletions

View File

@@ -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;
}
}

View File

@@ -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 <const char*> 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};

View File

@@ -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;