fixed being able to cast spells from an opponents hand when revealed. (fixes #4102)

This commit is contained in:
Evan Kranzler 2017-10-10 19:27:03 -04:00
parent 2275c80922
commit 81a1e81525

View file

@ -97,9 +97,11 @@ public class SpellAbility extends ActivatedAbilityImpl {
return false;
}
// fix for Gitaxian Probe and casting opponent's spells
if (!game.getContinuousEffects().asThough(getSourceId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, playerId, game)
&& !controllerId.equals(playerId) && getZone() != Zone.HAND) {
return false;
if (!game.getContinuousEffects().asThough(getSourceId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, playerId, game)) {
Card card = game.getCard(sourceId);
if (!(card != null && card.getOwnerId() == playerId)) {
return false;
}
}
// Check if rule modifying events prevent to cast the spell in check playable mode
if (this.isCheckPlayableMode()) {