diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index cd47bf1eb..389d98773 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -217,6 +217,7 @@ shock.txt shock2.txt slate_of_ancestry.txt sleeper_agent.txt +slith_bloodletter.txt soulblast.txt sphinx_summoner.txt spitting_earth.txt diff --git a/projects/mtg/bin/Res/test/slith_bloodletter.txt b/projects/mtg/bin/Res/test/slith_bloodletter.txt new file mode 100644 index 000000000..692529d5b --- /dev/null +++ b/projects/mtg/bin/Res/test/slith_bloodletter.txt @@ -0,0 +1,40 @@ +#Bug: Slith bloodletter gets counters even when it doesn't attack +[INIT] +COMBATATTACKERS +[PLAYER1] +inplay:grizzly bears,slith bloodletter +[PLAYER2] +[DO] +grizzly bears +next +#blockers +next +#damage +next +#end combat +eot +eot +next +#upkeep +next +#draw +next +#main +next +#begin +next +#attackers +slith bloodletter +next +#blockers +next +#damage +next +#end combat +[ASSERT] +COMBATEND +[PLAYER1] +inplay:grizzly bears,slith bloodletter +[PLAYER2] +life:17 +[END] \ No newline at end of file diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 5f9105850..2613105b3 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -118,16 +118,14 @@ TriggeredAbility * AbilityFactory::parseTrigger(string magicText, int id, Spell tc->targetter = NULL; found = s.find("from("); - TargetChooser *fromTc = NULL; - if (found != string::npos){ - end = s.find (")", found); - starget = s.substr(found+5,end - found - 5); - TargetChooser * fromTc = tcf.createTargetChooser(starget,card); - fromTc->targetter = NULL; - return NEW TrDamaged(id,card,tc,fromTc); - }else{ + TargetChooser *fromTc = NULL; + if (found != string::npos){ + end = s.find (")", found); + starget = s.substr(found+5,end - found - 5); + fromTc = tcf.createTargetChooser(starget,card); + fromTc->targetter = NULL; + } return NEW TrDamaged(id,card,tc,fromTc); - } } int who = 0;