From 192103b105f57c18adad988c30e0a9b1ac94da0b Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew@gmail.com" Date: Sat, 9 Jan 2010 11:09:44 +0000 Subject: [PATCH] Erwan - fix issue 260 - ad test for issue 267 --- projects/mtg/bin/Res/sets/DIS/_cards.dat | 12 +++++ projects/mtg/bin/Res/test/_tests.txt | 1 + .../mtg/bin/Res/test/bugs/hope_charm_i267.txt | 30 +++++++++++ .../Res/test/bugs/shield_of_the_ages_i178.txt | 28 ---------- .../mtg/bin/Res/test/bugs/soul_net_i171.txt | 51 ------------------- .../mtg/bin/Res/test/plumes_of_peace_i260.txt | 21 ++++++++ projects/mtg/include/AllAbilities.h | 5 ++ 7 files changed, 69 insertions(+), 79 deletions(-) create mode 100644 projects/mtg/bin/Res/test/bugs/hope_charm_i267.txt delete mode 100644 projects/mtg/bin/Res/test/bugs/shield_of_the_ages_i178.txt delete mode 100644 projects/mtg/bin/Res/test/bugs/soul_net_i171.txt create mode 100644 projects/mtg/bin/Res/test/plumes_of_peace_i260.txt diff --git a/projects/mtg/bin/Res/sets/DIS/_cards.dat b/projects/mtg/bin/Res/sets/DIS/_cards.dat index d916e503c..eef683c5f 100644 --- a/projects/mtg/bin/Res/sets/DIS/_cards.dat +++ b/projects/mtg/bin/Res/sets/DIS/_cards.dat @@ -218,6 +218,18 @@ power=3 toughness=4 [/card] [card] +id=107379 +name=Plumes of Peace +mana={1}{W}{U} +type=Enchantment +subtype=Aura +text=Enchant creature Enchanted creature doesn't untap during its controller's untap step. Forecast - {W}{U}, Reveal Plumes of Peace from your hand: Tap target creature. (Activate this ability only during your upkeep and only once each turn.) +rarity=C +target=creature +auto=doesnotuntap +autohand={W}{U}:tap target(creature) limit:1 myUpkeepOnly +[/card] +[card] text=Flying Pride of the Clouds gets +1/+1 for each other creature with flying on the battlefield. Forecast - {2}{W}{U}, Reveal Pride of the Clouds from your hand: Put a 1/1 white and blue Bird creature token with flying onto the battlefield. (Activate this ability only during your upkeep and only once each turn.) autohand={2}{W}{U}:token(Bird,Creature Bird,1/1,blue,white flying) limit:1 myUpkeepOnly id=97097 diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index d3ddfefda..40204dc7e 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -305,6 +305,7 @@ paralysis.txt paralysis2.txt persuasion.txt plague_rats.txt +plumes_of_peace_i260.txt prosperity.txt protomatter_powder.txt prowess_of_the_fair.txt diff --git a/projects/mtg/bin/Res/test/bugs/hope_charm_i267.txt b/projects/mtg/bin/Res/test/bugs/hope_charm_i267.txt new file mode 100644 index 000000000..a882ec3df --- /dev/null +++ b/projects/mtg/bin/Res/test/bugs/hope_charm_i267.txt @@ -0,0 +1,30 @@ +#Bug: Hope Charm doesn't give first strike to target creature +[INIT] +COMBATATTACKERS +[PLAYER1] +hand:hope charm +inplay:grizzly bears +manapool:{W} +[PLAYER2] +inplay:hypnotic specter +[DO] +#attackers +hope charm +choice 0 +grizzly bears +grizzly bears +next +#blockers +hypnotic specter +next +#damage +next +#end combat +[ASSERT] +COMBATEND +[PLAYER1] +inplay:grizzly bears +graveyard:hope charm +[PLAYER2] +graveyard:hypnotic specter +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/bugs/shield_of_the_ages_i178.txt b/projects/mtg/bin/Res/test/bugs/shield_of_the_ages_i178.txt deleted file mode 100644 index 3e666fe31..000000000 --- a/projects/mtg/bin/Res/test/bugs/shield_of_the_ages_i178.txt +++ /dev/null @@ -1,28 +0,0 @@ -#NAME: Shield of the Ages -#DESC: Shield of the Ages was hardcoded and -#DESC: probably depended on damage going on -#DESC: the stack. Since this (correctly) doesn't -#DESC: happen any more, SotA has no effect. -#DESC: However, something else must also be -#DESC: going wrong, since SotA wants me to -#DESC: specify a target. It shouldn't. -[INIT] -firstmain -[PLAYER1] -inplay:Shield of the Ages -hand:Shock -manapool:{R}{R}{R} -[PLAYER2] -[DO] -human -Shield of the Ages -Shock -p1 -[ASSERT] -firstmain -[PLAYER1] -inplay:Shield of the Ages -graveyard:Shock -life:19 -[PLAYER2] -[END] diff --git a/projects/mtg/bin/Res/test/bugs/soul_net_i171.txt b/projects/mtg/bin/Res/test/bugs/soul_net_i171.txt deleted file mode 100644 index 4b555f7bd..000000000 --- a/projects/mtg/bin/Res/test/bugs/soul_net_i171.txt +++ /dev/null @@ -1,51 +0,0 @@ -#NAME: Soul Net -#DESC: Soul Net was reported to be unusable -#DESC: in the opponent's turn. Research revealed -#DESC: that it currently isn't usable at all. -#DESC: The script has player 0 sacrifice a Mogg -#DESC: Fanatic to kill a Savannah Lions, and -#DESC: then try to gain 1 Life for each of the -#DESC: two creatures through Soul Net. Then the -#DESC: opponent sacrifices a Thrull, and player 0 -#DESC: tries to use Soul Net again. -#DESC: The script may need adapting, I can't be -#DESC: sure how Soul Net is supposed to work, so -#DESC: I had to guess. -#DESC: See http://code.google.com/p/wagic/issues/detail?id=171 -[INIT] -secondmain -[PLAYER1] -inplay:Soul Net,Mogg Fanatic,Mountain -manapool:{R}{R} -[PLAYER2] -inplay:Basal Thrull,Savannah Lions -library:Swamp -[DO] -Mogg Fanatic -Savannah Lions -yes -Soul Net -Soul Net -endinterruption -no -eot -next -next -next -Basal Thrull -no -yes -Mountain -Soul Net -endinterruption -[ASSERT] -firstmain -[PLAYER1] -inplay:Soul Net,Mountain -graveyard:Mogg Fanatic -life:23 -[PLAYER2] -hand:Swamp -graveyard:Basal Thrull,Savannah Lions -manapool:{B}{B} -[END] diff --git a/projects/mtg/bin/Res/test/plumes_of_peace_i260.txt b/projects/mtg/bin/Res/test/plumes_of_peace_i260.txt new file mode 100644 index 000000000..2a3ca6341 --- /dev/null +++ b/projects/mtg/bin/Res/test/plumes_of_peace_i260.txt @@ -0,0 +1,21 @@ +#Bug: Act of Treason doesn't untap +[INIT] +UPKEEP +[PLAYER1] +inplay:grizzly bears,raging goblin +hand:plumes of peace +manapool:{W}{U}{W}{U} +[PLAYER2] +[DO] +plumes of peace +grizzly bears +plumes of peace +raging goblin +[ASSERT] +UPKEEP +[PLAYER1] +inplay:grizzly bears,raging goblin +hand:plumes of peace +manapool:{W}{U} +[PLAYER2] +[END] \ No newline at end of file diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 9e42c3b17..338ce58a1 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -463,6 +463,11 @@ public: return a; } + int resolve(){ + counters++; + return TargetAbility::resolve(); + } + int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL){ if (limitPerTurn && counters >= limitPerTurn) return 0; return TargetAbility::isReactingToClick(card,mana);