From ceb2b9b7b35e000c3399c74efd06bf721acf76d9 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Sun, 7 Dec 2008 14:12:19 +0000 Subject: [PATCH] Erwan - fixed a bug with Mountain goat - fixed a bug with Hymn of rebirth --- projects/mtg/bin/Res/sets/ICE/_cards.dat | 2 +- projects/mtg/bin/Res/test/_tests.txt | 1 + projects/mtg/bin/Res/test/hymn_of_rebirth.txt | 21 +++++++++++++++++++ projects/mtg/src/MTGAbility.cpp | 3 ++- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 projects/mtg/bin/Res/test/hymn_of_rebirth.txt diff --git a/projects/mtg/bin/Res/sets/ICE/_cards.dat b/projects/mtg/bin/Res/sets/ICE/_cards.dat index 1c0d3fe00..ab5211157 100644 --- a/projects/mtg/bin/Res/sets/ICE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ICE/_cards.dat @@ -882,7 +882,7 @@ toughness=1 [/card] [card] text=Mountainwalk -abilities=moutainwalk +abilities=mountainwalk id=2639 name=Mountain Goat rarity=C diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 10b52f82d..9e551753d 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -36,6 +36,7 @@ giant_growth.txt goblin_balloon_brigade.txt goblin_balloon_brigade2.txt goblin_king.txt +hymn_of_rebirth.txt keldon_warlord.txt kudzu.txt kudzu2.txt diff --git a/projects/mtg/bin/Res/test/hymn_of_rebirth.txt b/projects/mtg/bin/Res/test/hymn_of_rebirth.txt new file mode 100644 index 000000000..529c79677 --- /dev/null +++ b/projects/mtg/bin/Res/test/hymn_of_rebirth.txt @@ -0,0 +1,21 @@ +#TestingHymn of Rebirth on a creature in opponent's graveyard +[INIT] +FIRSTMAIN +[PLAYER1] +hand:2731 +manapool:{3}{W}{G} +[PLAYER2] +graveyard:2586 +[DO] +2731 +2586 +[ASSERT] +FIRSTMAIN +[PLAYER1] +inplay:2586 +graveyard:2731 +manapool:{0} +life:20 +[PLAYER2] +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index d87794060..c6944e8fb 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1278,8 +1278,9 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ case 1360: //Resurrection { Player * p = card->controller(); + Player * p2 = card->target->controller(); AbilityFactory af; - af.putInPlayFromZone(card->target, p->game->graveyard, p); + af.putInPlayFromZone(card->target, p2->game->graveyard, p); break; } case 1362: //Reverse polarity