diff --git a/Mage/src/mage/abilities/SpellAbility.java b/Mage/src/mage/abilities/SpellAbility.java index a2d4989d9f..36af50bde8 100644 --- a/Mage/src/mage/abilities/SpellAbility.java +++ b/Mage/src/mage/abilities/SpellAbility.java @@ -78,7 +78,9 @@ public class SpellAbility extends ActivatedAbilityImpl { if (!controllerId.equals(playerId)) { return false; } - + if (this.getManaCosts().isEmpty()) { + return false; + } if (costs.canPay(sourceId, controllerId, game) && canChooseTarget(game)) { return true; } diff --git a/Mage/src/mage/abilities/keyword/DredgeAbility.java b/Mage/src/mage/abilities/keyword/DredgeAbility.java index eb887d36d7..87c225ff2c 100644 --- a/Mage/src/mage/abilities/keyword/DredgeAbility.java +++ b/Mage/src/mage/abilities/keyword/DredgeAbility.java @@ -58,11 +58,6 @@ public class DredgeAbility extends SimpleStaticAbility { public DredgeAbility copy() { return new DredgeAbility(this); } - - @Override - public String getRule() { - return "Dredge " + super.getRule(); - } } class DredgeEffect extends ReplacementEffectImpl { @@ -72,7 +67,8 @@ class DredgeEffect extends ReplacementEffectImpl { public DredgeEffect(int value) { super(Duration.WhileInGraveyard, Outcome.ReturnToHand); this.amount = value; - this.staticText = Integer.toString(value); + this.staticText = new StringBuilder("Dredge ").append(Integer.toString(value)) + .append(" (If you would draw a card, instead you may put exactly three cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.)").toString(); } public DredgeEffect(final DredgeEffect effect) { @@ -96,12 +92,10 @@ class DredgeEffect extends ReplacementEffectImpl { if (sourceCard == null) { return false; } - StringBuilder sb = new StringBuilder(); - sb.append("Put exactly ").append(amount).append(" cards from the top of your library into your graveyard?"); - sb.append(" If you do, return ").append(sourceCard.getName()).append(" from your graveyard to your hand. Otherwise, draw a card."); - Player player = game.getPlayer(source.getControllerId()); - if (player != null && player.getLibrary().size() >= amount && player.chooseUse(outcome, sb.toString(), game)) { + if (player != null && player.getLibrary().size() >= amount + && player.chooseUse(outcome, new StringBuilder("Dredge ").append(sourceCard.getName()). + append(" (").append(amount).append(" cards go from top of library to graveyard)").toString(), game)) { for (int i = 0; i < amount; i++) { Card card = player.getLibrary().removeFromTop(game); if (card != null) { diff --git a/Mage/src/mage/abilities/keyword/SuspendAbility.java b/Mage/src/mage/abilities/keyword/SuspendAbility.java index e48d4ccb5c..f67327e220 100644 --- a/Mage/src/mage/abilities/keyword/SuspendAbility.java +++ b/Mage/src/mage/abilities/keyword/SuspendAbility.java @@ -29,6 +29,7 @@ package mage.abilities.keyword; import java.util.UUID; +import mage.Constants.AsThoughEffectType; import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Layer; @@ -36,6 +37,7 @@ import mage.Constants.Outcome; import mage.Constants.SubLayer; import mage.Constants.TargetController; import mage.Constants.Zone; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.TriggeredAbilityImpl; @@ -170,6 +172,18 @@ public class SuspendAbility extends ActivatedAbilityImpl { this.ruleText = ability.getRule(); } + @Override + public boolean canActivate(UUID playerId, Game game) { + MageObject object = game.getObject(sourceId); + if ((object.getCardType().contains(CardType.INSTANT) || + object.getAbilities().containsKey(FlashAbility.getInstance().getId()) || + game.getContinuousEffects().asThough(sourceId, AsThoughEffectType.CAST, game) || + game.canPlaySorcery(playerId))) { + return true; + } + return false; + } + @Override public String getRule() { return ruleText; @@ -205,7 +219,13 @@ class SuspendExileEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Card card = game.getCard(source.getSourceId()); Player controller = game.getPlayer(source.getControllerId()); - if (card != null && card.getSpellAbility().canActivate(source.getControllerId(), game) && card.getSpellAbility().isInUseableZone(game, card, false)) { + if (card != null && controller != null) { + // check if user really wants to suspend the card (only if spell can't be casted because else the choose ability dialog appears) + if (!card.getSpellAbility().canActivate(source.getControllerId(), game)) { + if (!controller.chooseUse(outcome, new StringBuilder("Suspend ").append(card.getName()).append("?").toString(), game)) { + return false; + } + } UUID exileId = (UUID) game.getState().getValue("SuspendExileId" + source.getControllerId().toString()); if (exileId == null) { exileId = UUID.randomUUID();