From d9ca4f2ff6367d59a2941532833513d3087b1a8a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 21 Dec 2018 19:40:59 -0500 Subject: [PATCH] Implemented Sphinx's Insight --- .../src/mage/cards/s/SphinxsInsight.java | 40 +++++++++++++++++++ .../src/mage/sets/RavnicaAllegiance.java | 1 + .../main/java/mage/constants/AbilityWord.java | 1 + 3 files changed, 42 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SphinxsInsight.java diff --git a/Mage.Sets/src/mage/cards/s/SphinxsInsight.java b/Mage.Sets/src/mage/cards/s/SphinxsInsight.java new file mode 100644 index 0000000000..d0c8fb18ad --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphinxsInsight.java @@ -0,0 +1,40 @@ +package mage.cards.s; + +import mage.abilities.condition.common.MyMainPhaseCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SphinxsInsight extends CardImpl { + + public SphinxsInsight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{U}"); + + + // Draw two cards. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + + // Addendum — If you cast this spell during your main phase, you gain 2 life. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new GainLifeEffect(2), MyMainPhaseCondition.instance, + "
Addendum — If you cast this spell during your main phase, you gain 2 life." + )); + } + + private SphinxsInsight(final SphinxsInsight card) { + super(card); + } + + @Override + public SphinxsInsight copy() { + return new SphinxsInsight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 50e46da266..0fe56b225e 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -45,6 +45,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Rafter Demon", 196, Rarity.COMMON, mage.cards.r.RafterDemon.class)); cards.add(new SetCardInfo("Rakdos Firewheeler", 197, Rarity.UNCOMMON, mage.cards.r.RakdosFirewheeler.class)); cards.add(new SetCardInfo("Rix Maadi Reveler", 109, Rarity.RARE, mage.cards.r.RixMaadiReveler.class)); + cards.add(new SetCardInfo("Sphinx's Insight", 209, Rarity.COMMON, mage.cards.s.SphinxsInsight.class)); cards.add(new SetCardInfo("The Haunt of Hightower", 273, Rarity.MYTHIC, mage.cards.t.TheHauntOfHightower.class)); cards.add(new SetCardInfo("Tithe Taker", 27, Rarity.RARE, mage.cards.t.TitheTaker.class)); cards.add(new SetCardInfo("Zegana, Utopian Speaker", 214, Rarity.RARE, mage.cards.z.ZeganaUtopianSpeaker.class)); diff --git a/Mage/src/main/java/mage/constants/AbilityWord.java b/Mage/src/main/java/mage/constants/AbilityWord.java index 408e590c66..898cc8ea6c 100644 --- a/Mage/src/main/java/mage/constants/AbilityWord.java +++ b/Mage/src/main/java/mage/constants/AbilityWord.java @@ -7,6 +7,7 @@ package mage.constants; */ public enum AbilityWord { + ADDENDUM("Addendum"), BATTALION("Battalion"), BLOODRUSH("Bloodrush"), CHANNEL("Channel"),