Fixed issue with cantbeblockerof and cantbeblockedby vs protection

This commit is contained in:
pankdm
2013-10-01 14:47:39 +00:00
parent 490752e9da
commit be76c8a4f1
6 changed files with 59 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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