[DMC] Implement The Mana Rig (#9492)

This commit is contained in:
PurpleCrowbar 2022-09-09 04:28:30 +01:00 committed by GitHub
parent 173b3dbb4f
commit 49a13cdcdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));