Implemented God-Pharaoh's Statue

This commit is contained in:
Evan Kranzler 2019-04-03 17:32:39 -04:00
parent 1ff380db8e
commit cd3396eab9
2 changed files with 82 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));