add support for repeater deplete cards.

Scalpelexis
Sphinx's Tutelage
Grindstone
normally I aim for much bigger card groups, but this was requested by one of the only 2 active members we have on the forum.
I'll have the card code for these cards ready when I code eldrich moon set.

to use, use it like any normal depelte except add
name
color
to the front, 
name deplete:4 targetsZone(player)
this will repeat this until the player depletes cards that dont have atleast 2 with the same name.
color deplete:2 target(player)
this will continue to deplete until the player depletes a set of cards that dont share a color with each other lands not included when checking colors.
enjoy.
This commit is contained in:
zethfoxster
2016-07-17 22:24:53 -04:00
parent 6acd897e16
commit 9e73dc9c00
3 changed files with 133 additions and 11 deletions
+14 -2
View File
@@ -2820,8 +2820,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
vector<string> splitDeplete = parseBetween(s, "deplete:", " ", false);
if (splitDeplete.size())
{
bool namerepeat = false;
bool colorrepeat = false;
if (splitDeplete[0].find("color") != string::npos)
colorrepeat = true;
if (splitDeplete[0].find("name") != string::npos)
namerepeat = true;
Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AADepleter(observer, id, card, t , splitDeplete[1], NULL, who, false);
MTGAbility * a = NEW AADepleter(observer, id, card, t , splitDeplete[1], NULL, who, false, colorrepeat, namerepeat);
a->oneShot = 1;
return a;
}
@@ -2830,8 +2836,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
vector<string> splitIngest = parseBetween(s, "ingest:", " ", false);
if (splitIngest.size())
{
bool namerepeat = false;
bool colorrepeat = false;
if (splitIngest[0].find("coloringest") != string::npos)
colorrepeat = true;
if (splitIngest[0].find("nameingest") != string::npos)
namerepeat = true;
Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AADepleter(observer, id, card, t , splitIngest[1], NULL, who, true);
MTGAbility * a = NEW AADepleter(observer, id, card, t , splitIngest[1], NULL, who, true, colorrepeat, namerepeat);
a->oneShot = 1;
return a;
}