diff --git a/Mage.Sets/src/mage/cards/t/TundraFumarole.java b/Mage.Sets/src/mage/cards/t/TundraFumarole.java new file mode 100644 index 0000000000..907aff7348 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TundraFumarole.java @@ -0,0 +1,73 @@ +package mage.cards.t; + +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ManaType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlaneswalker; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TundraFumarole extends CardImpl { + + public TundraFumarole(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + + this.addSuperType(SuperType.SNOW); + + // Tundra Fumarole deals 4 damage to target creature or planeswalker. Add {C} for each {S} spent to cast this spell. Until end of turn, you don't lose this mana as steps and phases end. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addEffect(new TundraFumaroleEffect()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker()); + } + + private TundraFumarole(final TundraFumarole card) { + super(card); + } + + @Override + public TundraFumarole copy() { + return new TundraFumarole(this); + } +} + +class TundraFumaroleEffect extends OneShotEffect { + + TundraFumaroleEffect() { + super(Outcome.Benefit); + staticText = "Add {C} for each {S} spent to cast this spell. " + + "Until end of turn, you don't lose this mana as steps and phases end."; + } + + private TundraFumaroleEffect(final TundraFumaroleEffect effect) { + super(effect); + } + + @Override + public TundraFumaroleEffect copy() { + return new TundraFumaroleEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + player.getManaPool().addMana(new Mana( + ManaType.COLORLESS, source.getManaCostsToPay().getUsedManaToPay().getSnow() + ), game, source, true); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 33352ad748..671fc52639 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -318,6 +318,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Toralf, God of Fury", 154, Rarity.MYTHIC, mage.cards.t.ToralfGodOfFury.class)); cards.add(new SetCardInfo("Tormentor's Helm", 155, Rarity.COMMON, mage.cards.t.TormentorsHelm.class)); cards.add(new SetCardInfo("Toski, Bearer of Secrets", 197, Rarity.RARE, mage.cards.t.ToskiBearerOfSecrets.class)); + cards.add(new SetCardInfo("Tundra Fumarole", 156, Rarity.RARE, mage.cards.t.TundraFumarole.class)); cards.add(new SetCardInfo("Tuskeri Firewalker", 157, Rarity.COMMON, mage.cards.t.TuskeriFirewalker.class)); cards.add(new SetCardInfo("Tyrite Sanctum", 272, Rarity.RARE, mage.cards.t.TyriteSanctum.class)); cards.add(new SetCardInfo("Tyvar Kell", 198, Rarity.MYTHIC, mage.cards.t.TyvarKell.class));