diff --git a/Mage.Sets/src/mage/cards/s/SingularityRupture.java b/Mage.Sets/src/mage/cards/s/SingularityRupture.java new file mode 100644 index 00000000000..f978497f046 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SingularityRupture.java @@ -0,0 +1,36 @@ +package mage.cards.s; + +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.effects.common.MillHalfLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; +import mage.target.TargetPlayer; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SingularityRupture extends CardImpl { + + public SingularityRupture(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}{B}{B}"); + + // Destroy all creatures, then any number of target players each mill half their library, rounded down. + this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES)); + this.getSpellAbility().addEffect(new MillHalfLibraryTargetEffect(false) + .setText(", then any number of target players each mill half their library, rounded down")); + this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); + } + + private SingularityRupture(final SingularityRupture card) { + super(card); + } + + @Override + public SingularityRupture copy() { + return new SingularityRupture(this); + } +} diff --git a/Mage.Sets/src/mage/sets/EdgeOfEternities.java b/Mage.Sets/src/mage/sets/EdgeOfEternities.java index 42339fd5ce7..a738e8bd455 100644 --- a/Mage.Sets/src/mage/sets/EdgeOfEternities.java +++ b/Mage.Sets/src/mage/sets/EdgeOfEternities.java @@ -60,6 +60,9 @@ public final class EdgeOfEternities extends ExpansionSet { cards.add(new SetCardInfo("Sacred Foundry", 377, Rarity.RARE, mage.cards.s.SacredFoundry.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sami, Ship's Engineer", 225, Rarity.UNCOMMON, mage.cards.s.SamiShipsEngineer.class)); cards.add(new SetCardInfo("Shattered Wings", 206, Rarity.COMMON, mage.cards.s.ShatteredWings.class)); + cards.add(new SetCardInfo("Singularity Rupture", 228, Rarity.RARE, mage.cards.s.SingularityRupture.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Singularity Rupture", 350, Rarity.RARE, mage.cards.s.SingularityRupture.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Singularity Rupture", 398, Rarity.RARE, mage.cards.s.SingularityRupture.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sothera, the Supervoid", 115, Rarity.MYTHIC, mage.cards.s.SotheraTheSupervoid.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sothera, the Supervoid", 360, Rarity.MYTHIC, mage.cards.s.SotheraTheSupervoid.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sothera, the Supervoid", 382, Rarity.MYTHIC, mage.cards.s.SotheraTheSupervoid.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/MillHalfLibraryTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/MillHalfLibraryTargetEffect.java index 155bcf15157..8f9a78084cd 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/MillHalfLibraryTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/MillHalfLibraryTargetEffect.java @@ -7,6 +7,8 @@ import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * @author TheElk801 */ @@ -31,12 +33,15 @@ public class MillHalfLibraryTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); - if (player == null) { - return false; + for (UUID playerId : getTargetPointer().getTargets(game, source)) { + Player player = game.getPlayer(playerId); + if (player == null) { + return false; + } + int count = player.getLibrary().size(); + player.millCards(count / 2 + (roundUp ? count % 2 : 0), source, game); } - int count = player.getLibrary().size(); - return player.millCards(count / 2 + (roundUp ? count % 2 : 0), source, game).size() > 0; + return true; } @Override