[LTR] Implement Entish Restoration (#10504)

This commit is contained in:
Susucre 2023-06-22 07:14:42 +02:00 committed by GitHub
parent ad324c169d
commit 440bf6bf43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.e;
import java.util.UUID;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.SacrificeControllerEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterBasicLandCard;
import mage.target.common.TargetCardInLibrary;
/**
*
* @author Susucr
*/
public final class EntishRestoration extends CardImpl {
private static final FilterCard filter = new FilterBasicLandCard("basic land cards");
private static final String rule = "Search your library for up to two basic land cards, " +
"put them onto the battlefield tapped, then shuffle." +
"If " + FerociousCondition.instance.toString() + ", instead search your library for up" +
"to three basic land cards, put them onto the battlefield tapped, then shuffle.";
public EntishRestoration(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Sacrifice a land. Search your library for up to two basic land cards,
// put them onto the battlefield tapped, then shuffle. If you control a
// creature with power 4 or greater, instead search your library for up
// to three basic land cards, put them onto the battlefield tapped, then shuffle.
this.getSpellAbility().addEffect(new SacrificeControllerEffect(
StaticFilters.FILTER_LAND, 1, null
).setText("Sacrifice a land."));
this.getSpellAbility().addEffect(
new ConditionalOneShotEffect(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 3, filter), true),
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, filter), true),
FerociousCondition.instance, rule
)
);
}
private EntishRestoration(final EntishRestoration card) {
super(card);
}
@Override
public EntishRestoration copy() {
return new EntishRestoration(this);
}
}

View file

@ -67,6 +67,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Elvish Mariner", 283, Rarity.RARE, mage.cards.e.ElvishMariner.class));
cards.add(new SetCardInfo("Enraged Huorn", 162, Rarity.COMMON, mage.cards.e.EnragedHuorn.class));
cards.add(new SetCardInfo("Ent-Draught Basin", 238, Rarity.UNCOMMON, mage.cards.e.EntDraughtBasin.class));
cards.add(new SetCardInfo("Entish Restoration", 163, Rarity.UNCOMMON, mage.cards.e.EntishRestoration.class));
cards.add(new SetCardInfo("Eomer of the Riddermark", 121, Rarity.UNCOMMON, mage.cards.e.EomerOfTheRiddermark.class));
cards.add(new SetCardInfo("Eowyn, Fearless Knight", 201, Rarity.RARE, mage.cards.e.EowynFearlessKnight.class));
cards.add(new SetCardInfo("Eowyn, Lady of Rohan", 10, Rarity.UNCOMMON, mage.cards.e.EowynLadyOfRohan.class));