diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index e3e23e25e..970de3fc5 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -796,6 +796,20 @@ mana={X}{B}{G}{U} type=Sorcery [/card] [card] +name=Watcher of the Roost +#missing reveal card +abilities=flying +autofaceup=life:2 controller +facedown={3} +autofacedown={0}:morph restriction{type(*[white]|myhand)~morethan~0} +text=Flying -- Morph—Reveal a white card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Watcher of the Roost is turned face up, you gain 2 life. +mana={2}{W} +type=Creature +subtype=Bird Soldier +power=2 +toughness=1 +[/card] +[card] name=Wolfcaller's Howl #wagic supports one opponent only auto=@each my upkeep restriction{type(*|opponenthand)~morethan~3}:token(Wolf,Creature Wolf,2/2,green) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index cf689bb4b..b2b5723e1 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -32007,7 +32007,7 @@ toughness=1 [/card] [card] name=Dreampod Druid -auto=this(auras >= 1) transforms((,newability[@each upkeep:token(-11492115)])) +auto=this(auras >= 1) transforms((,newability[@each upkeep:create(Saproling:Creature Saproling:1/1:green)])) text=At the beginning of each upkeep, if Dreampod Druid is enchanted, put a 1/1 green Saproling creature token onto the battlefield. mana={1}{G} type=Creature @@ -132933,6 +132933,29 @@ mana={4}{W} type=Sorcery [/card] [card] +name=Wave of Terror +auto=cumulativeupcost[{1}] sacrifice +auto=this(counter{0/0.1.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=1]|battlefield)])) +auto=this(counter{0/0.2.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=2]|battlefield)])) +auto=this(counter{0/0.3.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=3]|battlefield)])) +auto=this(counter{0/0.4.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=4]|battlefield)])) +auto=this(counter{0/0.5.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=5]|battlefield)])) +auto=this(counter{0/0.6.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=6]|battlefield)])) +auto=this(counter{0/0.7.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=7]|battlefield)])) +auto=this(counter{0/0.8.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=8]|battlefield)])) +auto=this(counter{0/0.9.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=9]|battlefield)])) +auto=this(counter{0/0.10.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=10]|battlefield)])) +auto=this(counter{0/0.11.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=11]|battlefield)])) +auto=this(counter{0/0.12.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=12]|battlefield)])) +auto=this(counter{0/0.13.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=13]|battlefield)])) +auto=this(counter{0/0.14.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=14]|battlefield)])) +auto=this(counter{0/0.15.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=15]|battlefield)])) +auto=this(counter{0/0.16.Age}=) transforms((,newability[@each my draw:bury all(creature[manacost=16]|battlefield)])) +text=Cumulative upkeep {1} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- At the beginning of your draw step, destroy each creature with converted mana cost equal to the number of age counters on Wave of Terror. They can't be regenerated. +mana={2}{B} +type=Enchantment +[/card] +[card] name=Wavecrash Triton auto=@targeted(this) from(*[instant;sorcery;enchantment]|mycastingzone):target(creature|opponentbattlefield) transforms((,newability[tap],newability[frozen])) oneshot text=Heroic -- Whenever you cast a spell that targets Wavecrash Triton, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. @@ -134608,6 +134631,7 @@ toughness=4 name=Wilt-Leaf Liege abilities=discardtoplaybyopponent auto=lord(other creature[green]|mybattlefield) 1/1 +auto=lord(other creature[white]|mybattlefield) 1/1 text=Other green creatures you control get +1/+1. -- Other white creatures you control get +1/+1. -- If a spell or ability an opponent controls causes you to discard Wilt-Leaf Liege, put it onto the battlefield instead of putting it into your graveyard. mana={1}{GW}{GW}{GW} type=Creature diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index 88edcd69d..05aa61a78 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -20012,27 +20012,12 @@ mana={5}{R}{R}{R} type=Sorcery [/card] [card] -name=Warpath -text=Warpath deals 3 damage to each blocking creature and each blocked creature. -mana={3}{R} -type=Instant -[/card] -[card] name=Warping Wail text=({C} represents colorless mana.) -- Choose one — -- • Exile target creature with power or toughness 1 or less. -- • Counter target sorcery spell. -- • Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." mana={1}{C} type=Instant [/card] [card] -name=Warping Wurm -text=Phasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.) -- At the beginning of your upkeep, Warping Wurm phases out unless you pay {2}{G}{U}. -- When Warping Wurm phases in, put a +1/+1 counter on it. -mana={2}{G}{U} -type=Creature -subtype=Wurm -power=1 -toughness=1 -[/card] -[card] name=Warrior en-Kor text={0}: The next 1 damage that would be dealt to Warrior en-Kor this turn is dealt to target creature you control instead. mana={W}{W} @@ -20054,6 +20039,9 @@ toughness=5 [card] name=Watcher of the Roost abilities=flying +autofaceup=life:2 controller +facedown={3} +autofacedown={0}:morph restriction{type(*[white]|myhand)~morethan~0} text=Flying -- Morph—Reveal a white card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Watcher of the Roost is turned face up, you gain 2 life. mana={2}{W} type=Creature @@ -20068,12 +20056,6 @@ mana={2} type=Artifact [/card] [card] -name=Wave of Terror -text=Cumulative upkeep {1} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- At the beginning of your draw step, destroy each creature with converted mana cost equal to the number of age counters on Wave of Terror. They can't be regenerated. -mana={2}{B} -type=Enchantment -[/card] -[card] name=Wave of Vitriol text=Each player sacrifices all artifacts, enchantments, and nonbasic lands he or she controls. For each land sacrificed this way, its controller may search his or her library for a basic land card and put it onto the battlefield tapped. Then each player who searched his or her library this way shuffles it. mana={5}{G}{G} diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index f079e9e7d..59ec7f9bf 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -771,6 +771,10 @@ private: { intValue = target->CountedObjects; } + else if (s == "countedbamount") + { + intValue = target->CountedObjectsB; + } else if (s == "kicked") { intValue = target->kicked; @@ -4744,6 +4748,16 @@ public: int resolve(); AACountObject * clone() const; }; +//counts a targetchooser for use later by other effects +class AACountObjectB : public ActivatedAbility +{ +public: + string value; + + AACountObjectB(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * source, ManaCost * _cost = NULL, string value =""); + int resolve(); + AACountObjectB * clone() const; +}; /* Can prevent a card from untapping next untap */ class AAFrozen: public ActivatedAbility { diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index 67e6efd5d..e7e9b40e8 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -116,6 +116,7 @@ public: int fresh; int MaxLevelUp; int CountedObjects; + int CountedObjectsB; int kicked; int dredge; int zpos; diff --git a/projects/mtg/src/AIHints.cpp b/projects/mtg/src/AIHints.cpp index f819344c2..0482a77d7 100644 --- a/projects/mtg/src/AIHints.cpp +++ b/projects/mtg/src/AIHints.cpp @@ -1,5 +1,5 @@ #include "PrecompiledHeader.h" - + #include "AIHints.h" #include "AIPlayerBaka.h" #include "utils.h" diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 1e8c06c5b..31f2f7111 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -5209,6 +5209,30 @@ AACountObject * AACountObject::clone() const { return NEW AACountObject(*this); } +//count objects on field before doing an effect +AACountObjectB::AACountObjectB(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance *, ManaCost * _cost, string value) : + ActivatedAbility(observer, id, card, _cost, 0), value(value) +{ +} + +int AACountObjectB::resolve() +{ + + if (source) + { + int amount = 0; + WParsedInt * use = NEW WParsedInt(value, NULL, source); + amount = use->getValue(); + source->CountedObjectsB = amount; + SAFE_DELETE(use); + } + return 1; +} + +AACountObjectB * AACountObjectB::clone() const +{ + return NEW AACountObjectB(*this); +} // Win Game AAWinGame::AAWinGame(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost, int who) : diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index db4919bc6..83a337215 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -4118,6 +4118,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } + vector splitCountObjectB = parseBetween(s, "countb(", ")", false); + if (splitCountObjectB.size()) + { + MTGAbility * a = NEW AACountObjectB(observer, id, card, card, NULL, splitCountObjectB[1]); + a->oneShot = 1; + return a; + } + //switch targest power with toughness found = s.find("swap"); if (found != string::npos) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 397aec705..9bd209250 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -286,6 +286,7 @@ void MTGCardInstance::initMTGCI() currentimprintName = ""; imprintedNames.clear(); CountedObjects = 0; + CountedObjectsB = 0; for (int i = 0; i < ManaCost::MANA_PAID_WITH_SUSPEND +1; i++) alternateCostPaid[i] = 0;