diff --git a/Mage.Sets/src/mage/cards/d/DreamSeizer.java b/Mage.Sets/src/mage/cards/d/DreamSeizer.java new file mode 100644 index 00000000000..f4b9774f337 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DreamSeizer.java @@ -0,0 +1,47 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.BlightCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DreamSeizer extends CardImpl { + + public DreamSeizer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When this creature enters, you may blight 1. If you do, each opponent discards a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( + new DiscardEachPlayerEffect(TargetController.OPPONENT), new BlightCost(1) + ))); + } + + private DreamSeizer(final DreamSeizer card) { + super(card); + } + + @Override + public DreamSeizer copy() { + return new DreamSeizer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HighPerfectMorcant.java b/Mage.Sets/src/mage/cards/h/HighPerfectMorcant.java index ce4a60cc452..4095763b875 100644 --- a/Mage.Sets/src/mage/cards/h/HighPerfectMorcant.java +++ b/Mage.Sets/src/mage/cards/h/HighPerfectMorcant.java @@ -4,10 +4,10 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.common.EntersBattlefieldThisOrAnotherTriggeredAbility; +import mage.abilities.costs.common.BlightCost; import mage.abilities.costs.common.TapTargetCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.ProliferateEffect; -import mage.abilities.effects.keyword.BlightControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -85,7 +85,7 @@ class HighPerfectMorcantEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { for (UUID opponentId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(opponentId); - BlightControllerEffect.doBlight(opponent, 1, game, source); + BlightCost.doBlight(opponent, 1, game, source); } return true; } diff --git a/Mage.Sets/src/mage/sets/LorwynEclipsed.java b/Mage.Sets/src/mage/sets/LorwynEclipsed.java index af07bd667bc..55afa966273 100644 --- a/Mage.Sets/src/mage/sets/LorwynEclipsed.java +++ b/Mage.Sets/src/mage/sets/LorwynEclipsed.java @@ -33,6 +33,7 @@ public final class LorwynEclipsed extends ExpansionSet { cards.add(new SetCardInfo("Deceit", 212, Rarity.MYTHIC, mage.cards.d.Deceit.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Deceit", 293, Rarity.MYTHIC, mage.cards.d.Deceit.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Dose of Dawnglow", 100, Rarity.UNCOMMON, mage.cards.d.DoseOfDawnglow.class)); + cards.add(new SetCardInfo("Dream Seizer", 101, Rarity.COMMON, mage.cards.d.DreamSeizer.class)); cards.add(new SetCardInfo("Eirdu, Carrier of Dawn", 13, Rarity.MYTHIC, mage.cards.e.EirduCarrierOfDawn.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Eirdu, Carrier of Dawn", 286, Rarity.MYTHIC, mage.cards.e.EirduCarrierOfDawn.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Emptiness", 222, Rarity.MYTHIC, mage.cards.e.Emptiness.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/abilities/costs/common/BlightCost.java b/Mage/src/main/java/mage/abilities/costs/common/BlightCost.java new file mode 100644 index 00000000000..c6bed568986 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/costs/common/BlightCost.java @@ -0,0 +1,70 @@ +package mage.abilities.costs.common; + +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public class BlightCost extends CostImpl { + + private int amount; + + public BlightCost(int amount) { + super(); + this.amount = amount; + this.text = "blight " + amount; + } + + private BlightCost(final BlightCost cost) { + super(cost); + this.amount = cost.amount; + } + + @Override + public BlightCost copy() { + return new BlightCost(this); + } + + @Override + public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) { + return game + .getBattlefield() + .contains(StaticFilters.FILTER_CONTROLLED_CREATURE, controllerId, source, game, 1); + } + + @Override + public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) { + Player player = game.getPlayer(controllerId); + paid = player != null && doBlight(player, amount, game, source) != null; + return paid; + } + + public static Permanent doBlight(Player player, int amount, Game game, Ability source) { + if (player == null || amount < 1 || !game.getBattlefield().contains( + StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game, 1 + )) { + return null; + } + TargetPermanent target = new TargetControlledCreaturePermanent(); + target.withNotTarget(true); + target.withChooseHint("to put a -1/-1 counter on"); + player.choose(Outcome.UnboostCreature, target, source, game); + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanent.addCounters(CounterType.M1M1.createInstance(amount), source, game); + } + return permanent; + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/BlightControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/BlightControllerEffect.java index 05dd095a522..df25a56f1df 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/BlightControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/BlightControllerEffect.java @@ -1,15 +1,11 @@ package mage.abilities.effects.keyword; import mage.abilities.Ability; +import mage.abilities.costs.common.BlightCost; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; -import mage.counters.CounterType; -import mage.filter.StaticFilters; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPermanent; -import mage.target.common.TargetControlledCreaturePermanent; /** * @author TheElk801 @@ -37,23 +33,6 @@ public class BlightControllerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); - return doBlight(player, amount, game, source) != null; - } - - public static Permanent doBlight(Player player, int amount, Game game, Ability source) { - if (player == null || amount < 1 || !game.getBattlefield().contains( - StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game, 1 - )) { - return null; - } - TargetPermanent target = new TargetControlledCreaturePermanent(); - target.withNotTarget(true); - target.withChooseHint("to put a -1/-1 counter on"); - player.choose(Outcome.UnboostCreature, target, source, game); - Permanent permanent = game.getPermanent(target.getFirstTarget()); - if (permanent != null) { - permanent.addCounters(CounterType.M1M1.createInstance(amount), source, game); - } - return permanent; + return BlightCost.doBlight(player, amount, game, source) != null; } } diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index cf752f1c13d..57ff8c7ae68 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -60826,6 +60826,7 @@ Sygg, Wanderbrine Shield|Lorwyn Eclipsed|76|R||Legendary Creature - Merfolk Rogu Unexpected Assistance|Lorwyn Eclipsed|80|C|{3}{U}{U}|Instant|||Convoke$Draw three cards, then discard a card.| Bitterbloom Bearer|Lorwyn Eclipsed|88|M|{B}{B}|Creature - Faerie Rogue|1|1|Flash$Flying$At the beginning of your upkeep, you lose 1 life and create a 1/1 blue and black Faerie creature token with flying.| Dose of Dawnglow|Lorwyn Eclipsed|100|U|{4}{B}|Instant|||Return target creature card from your graveyard to the battlefield. Then if it isn't your main phase, blight 2.| +Dream Seizer|Lorwyn Eclipsed|101|C|{3}{B}|Creature - Faerie Rogue|3|2|Flying$When this creature enters, you may blight 1. If you do, each opponent discards a card.| Perfect Intimidation|Lorwyn Eclipsed|115|U|{3}{B}|Sorcery|||Choose one or both --$* Target opponent exiles two cards from their hand.$* Remove all counters from target creature.| Ashling, Rekindled|Lorwyn Eclipsed|124|R|{1}{R}|Legendary Creature - Elemental Sorcerer|1|3|Whenever this creature enters or transforms into Ashling, Rekindled, you may discard a card. If you do, draw a card.$At the beginning of your first main phase, you may pay {U}. If you do, transform Ashling.| Ashling, Rimebound|Lorwyn Eclipsed|124|R||Legendary Creature - Elemental Wizard|1|3|Whenever this creature transforms into Ashling, Rimebound and at the beginning of your first main phase, add two mana of any one color. Spend this mana only to cast spells with mana value 4 or greater.$At the beginning of your first main phase, you may pay {R}. If you do, transform Ashling.|