From bd9cb672e1b3271c2b8d33347913777d0ce37877 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 12 Apr 2019 20:16:25 -0400 Subject: [PATCH] Implemented Jace's Triumph --- Mage.Sets/src/mage/cards/j/JacesTriumph.java | 42 +++++++++++++++++++ .../src/mage/cards/l/LilianasTriumph.java | 7 ++-- Mage.Sets/src/mage/cards/n/NissasTriumph.java | 3 ++ Mage.Sets/src/mage/sets/WarOfTheSpark.java | 1 + 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/j/JacesTriumph.java diff --git a/Mage.Sets/src/mage/cards/j/JacesTriumph.java b/Mage.Sets/src/mage/cards/j/JacesTriumph.java new file mode 100644 index 0000000000..12ea23dd71 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JacesTriumph.java @@ -0,0 +1,42 @@ +package mage.cards.j; + +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPlaneswalkerPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class JacesTriumph extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPlaneswalkerPermanent(SubType.JACE); + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter); + + public JacesTriumph(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); + + // Draw two cards. If you control a Jace planeswalker, draw three cards instead. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DrawCardSourceControllerEffect(3), new DrawCardSourceControllerEffect(2), + condition, "Draw two cards. If you control a Jace planeswalker, draw three cards instead." + )); + } + + private JacesTriumph(final JacesTriumph card) { + super(card); + } + + @Override + public JacesTriumph copy() { + return new JacesTriumph(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LilianasTriumph.java b/Mage.Sets/src/mage/cards/l/LilianasTriumph.java index bdc39b8d95..5cb8a89ec4 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasTriumph.java +++ b/Mage.Sets/src/mage/cards/l/LilianasTriumph.java @@ -1,5 +1,6 @@ package mage.cards.l; +import mage.abilities.condition.Condition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.dynamicvalue.common.StaticValue; @@ -21,7 +22,8 @@ import java.util.UUID; public final class LilianasTriumph extends CardImpl { private static final FilterControlledPlaneswalkerPermanent filter - = new FilterControlledPlaneswalkerPermanent(SubType.LILIANA, "a Liliana planeswalker"); + = new FilterControlledPlaneswalkerPermanent(SubType.LILIANA); + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter); public LilianasTriumph(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); @@ -33,8 +35,7 @@ public final class LilianasTriumph extends CardImpl { this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DiscardEachPlayerEffect( new StaticValue(1), false, TargetController.OPPONENT - ), new PermanentsOnTheBattlefieldCondition(filter), - "If you control a Liliana planeswalker, each opponent also discards a card." + ), condition, "If you control a Liliana planeswalker, each opponent also discards a card." )); } diff --git a/Mage.Sets/src/mage/cards/n/NissasTriumph.java b/Mage.Sets/src/mage/cards/n/NissasTriumph.java index ed0263fed3..8d5a5ceb7f 100644 --- a/Mage.Sets/src/mage/cards/n/NissasTriumph.java +++ b/Mage.Sets/src/mage/cards/n/NissasTriumph.java @@ -1,5 +1,6 @@ package mage.cards.n; +import mage.abilities.condition.Condition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; @@ -31,6 +32,8 @@ public final class NissasTriumph extends CardImpl { filter.add(new SubtypePredicate(SubType.FOREST)); } + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter2); + public NissasTriumph(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{G}"); diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index 3a14652696..b3bdcf1f0b 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -97,6 +97,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Island", 253, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 254, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 255, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Jace's Triumph", 55, Rarity.UNCOMMON, mage.cards.j.JacesTriumph.class)); cards.add(new SetCardInfo("Jace, Wielder of Mysteries", 54, Rarity.RARE, mage.cards.j.JaceWielderOfMysteries.class)); cards.add(new SetCardInfo("Jaya's Greeting", 136, Rarity.COMMON, mage.cards.j.JayasGreeting.class)); cards.add(new SetCardInfo("Jaya, Venerated Firemage", 135, Rarity.UNCOMMON, mage.cards.j.JayaVeneratedFiremage.class));