diff --git a/Mage.Sets/src/mage/cards/i/InfernalSovereign.java b/Mage.Sets/src/mage/cards/i/InfernalSovereign.java new file mode 100644 index 0000000000..7289ae079f --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InfernalSovereign.java @@ -0,0 +1,81 @@ +package mage.cards.i; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.SkipDrawStepEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class InfernalSovereign extends CardImpl { + + public InfernalSovereign(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.subtype.add(SubType.DEMON); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Skip your draw step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); + + // Whenever you play a land or cast a spell, you draw a card and you lose 1 life. + this.addAbility(new InfernalSovereignTriggeredAbility()); + } + + private InfernalSovereign(final InfernalSovereign card) { + super(card); + } + + @Override + public InfernalSovereign copy() { + return new InfernalSovereign(this); + } +} + +class InfernalSovereignTriggeredAbility extends TriggeredAbilityImpl { + + public InfernalSovereignTriggeredAbility() { + super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1).setText("you draw a card")); + this.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); + setTriggerPhrase("Whenever you play a land or cast a spell, "); + } + + private InfernalSovereignTriggeredAbility(final InfernalSovereignTriggeredAbility ability) { + super(ability); + } + + @Override + public InfernalSovereignTriggeredAbility copy() { + return new InfernalSovereignTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.LAND_PLAYED || event.getType() == GameEvent.EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getPlayerId().equals(controllerId); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java b/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java index 9935388d7c..8c9aaa6acd 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java @@ -148,6 +148,8 @@ public final class MarchOfTheMachineCommander extends ExpansionSet { cards.add(new SetCardInfo("Imprisoned in the Moon", 224, Rarity.RARE, mage.cards.i.ImprisonedInTheMoon.class)); cards.add(new SetCardInfo("Improbable Alliance", 329, Rarity.UNCOMMON, mage.cards.i.ImprobableAlliance.class)); cards.add(new SetCardInfo("Incubation Druid", 302, Rarity.RARE, mage.cards.i.IncubationDruid.class)); + cards.add(new SetCardInfo("Infernal Sovereign", 75, Rarity.MYTHIC, mage.cards.i.InfernalSovereign.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Infernal Sovereign", 83, Rarity.MYTHIC, mage.cards.i.InfernalSovereign.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Inscription of Abundance", 303, Rarity.RARE, mage.cards.i.InscriptionOfAbundance.class)); cards.add(new SetCardInfo("Inspiring Call", 304, Rarity.UNCOMMON, mage.cards.i.InspiringCall.class)); cards.add(new SetCardInfo("Inspiring Statuary", 361, Rarity.RARE, mage.cards.i.InspiringStatuary.class));