Fixed a bug allowing to cast revealed opponent spells

This commit is contained in:
magenoxx 2012-07-13 15:43:32 +04:00
parent fc2283898c
commit ad412af32b

View file

@ -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<SpellAbility> {
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;
}