From 90640b0a058892bb2cd8ab5addfc7d967459f5e4 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Fri, 12 Apr 2013 12:09:11 -0500 Subject: [PATCH] - Fixed Scroll Rack. Added some cards, including one from LevelX2. --- .../src/mage/sets/legions/NoxiousGhoul.java | 52 ++++++++ .../src/mage/sets/onslaught/CruelRevival.java | 113 ++++++++++++++++++ .../src/mage/sets/onslaught/SoullessOne.java | 108 +++++++++++++++++ .../mage/sets/planechase/CruelRevival.java | 52 ++++++++ .../sets/planechase/IncrementalBlight.java | 52 ++++++++ .../mage/sets/planechase/NoxiousGhoul.java | 86 +++++++++++++ .../src/mage/sets/planechase/SoullessOne.java | 52 ++++++++ .../sets/shadowmoor/IncrementalBlight.java | 99 +++++++++++++++ .../src/mage/sets/tempest/ScrollRack.java | 45 +++---- 9 files changed, 639 insertions(+), 20 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/legions/NoxiousGhoul.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/CruelRevival.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/SoullessOne.java create mode 100644 Mage.Sets/src/mage/sets/planechase/CruelRevival.java create mode 100644 Mage.Sets/src/mage/sets/planechase/IncrementalBlight.java create mode 100644 Mage.Sets/src/mage/sets/planechase/NoxiousGhoul.java create mode 100644 Mage.Sets/src/mage/sets/planechase/SoullessOne.java create mode 100644 Mage.Sets/src/mage/sets/shadowmoor/IncrementalBlight.java diff --git a/Mage.Sets/src/mage/sets/legions/NoxiousGhoul.java b/Mage.Sets/src/mage/sets/legions/NoxiousGhoul.java new file mode 100644 index 00000000000..1144912bf09 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/NoxiousGhoul.java @@ -0,0 +1,52 @@ +/* + * 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.legions; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class NoxiousGhoul extends mage.sets.planechase.NoxiousGhoul { + + public NoxiousGhoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "LGN"; + } + + public NoxiousGhoul(final NoxiousGhoul card) { + super(card); + } + + @Override + public NoxiousGhoul copy() { + return new NoxiousGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/CruelRevival.java b/Mage.Sets/src/mage/sets/onslaught/CruelRevival.java new file mode 100644 index 00000000000..76e2224911c --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/CruelRevival.java @@ -0,0 +1,113 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author jeffwadsworth + */ +public class CruelRevival extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Zombie creature"); + private final static FilterCard filter2 = new FilterCard("Zombie card from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(Predicates.not(new SubtypePredicate("Zombie"))); + filter2.add(new SubtypePredicate("Zombie")); + } + + public CruelRevival(UUID ownerId) { + super(ownerId, 135, "Cruel Revival", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{B}"); + this.expansionSetCode = "ONS"; + + this.color.setBlack(true); + + // Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand. + this.getSpellAbility().addEffect(new CruelRevivalEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, filter2)); + } + + public CruelRevival(final CruelRevival card) { + super(card); + } + + @Override + public CruelRevival copy() { + return new CruelRevival(this); + } +} + +class CruelRevivalEffect extends OneShotEffect { + + public CruelRevivalEffect() { + super(Constants.Outcome.DestroyPermanent); + staticText = "Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand"; + } + + public CruelRevivalEffect(final CruelRevivalEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent targetDestroy = game.getPermanent(source.getFirstTarget()); + Card targetRetrieve = game.getCard(source.getTargets().get(1).getFirstTarget()); + if (targetDestroy != null) { + targetDestroy.destroy(source.getId(), game, true); + } + if (targetRetrieve != null) { + targetRetrieve.moveToZone(Constants.Zone.HAND, source.getId(), game, true); + } + return true; + } + + @Override + public CruelRevivalEffect copy() { + return new CruelRevivalEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/onslaught/SoullessOne.java b/Mage.Sets/src/mage/sets/onslaught/SoullessOne.java new file mode 100644 index 00000000000..b3dc3978531 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SoullessOne.java @@ -0,0 +1,108 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class SoullessOne extends CardImpl { + + public SoullessOne(UUID ownerId) { + super(ownerId, 171, "Soulless One", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.subtype.add("Avatar"); + + this.color.setBlack(true); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Soulless One's power and toughness are each equal to the number of Zombies on the battlefield plus the number of Zombie cards in all graveyards. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new SoullessOneDynamicCount(), Constants.Duration.WhileOnBattlefield))); + } + + public SoullessOne(final SoullessOne card) { + super(card); + } + + @Override + public SoullessOne copy() { + return new SoullessOne(this); + } +} + +class SoullessOneDynamicCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility) { + FilterPermanent zombiesBattlefield = new FilterPermanent("Zombies on the battlefield"); + FilterCard zombiesInGraveyard = new FilterCard("Zombie cards in all graveyards"); + zombiesBattlefield.add(new SubtypePredicate("Zombie")); + zombiesInGraveyard.add(new SubtypePredicate("Zombie")); + + int count = game.getBattlefield().count(zombiesBattlefield, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game); + for (Player player : game.getPlayers().values()) { + if (player != null) { + count += player.getGraveyard().count(zombiesInGraveyard, game); + } + } + return count; + } + + @Override + public DynamicValue copy() { + return new SoullessOneDynamicCount(); + } + + @Override + public String getMessage() { + return "Zombies on the battlefield plus the number of Zombie cards in all graveyards"; + } + + @Override + public String toString() { + return "1"; + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/CruelRevival.java b/Mage.Sets/src/mage/sets/planechase/CruelRevival.java new file mode 100644 index 00000000000..463f23a8f6d --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/CruelRevival.java @@ -0,0 +1,52 @@ +/* + * 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.planechase; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class CruelRevival extends mage.sets.onslaught.CruelRevival { + + public CruelRevival(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "HOP"; + } + + public CruelRevival(final CruelRevival card) { + super(card); + } + + @Override + public CruelRevival copy() { + return new CruelRevival(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/IncrementalBlight.java b/Mage.Sets/src/mage/sets/planechase/IncrementalBlight.java new file mode 100644 index 00000000000..a7eaf7bdab6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/IncrementalBlight.java @@ -0,0 +1,52 @@ +/* + * 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.planechase; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class IncrementalBlight extends mage.sets.shadowmoor.IncrementalBlight { + + public IncrementalBlight(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "HOP"; + } + + public IncrementalBlight(final IncrementalBlight card) { + super(card); + } + + @Override + public IncrementalBlight copy() { + return new IncrementalBlight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/NoxiousGhoul.java b/Mage.Sets/src/mage/sets/planechase/NoxiousGhoul.java new file mode 100644 index 00000000000..323c571b42f --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/NoxiousGhoul.java @@ -0,0 +1,86 @@ +/* + * 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.planechase; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.continious.BoostAllEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardIdPredicate; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author jeffwadsworth + */ +public class NoxiousGhoul extends CardImpl { + + final FilterPermanent filter = new FilterPermanent("Noxious Ghoul or another Zombie"); + final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("non-Zombie"); + + public NoxiousGhoul(UUID ownerId) { + super(ownerId, 35, "Noxious Ghoul", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "HOP"; + this.subtype.add("Zombie"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + filter.add(Predicates.or( + new CardIdPredicate(this.getId()), + new SubtypePredicate("Zombie"))); + + filter2.add(new CardTypePredicate(CardType.CREATURE)); + filter2.add(Predicates.not( + new SubtypePredicate("Zombie"))); + + final String rule = "Whenever Noxious Ghoul or another Zombie enters the battlefield, all non-Zombie creatures get -1/-1 until end of turn."; + + // Whenever Noxious Ghoul or another Zombie enters the battlefield, all non-Zombie creatures get -1/-1 until end of turn. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1, -1, Duration.EndOfTurn, filter2, false), filter, false, rule)); + } + + public NoxiousGhoul(final NoxiousGhoul card) { + super(card); + } + + @Override + public NoxiousGhoul copy() { + return new NoxiousGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/SoullessOne.java b/Mage.Sets/src/mage/sets/planechase/SoullessOne.java new file mode 100644 index 00000000000..8c2923734bd --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/SoullessOne.java @@ -0,0 +1,52 @@ +/* + * 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.planechase; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class SoullessOne extends mage.sets.onslaught.SoullessOne { + + public SoullessOne(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "HOP"; + } + + public SoullessOne(final SoullessOne card) { + super(card); + } + + @Override + public SoullessOne copy() { + return new SoullessOne(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/IncrementalBlight.java b/Mage.Sets/src/mage/sets/shadowmoor/IncrementalBlight.java new file mode 100644 index 00000000000..f36c0bdd035 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowmoor/IncrementalBlight.java @@ -0,0 +1,99 @@ + + /* 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.shadowmoor; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class IncrementalBlight extends CardImpl { + + public IncrementalBlight(UUID ownerId) { + super(ownerId, 70, "Incremental Blight", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "SHM"; + + this.color.setBlack(true); + + // Put a -1/-1 counter on target creature, two -1/-1 counters on another target creature, and three -1/-1 counters on a third target creature. + this.getSpellAbility().addEffect(new IncrementalBlightEffect()); + Target target = new TargetCreaturePermanent(3,3); + target.setRequired(true); + this.getSpellAbility().addTarget(target); + } + + public IncrementalBlight(final IncrementalBlight card) { + super(card); + } + + @Override + public IncrementalBlight copy() { + return new IncrementalBlight(this); + } +} +class IncrementalBlightEffect extends OneShotEffect { + + public IncrementalBlightEffect() { + super(Outcome.UnboostCreature); + this.staticText = "Put a -1/-1 counter on target creature, two -1/-1 counters on another target creature, and three -1/-1 counters on a third target creature"; + } + + public IncrementalBlightEffect(final IncrementalBlightEffect effect) { + super(effect); + } + + @Override + public IncrementalBlightEffect copy() { + return new IncrementalBlightEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int i = 0; + for (UUID targetId : getTargetPointer().getTargets(game, source)) { + i++; + Permanent creature = game.getPermanent(targetId); + if (creature != null) { + creature.addCounters(CounterType.M1M1.createInstance(i), game); + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java index 73eb4df1562..cc5022471da 100644 --- a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java +++ b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java @@ -32,7 +32,6 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -40,8 +39,8 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; -import mage.cards.Cards; import mage.filter.FilterCard; +import mage.game.ExileZone; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInExile; @@ -86,7 +85,7 @@ class ScrollRackEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - FilterCard filter = new FilterCard("card in your hand"); + FilterCard filter = new FilterCard("card in your hand to exile"); FilterCard filter2 = new FilterCard("card exiled by Scroll Rack to put on top of library"); Player you = game.getPlayer(source.getControllerId()); TargetCardInHand target = new TargetCardInHand(0, you.getHand().size(), filter); @@ -99,7 +98,7 @@ class ScrollRackEffect extends OneShotEffect { Card card = game.getCard(targetId); if (card != null) { card.setFaceDown(true); - if (card.moveToExile(source.getId(), "Scroll Rack Exile", source.getSourceId(), game)) { + if (card.moveToExile(source.getSourceId(), "Scroll Rack Exile", source.getId(), game)) { amountExiled++; } } @@ -111,27 +110,33 @@ class ScrollRackEffect extends OneShotEffect { for (int i = 0; i < count; i++) { Card card = you.getLibrary().removeFromTop(game); if (card != null) { - card.moveToZone(Zone.HAND, id, game, false); + card.moveToZone(Constants.Zone.HAND, id, game, false); } } } - Cards cards = game.getExile().getExileZone(source.getId()); - TargetCardInExile targetExiled = new TargetCardInExile(filter2, source.getSourceId()); - targetExiled.setRequired(true); - while (cards.size() > 1) { - you.choose(Constants.Outcome.Neutral, cards, targetExiled, game); - Card card = cards.get(targetExiled.getFirstTarget(), game); - if (card != null) { - cards.remove(card); + + TargetCardInExile target2 = new TargetCardInExile(filter2, source.getSourceId()); + ExileZone scrollRackExileZone = game.getExile().getExileZone(source.getSourceId()); + target2.setRequired(true); + if (scrollRackExileZone != null) { + while (scrollRackExileZone.count(filter, game) > 1) { + if (you != null) { + you.lookAtCards("exiled cards with " + game.getCard(source.getSourceId()).getName(), scrollRackExileZone, game); + } + you.choose(Constants.Outcome.Neutral, scrollRackExileZone, target2, game); + Card card = game.getCard(target2.getFirstTarget()); + if (card != null) { + game.getExile().removeCard(card, game); + card.moveToZone(Constants.Zone.LIBRARY, source.getId(), game, true); + } + target2.clearChosen(); + } + if (scrollRackExileZone.count(filter, game) == 1) { + Card card = scrollRackExileZone.get(scrollRackExileZone.iterator().next(), game); card.moveToZone(Constants.Zone.LIBRARY, source.getId(), game, true); } - targetExiled.clearChosen(); + return true; } - if (cards.size() == 1) { - Card card = cards.get(cards.iterator().next(), game); - card.moveToZone(Constants.Zone.LIBRARY, source.getId(), game, true); - } - return true; } return false; } @@ -140,4 +145,4 @@ class ScrollRackEffect extends OneShotEffect { public ScrollRackEffect copy() { return new ScrollRackEffect(this); } -} \ No newline at end of file +}