From f7684daaa3bf9392ed6ec24746eeab34cfa245fd Mon Sep 17 00:00:00 2001 From: fireshoes Date: Wed, 15 Jul 2015 10:47:35 -0500 Subject: [PATCH] Implemented Barbed Lightning, Savage Offensive, Incite War, Journey of Discovery, Roar of the Kha, Solar Tide, Temporal Cascade, Wail of the Nim --- .../mage/sets/darksteel/BarbedLightning.java | 72 +++++++++ .../mage/sets/invasion/SavageOffensive.java | 83 +++++++++++ .../src/mage/sets/mirrodin/InciteWar.java | 119 +++++++++++++++ .../sets/mirrodin/JourneyOfDiscovery.java | 72 +++++++++ .../src/mage/sets/mirrodin/RoarOfTheKha.java | 73 +++++++++ .../src/mage/sets/mirrodin/SolarTide.java | 82 ++++++++++ .../mage/sets/mirrodin/TemporalCascade.java | 140 ++++++++++++++++++ .../src/mage/sets/mirrodin/WailOfTheNim.java | 70 +++++++++ 8 files changed, 711 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/darksteel/BarbedLightning.java create mode 100644 Mage.Sets/src/mage/sets/invasion/SavageOffensive.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/InciteWar.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/JourneyOfDiscovery.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/RoarOfTheKha.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/SolarTide.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/TemporalCascade.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/WailOfTheNim.java diff --git a/Mage.Sets/src/mage/sets/darksteel/BarbedLightning.java b/Mage.Sets/src/mage/sets/darksteel/BarbedLightning.java new file mode 100644 index 00000000000..0bd4af01e2b --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/BarbedLightning.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.darksteel; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.EntwineAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class BarbedLightning extends CardImpl { + + public BarbedLightning(UUID ownerId) { + super(ownerId, 55, "Barbed Lightning", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "DST"; + + // Choose one - Barbed Lightning deals 3 damage to target creature; + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // or Barbed Lightning deals 3 damage to target player. + Mode mode = new Mode(); + mode.getEffects().add(new DamageTargetEffect(3)); + mode.getTargets().add(new TargetPlayer()); + this.getSpellAbility().getModes().addMode(mode); + + // Entwine {2} + this.addAbility(new EntwineAbility("{2}")); + } + + public BarbedLightning(final BarbedLightning card) { + super(card); + } + + @Override + public BarbedLightning copy() { + return new BarbedLightning(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/SavageOffensive.java b/Mage.Sets/src/mage/sets/invasion/SavageOffensive.java new file mode 100644 index 00000000000..405ed30e595 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/SavageOffensive.java @@ -0,0 +1,83 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.invasion; + +import java.util.UUID; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.AddContinuousEffectToGame; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class SavageOffensive extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public SavageOffensive(UUID ownerId) { + super(ownerId, 162, "Savage Offensive", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "INV"; + + // Kicker {G} + this.addAbility(new KickerAbility("{G}")); + + // Creatures you control gain first strike until end of turn. + this.getSpellAbility().addEffect(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter)); + + // If Savage Offensive was kicked, they get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new AddContinuousEffectToGame(new BoostControlledEffect(1, 1, Duration.EndOfTurn)), + KickedCondition.getInstance(), + "If {this} was kicked, they get +1/+1 until end of turn.")); + } + + public SavageOffensive(final SavageOffensive card) { + super(card); + } + + @Override + public SavageOffensive copy() { + return new SavageOffensive(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/InciteWar.java b/Mage.Sets/src/mage/sets/mirrodin/InciteWar.java new file mode 100644 index 00000000000..aecd8e02906 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/InciteWar.java @@ -0,0 +1,119 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RequirementEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.EntwineAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class InciteWar extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public InciteWar(UUID ownerId) { + super(ownerId, 96, "Incite War", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "MRD"; + + // Choose one - Creatures target player controls attack this turn if able; + this.getSpellAbility().addEffect(new InciteWarMustAttackEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // or creatures you control gain first strike until end of turn. + Mode mode = new Mode(); + mode.getEffects().add(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter)); + this.getSpellAbility().getModes().addMode(mode); + + // Entwine {2} + this.addAbility(new EntwineAbility("{2}")); + } + + public InciteWar(final InciteWar card) { + super(card); + } + + @Override + public InciteWar copy() { + return new InciteWar(this); + } +} + +class InciteWarMustAttackEffect extends OneShotEffect { + + public InciteWarMustAttackEffect() { + super(Outcome.Detriment); + staticText = "Creatures target player control attack this turn if able"; + } + + public InciteWarMustAttackEffect(final InciteWarMustAttackEffect effect) { + super(effect); + } + + @Override + public InciteWarMustAttackEffect copy() { + return new InciteWarMustAttackEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (player != null) { + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerIdPredicate(player.getId())); + RequirementEffect effect = new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn); + game.addEffect(effect, source); + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/mirrodin/JourneyOfDiscovery.java b/Mage.Sets/src/mage/sets/mirrodin/JourneyOfDiscovery.java new file mode 100644 index 00000000000..9c0820954d9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/JourneyOfDiscovery.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.EntwineAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterBasicLandCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class JourneyOfDiscovery extends CardImpl { + + public JourneyOfDiscovery(UUID ownerId) { + super(ownerId, 123, "Journey of Discovery", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "MRD"; + + // Choose one - Search your library for up to two basic land cards, reveal them, put them into your hand, then shuffle your library; + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()))); + + // or you may play up to two additional lands this turn. + Mode mode = new Mode(); + mode.getEffects().add(new PlayAdditionalLandsControllerEffect(2, Duration.EndOfTurn)); + this.getSpellAbility().getModes().addMode(mode); + + // Entwine {2}{G} + this.addAbility(new EntwineAbility("{2}{G}")); + } + + public JourneyOfDiscovery(final JourneyOfDiscovery card) { + super(card); + } + + @Override + public JourneyOfDiscovery copy() { + return new JourneyOfDiscovery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/RoarOfTheKha.java b/Mage.Sets/src/mage/sets/mirrodin/RoarOfTheKha.java new file mode 100644 index 00000000000..d4a2813bbf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/RoarOfTheKha.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.EntwineAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class RoarOfTheKha extends CardImpl { + + private static final String rule = "untap all creatures you control"; + + public RoarOfTheKha(UUID ownerId) { + super(ownerId, 18, "Roar of the Kha", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "MRD"; + + // Choose one - Creatures you control get +1/+1 until end of turn; + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); + + // or untap all creatures you control. + Mode mode = new Mode(); + mode.getEffects().add(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), rule)); + this.getSpellAbility().getModes().addMode(mode); + + // Entwine {1}{W} + this.addAbility(new EntwineAbility("{1}{W}")); + } + + public RoarOfTheKha(final RoarOfTheKha card) { + super(card); + } + + @Override + public RoarOfTheKha copy() { + return new RoarOfTheKha(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/SolarTide.java b/Mage.Sets/src/mage/sets/mirrodin/SolarTide.java new file mode 100644 index 00000000000..6164aff6d2c --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/SolarTide.java @@ -0,0 +1,82 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.keyword.EntwineAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author fireshoes + */ +public class SolarTide extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("creatures with power 2 or less"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures with power 3 or greater"); + + static { + filter1.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter2.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + } + + public SolarTide(UUID ownerId) { + super(ownerId, 24, "Solar Tide", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{W}{W}"); + this.expansionSetCode = "MRD"; + + // Choose one - Destroy all creatures with power 2 or less; + this.getSpellAbility().addEffect(new DestroyAllEffect(filter1)); + + // or destroy all creatures with power 3 or greater. + Mode mode = new Mode(); + mode.getEffects().add(new DestroyAllEffect(filter2)); + this.getSpellAbility().getModes().addMode(mode); + + // Entwine-Sacrifice two lands. + this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true)))); + } + + public SolarTide(final SolarTide card) { + super(card); + } + + @Override + public SolarTide copy() { + return new SolarTide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/TemporalCascade.java b/Mage.Sets/src/mage/sets/mirrodin/TemporalCascade.java new file mode 100644 index 00000000000..8665d7274d6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/TemporalCascade.java @@ -0,0 +1,140 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.EntwineAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class TemporalCascade extends CardImpl { + + public TemporalCascade(UUID ownerId) { + super(ownerId, 52, "Temporal Cascade", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{U}{U}"); + this.expansionSetCode = "MRD"; + + // Choose one - Each player shuffles his or her hand and graveyard into his or her library; + this.getSpellAbility().addEffect(new TemporalCascadeShuffleEffect()); + + // or each player draws seven cards. + Mode mode = new Mode(); + mode.getEffects().add(new TemporalCascadeDrawEffect()); + this.getSpellAbility().getModes().addMode(mode); + + // Entwine {2} + this.addAbility(new EntwineAbility("{2}")); + } + + public TemporalCascade(final TemporalCascade card) { + super(card); + } + + @Override + public TemporalCascade copy() { + return new TemporalCascade(this); + } +} + +class TemporalCascadeShuffleEffect extends OneShotEffect { + + public TemporalCascadeShuffleEffect() { + super(Outcome.Neutral); + staticText = "Each player shuffles his or her hand and graveyard into his or her library"; + } + + public TemporalCascadeShuffleEffect(final TemporalCascadeShuffleEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player sourcePlayer = game.getPlayer(source.getControllerId()); + for (UUID playerId: sourcePlayer.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null) { + for (Card card: player.getHand().getCards(game)) { + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + } + for (Card card: player.getGraveyard().getCards(game)) { + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + } + player.shuffleLibrary(game); + + } + } + return true; + } + + @Override + public TemporalCascadeShuffleEffect copy() { + return new TemporalCascadeShuffleEffect(this); + } +} + +class TemporalCascadeDrawEffect extends OneShotEffect { + + public TemporalCascadeDrawEffect() { + super(Outcome.Neutral); + staticText = "Each player draws seven cards"; + } + + public TemporalCascadeDrawEffect(final TemporalCascadeDrawEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player sourcePlayer = game.getPlayer(source.getControllerId()); + game.getState().handleSimultaneousEvent(game); // needed here so state based triggered effects + for (UUID playerId: sourcePlayer.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.drawCards(7, game); + } + } + return true; + } + + @Override + public TemporalCascadeDrawEffect copy() { + return new TemporalCascadeDrawEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/mirrodin/WailOfTheNim.java b/Mage.Sets/src/mage/sets/mirrodin/WailOfTheNim.java new file mode 100644 index 00000000000..cbe3b765bd8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/WailOfTheNim.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.abilities.effects.common.RegenerateAllEffect; +import mage.abilities.keyword.EntwineAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class WailOfTheNim extends CardImpl { + + public WailOfTheNim(UUID ownerId) { + super(ownerId, 81, "Wail of the Nim", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "MRD"; + + // Choose one - Regenerate each creature you control; + this.getSpellAbility().addEffect(new RegenerateAllEffect(new FilterControlledCreaturePermanent())); + + // or Wail of the Nim deals 1 damage to each creature and each player. + Mode mode = new Mode(); + mode.getEffects().add(new DamageEverythingEffect(1)); + this.getSpellAbility().getModes().addMode(mode); + + // Entwine {B} + this.addAbility(new EntwineAbility("{B}")); + } + + public WailOfTheNim(final WailOfTheNim card) { + super(card); + } + + @Override + public WailOfTheNim copy() { + return new WailOfTheNim(this); + } +}