From fea798521247ca1f52b8737c6a7c7bd1f3926b74 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew@gmail.com" Date: Fri, 15 Jan 2010 14:44:55 +0000 Subject: [PATCH] Erwan - fix issue 228 (cockatrice VS regenerate) --- projects/mtg/bin/Res/test/_tests.txt | 1 + projects/mtg/bin/Res/test/cockatrice_i228.txt | 28 +++++++++++++++++++ projects/mtg/include/AllAbilities.h | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 projects/mtg/bin/Res/test/cockatrice_i228.txt diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index a896904c5..36a8f9b19 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -142,6 +142,7 @@ clone.txt clone2.txt clone3.txt cockatrice.txt +cockatrice_i228.txt colossus_of_sardia1.txt colossus_of_sardia2.txt composite_golem.txt diff --git a/projects/mtg/bin/Res/test/cockatrice_i228.txt b/projects/mtg/bin/Res/test/cockatrice_i228.txt new file mode 100644 index 000000000..09519369c --- /dev/null +++ b/projects/mtg/bin/Res/test/cockatrice_i228.txt @@ -0,0 +1,28 @@ +#Bug: Regenerate should prevent cokcatrice's effect +#see http://code.google.com/p/wagic/issues/detail?id=228 +[INIT] +COMBATATTACKERS +[PLAYER1] +inplay:Charging Troll,forest +[PLAYER2] +inplay:cockatrice +[DO] +Charging Troll +next +#blockers +cockatrice +next +yes +forest +Charging Troll +endinterruption +#damage +next +#end combat +[ASSERT] +COMBATEND +[PLAYER1] +inplay:Charging Troll,forest +[PLAYER2] +inplay:cockatrice +[END] \ No newline at end of file diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 542571e21..71f094cd9 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2134,7 +2134,7 @@ class AOldSchoolDeathtouch:public MTGAbility{ } }else if (newPhase == Constants::MTG_PHASE_COMBATEND){ for (int i = 0; i < nbOpponents ; i++){ - game->mLayers->stackLayer()->addPutInGraveyard(opponents[i]); + opponents[i]->destroy(); } } }