From 60c589ccaa11d49a746599503e0ba8537d5b6684 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Wed, 26 Jan 2011 13:38:21 +0000 Subject: [PATCH] fixed a bug reported for Ghost Council of Orzhova, involving MTG rulings on such effects...if the target of the effect is no longer in the targetted zone at the time the effect goes to resolve, it will still be put on the stack and resolve to do nothing at all. AKA if you sacrifice Ghost to herself, or use ghost to sacrifice that goblin which has {s}:damage:1 target player...and you interupt that ability to sac the goblin for the one damage...while the ability is on the stack..it should not blink the goblin afterwards... i was originally not going to fix it but it bothered me enough thinking of possible exploits that i went ahead and corrected it. --- projects/mtg/src/AllAbilities.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 62268bbba..99f80efa5 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -3013,6 +3013,16 @@ void ABlink::resolveBlink() MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) { + if(blinkhand && !_target->controller()->game->isInZone(_target,_target->controller()->game->hand)) + { + this->forceDestroy = 1; + return; + } + else if(!blinkhand && !_target->controller()->game->isInZone(_target,_target->controller()->game->battlefield)) + { + this->forceDestroy = 1; + return; + } _target->controller()->game->putInZone(_target, _target->currentZone, _target->owner->game->exile); _target = _target->next;