diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index d85166782..f2df1f925 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -5084,12 +5084,10 @@ toughness=3 [/card] [card] name=Austere Command -auto=choice name(gain 1 life) transforms((,newability[choice name(draw 1 card) draw:1 controller], newability[choice name(draw 2 card) draw:2 controller])) -auto=choice name(gain 2 life) life:2 controller -#auto=choice name(Destroy all Artifacts) destroy all(artifact) && all(this) transforms((,newability[choice name(Destroy all Enchantments) destroy all(enchantment)],newability[choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3])],newability[choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4])])) -#auto=choice name(Destroy all Enchantments) destroy all(enchantment) && all(this) transforms((,newability[choice name(Destroy all Artifacts) destroy all(artifact)],newability[choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3])],newability[choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4])])) -#auto=choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3]) && all(this) transforms((,newability[choice name(Destroy all Artifacts) destroy all(artifact)],newability[choice name(Destroy all Enchantments) destroy all(enchantment)],newability[choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4])])) -#auto=choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4]) && all(this) transforms((,newability[choice name(Destroy all Artifacts) destroy all(artifact)],newability[choice name(Destroy all Enchantments) destroy all(enchantment)],newability[choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3])])) +auto=choice name(Destroy all Artifacts) destroy all(artifact) && all(this) transforms((,newability[choice name(Destroy all Enchantments) destroy all(enchantment)],newability[choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3])],newability[choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4])])) +auto=choice name(Destroy all Enchantments) destroy all(enchantment) && all(this) transforms((,newability[choice name(Destroy all Artifacts) destroy all(artifact)],newability[choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3])],newability[choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4])])) +auto=choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3]) && all(this) transforms((,newability[choice name(Destroy all Artifacts) destroy all(artifact)],newability[choice name(Destroy all Enchantments) destroy all(enchantment)],newability[choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4])])) +auto=choice name(Destroy all Creatures w/ manacost 4 or greater) destroy all(creature[manacost>=4]) && all(this) transforms((,newability[choice name(Destroy all Artifacts) destroy all(artifact)],newability[choice name(Destroy all Enchantments) destroy all(enchantment)],newability[choice name(Destroy all Creatures w/ manacost 3 or less) destroy all(creature[manacost<=3])])) text=Choose two - Destroy all artifacts; or destroy all enchantments; or destroy all creatures with converted mana cost 3 or less; or destroy all creatures with converted mana cost 4 or greater. mana={4}{W}{W} type=Sorcery diff --git a/projects/mtg/bin/Res/test/bugs/Shifting_Sliver_i936.txt b/projects/mtg/bin/Res/test/Shifting_Sliver_i936.txt similarity index 51% rename from projects/mtg/bin/Res/test/bugs/Shifting_Sliver_i936.txt rename to projects/mtg/bin/Res/test/Shifting_Sliver_i936.txt index dd900e9b6..c532869be 100644 --- a/projects/mtg/bin/Res/test/bugs/Shifting_Sliver_i936.txt +++ b/projects/mtg/bin/Res/test/Shifting_Sliver_i936.txt @@ -1,24 +1,34 @@ #Testing Shifting Sliver evasion ability vs protection from blue + +# Shifting Sliver +# Slivers can't be blocked except by Slivers. +# {3}{U} +# 2/2 + +# Guma +# Protection from blue +# 2/2 + [INIT] combatattackers [PLAYER1] -inplay:Shifting Sliver,Crystalline Sliver +inplay:Shifting Sliver life:20 [PLAYER2] inplay:Guma life:20 [DO] Shifting Sliver -Crystalline Sliver next Guma +Shifting Sliver eot [ASSERT] untap [PLAYER1] -inplay:Shifting Sliver,Crystalline Sliver +inplay:Shifting Sliver life:20 [PLAYER2] inplay:Guma -life:16 +life:18 [END] diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 6896d2cbe..fb5d80eb7 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -391,6 +391,7 @@ incinerate.txt instill_energy_i166.txt invigorate.txt invigorate#2.txt +ironclaw_orcs.txt iron_will_i270.txt ivy_elemental.txt jodahs_avenger.txt @@ -588,6 +589,7 @@ skullcage7_i239.txt skullclamp.txt skullclamp2_i439.txt shepherd_of_rot.txt +Shifting_Sliver_i936.txt shimmer_myr_FORCEDALIVE.txt shivan_hellkite.txt shock.txt diff --git a/projects/mtg/bin/Res/test/ironclaw_orcs.txt b/projects/mtg/bin/Res/test/ironclaw_orcs.txt new file mode 100644 index 000000000..83a8bd2c2 --- /dev/null +++ b/projects/mtg/bin/Res/test/ironclaw_orcs.txt @@ -0,0 +1,33 @@ +#Testing cantbeblockerof vs shroud + +# Mist Leopard +# text=Shroud (This creature can't be the target of spells or abilities.) +# 3/2 + +# Ironclaw Orcs +# {1}{R} +# Ironclaw Orcs can't block creatures with power 2 or greater. + +[INIT] +combatattackers +[PLAYER1] +inplay:Mist Leopard +life:20 +[PLAYER2] +inplay:Ironclaw Orcs +life:20 +[DO] +Mist Leopard +next +Ironclaw Orcs +Mist Leopard +eot +[ASSERT] +untap +[PLAYER1] +inplay:Mist Leopard +life:20 +[PLAYER2] +inplay:Ironclaw Orcs +life:17 +[END] diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index a9841fc20..a44f1aae2 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -1050,7 +1050,7 @@ int MTGCardInstance::cantBeBlockedBy(MTGCardInstance * card) { for (size_t i = 0; i < cantBeBlockedBys.size(); i++) { - if (cantBeBlockedBys[i]->canTarget(card)) + if (cantBeBlockedBys[i]->canTarget(card, true)) return 1; } return 0; @@ -1081,7 +1081,7 @@ int MTGCardInstance::cantBeBlockerOf(MTGCardInstance * card) { for (size_t i = 0; i < cantBeBlockerOfs.size(); i++) { - if (cantBeBlockerOfs[i]->canTarget(card)) + if (cantBeBlockerOfs[i]->canTarget(card, true)) return 1; } return 0; diff --git a/projects/mtg/src/TestSuiteAI.cpp b/projects/mtg/src/TestSuiteAI.cpp index 47237923b..1f9c97efa 100644 --- a/projects/mtg/src/TestSuiteAI.cpp +++ b/projects/mtg/src/TestSuiteAI.cpp @@ -552,6 +552,10 @@ int TestSuite::loadNext() return loadNext(); } + mProcessing = true; + ThreadProc(this); + return 0; + if(!mProcessing) { // "I don't like to wait" mode mProcessing = true;