From ad412af32bb0efb24ac7f3c5e514bd351f788f5f Mon Sep 17 00:00:00 2001 From: magenoxx Date: Fri, 13 Jul 2012 15:43:32 +0400 Subject: [PATCH] Fixed a bug allowing to cast revealed opponent spells --- Mage/src/mage/abilities/SpellAbility.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Mage/src/mage/abilities/SpellAbility.java b/Mage/src/mage/abilities/SpellAbility.java index 79ef12685f..e0d5272c8f 100644 --- a/Mage/src/mage/abilities/SpellAbility.java +++ b/Mage/src/mage/abilities/SpellAbility.java @@ -28,7 +28,6 @@ package mage.abilities; -import java.util.UUID; import mage.Constants.AbilityType; import mage.Constants.AsThoughEffectType; import mage.Constants.CardType; @@ -38,6 +37,8 @@ import mage.abilities.costs.mana.ManaCost; import mage.abilities.keyword.FlashAbility; import mage.game.Game; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,6 +62,12 @@ public class SpellAbility extends ActivatedAbilityImpl { object.getAbilities().containsKey(FlashAbility.getInstance().getId()) || game.getContinuousEffects().asThough(sourceId, AsThoughEffectType.CAST, game) || game.canPlaySorcery(playerId))) { + + // fix for Gitaxian Probe and casting opponent's spells + if (!controllerId.equals(playerId)) { + return false; + } + if (costs.canPay(sourceId, controllerId, game) && canChooseTarget(game)) { return true; }