[MH3] Implement Ral and the Implicit Maze

This commit is contained in:
theelk801 2024-05-30 13:35:16 -04:00
parent 2c8873d1bd
commit 641116cbe9
3 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package mage.cards.r;
import mage.abilities.common.SagaAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ExileTopXMayPlayUntilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
import mage.game.permanent.token.SpellgorgerWeirdToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RalAndTheImplicitMaze extends CardImpl {
private static final FilterPermanent filter
= new FilterCreatureOrPlaneswalkerPermanent("creature and planeswalker your opponents control");
static {
filter.add(TargetController.OPPONENT.getControllerPredicate());
}
public RalAndTheImplicitMaze(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}");
this.subtype.add(SubType.SAGA);
SagaAbility sagaAbility = new SagaAbility(this);
// I -- Ral and the Implicit Maze deals 2 damage to each creature and planeswalker your opponents control.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new DamageAllEffect(2, filter));
// II -- You may discard a card. If you do, exile the top two cards of your library. You may play them until the end of your next turn.
sagaAbility.addChapterEffect(
this, SagaChapter.CHAPTER_II,
new DoIfCostPaid(new ExileTopXMayPlayUntilEffect(2, Duration.UntilEndOfYourNextTurn), new DiscardCardCost())
);
// III -- Create a Spellgorger Weird token.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new CreateTokenEffect(new SpellgorgerWeirdToken()));
this.addAbility(sagaAbility);
}
private RalAndTheImplicitMaze(final RalAndTheImplicitMaze card) {
super(card);
}
@Override
public RalAndTheImplicitMaze copy() {
return new RalAndTheImplicitMaze(this);
}
}

View file

@ -176,6 +176,7 @@ public final class ModernHorizons3 extends ExpansionSet {
cards.add(new SetCardInfo("Proud Pack-Rhino", 41, Rarity.UNCOMMON, mage.cards.p.ProudPackRhino.class)); cards.add(new SetCardInfo("Proud Pack-Rhino", 41, Rarity.UNCOMMON, mage.cards.p.ProudPackRhino.class));
cards.add(new SetCardInfo("Psychic Frog", 199, Rarity.RARE, mage.cards.p.PsychicFrog.class)); cards.add(new SetCardInfo("Psychic Frog", 199, Rarity.RARE, mage.cards.p.PsychicFrog.class));
cards.add(new SetCardInfo("Quest for the Necropolis", 104, Rarity.UNCOMMON, mage.cards.q.QuestForTheNecropolis.class)); cards.add(new SetCardInfo("Quest for the Necropolis", 104, Rarity.UNCOMMON, mage.cards.q.QuestForTheNecropolis.class));
cards.add(new SetCardInfo("Ral and the Implicit Maze", 132, Rarity.UNCOMMON, mage.cards.r.RalAndTheImplicitMaze.class));
cards.add(new SetCardInfo("Ral, Leyline Prodigy", 247, Rarity.MYTHIC, mage.cards.r.RalLeylineProdigy.class)); cards.add(new SetCardInfo("Ral, Leyline Prodigy", 247, Rarity.MYTHIC, mage.cards.r.RalLeylineProdigy.class));
cards.add(new SetCardInfo("Ral, Monsoon Mage", 247, Rarity.MYTHIC, mage.cards.r.RalMonsoonMage.class)); cards.add(new SetCardInfo("Ral, Monsoon Mage", 247, Rarity.MYTHIC, mage.cards.r.RalMonsoonMage.class));
cards.add(new SetCardInfo("Razorgrass Ambush", 238, Rarity.UNCOMMON, mage.cards.r.RazorgrassAmbush.class)); cards.add(new SetCardInfo("Razorgrass Ambush", 238, Rarity.UNCOMMON, mage.cards.r.RazorgrassAmbush.class));

View file

@ -0,0 +1,41 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
/**
* @author TheElk801
*/
public final class SpellgorgerWeirdToken extends TokenImpl {
public SpellgorgerWeirdToken() {
super("Spellgorger Weird", "Spellgorger Weird token");
manaCost = new ManaCostsImpl<>("{2}{R}");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add(SubType.WEIRD);
power = new MageInt(2);
toughness = new MageInt(2);
// Whenever you cast a noncreature spell, put a +1/+1 counter on Spellgorger Weird.
this.addAbility(new SpellCastControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
StaticFilters.FILTER_SPELL_A_NON_CREATURE, false
));
}
private SpellgorgerWeirdToken(final SpellgorgerWeirdToken token) {
super(token);
}
@Override
public SpellgorgerWeirdToken copy() {
return new SpellgorgerWeirdToken(this);
}
}