From 23956fc107ee6dcf9211f02e0777cbad5b58dc4f Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 18 Jun 2023 12:21:24 -0400 Subject: [PATCH] [LTR] Implement Lembas --- Mage.Sets/src/mage/cards/l/Lembas.java | 56 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/l/Lembas.java diff --git a/Mage.Sets/src/mage/cards/l/Lembas.java b/Mage.Sets/src/mage/cards/l/Lembas.java new file mode 100644 index 0000000000..c28f6f31a8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Lembas.java @@ -0,0 +1,56 @@ +package mage.cards.l; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.ShuffleIntoLibrarySourceEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Lembas extends CardImpl { + + public Lembas(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.subtype.add(SubType.FOOD); + + // When Lembas enters the battlefield, scry 1, then draw a card. + Ability ability = new EntersBattlefieldTriggeredAbility(new ScryEffect(1, false)); + ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(", then")); + this.addAbility(ability); + + // {2}, {T}, Sacrifice Lembas: You gain 3 life. + ability = new SimpleActivatedAbility(new GainLifeEffect(3), new GenericManaCost(2)); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + + // When Lembas is put into a graveyard from the battlefield, its owner shuffles it into their library. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility( + new ShuffleIntoLibrarySourceEffect().setText("its owner shuffles it into their library") + )); + } + + private Lembas(final Lembas card) { + super(card); + } + + @Override + public Lembas copy() { + return new Lembas(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index c2d75be87a..275b9717f7 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -131,6 +131,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Lash of the Balrog", 92, Rarity.COMMON, mage.cards.l.LashOfTheBalrog.class)); cards.add(new SetCardInfo("Last March of the Ents", 172, Rarity.MYTHIC, mage.cards.l.LastMarchOfTheEnts.class)); cards.add(new SetCardInfo("Legolas, Counter of Kills", 212, Rarity.UNCOMMON, mage.cards.l.LegolasCounterOfKills.class)); + cards.add(new SetCardInfo("Lembas", 243, Rarity.COMMON, mage.cards.l.Lembas.class)); cards.add(new SetCardInfo("Lobelia Sackville-Baggins", 93, Rarity.RARE, mage.cards.l.LobeliaSackvilleBaggins.class)); cards.add(new SetCardInfo("Long List of the Ents", 174, Rarity.UNCOMMON, mage.cards.l.LongListOfTheEnts.class)); cards.add(new SetCardInfo("Lorien Revealed", 60, Rarity.COMMON, mage.cards.l.LorienRevealed.class));