From 336a7bfeb1fe8babe846f177e1d3957c6f002fd8 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 13 Apr 2023 21:57:54 -0400 Subject: [PATCH] [MOM] Implement Invasion of Muraganda --- .../src/mage/cards/i/InvasionOfMuraganda.java | 53 ++++++++++++++++ .../src/mage/cards/p/PrimordialPlasm.java | 61 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 2 + 3 files changed, 116 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/InvasionOfMuraganda.java create mode 100644 Mage.Sets/src/mage/cards/p/PrimordialPlasm.java diff --git a/Mage.Sets/src/mage/cards/i/InvasionOfMuraganda.java b/Mage.Sets/src/mage/cards/i/InvasionOfMuraganda.java new file mode 100644 index 0000000000..6c312f0611 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InvasionOfMuraganda.java @@ -0,0 +1,53 @@ +package mage.cards.i; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SiegeAbility; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class InvasionOfMuraganda extends CardImpl { + + public InvasionOfMuraganda(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.BATTLE}, "{4}{G}"); + + this.subtype.add(SubType.SIEGE); + this.setStartingDefense(6); + this.secondSideCardClazz = mage.cards.p.PrimordialPlasm.class; + + // (As a Siege enters, choose an opponent to protect it. You and others can attack it. When it's defeated, exile it, then cast it transformed.) + this.addAbility(new SiegeAbility()); + + // When Invasion of Muraganda enters the battlefield, put a +1/+1 counter on target creature you control. Then that creature fights up to one target creature you don't control. + Ability ability = new EntersBattlefieldTriggeredAbility( + new AddCountersTargetEffect(CounterType.P1P1.createInstance()) + ); + ability.addEffect(new FightTargetsEffect() + .setText("Then that creature fights up to one target creature you don't control")); + ability.addTarget(new TargetControlledCreaturePermanent()); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); + this.addAbility(ability); + } + + private InvasionOfMuraganda(final InvasionOfMuraganda card) { + super(card); + } + + @Override + public InvasionOfMuraganda copy() { + return new InvasionOfMuraganda(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PrimordialPlasm.java b/Mage.Sets/src/mage/cards/p/PrimordialPlasm.java new file mode 100644 index 0000000000..95f72b7904 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrimordialPlasm.java @@ -0,0 +1,61 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PrimordialPlasm extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("another creature"); + + static { + filter.add(AnotherPredicate.instance); + } + + public PrimordialPlasm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.OOZE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + this.color.setGreen(true); + this.nightCard = true; + + // At the beginning of combat on your turn, another target creature gets +2/+2 and loses all abilities until end of turn. + Ability ability = new BeginningOfCombatTriggeredAbility( + new BoostTargetEffect(2, 2) + .setText("another target creature gets +2/+2"), + TargetController.YOU, false + ); + ability.addEffect(new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn) + .setText("and loses all abilities until end of turn")); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private PrimordialPlasm(final PrimordialPlasm card) { + super(card); + } + + @Override + public PrimordialPlasm copy() { + return new PrimordialPlasm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 72d61a5c55..bfe0e6b3ff 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -159,6 +159,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Invasion of Lorwyn", 236, Rarity.UNCOMMON, mage.cards.i.InvasionOfLorwyn.class)); cards.add(new SetCardInfo("Invasion of Mercadia", 147, Rarity.UNCOMMON, mage.cards.i.InvasionOfMercadia.class)); cards.add(new SetCardInfo("Invasion of Moag", 237, Rarity.UNCOMMON, mage.cards.i.InvasionOfMoag.class)); + cards.add(new SetCardInfo("Invasion of Muraganda", 192, Rarity.UNCOMMON, mage.cards.i.InvasionOfMuraganda.class)); cards.add(new SetCardInfo("Invasion of Pyrulea", 240, Rarity.UNCOMMON, mage.cards.i.InvasionOfPyrulea.class)); cards.add(new SetCardInfo("Invasion of Ravnica", 1, Rarity.MYTHIC, mage.cards.i.InvasionOfRavnica.class)); cards.add(new SetCardInfo("Invasion of Shandalar", 193, Rarity.MYTHIC, mage.cards.i.InvasionOfShandalar.class)); @@ -226,6 +227,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Portent Tracker", 201, Rarity.COMMON, mage.cards.p.PortentTracker.class)); cards.add(new SetCardInfo("Preening Champion", 73, Rarity.COMMON, mage.cards.p.PreeningChampion.class)); cards.add(new SetCardInfo("Prickle Faeries", 113, Rarity.UNCOMMON, mage.cards.p.PrickleFaeries.class)); + cards.add(new SetCardInfo("Primordial Plasm", 192, Rarity.UNCOMMON, mage.cards.p.PrimordialPlasm.class)); cards.add(new SetCardInfo("Progenitor Exarch", 32, Rarity.RARE, mage.cards.p.ProgenitorExarch.class)); cards.add(new SetCardInfo("Protocol Knight", 74, Rarity.COMMON, mage.cards.p.ProtocolKnight.class)); cards.add(new SetCardInfo("Pyre of the World Tree", 145, Rarity.RARE, mage.cards.p.PyreOfTheWorldTree.class));