diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index fa969be8a..5b2a3b447 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -11328,7 +11328,7 @@ type=Enchantment [/card] [card] name=Bloodbond Vampire -auto=@lifed(controller):counter(1/1,1) +auto=@lifeof(player):counter(1/1,1) text=Whenever you gain life, put a +1/+1 counter on Bloodbond Vampire. mana={2}{B}{B} type=Creature @@ -20226,9 +20226,10 @@ type=Instant [/card] [card] name=Conduit of Ruin +alias=401847 auto=may moveto(myhand) target(creature[colorless;manacost>=7]|mylibrary) -auto=aslongas(thisturn(creature|mystack)~equalto~0) lord(creature|myhand) altercost(colorless,-2) -text=when you cast Conduit of Ruin, you may search your library for a colorless creature with converted mana cost 7 or more and put it into your hand -- the first creature spell you cast each turn costs {2} less to cast +auto=lord(creature|mycastingzone) conduited +text=When you cast Conduit of Ruin, you may search your library for a colorless creature card with converted mana cost 7 or greater, reveal it, then shuffle your library and put that card on top of it. -- The first creature spell you cast each turn costs {2} less to cast. mana={6} type=Creature subtype=Eldrazi @@ -25827,7 +25828,7 @@ subtype=Aura [card] name=Defiant Bloodlord abilities=flying -auto=@lifed(controller):life:-thatmuch target(opponent) +auto=@lifeof(player):life:-thatmuch target(opponent) text=Flying -- Whenever you gain life, target opponent loses that much life. mana={5}{B}{B} type=Creature @@ -56468,7 +56469,7 @@ toughness=2 [/card] [card] name=Kalastria Nightwatch -auto=@lifed(controller):flying ueot +auto=@lifeof(player):flying ueot text=Whenever you gain life, Kalastria Nightwatch gains flying until end of turn. mana={4}{B} type=Creature @@ -64867,7 +64868,7 @@ toughness=1 [card] name=Malakir Familiar abilities=flying, deathtouch -auto=@lifed(controller):1/1 ueot +auto=@lifeof(player):1/1 ueot text=Flying, deathtouch -- Whenever you gain life, Malakir Familiar gets +1/+1 until end of turn. mana={2}{B} type=Creature @@ -74085,7 +74086,7 @@ toughness=1 [/card] [card] name=Nirkana Assassin -auto=@lifed(controller):deathtouch ueot +auto=@lifeof(player):deathtouch ueot text=Whenever you gain life, Nirkana Assassin gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.) mana={2}{B} type=Creature @@ -94834,7 +94835,7 @@ type=Sorcery [/card] [card] name=Serene Steward -auto=@lifed(controller):pay({W}) counter(1/1) target(creature) +auto=@lifeof(player):pay({W}) counter(1/1) target(creature) text=Whenever you gain life, you may pay {W}. If you do, put a +1/+1 counter on target creature. mana={1}{W} type=Creature @@ -116934,21 +116935,21 @@ toughness=2 [/card] [card] name=Unity of Purpose -auto=target(other creature|battlefield) counter(1/1,1) -auto=all(creature[counter{1/1.1}]|mybattlefield) untap +auto=ability$!choice untap all(creature[counter{1/1.1}]|mybattlefield)!$ controller +auto=target(other creature|battlefield) counter(1/1,1) text=Support 2. (Put a +1/+1 counter on each of up to two target creatures.) -- Untap each creature you control with a +1/+1 counter on it. mana={3}{U} type=Instant [/card] [card] name=Unknown Shores -auto={T}:Add{1} +auto={T}:Add{c} auto={1}{T}:Add{G} auto={1}{T}:Add{R} auto={1}{T}:Add{B} auto={1}{T}:Add{U} auto={1}{T}:Add{W} -text={T}: Add {1} to your mana pool. -- {1}, {T}: Add one mana of any color to your mana pool. +text={T}: Add {C} to your mana pool. ({C} represents colorless mana.) -- {1}, {T}: Add one mana of any color to your mana pool. type=Land [/card] [card] @@ -116987,7 +116988,7 @@ type=Sorcery [card] name=Unnatural Endurance target=creature -auto=+2/+0 ueot +auto=2/0 ueot auto=regenerate text=Devoid (This card has no color.) -- Target creature gets +2/+0 until end of turn. Regenerate it. mana={B} @@ -117160,7 +117161,7 @@ type=Instant name=Untamed Hunger target=creature auto=teach(creature) menace -auto=+2/+1 +auto=2/1 text=Enchant creature -- Enchanted creature gets +2/+1 and has menace. (It can't be blocked except by two or more creatures.) mana={2}{B} type=Enchantment @@ -119900,7 +119901,7 @@ name=Vines of the Recluse target=creature auto=untap auto=reach ueot -auto=+1/+2 ueot +auto=1/2 ueot text=Target creature gets +1/+2 and gains reach until end of turn. Untap it. (A creature with reach can block creatures with flying.) mana={G} type=Instant @@ -121525,7 +121526,7 @@ toughness=7 [card] name=Walker of the Wastes abilities=trample -auto=foreach(waste|mybattlefield) 1/1 +auto=foreach(Wastes|mybattlefield) 1/1 text=({C} represents colorless mana.) -- Trample -- Walker of the Wastes gets +1/+1 for each land you control named Wastes. mana={4}{C} type=Creature @@ -121954,7 +121955,7 @@ toughness=3 [/card] [card] name=Wall of Resurgence -abilities=defender, haste +abilities=defender auto=may target(land|mybattlefield) transforms((Elemental Creature,newability[counter(1/1,3)],newability[haste])) forever text=Defender -- When Wall of Resurgence enters the battlefield, you may put three +1/+1 counters on target land you control. If you do, that land becomes a 0/0 Elemental creature with haste that's still a land. mana={2}{W} @@ -122837,6 +122838,12 @@ text={T}: Add {1} to your mana pool. -- {T}, Sacrifice Wasteland: Destroy target type=Land [/card] [card] +name=Wastes +auto={t}:add{c} +text={T}: Add {C} to your mana pool. +type=Basic Land +[/card] +[card] name=Watchdog abilities=mustblock auto=this(untapped) lord(creature[attacking]|opponentbattlefield) -1/0 diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index f3d8c5451..2302e2345 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -259,7 +259,8 @@ class Constants NOLEGENDRULE =137, CANTTRANSFORM =138, ASFLASH =139, - NB_BASIC_ABILITIES = 140, + CONDUITED = 140, + NB_BASIC_ABILITIES = 141, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/include/MTGGameZones.h b/projects/mtg/include/MTGGameZones.h index 96f3bfb29..5219cb5f7 100644 --- a/projects/mtg/include/MTGGameZones.h +++ b/projects/mtg/include/MTGGameZones.h @@ -102,7 +102,8 @@ class MTGGameZone { size_t getIndex(MTGCardInstance * card); void cleanupPhase(); void beforeBeginPhase(); - + + unsigned int countByAlias(int number = 0); unsigned int countByType(const string &value); unsigned int countByCanTarget(TargetChooser * tc); unsigned int countTotalManaSymbols(TargetChooser * tc, int color); diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index ee647ae37..d5769a4cd 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -1121,6 +1121,7 @@ void GameObserver::Affinity() card->has(Constants::AFFINITYMOUNTAIN) || card->has(Constants::AFFINITYPLAINS) || card->has(Constants::AFFINITYSWAMP) || + card->has(Constants::CONDUITED) || card->getIncreasedManaCost()->getConvertedCost() || card->getReducedManaCost()->getConvertedCost() || NewAffinityFound) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index ed002960d..14175e732 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -1090,7 +1090,8 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos card->has(Constants::AFFINITYISLAND) || card->has(Constants::AFFINITYMOUNTAIN) || card->has(Constants::AFFINITYPLAINS) || - card->has(Constants::AFFINITYSWAMP)) + card->has(Constants::AFFINITYSWAMP) || + card->has(Constants::CONDUITED)) {//start3 if (card->has(Constants::AFFINITYARTIFACTS)) { @@ -1145,6 +1146,14 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos reduce = card->controller()->game->battlefield->countByCanTarget(tc); SAFE_DELETE(tc); } + else if (card->has(Constants::CONDUITED)) + {//I had to hardcode this since it doesn't update with auto=this(creaturespells<1) lord(creature|mycastingzone) altercost(colorless,-2) + color = 0; + reduce = card->controller()->inPlay()->countByAlias(401847); + reduce *= 2; + if(card->controller()->game->stack->seenThisTurn("creature", Constants::CAST_ALL) > 0) + reduce = 0; + } else { reduce = card->controller()->game->battlefield->countByType(type); diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 7474192c1..abcfdedce 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -170,7 +170,8 @@ const char* Constants::MTGBasicAbilities[] = { "tempflashback", "legendruleremove", "canttransform", - "asflash" + "asflash", + "conduited" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 3accbde01..165516841 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -643,6 +643,20 @@ size_t MTGGameZone::getIndex(MTGCardInstance * card) return -1; } +unsigned int MTGGameZone::countByAlias(int number) +{ + if(!number) + return 0; + int result = 0; + for (int i = 0; i < (nb_cards); i++) + { + if (cards[i]->alias == number) + { + result++; + } + } + return result; +} unsigned int MTGGameZone::countByType(const string &value) {