diff --git a/Mage.Sets/src/mage/cards/s/SereneSunset.java b/Mage.Sets/src/mage/cards/s/SereneSunset.java new file mode 100644 index 0000000000..157e5d9a9e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SereneSunset.java @@ -0,0 +1,47 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.effects.common.PreventDamageByTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetadjustment.TargetAdjuster; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SereneSunset extends CardImpl { + + public SereneSunset(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}"); + + // Prevent all combat damage X target creatures would deal this turn. + this.getSpellAbility().addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true) + .setText("prevent all combat damage X target creatures would deal this turn")); + this.getSpellAbility().setTargetAdjuster(SereneSunsetAdjuster.instance); + } + + private SereneSunset(final SereneSunset card) { + super(card); + } + + @Override + public SereneSunset copy() { + return new SereneSunset(this); + } +} + +enum SereneSunsetAdjuster implements TargetAdjuster { + instance; + + @Override + public void adjustTargets(Ability ability, Game game) { + ability.getTargets().clear(); + ability.addTarget(new TargetCreaturePermanent(ability.getManaCostsToPay().getX())); + } +} diff --git a/Mage.Sets/src/mage/sets/Judgment.java b/Mage.Sets/src/mage/sets/Judgment.java index 7c0ec46225..2ec3f16394 100644 --- a/Mage.Sets/src/mage/sets/Judgment.java +++ b/Mage.Sets/src/mage/sets/Judgment.java @@ -131,6 +131,7 @@ public final class Judgment extends ExpansionSet { cards.add(new SetCardInfo("Scalpelexis", 50, Rarity.RARE, mage.cards.s.Scalpelexis.class)); cards.add(new SetCardInfo("Seedtime", 130, Rarity.RARE, mage.cards.s.Seedtime.class)); cards.add(new SetCardInfo("Selfless Exorcist", 21, Rarity.RARE, mage.cards.s.SelflessExorcist.class)); + cards.add(new SetCardInfo("Serene Sunset", 131, Rarity.UNCOMMON, mage.cards.s.SereneSunset.class)); cards.add(new SetCardInfo("Shieldmage Advocate", 22, Rarity.COMMON, mage.cards.s.ShieldmageAdvocate.class)); cards.add(new SetCardInfo("Silver Seraph", 23, Rarity.RARE, mage.cards.s.SilverSeraph.class)); cards.add(new SetCardInfo("Solitary Confinement", 24, Rarity.RARE, mage.cards.s.SolitaryConfinement.class));