From 49a13cdcdc1381deec8a5375a2cc0ea49c151d2a Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Fri, 9 Sep 2022 04:28:30 +0100 Subject: [PATCH] [DMC] Implement The Mana Rig (#9492) --- Mage.Sets/src/mage/cards/t/TheManaRig.java | 54 +++++++++++++++++++ .../mage/sets/DominariaUnitedCommander.java | 2 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TheManaRig.java diff --git a/Mage.Sets/src/mage/cards/t/TheManaRig.java b/Mage.Sets/src/mage/cards/t/TheManaRig.java new file mode 100644 index 00000000000..13a43be6bfc --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheManaRig.java @@ -0,0 +1,54 @@ +package mage.cards.t; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.PowerstoneToken; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class TheManaRig extends CardImpl { + + public TheManaRig(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + addSuperType(SuperType.LEGENDARY); + + // Whenever you cast a multicolored spell, create a tapped Powerstone token. + this.addAbility(new SpellCastControllerTriggeredAbility( + new CreateTokenEffect(new PowerstoneToken(), 1, true, false), StaticFilters.FILTER_SPELL_A_MULTICOLORED, false + )); + + // {X}{X}{X}, {T}: Look at the top X cards of your library. Put up to two of them into your hand and the rest on the bottom of your library in a random order. + Ability ability = new SimpleActivatedAbility(new LookLibraryAndPickControllerEffect( + ManacostVariableValue.REGULAR, 2, PutCards.HAND, PutCards.BOTTOM_RANDOM, true + ).setText("Look at the top X cards of your library. " + + "Put up to two of them into your hand and the rest on the bottom of your library in a random order"), + new ManaCostsImpl<>("{X}{X}{X}") + ); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + private TheManaRig(final TheManaRig card) { + super(card); + } + + @Override + public TheManaRig copy() { + return new TheManaRig(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java index 05a3627f5a7..5eae92b38ef 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java +++ b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java @@ -165,6 +165,8 @@ public final class DominariaUnitedCommander extends ExpansionSet { cards.add(new SetCardInfo("Terramorphic Expanse", 239, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class)); cards.add(new SetCardInfo("Teshar, Ancestor's Apostle", 105, Rarity.RARE, mage.cards.t.TesharAncestorsApostle.class)); cards.add(new SetCardInfo("The Circle of Loyalty", 98, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class)); + cards.add(new SetCardInfo("The Mana Rig", 28, Rarity.MYTHIC, mage.cards.t.TheManaRig.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Mana Rig", 80, Rarity.MYTHIC, mage.cards.t.TheManaRig.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Thrill of Possibility", 127, Rarity.COMMON, mage.cards.t.ThrillOfPossibility.class)); cards.add(new SetCardInfo("Time Wipe", 173, Rarity.RARE, mage.cards.t.TimeWipe.class)); cards.add(new SetCardInfo("Transguild Courier", 194, Rarity.UNCOMMON, mage.cards.t.TransguildCourier.class));