Implemented Alpine Guide

This commit is contained in:
Evan Kranzler 2019-05-31 08:23:47 -04:00
parent ba47fee11e
commit 66564d0446
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.AttacksEachCombatStaticAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
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.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterBySubtypeCard;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AlpineGuide extends CardImpl {
private static final FilterCard filter = new FilterBySubtypeCard(SubType.PLAINS);
private static final FilterPermanent filter2 = new FilterControlledPermanent(SubType.MOUNTAIN, "Mountain");
public AlpineGuide(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.addSuperType(SuperType.SNOW);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SCOUT);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// When Alpine Guide enters the battlefield, you may search your library for a Mountain card, put that card onto the battlefield tapped, then shuffle your library.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(
new TargetCardInLibrary(filter), true
), true));
// Alpine Guide attacks each combat if able.
this.addAbility(new AttacksEachCombatStaticAbility());
// When Alpine Guide leaves the battlefield, sacrifice a Mountain.
this.addAbility(new LeavesBattlefieldTriggeredAbility(
new SacrificeControllerEffect(filter2, 1, null), false
));
}
private AlpineGuide(final AlpineGuide card) {
super(card);
}
@Override
public AlpineGuide copy() {
return new AlpineGuide(this);
}
}

View file

@ -27,6 +27,7 @@ public final class ModernHorizons extends ExpansionSet {
this.ratioBoosterMythic = 8;
cards.add(new SetCardInfo("Abominable Treefolk", 194, Rarity.UNCOMMON, mage.cards.a.AbominableTreefolk.class));
cards.add(new SetCardInfo("Alpine Guide", 117, Rarity.UNCOMMON, mage.cards.a.AlpineGuide.class));
cards.add(new SetCardInfo("Altar of Dementia", 218, Rarity.RARE, mage.cards.a.AltarOfDementia.class));
cards.add(new SetCardInfo("Answered Prayers", 2, Rarity.COMMON, mage.cards.a.AnsweredPrayers.class));
cards.add(new SetCardInfo("Archmage's Charm", 40, Rarity.RARE, mage.cards.a.ArchmagesCharm.class));