From 410f2d4e69fe3ae4c26d3b994c996c9ecf2e1e31 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 30 Aug 2015 23:04:15 +0800 Subject: [PATCH] updated tests --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 2 +- projects/mtg/bin/Res/test/_tests.txt | 1 + projects/mtg/src/AllAbilities.cpp | 1 + projects/mtg/src/MTGAbility.cpp | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 27e003d88..f620d5ea0 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -78369,7 +78369,7 @@ type=Enchantment [/card] [card] name=Root Spider -auto=@combat(blocking) source(this):choice 1/0 && first strike ueot +auto=@combat(blocking) source(this):all(this) 1/0 ueot && all(this) first strike ueot text=Whenever Root Spider blocks, it gets +1/+0 and gains first strike until end of turn. mana={3}{G} type=Creature diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 3e01d0157..8898324a5 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -656,6 +656,7 @@ thallid.txt the_tabernacle_at_pendrell_vale.txt thelon_of_havenwood.txt threaten.txt +thraximundar.txt throne_of_bone.txt thunder-thrash_elder.txt tidal_warrior_i646.txt diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index f45b94a7d..1b2612e1a 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -4363,6 +4363,7 @@ int PTInstant::resolve() APowerToughnessModifier * a = ability->clone(); GenericInstantAbility * wrapper = NEW GenericInstantAbility(game, 1, source, (Damageable *) (this->target), a); wrapper->addToGame(); + ((Damageable *) (this->target))->afterDamage();//additional check the negative pt after resolving.. return 1; } const string PTInstant::getMenuText() diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 393ba8a19..d38ce37b0 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -4952,6 +4952,15 @@ int TriggeredAbility::receiveEvent(WEvent * e) resolve(); return 1; } + if(dynamic_cast(e)) + { + //sacrificed event + //thraximundar vs bloodfore collosus, thraximundar + //must be able to survive a sacrificed bloodfire collosus, + //same with mortician beetle vs phyrexian denouncer test + resolve(); + return 1; + } WEventZoneChange * stackCheck = dynamic_cast(e); if(stackCheck && (stackCheck->to == game->currentPlayer->game->stack||stackCheck->to == game->currentPlayer->opponent()->game->stack)) {