[LTR] Implement Lost to Legend

This commit is contained in:
theelk801 2023-06-10 12:56:30 -04:00
parent ce46b0c0fc
commit 17ce479d16
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,41 @@
package mage.cards.l;
import mage.abilities.effects.common.PutIntoLibraryNFromTopTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class LostToLegend extends CardImpl {
private static final FilterPermanent filter = new FilterNonlandPermanent("nonland historic permanent");
static {
filter.add(HistoricPredicate.instance);
}
public LostToLegend(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}{W}");
// Put target nonland historic permanent into its owner's library fourth from the top.
this.getSpellAbility().addEffect(new PutIntoLibraryNFromTopTargetEffect(4));
this.getSpellAbility().addTarget(new TargetPermanent(filter));
}
private LostToLegend(final LostToLegend card) {
super(card);
}
@Override
public LostToLegend copy() {
return new LostToLegend(this);
}
}

View file

@ -116,6 +116,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
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));
cards.add(new SetCardInfo("Lost Isle Calling", 61, Rarity.RARE, mage.cards.l.LostIsleCalling.class));
cards.add(new SetCardInfo("Lost to Legend", 22, Rarity.UNCOMMON, mage.cards.l.LostToLegend.class));
cards.add(new SetCardInfo("Lothlorien Lookout", 175, Rarity.COMMON, mage.cards.l.LothlorienLookout.class));
cards.add(new SetCardInfo("Lotho, Corrupt Shirriff", 213, Rarity.RARE, mage.cards.l.LothoCorruptShirriff.class));
cards.add(new SetCardInfo("Many Partings", 176, Rarity.COMMON, mage.cards.m.ManyPartings.class));