From 9bde86557e5836442247dce15fa945197bdb63cc Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 15 Jan 2023 11:35:49 -0500 Subject: [PATCH] [ONE] Implement Migloz, Maze Crusher --- .../src/mage/cards/m/MiglozMazeCrusher.java | 78 +++++++++++++++++++ .../src/mage/sets/PhyrexiaAllWillBeOne.java | 1 + 2 files changed, 79 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MiglozMazeCrusher.java diff --git a/Mage.Sets/src/mage/cards/m/MiglozMazeCrusher.java b/Mage.Sets/src/mage/cards/m/MiglozMazeCrusher.java new file mode 100644 index 00000000000..e73b9c5facd --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MiglozMazeCrusher.java @@ -0,0 +1,78 @@ +package mage.cards.m; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +/** + * @author TheElk801 + */ +public final class MiglozMazeCrusher extends CardImpl { + + public MiglozMazeCrusher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Migloz, Maze Crusher enters the battlefield with five oil counters on it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.OIL.createInstance(5)), + "with five oil counters on it" + )); + + // {1}, Remove an oil counter from Migloz: It gains vigilance and menace until end of turn. + Ability ability = new SimpleActivatedAbility(new GainAbilitySourceEffect( + VigilanceAbility.getInstance(), Duration.EndOfTurn + ).setText("it gains vigilance"), new GenericManaCost(1)); + ability.addCost(new RemoveCountersSourceCost(CounterType.OIL.createInstance())); + ability.addEffect(new GainAbilitySourceEffect(new MenaceAbility(false)) + .setText("and menace until end of turn")); + this.addAbility(ability); + + // {2}, Remove two oil counters from Migloz: It gets +2/+2 until end of turn. + ability = new SimpleActivatedAbility(new BoostSourceEffect( + 2, 2, Duration.EndOfTurn, "it" + ), new GenericManaCost(2)); + ability.addCost(new RemoveCountersSourceCost(CounterType.OIL.createInstance(2))); + this.addAbility(ability); + + // {3}, Remove three oil counters from Migloz: Destroy target artifact or enchantment. + ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new GenericManaCost(3)); + ability.addCost(new RemoveCountersSourceCost(CounterType.OIL.createInstance(3))); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); + this.addAbility(ability); + } + + private MiglozMazeCrusher(final MiglozMazeCrusher card) { + super(card); + } + + @Override + public MiglozMazeCrusher copy() { + return new MiglozMazeCrusher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index f26e5895fa4..2af9d6c5f24 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -35,6 +35,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Karumonix, the Rat King", 292, Rarity.RARE, mage.cards.k.KarumonixTheRatKing.class)); cards.add(new SetCardInfo("Koth, Fire of Resistance", 138, Rarity.RARE, mage.cards.k.KothFireOfResistance.class)); cards.add(new SetCardInfo("Mercurial Spelldancer", 61, Rarity.RARE, mage.cards.m.MercurialSpelldancer.class)); + cards.add(new SetCardInfo("Migloz, Maze Crusher", 210, Rarity.RARE, mage.cards.m.MiglozMazeCrusher.class)); cards.add(new SetCardInfo("Mindsplice Apparatus", 63, Rarity.RARE, mage.cards.m.MindspliceApparatus.class)); cards.add(new SetCardInfo("Mirrex", 254, Rarity.RARE, mage.cards.m.Mirrex.class)); cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));