diff --git a/projects/mtg/bin/Res/sets/LEG/_cards.dat b/projects/mtg/bin/Res/sets/LEG/_cards.dat index 7e3acb822..c93c89aca 100644 --- a/projects/mtg/bin/Res/sets/LEG/_cards.dat +++ b/projects/mtg/bin/Res/sets/LEG/_cards.dat @@ -47,7 +47,7 @@ toughness=4 [/card] [card] text=Except for creatures named Akron Legionnaire and artifact creatures, creatures you control can't attack. -auto=lord(creature[-artifact]|myinplay) cantattack other +auto=lord(creature[-artifact;-Akron Legionnaire]|myinplay) cantattack id=1599 name=Akron Legionnaire color=White diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index edfb0f4ce..d67539d50 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -18,6 +18,7 @@ generic/wither.txt #Specific Cards ######################## afflict.txt +akron_legionnaire.txt Amugaba.txt anarchy.txt animate_dead.txt diff --git a/projects/mtg/bin/Res/test/akron_legionnaire.txt b/projects/mtg/bin/Res/test/akron_legionnaire.txt new file mode 100644 index 000000000..8fecd4414 --- /dev/null +++ b/projects/mtg/bin/Res/test/akron_legionnaire.txt @@ -0,0 +1,20 @@ +#Bug: two akron legionnaires on your side, non can attack +[INIT] +COMBATATTACKERS +[PLAYER1] +inplay:akron legionnaire,akron legionnaire,grizzly bears,dragon engine +[PLAYER2] +[DO] +akron legionnaire +grizzly bears +dragon engine +next +next +next +[ASSERT] +COMBATEND +[PLAYER1] +inplay:akron legionnaire,akron legionnaire,grizzly bears,dragon engine +[PLAYER2] +life:11 +[END] \ No newline at end of file diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index 603bc9fdb..4122d2a24 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -29,7 +29,7 @@ MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card){ break; } }else{ - if (!card->hasSubtype(-types[i])){ + if (!card->hasSubtype(-types[i]) && (Subtypes::subtypesList->find(card->name) != -types[i])){ found = 1; break; } @@ -65,7 +65,7 @@ MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card){ match = NULL; } }else{ - if(card->hasSubtype(-types[i])){ + if(card->hasSubtype(-types[i]) || (Subtypes::subtypesList->find(card->name) == -types[i])){ match = NULL; } }