Implemented Nissa's Triumph

This commit is contained in:
Evan Kranzler 2019-04-10 17:20:45 -04:00
parent 8f63e647c6
commit 076a965e02
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.n;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
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.StaticFilters;
import mage.filter.common.FilterControlledPlaneswalkerPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NissasTriumph extends CardImpl {
private static final FilterCard filter = new FilterCard("basic Forest cards");
private static final FilterPermanent filter2 = new FilterControlledPlaneswalkerPermanent(SubType.NISSA);
static {
filter.add(new SupertypePredicate(SuperType.BASIC));
filter.add(new SubtypePredicate(SubType.FOREST));
}
public NissasTriumph(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{G}");
// Search your land for up to two basic Forest cards. If you control a Nissa planeswalker, instead search your library for up to three land cards. reveal those cards, put them in your hand, then shuffle your library.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(
0, 3, StaticFilters.FILTER_CARD_LAND
), true, true),
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(
0, 2, filter
), true, true),
new PermanentsOnTheBattlefieldCondition(filter2),
"Search your land for up to two basic Forest cards. " +
"If you control a Nissa planeswalker, instead search your library " +
"for up to three land cards. Reveal those cards, " +
"put them into your hand, then shuffle your library."
));
}
private NissasTriumph(final NissasTriumph card) {
super(card);
}
@Override
public NissasTriumph copy() {
return new NissasTriumph(this);
}
}

View file

@ -127,6 +127,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Nahiri's Stoneblades", 139, Rarity.COMMON, mage.cards.n.NahirisStoneblades.class));
cards.add(new SetCardInfo("Nahiri, Storm of Stone", 233, Rarity.UNCOMMON, mage.cards.n.NahiriStormOfStone.class));
cards.add(new SetCardInfo("Neheb, Dreadhorde Champion", 140, Rarity.RARE, mage.cards.n.NehebDreadhordeChampion.class));
cards.add(new SetCardInfo("Nissa's Triumph", 170, Rarity.UNCOMMON, mage.cards.n.NissasTriumph.class));
cards.add(new SetCardInfo("No Escape", 63, Rarity.COMMON, mage.cards.n.NoEscape.class));
cards.add(new SetCardInfo("Ob Nixilis's Cruelty", 101, Rarity.COMMON, mage.cards.o.ObNixilissCruelty.class));
cards.add(new SetCardInfo("Ob Nixilis, the Hate-Twisted", 100, Rarity.UNCOMMON, mage.cards.o.ObNixilisTheHateTwisted.class));