diff --git a/projects/mtg/bin/Res/sets/EVE/_cards.dat b/projects/mtg/bin/Res/sets/EVE/_cards.dat index 39ff30170..3bbf4dbe7 100644 --- a/projects/mtg/bin/Res/sets/EVE/_cards.dat +++ b/projects/mtg/bin/Res/sets/EVE/_cards.dat @@ -561,7 +561,7 @@ mana={WB}{WB}{WB} [/card] [card] text={T}: Target red or green creature gets -2/-0 until end of turn. -auto={T}:-2/0 target(creature[red]) +auto={T}:-2/0 target(creature[red;green]) id=153476 name=Wilderness Hypnotist rarity=C diff --git a/projects/mtg/bin/Res/sets/M10/_cards.dat b/projects/mtg/bin/Res/sets/M10/_cards.dat index f95789c49..d6e538acc 100644 --- a/projects/mtg/bin/Res/sets/M10/_cards.dat +++ b/projects/mtg/bin/Res/sets/M10/_cards.dat @@ -1131,7 +1131,7 @@ mana={1}{G} type=Sorcery text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. target=basic|myLibrary -auto=moveTo(myBattlefield) +auto=moveTo(myBattlefield) && tap rarity=C [/card] [card] diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 0b611fa5e..6b57eb62f 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -125,6 +125,7 @@ plague_rats.txt protomatter_powder.txt pygmy_troll.txt pyroclasm.txt +rampant_growth.txt recover.txt resurrection.txt righteous_cause.txt diff --git a/projects/mtg/bin/Res/test/rampant_growth.txt b/projects/mtg/bin/Res/test/rampant_growth.txt new file mode 100644 index 000000000..120eed7f5 --- /dev/null +++ b/projects/mtg/bin/Res/test/rampant_growth.txt @@ -0,0 +1,20 @@ +#Bug:rampant growth does not tap target +[INIT] +FIRSTMAIN +[PLAYER1] +library:island +hand:rampant growth +manapool:{1}{G} +[PLAYER2] +[DO] +rampant growth +island +island +[ASSERT] +FIRSTMAIN +[PLAYER1] +inplay:island +manapool:{0} +graveyard:rampant growth +[PLAYER2] +[END] \ No newline at end of file diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 70e61ca9c..9353f27e3 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -162,7 +162,8 @@ public: vector abilities; - MultiAbility(int _id, MTGCardInstance * card,ManaCost * _cost, int _tap):ActivatedAbility(_id, card,_cost,0,_tap){ + MultiAbility(int _id, MTGCardInstance * card,Targetable * _target, ManaCost * _cost, int _tap):ActivatedAbility(_id, card,_cost,0,_tap){ + if (_target) target = _target; } @@ -1648,13 +1649,14 @@ class AATapper:public ActivatedAbility{ int resolve(){ MTGCardInstance * _target = (MTGCardInstance *) target; if (_target){ + while (_target->next) _target=_target->next; //This is for cards such as rampant growth _target->tap(); } return 1; } const char * getMenuText(){ - return "Tap target"; + return "Tap"; } AATapper * clone() const{ @@ -1675,13 +1677,14 @@ class AAUntapper:public ActivatedAbility{ int resolve(){ MTGCardInstance * _target = (MTGCardInstance *) target; if (_target){ - _target->tap(); + while (_target->next) _target=_target->next; //This is for cards such as rampant growth + _target->untap(); } return 1; } const char * getMenuText(){ - return "untap target"; + return "Untap"; } AAUntapper * clone() const{ diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index e1d6e239c..c9dd73d1f 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -210,11 +210,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG if (found != string::npos){ string s1 = s.substr(0,found); string s2 = s.substr(found+2); - MultiAbility * multi = NEW MultiAbility(id, card,NULL,NULL); + MultiAbility * multi = NEW MultiAbility(id, card,target,NULL,NULL); MTGAbility * a1 = parseMagicLine(s1,id,spell, card); MTGAbility * a2 = parseMagicLine(s2,id,spell, card); multi->Add(a1); multi->Add(a2); + multi->oneShot=1; return multi; }