diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 32841bb5a..7a5448816 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -226,6 +226,7 @@ colossus_of_sardia1.txt colossus_of_sardia2.txt composite_golem.txt conservator.txt +consign_to_dream.txt Contagion_Clasp.txt control_magic.txt control_magic2.txt diff --git a/projects/mtg/bin/Res/test/consign_to_dream.txt b/projects/mtg/bin/Res/test/consign_to_dream.txt new file mode 100644 index 000000000..599770868 --- /dev/null +++ b/projects/mtg/bin/Res/test/consign_to_dream.txt @@ -0,0 +1,25 @@ +# Test TargetChooser based on negation of two colors +# Grizzly bear should be put on top of library + +# name=Consign to Dream +# Return target permanent to its owner's hand. +# If that permanent is red or green, put it on top of its owner's library + +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Consign to Dream +manapool:{2}{U} +inplay:grizzly bears +[PLAYER2] +[DO] +Consign to Dream +grizzly bears +endinterruption +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:Consign to Dream +library:grizzly bears +[PLAYER2] +[END] \ No newline at end of file diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index 995ff79b4..f304e356d 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -160,7 +160,8 @@ MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card) if (mColorExclusions) { - if ((mColorExclusions & card->colors) == mColorExclusions) + // if any of forbidden colors intersect with card colors + if ((mColorExclusions & card->colors) != 0) match = NULL; }