Merge pull request #866 from kevlahnota/master
change naming convention
This commit is contained in:
@@ -204,12 +204,6 @@ type=Enchantment
|
||||
subtype=Aura
|
||||
[/card]
|
||||
[card]
|
||||
name=Squandered Resources
|
||||
text=Sacrifice a land: Add to your mana pool one mana of any type the sacrificed land could produce.
|
||||
mana={B}{G}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Talruum Piper
|
||||
text=All creatures with flying able to block Talruum Piper do so.
|
||||
mana={4}{R}
|
||||
|
||||
@@ -241,8 +241,8 @@ toughness=2
|
||||
[card]
|
||||
name=Rayne, Academy Chancellor
|
||||
#missing parser for player/controller/opponent
|
||||
auto=this(auras >= 1) transforms((,newability[@targeted(*|mybattlefield) from(*|oppzones):draw:2]))
|
||||
auto=this(auras < 1) transforms((,newability[@targeted(*|mybattlefield) from(*|oppzones):draw:1]))
|
||||
auto=this(auras >= 1) transforms((,newability[@targeted(*|mybattlefield) from(*|opponentzones):draw:2]))
|
||||
auto=this(auras < 1) transforms((,newability[@targeted(*|mybattlefield) from(*|opponentzones):draw:1]))
|
||||
text=Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card. You may draw an additional card if Rayne, Academy Chancellor is enchanted.
|
||||
mana={2}{U}
|
||||
type=Legendary Creature
|
||||
@@ -351,6 +351,18 @@ power=2
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Squandered Resources
|
||||
auto=this(variable{plandg}>0) {S(land[manag]|mybattlefield)}:Add{G}
|
||||
auto=this(variable{plandu}>0) {S(land[manau]|mybattlefield)}:Add{U}
|
||||
auto=this(variable{plandr}>0) {S(land[manar]|mybattlefield)}:Add{R}
|
||||
auto=this(variable{plandb}>0) {S(land[manab]|mybattlefield)}:Add{B}
|
||||
auto=this(variable{plandw}>0) {S(land[manaw]|mybattlefield)}:Add{W}
|
||||
auto=this(variable{plandc}>0) {S(land[cmana]|mybattlefield)}:Add{C}
|
||||
text=Sacrifice a land: Add to your mana pool one mana of any type the sacrificed land could produce.
|
||||
mana={B}{G}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Staggershock
|
||||
target=creature,player
|
||||
auto=damage:2
|
||||
|
||||
@@ -6562,8 +6562,8 @@ subtype=Aura
|
||||
[/card]
|
||||
[card]
|
||||
name=Aura of Silence
|
||||
auto=lord(artifact|oppcastingzone) altercost(colorless, +2)
|
||||
auto=lord(enchantment|oppcastingzone) altercost(colorless, +2)
|
||||
auto=lord(artifact|opponentcastingzone) altercost(colorless, +2)
|
||||
auto=lord(enchantment|opponentcastingzone) altercost(colorless, +2)
|
||||
auto={S}:destroy target(artifact,enchantment)
|
||||
text=Artifact and enchantment spells your opponents cast cost {2} more to cast. -- Sacrifice Aura of Silence: Destroy target artifact or enchantment.
|
||||
mana={1}{W}{W}
|
||||
@@ -18538,7 +18538,7 @@ type=Instant
|
||||
[card]
|
||||
name=Chill
|
||||
auto=lord(*[red]|mycastingzone) altercost(colorless, +2)
|
||||
auto=lord(*[red]|oppcastingzone) altercost(colorless, +2)
|
||||
auto=lord(*[red]|opponentcastingzone) altercost(colorless, +2)
|
||||
text=Red spells cost {2} more to cast.
|
||||
mana={1}{U}
|
||||
type=Enchantment
|
||||
@@ -36031,11 +36031,11 @@ type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Exotic Orchard
|
||||
auto=this(variable{olandg}>0) {t}:add{g}
|
||||
auto=this(variable{olandu}>0) {t}:add{u}
|
||||
auto=this(variable{olandr}>0) {t}:add{r}
|
||||
auto=this(variable{olandb}>0) {t}:add{b}
|
||||
auto=this(variable{olandw}>0) {t}:add{w}
|
||||
auto=this(variable{olandg}>0) {t}:out{g}
|
||||
auto=this(variable{olandu}>0) {t}:out{u}
|
||||
auto=this(variable{olandr}>0) {t}:out{r}
|
||||
auto=this(variable{olandb}>0) {t}:out{b}
|
||||
auto=this(variable{olandw}>0) {t}:out{w}
|
||||
text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
|
||||
type=Land
|
||||
[/card]
|
||||
@@ -37789,11 +37789,11 @@ toughness=6
|
||||
[/card]
|
||||
[card]
|
||||
name=Fellwar Stone
|
||||
auto=this(variable{olandg}>0) {t}:add{g}
|
||||
auto=this(variable{olandu}>0) {t}:add{u}
|
||||
auto=this(variable{olandr}>0) {t}:add{r}
|
||||
auto=this(variable{olandb}>0) {t}:add{b}
|
||||
auto=this(variable{olandw}>0) {t}:add{w}
|
||||
auto=this(variable{olandg}>0) {t}:out{g}
|
||||
auto=this(variable{olandu}>0) {t}:out{u}
|
||||
auto=this(variable{olandr}>0) {t}:out{r}
|
||||
auto=this(variable{olandb}>0) {t}:out{b}
|
||||
auto=this(variable{olandw}>0) {t}:out{w}
|
||||
text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
|
||||
mana={2}
|
||||
type=Artifact
|
||||
@@ -44936,7 +44936,7 @@ toughness=3
|
||||
[card]
|
||||
name=Glowrider
|
||||
auto=lord(*[-creature]|mycastingzone) altercost(colorless,+1)
|
||||
auto=lord(*[-creature]|oppcastingzone) altercost(colorless, +1)
|
||||
auto=lord(*[-creature]|opponentcastingzone) altercost(colorless, +1)
|
||||
text=Noncreature spells cost {1} more to cast.
|
||||
mana={2}{W}
|
||||
type=Creature
|
||||
@@ -46916,7 +46916,7 @@ toughness=2
|
||||
name=Grand Arbiter Augustin IV
|
||||
auto=lord(*[white]|mycastingzone) altercost(colorless,-1)
|
||||
auto=lord(*[blue]|mycastingzone) altercost(colorless,-1)
|
||||
auto=lord(*|oppcastingzone) altercost( colorless,+1)
|
||||
auto=lord(*|opponentcastingzone) altercost( colorless,+1)
|
||||
text=White spells you cast cost {1} less to cast. -- Blue spells you cast cost {1} less to cast. -- Spells your opponents cast cost {1} more to cast.
|
||||
mana={2}{W}{U}
|
||||
type=Legendary Creature
|
||||
@@ -50008,11 +50008,11 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Harvester Druid
|
||||
auto=this(variable{plandg}>0) {t}:add{g}
|
||||
auto=this(variable{plandu}>0) {t}:add{u}
|
||||
auto=this(variable{plandr}>0) {t}:add{r}
|
||||
auto=this(variable{plandb}>0) {t}:add{b}
|
||||
auto=this(variable{plandw}>0) {t}:add{w}
|
||||
auto=this(variable{plandg}>0) {t}:out{g}
|
||||
auto=this(variable{plandu}>0) {t}:out{u}
|
||||
auto=this(variable{plandr}>0) {t}:out{r}
|
||||
auto=this(variable{plandb}>0) {t}:out{b}
|
||||
auto=this(variable{plandw}>0) {t}:out{w}
|
||||
text={T}: Add to your mana pool one mana of any color that a land you control could produce.
|
||||
mana={1}{G}
|
||||
type=Creature
|
||||
@@ -85877,11 +85877,11 @@ toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Quirion Explorer
|
||||
auto=this(variable{olandg}>0) {t}:add{g}
|
||||
auto=this(variable{olandu}>0) {t}:add{u}
|
||||
auto=this(variable{olandr}>0) {t}:add{r}
|
||||
auto=this(variable{olandb}>0) {t}:add{b}
|
||||
auto=this(variable{olandw}>0) {t}:add{w}
|
||||
auto=this(variable{olandg}>0) {t}:out{g}
|
||||
auto=this(variable{olandu}>0) {t}:out{u}
|
||||
auto=this(variable{olandr}>0) {t}:out{r}
|
||||
auto=this(variable{olandb}>0) {t}:out{b}
|
||||
auto=this(variable{olandw}>0) {t}:out{w}
|
||||
text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
|
||||
mana={1}{G}
|
||||
type=Creature
|
||||
@@ -88419,12 +88419,12 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Reflecting Pool
|
||||
auto=this(variable{plandg}>0) {t}:add{g}
|
||||
auto=this(variable{plandu}>0) {t}:add{u}
|
||||
auto=this(variable{plandr}>0) {t}:add{r}
|
||||
auto=this(variable{plandb}>0) {t}:add{b}
|
||||
auto=this(variable{plandw}>0) {t}:add{w}
|
||||
auto=this(variable{plandc}>0) {t}:add{1}
|
||||
auto=this(variable{plandg}>0) {t}:out{g}
|
||||
auto=this(variable{plandu}>0) {t}:out{u}
|
||||
auto=this(variable{plandr}>0) {t}:out{r}
|
||||
auto=this(variable{plandb}>0) {t}:out{b}
|
||||
auto=this(variable{plandw}>0) {t}:out{w}
|
||||
auto=this(variable{plandc}>0) {t}:out{1}
|
||||
text={T}: Add to your mana pool one mana of any type that a land you control could produce.
|
||||
type=Land
|
||||
[/card]
|
||||
@@ -110856,11 +110856,11 @@ toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Sylvok Explorer
|
||||
auto=this(variable{olandg}>0) {t}:add{g}
|
||||
auto=this(variable{olandu}>0) {t}:add{u}
|
||||
auto=this(variable{olandr}>0) {t}:add{r}
|
||||
auto=this(variable{olandb}>0) {t}:add{b}
|
||||
auto=this(variable{olandw}>0) {t}:add{w}
|
||||
auto=this(variable{olandg}>0) {t}:out{g}
|
||||
auto=this(variable{olandu}>0) {t}:out{u}
|
||||
auto=this(variable{olandr}>0) {t}:out{r}
|
||||
auto=this(variable{olandb}>0) {t}:out{b}
|
||||
auto=this(variable{olandw}>0) {t}:out{w}
|
||||
text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
|
||||
mana={1}{G}
|
||||
type=Creature
|
||||
@@ -113313,7 +113313,7 @@ toughness=2
|
||||
name=Thalia, Guardian of Thraben
|
||||
abilities=first strike
|
||||
auto=lord(*[-creature]|mycastingzone) altercost(colorless,+1)
|
||||
auto=lord(*[-creature]|oppcastingzone) altercost(colorless, +1)
|
||||
auto=lord(*[-creature]|opponentcastingzone) altercost(colorless, +1)
|
||||
text=First Strike -- Noncreature spells cost {1} more to cast.
|
||||
mana={1}{W}
|
||||
type=Legendary Creature
|
||||
|
||||
@@ -748,53 +748,53 @@ private:
|
||||
}
|
||||
else if (s == "olandg")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_GREEN, target, target->controller()->opponent());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_GREEN, target->controller()->opponent());
|
||||
}
|
||||
else if (s == "olandu")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLUE, target, target->controller()->opponent());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLUE, target->controller()->opponent());
|
||||
}
|
||||
else if (s == "olandr")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_RED, target, target->controller()->opponent());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_RED, target->controller()->opponent());
|
||||
}
|
||||
else if (s == "olandb")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLACK, target, target->controller()->opponent());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLACK, target->controller()->opponent());
|
||||
}
|
||||
else if (s == "olandw")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_WHITE, target, target->controller()->opponent());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_WHITE, target->controller()->opponent());
|
||||
}
|
||||
else if (s == "olandc")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_ARTIFACT, target, target->controller()->opponent()) +
|
||||
countManaProducedby(Constants::MTG_COLOR_WASTE, target, target->controller()->opponent());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_ARTIFACT, target->controller()->opponent()) +
|
||||
countManaProducedby(Constants::MTG_COLOR_WASTE, target->controller()->opponent());
|
||||
}
|
||||
else if (s == "plandg")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_GREEN, target, target->controller());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_GREEN, target->controller());
|
||||
}
|
||||
else if (s == "plandu")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLUE, target, target->controller());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLUE, target->controller());
|
||||
}
|
||||
else if (s == "plandr")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_RED, target, target->controller());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_RED, target->controller());
|
||||
}
|
||||
else if (s == "plandb")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLACK, target, target->controller());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_BLACK, target->controller());
|
||||
}
|
||||
else if (s == "plandw")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_WHITE, target, target->controller());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_WHITE, target->controller());
|
||||
}
|
||||
else if (s == "plandc")
|
||||
{
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_ARTIFACT, target, target->controller()) +
|
||||
countManaProducedby(Constants::MTG_COLOR_WASTE, target, target->controller());
|
||||
intValue = countManaProducedby(Constants::MTG_COLOR_ARTIFACT, target->controller()) +
|
||||
countManaProducedby(Constants::MTG_COLOR_WASTE, target->controller());
|
||||
}
|
||||
else if (s == "cantargetmycre")// can target my creature
|
||||
{
|
||||
@@ -1061,7 +1061,7 @@ public:
|
||||
return count;
|
||||
}
|
||||
|
||||
int countManaProducedby(int color, MTGCardInstance * target, Player * player)
|
||||
/*int countManaProducedby(int color, MTGCardInstance * target, Player * player)
|
||||
{
|
||||
int count = 0;
|
||||
for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++)
|
||||
@@ -1073,6 +1073,27 @@ public:
|
||||
count += 1;
|
||||
}
|
||||
return count;
|
||||
}*/
|
||||
|
||||
int countManaProducedby(int color, Player * player)
|
||||
{
|
||||
int count = 0;
|
||||
for (int i = 0; i < player->game->battlefield->nb_cards; i++)
|
||||
{
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceC && (color == Constants::MTG_COLOR_ARTIFACT || color == Constants::MTG_COLOR_WASTE))
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceG && color == Constants::MTG_COLOR_GREEN)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceU && color == Constants::MTG_COLOR_BLUE)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceR && color == Constants::MTG_COLOR_RED)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceB && color == Constants::MTG_COLOR_BLACK)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceW && color == Constants::MTG_COLOR_WHITE)
|
||||
count += 1;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
WParsedInt(int value = 0)
|
||||
|
||||
@@ -67,6 +67,12 @@ class CardDescriptor: public MTGCardInstance
|
||||
int CDdamager;
|
||||
int CDgeared;
|
||||
int CDblocked;
|
||||
int CDcanProduceC;
|
||||
int CDcanProduceG;
|
||||
int CDcanProduceU;
|
||||
int CDcanProduceR;
|
||||
int CDcanProduceB;
|
||||
int CDcanProduceW;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -277,6 +277,12 @@ public:
|
||||
int imprintR;
|
||||
int imprintB;
|
||||
int imprintW;
|
||||
int canproduceG;
|
||||
int canproduceU;
|
||||
int canproduceR;
|
||||
int canproduceB;
|
||||
int canproduceW;
|
||||
int canproduceC;
|
||||
string currentimprintName;
|
||||
vector<string>imprintedNames;
|
||||
|
||||
|
||||
@@ -26,6 +26,12 @@ CardDescriptor::CardDescriptor()
|
||||
CDdamager = 0;
|
||||
CDgeared = 0;
|
||||
CDblocked = 0;
|
||||
CDcanProduceC = 0;
|
||||
CDcanProduceG = 0;
|
||||
CDcanProduceU = 0;
|
||||
CDcanProduceR = 0;
|
||||
CDcanProduceB = 0;
|
||||
CDcanProduceW = 0;
|
||||
}
|
||||
|
||||
int CardDescriptor::init()
|
||||
@@ -239,6 +245,36 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
||||
match = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ((CDcanProduceC == -1 && card->canproduceC == 1) || (CDcanProduceC == 1 && card->canproduceC == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceG == -1 && card->canproduceG == 1) || (CDcanProduceG == 1 && card->canproduceG == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceU == -1 && card->canproduceU == 1) || (CDcanProduceU == 1 && card->canproduceU == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceR == -1 && card->canproduceR == 1) || (CDcanProduceR == 1 && card->canproduceR == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceB == -1 && card->canproduceB == 1) || (CDcanProduceB == 1 && card->canproduceB == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((CDcanProduceW == -1 && card->canproduceW == 1) || (CDcanProduceW == 1 && card->canproduceW == 0))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
|
||||
{
|
||||
|
||||
@@ -702,6 +702,25 @@ void GameObserver::gameStateBasedEffects()
|
||||
card->myPair->myPair = NULL;
|
||||
card->myPair = NULL;
|
||||
}
|
||||
///set basic land mana objects canproduce
|
||||
for (size_t gg = 0; gg < mLayers->actionLayer()->manaObjects.size(); gg++)
|
||||
{
|
||||
if (dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])) &&
|
||||
(dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->source->isLand() &&
|
||||
(dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->source == card)
|
||||
{
|
||||
if (card->hasType("forest") && (dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_GREEN))
|
||||
card->canproduceG = 1;
|
||||
if (card->hasType("island") && (dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_BLUE))
|
||||
card->canproduceU = 1;
|
||||
if (card->hasType("mountain") && (dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_RED))
|
||||
card->canproduceR = 1;
|
||||
if (card->hasType("swamp") && (dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_BLACK))
|
||||
card->canproduceB = 1;
|
||||
if (card->hasType("plains") && (dynamic_cast<AManaProducer*> (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_WHITE))
|
||||
card->canproduceW = 1;
|
||||
}
|
||||
}
|
||||
///clear imprints
|
||||
if(isInPlay(card) && card->imprintedCards.size())
|
||||
{
|
||||
|
||||
@@ -3449,6 +3449,35 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
//Mana Producer
|
||||
found = s.find("add");
|
||||
if (found != string::npos)
|
||||
{
|
||||
bool doesntEmptyTilueot = s.find("doesntempty") != string::npos;
|
||||
ManaCost * output = ManaCost::parseManaCost(s.substr(found),NULL,card);
|
||||
Targetable * t = spell ? spell->getNextTarget() : NULL;
|
||||
if(output->getConvertedCost() > 0)
|
||||
{
|
||||
if(output->hasColor(Constants::MTG_COLOR_ARTIFACT)||output->hasColor(Constants::MTG_COLOR_WASTE))
|
||||
card->canproduceC = 1;
|
||||
if(output->hasColor(Constants::MTG_COLOR_GREEN))
|
||||
card->canproduceG = 1;
|
||||
if(output->hasColor(Constants::MTG_COLOR_BLUE))
|
||||
card->canproduceU = 1;
|
||||
if(output->hasColor(Constants::MTG_COLOR_RED))
|
||||
card->canproduceR = 1;
|
||||
if(output->hasColor(Constants::MTG_COLOR_BLACK))
|
||||
card->canproduceB = 1;
|
||||
if(output->hasColor(Constants::MTG_COLOR_WHITE))
|
||||
card->canproduceW = 1;
|
||||
}
|
||||
MTGAbility * a = NEW AManaProducer(observer, id, card, t, output, NULL, who,s.substr(found),doesntEmptyTilueot);
|
||||
a->oneShot = 1;
|
||||
if(newName.size())
|
||||
((AManaProducer*)a)->menutext = newName;
|
||||
return a;
|
||||
}
|
||||
|
||||
//another mana producer exempted for canproduce
|
||||
found = s.find("out");
|
||||
if (found != string::npos)
|
||||
{
|
||||
bool doesntEmptyTilueot = s.find("doesntempty") != string::npos;
|
||||
ManaCost * output = ManaCost::parseManaCost(s.substr(found),NULL,card);
|
||||
|
||||
@@ -252,6 +252,12 @@ void MTGCardInstance::initMTGCI()
|
||||
imprintR = 0;
|
||||
imprintB = 0;
|
||||
imprintW = 0;
|
||||
canproduceG = 0;
|
||||
canproduceU = 0;
|
||||
canproduceR = 0;
|
||||
canproduceB = 0;
|
||||
canproduceW = 0;
|
||||
canproduceC = 0;
|
||||
currentimprintName = "";
|
||||
imprintedNames.clear();
|
||||
CountedObjects = 0;
|
||||
|
||||
@@ -388,7 +388,29 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card)
|
||||
if ((cost->hasX() || cost->hasSpecificX()) && card->setX == -1)
|
||||
{
|
||||
vector<MTGAbility*>selection;
|
||||
int options = cost->hasSpecificX() ? 20 : (playerMana->getConvertedCost() - cost->getConvertedCost()) + 1;
|
||||
int amountx = 0;
|
||||
int colorlessx = 0;
|
||||
int costcx = 0;
|
||||
costcx = cost->getCost(0);
|
||||
if (cost->xColor)
|
||||
{
|
||||
int thisxcolor = cost->xColor;
|
||||
amountx = (playerMana->getCost(thisxcolor) - cost->getCost(thisxcolor));
|
||||
for(int kk = 0; kk < 7; kk++)
|
||||
{
|
||||
if(kk!=thisxcolor)
|
||||
{
|
||||
colorlessx += playerMana->getCost(kk);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (amountx < 0)
|
||||
amountx = 0;
|
||||
if(colorlessx >= costcx)
|
||||
colorlessx = 0;
|
||||
else
|
||||
colorlessx -= costcx;
|
||||
int options = cost->hasSpecificX() ? amountx + 1 +colorlessx : (playerMana->getConvertedCost() - cost->getConvertedCost()) + 1;
|
||||
//you can set up to 20 for specific X, if you cant afford it, it cancels. I couldnt think of a equation that would
|
||||
//give me the correct amount sorry.
|
||||
for (int i = 0; i < options; ++i)
|
||||
|
||||
@@ -209,7 +209,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
zones[nbzones++] = MTGGameZone::MY_HAND;
|
||||
zones[nbzones++] = MTGGameZone::MY_EXILE;
|
||||
}
|
||||
else if (zoneName.compare("oppcastingzone") == 0)
|
||||
else if (zoneName.compare("opponentcastingzone") == 0)
|
||||
{
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_GRAVEYARD;
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_LIBRARY;
|
||||
@@ -225,7 +225,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
zones[nbzones++] = MTGGameZone::MY_HAND;
|
||||
zones[nbzones++] = MTGGameZone::MY_EXILE;
|
||||
}
|
||||
else if (zoneName.compare("oppzones") == 0)
|
||||
else if (zoneName.compare("opponentzones") == 0)
|
||||
{
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_BATTLEFIELD;
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_STACK;
|
||||
@@ -557,6 +557,73 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
cd->CDdamager = 1;
|
||||
}
|
||||
}
|
||||
//can produce mana
|
||||
else if (attribute.find("cmana") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceC = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceC = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manag") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceG = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceG = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manau") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceU = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceU = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manar") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceR = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceR = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manab") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceB = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceB = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("manaw") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->CDcanProduceW = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->CDcanProduceW = 1;
|
||||
}
|
||||
}
|
||||
else if (attribute.find("multicolor") != string::npos)
|
||||
{
|
||||
//card is multicolored?
|
||||
|
||||
Reference in New Issue
Block a user