diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/LandGrant.java b/Mage.Sets/src/mage/sets/mercadianmasques/LandGrant.java index 36607337104..79ea63dd9a3 100644 --- a/Mage.Sets/src/mage/sets/mercadianmasques/LandGrant.java +++ b/Mage.Sets/src/mage/sets/mercadianmasques/LandGrant.java @@ -29,6 +29,7 @@ package mage.sets.mercadianmasques; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.condition.Condition; import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.CostImpl; @@ -55,7 +56,7 @@ public class LandGrant extends CardImpl { this.color.setGreen(true); // If you have no land cards in hand, you may reveal your hand rather than pay Land Grant's mana cost. - this.addAbility(new AlternativeCostSourceAbility(new LandGrantReavealCost(), new CardsInHandCondition(CardsInHandCondition.CountType.EQUAL_TO, 0), + this.addAbility(new AlternativeCostSourceAbility(new LandGrantReavealCost(), new LandGrantCondition(), "If you have no land cards in hand, you may reveal your hand rather than pay Land Grant's mana cost.")); // Search your library for a Forest card, reveal that card, and put it into your hand. Then shuffle your library. @@ -72,6 +73,23 @@ public class LandGrant extends CardImpl { } } +class LandGrantCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null && player.getHand().count(new FilterLandCard(), game) == 0) { + return true; + } + return false; + } + + @Override + public String toString() { + return "If you have no land cards in hand"; + } +} + class LandGrantReavealCost extends CostImpl { public LandGrantReavealCost() { diff --git a/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java b/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java index 9c7edfa924c..a8d1f8782b8 100644 --- a/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java +++ b/Mage.Sets/src/mage/sets/morningtide/Slithermuse.java @@ -37,6 +37,7 @@ import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.EvokeAbility; import mage.cards.CardImpl; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -99,7 +100,7 @@ class SlithermuseEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(source.getSourceId()); + Permanent permanent = (Permanent)game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); if (player != null && permanent != null) { TargetOpponent target = new TargetOpponent(); target.setRequired(true);