diff --git a/Mage.Sets/src/mage/cards/g/GodPharaohsStatue.java b/Mage.Sets/src/mage/cards/g/GodPharaohsStatue.java new file mode 100644 index 00000000000..2e2c67444d1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GodPharaohsStatue.java @@ -0,0 +1,81 @@ +package mage.cards.g; + +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.util.CardUtil; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GodPharaohsStatue extends CardImpl { + + public GodPharaohsStatue(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); + + this.addSuperType(SuperType.LEGENDARY); + + // Spells your opponents cast cost {2} more to cast. + this.addAbility(new SimpleStaticAbility(new GodPharaohsStatueEffect())); + + // At the beginning of your end step, each opponent loses 1 life. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + new LoseLifeOpponentsEffect(1), TargetController.YOU, false + )); + } + + private GodPharaohsStatue(final GodPharaohsStatue card) { + super(card); + } + + @Override + public GodPharaohsStatue copy() { + return new GodPharaohsStatue(this); + } +} + +class GodPharaohsStatueEffect extends CostModificationEffectImpl { + + private static final String effectText = "Spells your opponents cast cost {2} more to cast"; + + GodPharaohsStatueEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); + staticText = effectText; + } + + private GodPharaohsStatueEffect(GodPharaohsStatueEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + SpellAbility spellAbility = (SpellAbility) abilityToModify; + CardUtil.adjustCost(spellAbility, -2); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + if (abilityToModify instanceof SpellAbility) { + if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) { + return true; + } + } + return false; + } + + @Override + public GodPharaohsStatueEffect copy() { + return new GodPharaohsStatueEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index b5d5f694393..c3d71fadf1b 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -48,6 +48,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Giant Growth", 162, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); cards.add(new SetCardInfo("Gideon's Triumph", 15, Rarity.UNCOMMON, mage.cards.g.GideonsTriumph.class)); cards.add(new SetCardInfo("Gleaming Overseer", 198, Rarity.UNCOMMON, mage.cards.g.GleamingOverseer.class)); + cards.add(new SetCardInfo("God-Pharaoh's Statue", 238, Rarity.UNCOMMON, mage.cards.g.GodPharaohsStatue.class)); cards.add(new SetCardInfo("Grim Initiate", 130, Rarity.COMMON, mage.cards.g.GrimInitiate.class)); cards.add(new SetCardInfo("Herald of the Dreadhorde", 93, Rarity.COMMON, mage.cards.h.HeraldOfTheDreadhorde.class)); cards.add(new SetCardInfo("Honor the God-Pharaoh", 132, Rarity.COMMON, mage.cards.h.HonorTheGodPharaoh.class));