mirror of
https://github.com/correl/mage.git
synced 2025-01-13 03:00:10 +00:00
Implemented Inspired Ultimatum
This commit is contained in:
parent
5c8163c7c5
commit
c9725d4561
3 changed files with 74 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
72
Mage.Sets/src/mage/cards/i/InspiredUltimatum.java
Normal file
72
Mage.Sets/src/mage/cards/i/InspiredUltimatum.java
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue