From e5751957dde5b6b4be76fc0babb7c704e989c240 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew@gmail.com" Date: Fri, 25 Sep 2009 14:40:49 +0000 Subject: [PATCH] Erwan -fix issue 35 - Card duplicated when moved from inplay to inplay - fix issue 54 - Token not going away - (duplicate of issue 35) --- projects/mtg/bin/Res/test/manual/tokens.txt | 20 ++++++++++++++++++++ projects/mtg/src/GuiPlay.cpp | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 projects/mtg/bin/Res/test/manual/tokens.txt diff --git a/projects/mtg/bin/Res/test/manual/tokens.txt b/projects/mtg/bin/Res/test/manual/tokens.txt new file mode 100644 index 000000000..59e830c5f --- /dev/null +++ b/projects/mtg/bin/Res/test/manual/tokens.txt @@ -0,0 +1,20 @@ +#does wrath of god destroy all creature including tokens? +[INIT] +FIRSTMAIN +[PLAYER1] +hand:193751,Wrath of God +manapool:{3}{R}{R}{2}{W}{W} +[PLAYER2] +inplay:Grizzly Bears +[DO] +193751 +wrath of god +human +[ASSERT] +COMBATEND +[PLAYER1] +graveyard:193751,wrath of god +manapool:{0} +[PLAYER2] +graveyard:Grizzly Bears +[END] \ No newline at end of file diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index ee3c1cfaf..65e0fc534 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -216,7 +216,7 @@ int GuiPlay::receiveEventMinus(WEvent * e) if ((game->players[0]->inPlay() == event->from) || (game->players[1]->inPlay() == event->from)) for (iterator it = cards.begin(); it != cards.end(); ++it) - if (event->card->previous == (*it)->card) + if (event->card->previous == (*it)->card || event->card == (*it)->card ) { CardView* cv = *it; cs->Remove(cv);