diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 9e712eb60..112b48a1e 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -95,6 +95,7 @@ deja_vu.txt dingus_egg.txt doomed_necromancer.txt dragon_fodder.txt +dragon_fodder2.txt drain_life.txt drift_of_the_dead.txt dross_harvester.txt @@ -205,6 +206,7 @@ siege_gang_commander.txt shepherd_of_rot.txt shivan_hellkite.txt shock.txt +shock2.txt slate_of_ancestry.txt sleeper_agent.txt soulblast.txt diff --git a/projects/mtg/bin/Res/test/dragon_fodder2.txt b/projects/mtg/bin/Res/test/dragon_fodder2.txt new file mode 100644 index 000000000..e1e19bb48 --- /dev/null +++ b/projects/mtg/bin/Res/test/dragon_fodder2.txt @@ -0,0 +1,43 @@ +#Testing Tokens +# Dragon Fodder (ALA) 174936 +# text=Put two 1/1 red Goblin creature tokens into play. +[INIT] +FIRSTMAIN +[PLAYER1] +hand:174936 +manapool:{R}{1} +[PLAYER2] +inplay:mountain +hand:shock +[DO] +174936 +eot +eot +next +#upkeep +next +#draw +next +#main +next +#begin +next +#attackers +-174936 +next +#blockers +mountain +shock +-174936 +next +#end +[ASSERT] +COMBATEND +[PLAYER1] +graveyard:174936 +inplay:-174936 +[PLAYER2] +graveyard:shock +inplay:mountain +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/shock2.txt b/projects/mtg/bin/Res/test/shock2.txt new file mode 100644 index 000000000..d1499a0ff --- /dev/null +++ b/projects/mtg/bin/Res/test/shock2.txt @@ -0,0 +1,26 @@ +#Testing Combat Damage +[INIT] +COMBATATTACKERS +[PLAYER1] +inplay:grizzly bears +[PLAYER2] +inplay:mountain +hand:shock +[DO] +grizzly bears +next +#blockers +mountain +shock +grizzly bears +next +#end +[ASSERT] +COMBATEND +[PLAYER1] +graveyard:grizzly bears +[PLAYER2] +graveyard:shock +inplay:mountain +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/src/GuiCombat.cpp b/projects/mtg/src/GuiCombat.cpp index 82871cb2a..87d892107 100644 --- a/projects/mtg/src/GuiCombat.cpp +++ b/projects/mtg/src/GuiCombat.cpp @@ -373,7 +373,7 @@ int GuiCombat::receiveEventMinus(WEvent* e) if (go->players[0]->game->inPlay == event->from || go->players[1]->game->inPlay == event->from) { for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it) - if ((*it)->card == event->card->previous) + if ((*it)->card == event->card->previous || (*it)->card == event->card ) { AttackerDamaged* d = *it; if (activeAtk == *it) activeAtk = NULL; @@ -383,7 +383,7 @@ int GuiCombat::receiveEventMinus(WEvent* e) } else for (vector::iterator q = (*it)->blockers.begin(); q != (*it)->blockers.end(); ++q) - if ((*q)->card == event->card->previous) + if ((*q)->card == event->card->previous || (*q)->card == event->card) { DefenserDamaged* d = *q; (*it)->blockers.erase(q);