Small fix in match_and ( [-color1; -color2] was handled incorrectly )

This commit is contained in:
Dmitry Panin
2013-11-22 01:03:07 +04:00
parent ffbb228d2d
commit 052e3abdb8
3 changed files with 28 additions and 1 deletions

View File

@@ -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

View File

@@ -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]

View File

@@ -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;
}