[LTR] Implement Lembas

This commit is contained in:
theelk801 2023-06-18 12:21:24 -04:00
parent 1766eeb12d
commit 23956fc107
2 changed files with 57 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));