diff --git a/Mage.Sets/src/mage/sets/magic2013/Encrust.java b/Mage.Sets/src/mage/sets/magic2013/Encrust.java index 4c7f019723..1f62f6f91a 100644 --- a/Mage.Sets/src/mage/sets/magic2013/Encrust.java +++ b/Mage.Sets/src/mage/sets/magic2013/Encrust.java @@ -28,23 +28,21 @@ package mage.sets.magic2013; import java.util.UUID; - -import mage.constants.*; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.CantActivateAbilitiesAttachedEffect; import mage.abilities.effects.common.SkipEnchantedUntapEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; /** @@ -79,6 +77,7 @@ public class Encrust extends CardImpl { ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect()); Effect effect = new CantActivateAbilitiesAttachedEffect(); effect.setText("and its activated abilities can't be activated"); + ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java b/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java index 5baf3db97f..5a39309b5d 100644 --- a/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java +++ b/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java @@ -36,6 +36,7 @@ import mage.game.ExileZone; import mage.game.Game; import mage.players.Player; import mage.util.CardUtil; +import org.apache.log4j.Logger; /** * @author LevelX2 @@ -77,12 +78,17 @@ public class HideawayPlayEffect extends OneShotEffect { game.informPlayer(controller, "You're not able to play the land now due to regular restrictions."); } } else { - // The land's last ability allows you to play the removed card as part of the resolution of that ability. - // Timing restrictions based on the card's type are ignored (for instance, if it's a creature or sorcery). - // Other play restrictions are not (such as "Play [this card] only during combat"). - if (controller.chooseUse(Outcome.Benefit, new StringBuilder("Cast ").append(card.getName()).append(" without paying it's mana cost?").toString(), game)) { - card.setFaceDown(false); - return controller.cast(card.getSpellAbility(), game, true); + if (card.getSpellAbility() != null) { + // The land's last ability allows you to play the removed card as part of the resolution of that ability. + // Timing restrictions based on the card's type are ignored (for instance, if it's a creature or sorcery). + // Other play restrictions are not (such as "Play [this card] only during combat"). + if (controller.chooseUse(Outcome.Benefit, new StringBuilder("Cast ").append(card.getName()).append(" without paying it's mana cost?").toString(), game)) { + card.setFaceDown(false); + return controller.cast(card.getSpellAbility(), game, true); + } + } else { + Logger.getLogger(HideawayPlayEffect.class).error("Non land card had no spell ability: " + card.getName()); + return false; } } return true;