diff --git a/Mage.Sets/src/mage/cards/i/Ionize.java b/Mage.Sets/src/mage/cards/i/Ionize.java new file mode 100644 index 0000000000..4c89881a47 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/Ionize.java @@ -0,0 +1,63 @@ +package mage.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public final class Ionize extends CardImpl { + + public Ionize(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{R}"); + + // Counter target spell. Ionize deals 2 damage to that spell's controller. + this.getSpellAbility().addEffect(new IonizeEffect()); + } + + public Ionize(final Ionize card) { + super(card); + } + + @Override + public Ionize copy() { + return new Ionize(this); + } +} + +class IonizeEffect extends OneShotEffect { + + public IonizeEffect() { + super(Outcome.Benefit); + this.staticText = "Counter target spell. " + + "{this} deals 2 damage to that spell's controller."; + } + + public IonizeEffect(final IonizeEffect effect) { + super(effect); + } + + @Override + public IonizeEffect copy() { + return new IonizeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(game.getControllerId(source.getSourceId())); + new CounterTargetEffect().apply(game, source); + if (player == null) { + return false; + } + return player.damage(2, source.getSourceId(), game, false, true) > 0; + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index 57d7a65026..c11d77f415 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -53,6 +53,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Healer's Hawk", 14, Rarity.COMMON, mage.cards.h.HealersHawk.class)); cards.add(new SetCardInfo("Hypothesizzle", 178, Rarity.COMMON, mage.cards.h.Hypothesizzle.class)); cards.add(new SetCardInfo("Impervious Greatwurm", 273, Rarity.MYTHIC, mage.cards.i.ImperviousGreatwurm.class)); + cards.add(new SetCardInfo("Ionize", 179, Rarity.RARE, mage.cards.i.Ionize.class)); cards.add(new SetCardInfo("Island", 261, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Izoni, Thousand-Eyed", 180, Rarity.RARE, mage.cards.i.IzoniThousandEyed.class)); cards.add(new SetCardInfo("Izzet Guildgate", 251, Rarity.COMMON, mage.cards.i.IzzetGuildgate.class));