1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-10 09:11:04 -09:00

[MAT] Implement Nissa, Resurgent Animist

This commit is contained in:
theelk801 2023-05-03 10:12:53 -04:00
parent 4b0b30f471
commit 406d61a55f
3 changed files with 59 additions and 1 deletions
Mage.Sets/src/mage
Mage/src/main/java/mage/abilities/effects/common

View file

@ -0,0 +1,57 @@
package mage.cards.n;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.LandfallAbility;
import mage.abilities.effects.common.IfAbilityHasResolvedXTimesEffect;
import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect;
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NissaResurgentAnimist extends CardImpl {
private static final FilterCard filter = new FilterCard("an Elf or Elemental card");
static {
filter.add(Predicates.or(
SubType.ELF.getPredicate(),
SubType.ELEMENTAL.getPredicate()
));
}
public NissaResurgentAnimist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SCOUT);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Landfall--Whenever a land enters the battlefield under your control, add one mana of any color. Then if this is the second time this ability has resolved this turn, reveal cards from the top of your library until you reveal an Elf or Elemental card. Put that card into your hand and the rest on the bottom of your library in a random order.
Ability ability = new LandfallAbility(new AddManaOfAnyColorEffect());
ability.addEffect(new IfAbilityHasResolvedXTimesEffect(
Outcome.DrawCard, 2,
new RevealCardsFromLibraryUntilEffect(filter, Zone.HAND, Zone.LIBRARY)
).concatBy("Then"));
this.addAbility(ability);
}
private NissaResurgentAnimist(final NissaResurgentAnimist card) {
super(card);
}
@Override
public NissaResurgentAnimist copy() {
return new NissaResurgentAnimist(this);
}
}

View file

@ -37,6 +37,7 @@ public final class MarchOfTheMachineTheAftermath extends ExpansionSet {
cards.add(new SetCardInfo("Kolaghan Warmonger", 17, Rarity.UNCOMMON, mage.cards.k.KolaghanWarmonger.class));
cards.add(new SetCardInfo("Markov Baron", 14, Rarity.UNCOMMON, mage.cards.m.MarkovBaron.class));
cards.add(new SetCardInfo("Metropolis Reformer", 4, Rarity.RARE, mage.cards.m.MetropolisReformer.class));
cards.add(new SetCardInfo("Nissa, Resurgent Animist", 22, Rarity.MYTHIC, mage.cards.n.NissaResurgentAnimist.class));
cards.add(new SetCardInfo("Niv-Mizzet, Supreme", 40, Rarity.RARE, mage.cards.n.NivMizzetSupreme.class));
cards.add(new SetCardInfo("Rebuild the City", 43, Rarity.RARE, mage.cards.r.RebuildTheCity.class));
cards.add(new SetCardInfo("Reckless Handling", 19, Rarity.UNCOMMON, mage.cards.r.RecklessHandling.class));

View file

@ -52,7 +52,7 @@ public class IfAbilityHasResolvedXTimesEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "If this is the " + CardUtil.numberToOrdinalText(resolutionNumber) +
return "if this is the " + CardUtil.numberToOrdinalText(resolutionNumber) +
" time this ability has resolved this turn, " + effect.getText(mode);
}
}