diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/AlchemistsGreeting.java b/Mage.Sets/src/mage/sets/eldritchmoon/AlchemistsGreeting.java index 199719a6129..26fcb7062e1 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/AlchemistsGreeting.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/AlchemistsGreeting.java @@ -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}"))); } diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedHostility.java b/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedHostility.java index 4c8bd13b872..9348a79eae0 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedHostility.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/BorrowedHostility.java @@ -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 — 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); } diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/FortunesFavor.java b/Mage.Sets/src/mage/sets/eldritchmoon/FortunesFavor.java index bb16e144138..bbae839ff03 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/FortunesFavor.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/FortunesFavor.java @@ -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); diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/LoneRider.java b/Mage.Sets/src/mage/sets/eldritchmoon/LoneRider.java index 1270259e411..bd3e8a01ace 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/LoneRider.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/LoneRider.java @@ -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) { diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SavageAlliance.java b/Mage.Sets/src/mage/sets/eldritchmoon/SavageAlliance.java index d484b0c3a6c..33bd1d485af 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/SavageAlliance.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/SavageAlliance.java @@ -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); } diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SpontaneousMutation.java b/Mage.Sets/src/mage/sets/eldritchmoon/SpontaneousMutation.java index 3b309d5f27f..5ff9f751003 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/SpontaneousMutation.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/SpontaneousMutation.java @@ -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)))); } diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/SuccumbToTemptation.java b/Mage.Sets/src/mage/sets/eldritchmoon/SuccumbToTemptation.java index 5a014740a05..ebffc119795 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/SuccumbToTemptation.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/SuccumbToTemptation.java @@ -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)); diff --git a/Mage.Sets/src/mage/sets/magic2012/CallToTheGrave.java b/Mage.Sets/src/mage/sets/magic2012/CallToTheGrave.java index 92bd0491d4a..ea04b9077fb 100644 --- a/Mage.Sets/src/mage/sets/magic2012/CallToTheGrave.java +++ b/Mage.Sets/src/mage/sets/magic2012/CallToTheGrave.java @@ -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 { diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 3e94e53cfe8..4680ce770ad 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -57332,7 +57332,7 @@ Ruthless Disposal|Eldritch Moon|103|U|{4}{B}|Sorcery|||As an additional cost to Skirsdag Supplicant|Eldritch Moon|104|C|{2}{B}|Creature - Human Cleric|2|3|{B}, {T}, Discard a card: Each player loses 2 life.| Strange Augmentation|Eldritch Moon|105|C|{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +1/+1.$Delirium &mdash Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard.| Stromkirk Condemned|Eldritch Moon|106|R|{B}{B}|Creature - Vampire Horror|2|2|Discard a card: Vampires you control get +1/+1 until end of turn. Activate this ability only once each turn.| -Succumb to Temptation|Eldritch Moon|107|C|{1}{B}{B}|Insant|||You draw two cards and you lose 2 life.| +Succumb to Temptation|Eldritch Moon|107|C|{1}{B}{B}|Instant|||You draw two cards and you lose 2 life.| Thraben Foulbloods|Eldritch Moon|108|C|{2}{B}|Creature - Zombie Hound|3|2|Delirium — Thraben Foulbloods gets +1/+1 and has menace as long as there are four or more card types among cards in your graveyard. (A creature with menace can't be blocked except by two or more creatures.)| Tree of Perdition|Eldritch Moon|109|M|{3}{B}|Creature - Plant|0|13|Defender${tap}: Exchange target opponent's life total with Tree of Perdition's toughness.| Vampire Cutthroat|Eldritch Moon|110|U|{B}|Creature - Vampire Rogue|1|1|Skulk (This creature can't be blocked except by creatures with greater power.)$Lifelink (Damage dealt by this creature also causes you to gain that much life.)|