diff --git a/Mage.Sets/src/mage/cards/c/ChanneledForce.java b/Mage.Sets/src/mage/cards/c/ChanneledForce.java index 48817bf99c2..3e3363db112 100644 --- a/Mage.Sets/src/mage/cards/c/ChanneledForce.java +++ b/Mage.Sets/src/mage/cards/c/ChanneledForce.java @@ -65,7 +65,7 @@ class ChanneledForceEffect extends OneShotEffect { if (xValue == 0) { return false; } - Player player = game.getPlayer(source.getFirstTarget()); + Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); if (player != null) { player.drawCards(xValue, game); } diff --git a/Mage.Sets/src/mage/cards/i/InspiredUltimatum.java b/Mage.Sets/src/mage/cards/i/InspiredUltimatum.java new file mode 100644 index 00000000000..53374c1c9bd --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InspiredUltimatum.java @@ -0,0 +1,72 @@ +package mage.cards.i; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class InspiredUltimatum extends CardImpl { + + public InspiredUltimatum(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{U}{R}{R}{R}{W}{W}"); + + // Target player gains 5 life. Inspired Ultimatum deals 5 damage to any target. You draw five cards. + this.getSpellAbility().addEffect(new InspiredUltimatumEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); + } + + private InspiredUltimatum(final InspiredUltimatum card) { + super(card); + } + + @Override + public InspiredUltimatum copy() { + return new InspiredUltimatum(this); + } +} + +class InspiredUltimatumEffect extends OneShotEffect { + + InspiredUltimatumEffect() { + super(Outcome.Benefit); + staticText = "Target player gains 5 life. {this} deals 5 damage to any target. You draw five cards."; + } + + private InspiredUltimatumEffect(final InspiredUltimatumEffect effect) { + super(effect); + } + + @Override + public InspiredUltimatumEffect copy() { + return new InspiredUltimatumEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); + if (player != null) { + player.gainLife(5, game, source); + } + game.damagePlayerOrPlaneswalker( + source.getTargets().get(1).getFirstTarget(), 5, + source.getSourceId(), game, false, true + ); + player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.drawCards(5, game); + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java b/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java index 872ba51ee9e..0dcd3f8f167 100644 --- a/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java +++ b/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java @@ -171,6 +171,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet { cards.add(new SetCardInfo("Indatha Crystal", 235, Rarity.UNCOMMON, mage.cards.i.IndathaCrystal.class)); cards.add(new SetCardInfo("Indatha Triome", 248, Rarity.RARE, mage.cards.i.IndathaTriome.class)); cards.add(new SetCardInfo("Insatiable Hemophage", 93, Rarity.UNCOMMON, mage.cards.i.InsatiableHemophage.class)); + cards.add(new SetCardInfo("Inspired Ultimatum", 191, Rarity.RARE, mage.cards.i.InspiredUltimatum.class)); cards.add(new SetCardInfo("Island", 263, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 264, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 265, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));