From 37616848166342ae007ef294420928e9abfb44cc Mon Sep 17 00:00:00 2001 From: pankdm Date: Thu, 26 Sep 2013 14:17:39 +0000 Subject: [PATCH] Fixed blinking (until EOT) of creature with X in cost --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 10 ++++++---- projects/mtg/bin/Res/test/_tests.txt | 1 + projects/mtg/src/AllAbilities.cpp | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index f97ab5845..163170d5f 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -5084,10 +5084,12 @@ toughness=3 [/card] [card] name=Austere Command -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(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])])) 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/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 6e235a07c..6896d2cbe 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -185,6 +185,7 @@ blessed_wine.txt blinking_spirit.txt blinkmoth_nexus.txt Blink_and_X_counters.txt +Blink_and_X_counters2.txt bloated_toad1.txt bloated_toad2.txt bloodbond_march.txt diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 1eeae131b..7692dfe44 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -5025,6 +5025,7 @@ void ABlink::Update(float dt) } spell->source->power = spell->source->origpower; spell->source->toughness = spell->source->origtoughness; + spell->source->X = 0; if(!spell->source->hasSubtype(Subtypes::TYPE_AURA)) { spell->resolve();