[SNC] Implemented Riveteers Overlook

This commit is contained in:
Evan Kranzler 2022-04-16 09:41:56 -04:00
parent 4ebd65e52f
commit 66239b64be
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.r;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.DoWhenCostPaid;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RiveteersOverlook extends CardImpl {
private static final FilterCard filter = new FilterCard("a basic Swamp, Mountain, or Forest card");
static {
filter.add(SuperType.BASIC.getPredicate());
filter.add(Predicates.or(
SubType.SWAMP.getPredicate(),
SubType.MOUNTAIN.getPredicate(),
SubType.FOREST.getPredicate()
));
}
public RiveteersOverlook(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// When Riveteers Overlook enters the battlefield, sacrifice it. When you do, search your library for a basic Swamp, Mountain, or Forest card, put it onto the battlefield tapped, then shuffle and you gain 1 life.
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new SearchLibraryPutInPlayEffect(
new TargetCardInLibrary(filter), true, true
), false);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(new EntersBattlefieldTriggeredAbility(new DoWhenCostPaid(
ability, new SacrificeSourceCost(), null, false
)));
}
private RiveteersOverlook(final RiveteersOverlook card) {
super(card);
}
@Override
public RiveteersOverlook copy() {
return new RiveteersOverlook(this);
}
}

View file

@ -182,6 +182,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
cards.add(new SetCardInfo("Revel Ruiner", 91, Rarity.COMMON, mage.cards.r.RevelRuiner.class));
cards.add(new SetCardInfo("Riveteers Charm", 217, Rarity.UNCOMMON, mage.cards.r.RiveteersCharm.class));
cards.add(new SetCardInfo("Riveteers Initiate", 120, Rarity.COMMON, mage.cards.r.RiveteersInitiate.class));
cards.add(new SetCardInfo("Riveteers Overlook", 255, Rarity.COMMON, mage.cards.r.RiveteersOverlook.class));
cards.add(new SetCardInfo("Rob the Archives", 122, Rarity.UNCOMMON, mage.cards.r.RobTheArchives.class));
cards.add(new SetCardInfo("Rocco, Cabaretti Caterer", 218, Rarity.UNCOMMON, mage.cards.r.RoccoCabarettiCaterer.class));
cards.add(new SetCardInfo("Rogues' Gallery", 92, Rarity.UNCOMMON, mage.cards.r.RoguesGallery.class));