From 9f35d69c993a2383b5a277373895451ac11e805c Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 10 Dec 2018 13:22:35 -0600 Subject: [PATCH] - Exodus Set 100%. Added Dizzying Gaze, Mind Maggots, Paroxysm. --- Mage.Sets/src/mage/cards/d/DizzyingGaze.java | 71 ++++++++++++ Mage.Sets/src/mage/cards/m/MindMaggots.java | 88 +++++++++++++++ Mage.Sets/src/mage/cards/p/Paroxysm.java | 111 +++++++++++++++++++ Mage.Sets/src/mage/sets/Exodus.java | 3 + 4 files changed, 273 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DizzyingGaze.java create mode 100644 Mage.Sets/src/mage/cards/m/MindMaggots.java create mode 100644 Mage.Sets/src/mage/cards/p/Paroxysm.java diff --git a/Mage.Sets/src/mage/cards/d/DizzyingGaze.java b/Mage.Sets/src/mage/cards/d/DizzyingGaze.java new file mode 100644 index 0000000000..83f24c04ec --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DizzyingGaze.java @@ -0,0 +1,71 @@ +package mage.cards.d; + +import java.util.UUID; +import mage.constants.SubType; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.constants.Outcome; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public final class DizzyingGaze extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public DizzyingGaze(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature you control + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // {R}: Enchanted creature deals 1 damage to target creature with flying. + Ability ability2 = new SimpleActivatedAbility(new DamageTargetEffect(1), new ManaCostsImpl("{R}")); + ability2.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new GainAbilityAttachedEffect( + ability2, + AttachmentType.AURA, + Duration.WhileOnBattlefield))); + + } + + public DizzyingGaze(final DizzyingGaze card) { + super(card); + } + + @Override + public DizzyingGaze copy() { + return new DizzyingGaze(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MindMaggots.java b/Mage.Sets/src/mage/cards/m/MindMaggots.java new file mode 100644 index 0000000000..a53f2ceb1e --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MindMaggots.java @@ -0,0 +1,88 @@ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.Card; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author jeffwadsworth + */ +public final class MindMaggots extends CardImpl { + + public MindMaggots(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.INSECT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Mind Maggots enters the battlefield, discard any number of creature cards. + // For each card discarded this way, put two +1/+1 counters on Mind Maggots. + this.addAbility(new EntersBattlefieldTriggeredAbility(new MindMaggotsEffect())); + + } + + public MindMaggots(final MindMaggots card) { + super(card); + } + + @Override + public MindMaggots copy() { + return new MindMaggots(this); + } +} + +class MindMaggotsEffect extends OneShotEffect { + + MindMaggotsEffect() { + super(Outcome.BoostCreature); + this.staticText = "discard any number of creature cards. For each card discarded this way, put two +1/+1 counters on {this}"; + } + + MindMaggotsEffect(final MindMaggotsEffect effect) { + super(effect); + } + + @Override + public MindMaggotsEffect copy() { + return new MindMaggotsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int numToDiscard = controller.getAmount(0, + controller.getHand().getCards(new FilterCreatureCard(), game).size(), + "Discard how many creature cards?", + game); + TargetCardInHand target = new TargetCardInHand(numToDiscard, new FilterCreatureCard()); + if (controller.choose(Outcome.Benefit, target, source.getSourceId(), game)) { + for (UUID targetId : target.getTargets()) { + Card card = game.getCard(targetId); + if (card != null + && controller.discard(card, source, game)) { + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)).apply(game, source); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/Paroxysm.java b/Mage.Sets/src/mage/cards/p/Paroxysm.java new file mode 100644 index 0000000000..753951b5c1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/Paroxysm.java @@ -0,0 +1,111 @@ +package mage.cards.p; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author jeffwadsworth + */ +public final class Paroxysm extends CardImpl { + + public Paroxysm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // At the beginning of the upkeep of enchanted creature's controller, that player reveals the top card of his or her library. + // If that card is a land card, destroy that creature. Otherwise, it gets +3/+3 until end of turn. + this.addAbility(new BeginningOfUpkeepTriggeredAbility( + Zone.BATTLEFIELD, + new ParoxysmEffect(), + TargetController.CONTROLLER_ATTACHED_TO, + false, false, "At the beginning of the upkeep of enchanted creature's controller, ")); + } + + public Paroxysm(final Paroxysm card) { + super(card); + } + + @Override + public Paroxysm copy() { + return new Paroxysm(this); + } +} + +class ParoxysmEffect extends OneShotEffect { + + ParoxysmEffect() { + super(Outcome.BoostCreature); + this.staticText = "that player reveals the top card of his or her library. \n" + + "If that card is a land card, destroy that creature. \n" + + "Otherwise, it gets +3/+3 until end of turn."; + } + + ParoxysmEffect(final ParoxysmEffect effect) { + super(effect); + } + + @Override + public ParoxysmEffect copy() { + return new ParoxysmEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent aura = game.getPermanent(source.getSourceId()); + if (aura != null) { + Permanent creatureAttachedTo = game.getPermanent(aura.getAttachedTo()); + if (creatureAttachedTo != null) { + Player controllerOfCreature = game.getPlayer(creatureAttachedTo.getControllerId()); + if (controllerOfCreature != null) { + Card revealCardFromTop = controllerOfCreature.getLibrary().getFromTop(game); + if (revealCardFromTop != null) { + Cards cards = new CardsImpl(); + cards.add(revealCardFromTop); + controllerOfCreature.revealCards(source, cards, game); + if (revealCardFromTop.isLand()) { + creatureAttachedTo.destroy(source.getSourceId(), game, false); + } else { + ContinuousEffect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(creatureAttachedTo.getId())); + game.addEffect(effect, source); + } + return true; + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/Exodus.java b/Mage.Sets/src/mage/sets/Exodus.java index 8ee7f6a6ed..a7d5dcb6b3 100644 --- a/Mage.Sets/src/mage/sets/Exodus.java +++ b/Mage.Sets/src/mage/sets/Exodus.java @@ -52,6 +52,7 @@ public final class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Dauthi Jackal", 58, Rarity.COMMON, mage.cards.d.DauthiJackal.class)); cards.add(new SetCardInfo("Dauthi Warlord", 59, Rarity.UNCOMMON, mage.cards.d.DauthiWarlord.class)); cards.add(new SetCardInfo("Death's Duet", 60, Rarity.COMMON, mage.cards.d.DeathsDuet.class)); + cards.add(new SetCardInfo("Dizzying Gaze", 81, Rarity.COMMON, mage.cards.d.DizzyingGaze.class)); cards.add(new SetCardInfo("Dominating Licid", 30, Rarity.RARE, mage.cards.d.DominatingLicid.class)); cards.add(new SetCardInfo("Elven Palisade", 109, Rarity.UNCOMMON, mage.cards.e.ElvenPalisade.class)); cards.add(new SetCardInfo("Elvish Berserker", 110, Rarity.COMMON, mage.cards.e.ElvishBerserker.class)); @@ -86,6 +87,7 @@ public final class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Medicine Bag", 133, Rarity.UNCOMMON, mage.cards.m.MedicineBag.class)); cards.add(new SetCardInfo("Memory Crystal", 134, Rarity.RARE, mage.cards.m.MemoryCrystal.class)); cards.add(new SetCardInfo("Merfolk Looter", 39, Rarity.COMMON, mage.cards.m.MerfolkLooter.class)); + cards.add(new SetCardInfo("Mind Maggots", 66, Rarity.UNCOMMON, mage.cards.m.MindMaggots.class)); cards.add(new SetCardInfo("Mindless Automaton", 135, Rarity.RARE, mage.cards.m.MindlessAutomaton.class)); cards.add(new SetCardInfo("Mind Over Matter", 40, Rarity.RARE, mage.cards.m.MindOverMatter.class)); cards.add(new SetCardInfo("Mirozel", 41, Rarity.UNCOMMON, mage.cards.m.Mirozel.class)); @@ -104,6 +106,7 @@ public final class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Onslaught", 92, Rarity.COMMON, mage.cards.o.Onslaught.class)); cards.add(new SetCardInfo("Paladin en-Vec", 12, Rarity.RARE, mage.cards.p.PaladinEnVec.class)); cards.add(new SetCardInfo("Pandemonium", 93, Rarity.RARE, mage.cards.p.Pandemonium.class)); + cards.add(new SetCardInfo("Paroxysm", 94, Rarity.UNCOMMON, mage.cards.p.Paroxysm.class)); cards.add(new SetCardInfo("Peace of Mind", 13, Rarity.UNCOMMON, mage.cards.p.PeaceOfMind.class)); cards.add(new SetCardInfo("Pegasus Stampede", 14, Rarity.UNCOMMON, mage.cards.p.PegasusStampede.class)); cards.add(new SetCardInfo("Penance", 15, Rarity.UNCOMMON, mage.cards.p.Penance.class));