[EMN] Various fixes.

This commit is contained in:
fireshoes 2016-07-11 21:13:32 -05:00
parent 91f74ced1f
commit c698ce5630
9 changed files with 51 additions and 27 deletions

View file

@ -34,7 +34,7 @@ import mage.abilities.keyword.MadnessAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent;
/**
*
@ -48,7 +48,8 @@ public class AlchemistsGreeting extends CardImpl {
// Alchemist's Greeting deals 4 damage to target creature.
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Madness {1}{R}
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}")));
}

View file

@ -30,6 +30,7 @@ package mage.sets.eldritchmoon;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.EscalateAbility;
@ -38,6 +39,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
@ -46,24 +48,32 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class BorrowedHostility extends CardImpl {
private static final FilterCreaturePermanent filterBoost = new FilterCreaturePermanent("creature to get +3/+0");
private static final FilterCreaturePermanent filterFirstStrike = new FilterCreaturePermanent("creature to gain first strike");
public BorrowedHostility(UUID ownerId) {
super(ownerId, 121, "Borrowed Hostility", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
this.expansionSetCode = "EMN";
// Escalate {3}
this.addAbility(new EscalateAbility(new ManaCostsImpl<>("{3}")));
// Choose one or both &mdash;
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
// Target creature gets +3/+0 until end of turn.;
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(3, 0, Duration.EndOfTurn));
Effect effect = new BoostTargetEffect(3, 0, Duration.EndOfTurn);
effect.setText("Target creature gets +3/+0 until end of turn");
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterBoost));
this.getSpellAbility().addEffect(effect);
// Target creature gains first strike until end of turn.
Mode mode = new Mode();
mode.getEffects().add(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
effect.setText("Target creature gains first strike until end of turn");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterFirstStrike));
this.getSpellAbility().addMode(mode);
}

View file

@ -93,7 +93,7 @@ class FortunesFavorEffect extends OneShotEffect {
MageObject sourceObject = source.getSourceObject(game);
if (controller != null && targetOpponent != null && sourceObject != null) {
Cards cards = new CardsImpl();
cards.addAll(controller.getLibrary().getTopCards(game, 1));
cards.addAll(controller.getLibrary().getTopCards(game, 4));
TargetCard target = new TargetCard(0, Integer.MAX_VALUE, Zone.LIBRARY, new FilterCard("cards for the face-down pile"));
targetOpponent.choose(outcome, cards, target, game);
@ -101,7 +101,7 @@ class FortunesFavorEffect extends OneShotEffect {
faceDownPile.addAll(target.getTargets());
cards.removeAll(target.getTargets());
controller.revealCards(sourceObject.getIdName() + " - cards in face-up pile", cards, game);
game.informPlayers(targetOpponent.getLogName() + " puts " + faceDownPile.size() + "card(s) into the face-down pile");
game.informPlayers(targetOpponent.getLogName() + " puts " + faceDownPile.size() + " card(s) into the face-down pile");
MessageToClient message = new MessageToClient("Put the face-down pile into your hand?", "(If you say yes, the face-up pile goes to the graveyard.)");
if (controller.chooseUse(outcome, message, source, game)) {
controller.moveCards(faceDownPile, Zone.HAND, source, game);

View file

@ -30,9 +30,11 @@ package mage.sets.eldritchmoon;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.IntCompareCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.LifelinkAbility;
@ -40,9 +42,8 @@ import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.watchers.common.PlayerGainedLifeWatcher;
/**
@ -51,6 +52,8 @@ import mage.watchers.common.PlayerGainedLifeWatcher;
*/
public class LoneRider extends CardImpl {
private static final String ruleText = "At the beginning of the end step, if you gained 3 or more life this turn, transform {this}";
public LoneRider(UUID ownerId) {
super(ownerId, 33, "Lone Rider", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.expansionSetCode = "EMN";
@ -70,8 +73,8 @@ public class LoneRider extends CardImpl {
// At the beginning of the end step, if you gained 3 or more life this turn, transform Lone Rider.
this.addAbility(new TransformAbility());
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.ANY,
new YouGainedLifeCondition(Condition.ComparisonType.GreaterThan, 2), false), new PlayerGainedLifeWatcher());
TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new TransformSourceEffect(true));
this.addAbility(new ConditionalTriggeredAbility(triggered, new YouGainedLifeCondition(Condition.ComparisonType.GreaterThan, 2), ruleText), new PlayerGainedLifeWatcher());
}
public LoneRider(final LoneRider card) {

View file

@ -33,6 +33,7 @@ import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
@ -43,14 +44,16 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.filter.FilterPlayer;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.other.PlayerPredicate;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
/**
*
@ -58,6 +61,14 @@ import mage.target.common.TargetOpponent;
*/
public class SavageAlliance extends CardImpl {
private static final FilterPlayer filterPlayer = new FilterPlayer("player whose creatures gain trample");
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature to deal 2 damage to");
private static final FilterPlayer filterOpponent = new FilterPlayer("opponent whose creatures get dealt damage");
static {
filterOpponent.add(new PlayerPredicate(TargetController.OPPONENT));
}
public SavageAlliance(UUID ownerId) {
super(ownerId, 140, "Savage Alliance", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{R}");
this.expansionSetCode = "EMN";
@ -71,18 +82,20 @@ public class SavageAlliance extends CardImpl {
// Creatures target player controls gain trample until end of turn.
this.getSpellAbility().addEffect(new SavageAllianceGainTrampleEffect());
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addTarget(new TargetPlayer(1, 1, false, filterPlayer));
// Savage Alliance deals 2 damage to target creature.;
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(2));
mode.getTargets().add(new TargetCreaturePermanent());
Effect effect = new DamageTargetEffect(2);
effect.setText("{this} deals 2 damage to target creature");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
this.getSpellAbility().addMode(mode);
// Savage Alliance deals 1 damage to each creature target opponent controls.
mode = new Mode();
mode.getEffects().add(new SavageAllianceDamageEffect());
mode.getTargets().add(new TargetOpponent());
mode.getTargets().add(new TargetPlayer(1, 1, false, filterOpponent));
this.getSpellAbility().addMode(mode);
}

View file

@ -43,7 +43,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -69,7 +68,7 @@ public class SpontaneousMutation extends CardImpl {
this.addAbility(ability);
// Enchanted creature gets -X/-0, where X is the number of cards in your graveyard.
DynamicValue value = new SignInversionDynamicValue(new CardsInControllerGraveyardCount(new FilterCreatureCard()));
DynamicValue value = new SignInversionDynamicValue(new CardsInControllerGraveyardCount());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(value, new StaticValue(-0))));
}

View file

@ -42,9 +42,8 @@ import mage.constants.Rarity;
public class SuccumbToTemptation extends CardImpl {
public SuccumbToTemptation(UUID ownerId) {
super(ownerId, 107, "Succumb to Temptation", Rarity.COMMON, new CardType[]{}, "{1}{B}{B}");
super(ownerId, 107, "Succumb to Temptation", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}{B}");
this.expansionSetCode = "EMN";
this.supertype.add("Insant");
// You draw two cards and you lose 2 life.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));

View file

@ -28,9 +28,6 @@
package mage.sets.magic2012;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -40,6 +37,8 @@ import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
@ -52,7 +51,7 @@ import mage.game.events.GameEvent;
*/
public class CallToTheGrave extends CardImpl {
private static final String ruleText = "At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave.";
private static final String ruleText = "At the beginning of the end step, if no creatures are on the battlefield, sacrifice {this}.";
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Zombie creature");
static {