diff --git a/Mage.Sets/src/mage/cards/h/HaughtyDjinn.java b/Mage.Sets/src/mage/cards/h/HaughtyDjinn.java new file mode 100644 index 0000000000..fa5ed34c07 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HaughtyDjinn.java @@ -0,0 +1,55 @@ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterInstantOrSorceryCard; + +/** + * + * @author weirddan455 + */ +public final class HaughtyDjinn extends CardImpl { + + private static final FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard("instant and sorcery cards"); + private static final FilterInstantOrSorceryCard filter2 = new FilterInstantOrSorceryCard("instant and sorcery spells"); + + public HaughtyDjinn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + + this.subtype.add(SubType.DJINN); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Haughty Djinn's power is equal to the number of instant and sorcery cards in your graveyard. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, + new SetPowerSourceEffect(new CardsInControllerGraveyardCount(filter), Duration.EndOfGame) + )); + + // Instant and sorcery spells you cast cost {1} less to cast. + this.addAbility(new SimpleStaticAbility(new SpellsCostReductionControllerEffect(filter2, 1))); + } + + private HaughtyDjinn(final HaughtyDjinn card) { + super(card); + } + + @Override + public HaughtyDjinn copy() { + return new HaughtyDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DominariaUnited.java b/Mage.Sets/src/mage/sets/DominariaUnited.java index e7434ec181..e45b063396 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnited.java +++ b/Mage.Sets/src/mage/sets/DominariaUnited.java @@ -59,6 +59,7 @@ public final class DominariaUnited extends ExpansionSet { cards.add(new SetCardInfo("Forest", 274, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Frostfist Strider", 51, Rarity.UNCOMMON, mage.cards.f.FrostfistStrider.class)); cards.add(new SetCardInfo("Gaea's Might", 164, Rarity.COMMON, mage.cards.g.GaeasMight.class)); + cards.add(new SetCardInfo("Haughty Djinn", 52, Rarity.RARE, mage.cards.h.HaughtyDjinn.class)); cards.add(new SetCardInfo("Herd Migration", 165, Rarity.RARE, mage.cards.h.HerdMigration.class)); cards.add(new SetCardInfo("Hero's Heirloom", 231, Rarity.UNCOMMON, mage.cards.h.HerosHeirloom.class)); cards.add(new SetCardInfo("Hurler Cyclops", 130, Rarity.UNCOMMON, mage.cards.h.HurlerCyclops.class));