diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index ce6ade65d..d4510ec5f 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -2,6 +2,7 @@ #Generic engine features ######################## generic/attacks_each_turn.txt +generic/becomes_transform_i559.txt generic/bushido_1.txt generic/bushido_2.txt generic/cycling.txt diff --git a/projects/mtg/bin/Res/test/generic/becomes_transform_i559.txt b/projects/mtg/bin/Res/test/generic/becomes_transform_i559.txt new file mode 100644 index 000000000..6464d11af --- /dev/null +++ b/projects/mtg/bin/Res/test/generic/becomes_transform_i559.txt @@ -0,0 +1,26 @@ +#NAME: Niveous Wisps + Grizzly Bears + Execute=FAIL! +#Card Explanation: +#Niveous Wisps: (target creature becomes white) +#Execute: (destroy target white creature) +#BUG: Grizzly Bears cannot be targeted by Execute though it should be able to. +#This is because Grizzly Bears didn't become white. +# see http://code.google.com/p/wagic/issues/detail?id=559 +[INIT] +firstmain +[PLAYER1] +hand:Niveous Wisps,Execute +inplay:Grizzly Bears +manapool:{W}{B}{2} +[PLAYER2] +[DO] +Niveous Wisps +Grizzly Bears +Execute +Grizzly Bears +[ASSERT] +firstmain +[PLAYER1] +graveyard:Niveous Wisps,Execute,Grizzly Bears +manapool={0} +[PLAYER2] +[END] diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 1e0ccb04b..6fb52ecf3 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -2095,7 +2095,7 @@ void PopulateColorIndexVector(list& colors, const string& colorStringList, for (int colorIndex = Constants::MTG_COLOR_ARTIFACT; colorIndex < Constants::MTG_NB_COLORS; ++colorIndex) { // if the text is not a basic ability but contains a valid color add it to the color vector - if ((Constants::GetBasicAbilityIndex(*iter) != -1) + if ((Constants::GetBasicAbilityIndex(*iter) == -1) && ((*iter).find(Constants::MTGColorStrings[colorIndex]) != string::npos)) colors.push_back(colorIndex); }