[MAT] Implement Niv-Mizzet, Supreme

This commit is contained in:
theelk801 2023-05-03 09:47:44 -04:00
parent 6ed702a7b3
commit 0de3fb0cb6
2 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,81 @@
package mage.cards.n;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofFromMonocoloredAbility;
import mage.abilities.keyword.JumpStartAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NivMizzetSupreme extends CardImpl {
public NivMizzetSupreme(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.DRAGON);
this.subtype.add(SubType.AVATAR);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Hexproof from monocolored
this.addAbility(HexproofFromMonocoloredAbility.getInstance());
// Each instant and sorcery card in your graveyard that's exactly two colors has jump-start.
this.addAbility(new SimpleStaticAbility(new NivMizzetSupremeEffect()));
}
private NivMizzetSupreme(final NivMizzetSupreme card) {
super(card);
}
@Override
public NivMizzetSupreme copy() {
return new NivMizzetSupreme(this);
}
}
class NivMizzetSupremeEffect extends ContinuousEffectImpl {
NivMizzetSupremeEffect() {
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
staticText = "each instant and sorcery card in your graveyard that's exactly two colors has jump-start";
}
private NivMizzetSupremeEffect(final NivMizzetSupremeEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
for (Card card : controller.getGraveyard().getCards(game)) {
if (card.isInstantOrSorcery(game) && card.getColor(game).getColorCount() == 2) {
game.getState().addOtherAbility(card, new JumpStartAbility(card));
}
}
return true;
}
@Override
public NivMizzetSupremeEffect copy() {
return new NivMizzetSupremeEffect(this);
}
}

View file

@ -35,6 +35,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("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("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("Metropolis Reformer", 4, Rarity.RARE, mage.cards.m.MetropolisReformer.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("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)); cards.add(new SetCardInfo("Reckless Handling", 19, Rarity.UNCOMMON, mage.cards.r.RecklessHandling.class));
cards.add(new SetCardInfo("Samut, Vizier of Naktamun", 45, Rarity.MYTHIC, mage.cards.s.SamutVizierOfNaktamun.class)); cards.add(new SetCardInfo("Samut, Vizier of Naktamun", 45, Rarity.MYTHIC, mage.cards.s.SamutVizierOfNaktamun.class));