From a22991758f78cff20868cad3f4e89f22fa44dba4 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 8 Nov 2015 18:18:33 +0800 Subject: [PATCH] mana producer for lands you/opponent could produce reflecting pool, exotic orchard... --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 84 ++++++++++++- .../bin/Res/sets/primitives/unsupported.txt | 44 +------ projects/mtg/include/AllAbilities.h | 110 ++++++++++++++++++ projects/mtg/src/CardGui.cpp | 2 + 4 files changed, 196 insertions(+), 44 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 31a52ec1f..fd72dec5b 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -31743,6 +31743,16 @@ mana={4}{B} 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} +text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. +type=Land +[/card] +[card] name=Expedition Map auto={2}{T}{S}:moveTo(ownerhand) target(land|myLibrary) text={2}, {T}, Sacrifice Expedition Map: Search your library for a land card, reveal it, and put it into your hand. Then shuffle your library. @@ -33223,6 +33233,17 @@ power=4 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} +text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. +mana={2} +type=Artifact +[/card] +[card] name=Femeref Archers auto={T}:damage:4 target(creature[attacking;flying]) text={T}: Femeref Archers deals 4 damage to target attacking creature with flying. @@ -34522,6 +34543,15 @@ power=2 toughness=3 [/card] [card] +name=Flame Wave +target=player +auto=damage:4 +auto=damage:4 all(creature|targetedpersonsbattlefield) +text=Flame Wave deals 4 damage to target player and each creature he or she controls. +mana={3}{R}{R}{R}{R} +type=Sorcery +[/card] +[card] name=Flameblast Dragon abilities=flying auto=this(attacking) {X}{R}:thisforeach(X) damage:1 target(creature,player) limit:1 @@ -36843,7 +36873,7 @@ type=Sorcery [/card] [card] name=Fumiko the Lowblood -auto=bushido(type:creature[attacking]:battlefield/type:creature[attacking]:battlefield) +auto=aslongas(creature[attacking]) bushido(type:creature[attacking]:battlefield/type:creature[attacking]:battlefield) auto=lord(creature|opponentBattlefield) mustattack text=Fumiko the Lowblood has bushido X, where X is the number of attacking creatures. (When this blocks or becomes blocked, it gets +X/+X until end of turn.) -- Creatures your opponents control attack each turn if able. mana={2}{R}{R} @@ -44122,6 +44152,20 @@ power=3 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} +text={T}: Add to your mana pool one mana of any color that a land you control could produce. +mana={1}{G} +type=Creature +subtype=Human Druid +power=1 +toughness=1 +[/card] +[card] name=Harvester of Souls abilities=deathtouch auto=@movedTo(other creature[-token]|graveyard) from(battlefield):draw:1 controller @@ -76353,6 +76397,20 @@ power=1 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} +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 +subtype=Elf Druid Scout +power=1 +toughness=1 +[/card] +[card] name=Quirion Ranger auto={H(forest|myBattlefield)}:untap target(creature) limit:1 text=Return a Forest you control to its owner's hand: Untap target creature. Activate this ability only once each turn. @@ -78703,6 +78761,16 @@ power=0 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} +text={T}: Add to your mana pool one mana of any type that a land you control could produce. +type=Land +[/card] +[card] name=Reflex Sliver auto=lord(sliver) haste text=All Sliver creatures have haste. @@ -98929,6 +98997,20 @@ power=* 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} +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 +subtype=Human Druid +power=1 +toughness=1 +[/card] +[card] name=Sylvok Lifestaff auto=1/0 auto=@movedTo(mytgt|graveyard) from(battlefield):all(trigger[to]) life:3 controller diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index be85531ce..22d44537e 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -4763,11 +4763,6 @@ power=1 toughness=2 [/card] [card] -name=Exotic Orchard -text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. -type=Land -[/card] -[card] name=Experiment Kraj text=Experiment Kraj has all activated abilities of each other creature with a +1/+1 counter on it. -- {T}: Put a +1/+1 counter on target creature. mana={2}{G}{G}{U}{U} @@ -4986,12 +4981,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Fellwar Stone -text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. -mana={2} -type=Artifact -[/card] -[card] name=Feral Contest text=Put a +1/+1 counter on target creature you control. Another target creature blocks it this turn if able. mana={3}{G} @@ -6861,15 +6850,6 @@ power=1 toughness=1 [/card] [card] -name=Harvester Druid -text={T}: Add to your mana pool one mana of any color that a land you control could produce. -mana={1}{G} -type=Creature -subtype=Human Druid -power=1 -toughness=1 -[/card] -[card] name=Hatred text=As an additional cost to cast Hatred, pay X life. -- Target creature gets +X/+0 until end of turn. mana={3}{B}{B} @@ -12614,15 +12594,6 @@ mana={1}{U} type=Sorcery [/card] [card] -name=Quirion Explorer -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 -subtype=Elf Druid Scout -power=1 -toughness=1 -[/card] -[card] name=R&D's Secret Lair mana= type=Legendary Land @@ -12923,11 +12894,6 @@ mana={4} type=Artifact [/card] [card] -name=Reflecting Pool -text={T}: Add to your mana pool one mana of any type that a land you control could produce. -type=Land -[/card] -[card] name=Refraction Trap text=If an opponent cast a red instant or sorcery spell this turn, you may pay {W} rather than pay Refraction Trap's mana cost. -- Prevent the next 3 damage that a source of your choice would deal to you and/or permanents you control this turn. If damage is prevented this way, Refraction Trap deals that much damage to target creature or player. mana={3}{W} @@ -15570,6 +15536,7 @@ subtype=Monger power=3 toughness=3 [/card] +#needs alias [card] name=Squandered Resources text=Sacrifice a land: Add to your mana pool one mana of any type the sacrificed land could produce. @@ -16214,15 +16181,6 @@ power=2 toughness=2 [/card] [card] -name=Sylvok Explorer -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 -subtype=Human Druid -power=1 -toughness=1 -[/card] -[card] name=Symbol Status mana={2}{G}{G} type=Sorcery diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 66b33ff29..015bd2176 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -668,6 +668,116 @@ private: { intValue = target->controller()->handsize; } + else if (s == "olandg") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(1)) + intValue = 1; + }//end + } + else if (s == "olandu") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(2)) + intValue = 1; + }//end + } + else if (s == "olandr") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(3)) + intValue = 1; + }//end + } + else if (s == "olandb") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(4)) + intValue = 1; + }//end + } + else if (s == "olandw") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(5)) + intValue = 1; + }//end + } + else if (s == "plandg") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(1)) + intValue = 1; + }//end + } + else if (s == "plandu") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(2)) + intValue = 1; + }//end + } + else if (s == "plandr") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(3)) + intValue = 1; + }//end + } + else if (s == "plandb") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(4)) + intValue = 1; + }//end + } + else if (s == "plandw") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(5)) + intValue = 1; + }//end + } else if (s == "controllerturn")//intvalue = 1 if its your turn this(variable{controllerturn}) { intValue = 0; diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 00fec3c32..9b53f9041 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -365,6 +365,8 @@ void CardGui::Render() buff = "CT"; if(!card->isToken && card->isACopier) buff = "C"; + if(game && card->has(Constants::PAYZERO) && ((card->currentZone == card->controller()->game->hand) || (card->has(Constants::CANPLAYFROMGRAVEYARD) && card->currentZone == card->controller()->game->graveyard) || (card->has(Constants::CANPLAYFROMEXILE) && card->currentZone == card->controller()->game->exile))) + buff += "Z"; if(card->alias == 0000) { if(card->chooseacolor == 1)