diff --git a/Mage.Sets/src/mage/cards/g/GravenLore.java b/Mage.Sets/src/mage/cards/g/GravenLore.java new file mode 100644 index 00000000000..ded42ec6e2d --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GravenLore.java @@ -0,0 +1,68 @@ +package mage.cards.g; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GravenLore extends CardImpl { + + public GravenLore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); + + this.addSuperType(SuperType.SNOW); + + // Scry X, where is the amount of {S} spent to cast this spell, then draw three cards. + this.getSpellAbility().addEffect(new GravenLoreEffect()); + } + + private GravenLore(final GravenLore card) { + super(card); + } + + @Override + public GravenLore copy() { + return new GravenLore(this); + } +} + +class GravenLoreEffect extends OneShotEffect { + + GravenLoreEffect() { + super(Outcome.Benefit); + staticText = "scry X, where is the amount of {S} spent to cast this spell, then draw three cards"; + } + + private GravenLoreEffect(final GravenLoreEffect effect) { + super(effect); + } + + @Override + public GravenLoreEffect copy() { + return new GravenLoreEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + int snow = source.getManaCostsToPay().getUsedManaToPay().getSnow(); + if (snow > 0) { + player.scry(snow, source, game); + } + player.drawCards(3, source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SearchForGlory.java b/Mage.Sets/src/mage/cards/s/SearchForGlory.java index c96a3f90696..8394658d89f 100644 --- a/Mage.Sets/src/mage/cards/s/SearchForGlory.java +++ b/Mage.Sets/src/mage/cards/s/SearchForGlory.java @@ -13,7 +13,6 @@ import mage.filter.FilterCard; import mage.filter.predicate.Predicate; import mage.game.Game; import mage.target.common.TargetCardInLibrary; -import mage.watchers.common.ManaSpentToCastWatcher; import java.util.UUID; @@ -42,7 +41,6 @@ public final class SearchForGlory extends CardImpl { this.getSpellAbility().addEffect(new GainLifeEffect( SnowManaSpentValue.instance ).setText("You gain 1 life for each {S} spent to cast this spell")); - this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); } private SearchForGlory(final SearchForGlory card) { diff --git a/Mage.Sets/src/mage/cards/t/TundraFumarole.java b/Mage.Sets/src/mage/cards/t/TundraFumarole.java index 907aff7348c..485f2da03fa 100644 --- a/Mage.Sets/src/mage/cards/t/TundraFumarole.java +++ b/Mage.Sets/src/mage/cards/t/TundraFumarole.java @@ -65,9 +65,10 @@ class TundraFumaroleEffect extends OneShotEffect { if (player == null) { return false; } - player.getManaPool().addMana(new Mana( - ManaType.COLORLESS, source.getManaCostsToPay().getUsedManaToPay().getSnow() - ), game, source, true); + int snow = source.getManaCostsToPay().getUsedManaToPay().getSnow(); + if (snow > 0) { + player.getManaPool().addMana(new Mana(ManaType.COLORLESS, snow), game, source, true); + } return true; } } diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 671fc526393..83d330cb007 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -182,6 +182,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Goldmaw Champion", 14, Rarity.COMMON, mage.cards.g.GoldmawChampion.class)); cards.add(new SetCardInfo("Goldspan Dragon", 139, Rarity.MYTHIC, mage.cards.g.GoldspanDragon.class)); cards.add(new SetCardInfo("Goldvein Pick", 239, Rarity.COMMON, mage.cards.g.GoldveinPick.class)); + cards.add(new SetCardInfo("Graven Lore", 61, Rarity.RARE, mage.cards.g.GravenLore.class)); cards.add(new SetCardInfo("Great Hall of Starnheim", 259, Rarity.UNCOMMON, mage.cards.g.GreatHallOfStarnheim.class)); cards.add(new SetCardInfo("Grim Draugr", 96, Rarity.COMMON, mage.cards.g.GrimDraugr.class)); cards.add(new SetCardInfo("Grizzled Outrider", 173, Rarity.COMMON, mage.cards.g.GrizzledOutrider.class));