From e4620a72958535ae0d92238af14b4591160f5bee Mon Sep 17 00:00:00 2001 From: North Date: Tue, 2 Aug 2011 21:48:57 +0300 Subject: [PATCH] Added cards. --- .../java/mage/client/cards/CardsStorage.java | 2 +- .../sets/mirrodinbesieged/InkmothNexus.java | 3 - .../src/mage/sets/tenth/GhituEncampment.java | 84 +++++++++++++++++++ .../src/mage/sets/tenth/SparkElemental.java | 69 +++++++++++++++ .../sets/worldwake/AnowonTheRuinSage.java | 75 +++++++++++++++++ .../mage/sets/worldwake/ChainReaction.java | 61 ++++++++++++++ .../mage/sets/worldwake/SurrakarBanisher.java | 74 ++++++++++++++++ .../effects/common/SacrificeAllEffect.java | 1 - 8 files changed, 364 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/tenth/GhituEncampment.java create mode 100644 Mage.Sets/src/mage/sets/tenth/SparkElemental.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/AnowonTheRuinSage.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/ChainReaction.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/SurrakarBanisher.java diff --git a/Mage.Client/src/main/java/mage/client/cards/CardsStorage.java b/Mage.Client/src/main/java/mage/client/cards/CardsStorage.java index f3ac77169f1..7a869aa38e4 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardsStorage.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardsStorage.java @@ -160,7 +160,7 @@ public class CardsStorage { public static List getNotImplementedCards() { List cards = new ArrayList(); if (notImplementedCards == null) { - if (allCards.size() == 0) { + if (allCards.isEmpty()) { return cards; } diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java index c68a0cb5576..3c012461072 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/InkmothNexus.java @@ -30,17 +30,14 @@ package mage.sets.mirrodinbesieged; 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.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.InfectAbility; -import mage.abilities.keyword.UnblockableAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; diff --git a/Mage.Sets/src/mage/sets/tenth/GhituEncampment.java b/Mage.Sets/src/mage/sets/tenth/GhituEncampment.java new file mode 100644 index 00000000000..9c918fec075 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/GhituEncampment.java @@ -0,0 +1,84 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; +import mage.game.permanent.token.Token; + +/** + * + * @author North + */ +public class GhituEncampment extends CardImpl { + + public GhituEncampment(UUID ownerId) { + super(ownerId, 353, "Ghitu Encampment", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "10E"; + + this.addAbility(new EntersBattlefieldTappedAbility()); + this.addAbility(new RedManaAbility()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BecomesCreatureSourceEOTEffect(new GhituEncampmentToken(), "land"), + new ManaCostsImpl("{1}{R}"))); + } + + public GhituEncampment(final GhituEncampment card) { + super(card); + } + + @Override + public GhituEncampment copy() { + return new GhituEncampment(this); + } +} + +class GhituEncampmentToken extends Token { + + public GhituEncampmentToken() { + super("Warrior", "a 2/1 red Warrior creature with first strike"); + cardType.add(CardType.CREATURE); + this.subtype.add("Warrior"); + + this.color.setRed(true); + power = new MageInt(2); + toughness = new MageInt(1); + + this.addAbility(FirstStrikeAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/SparkElemental.java b/Mage.Sets/src/mage/sets/tenth/SparkElemental.java new file mode 100644 index 00000000000..5f8e1a0f0ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/SparkElemental.java @@ -0,0 +1,69 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author North + */ +public class SparkElemental extends CardImpl { + + public SparkElemental(UUID ownerId) { + super(ownerId, 237, "Spark Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "10E"; + this.subtype.add("Elemental"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + this.addAbility(TrampleAbility.getInstance()); + this.addAbility(HasteAbility.getInstance()); + this.addAbility(new OnEventTriggeredAbility(EventType.END_TURN_STEP_PRE, "beginning of the end step", new SacrificeSourceEffect())); + } + + public SparkElemental(final SparkElemental card) { + super(card); + } + + @Override + public SparkElemental copy() { + return new SparkElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/AnowonTheRuinSage.java b/Mage.Sets/src/mage/sets/worldwake/AnowonTheRuinSage.java new file mode 100644 index 00000000000..f54a39daf88 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/AnowonTheRuinSage.java @@ -0,0 +1,75 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.SacrificeAllEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author North + */ +public class AnowonTheRuinSage extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Vampire creature"); + + static { + filter.getSubtype().add("Vampire"); + filter.setNotSubtype(true); + } + + public AnowonTheRuinSage(UUID ownerId) { + super(ownerId, 49, "Anowon, the Ruin Sage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "WWK"; + this.supertype.add("Legendary"); + this.subtype.add("Vampire"); + this.subtype.add("Shaman"); + + this.color.setBlack(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeAllEffect(filter), TargetController.YOU, false)); + } + + public AnowonTheRuinSage(final AnowonTheRuinSage card) { + super(card); + } + + @Override + public AnowonTheRuinSage copy() { + return new AnowonTheRuinSage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/ChainReaction.java b/Mage.Sets/src/mage/sets/worldwake/ChainReaction.java new file mode 100644 index 00000000000..9ab4b2a88d6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/ChainReaction.java @@ -0,0 +1,61 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author North + */ +public class ChainReaction extends CardImpl { + + public ChainReaction(UUID ownerId) { + super(ownerId, 74, "Chain Reaction", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); + this.expansionSetCode = "WWK"; + + this.color.setRed(true); + + this.getSpellAbility().addEffect(new DamageAllEffect(new PermanentsOnBattlefieldCount(FilterCreaturePermanent.getDefault()), FilterCreaturePermanent.getDefault())); + } + + public ChainReaction(final ChainReaction card) { + super(card); + } + + @Override + public ChainReaction copy() { + return new ChainReaction(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/SurrakarBanisher.java b/Mage.Sets/src/mage/sets/worldwake/SurrakarBanisher.java new file mode 100644 index 00000000000..0b0e961a906 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/SurrakarBanisher.java @@ -0,0 +1,74 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class SurrakarBanisher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); + + static { + filter.setTapped(true); + } + + public SurrakarBanisher(UUID ownerId) { + super(ownerId, 39, "Surrakar Banisher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Surrakar"); + + this.color.setBlue(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCreaturePermanent(filter)); + } + + public SurrakarBanisher(final SurrakarBanisher card) { + super(card); + } + + @Override + public SurrakarBanisher copy() { + return new SurrakarBanisher(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/SacrificeAllEffect.java b/Mage/src/mage/abilities/effects/common/SacrificeAllEffect.java index 622c7a6c8b6..fd0080ab3ac 100644 --- a/Mage/src/mage/abilities/effects/common/SacrificeAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/SacrificeAllEffect.java @@ -76,7 +76,6 @@ public class SacrificeAllEffect extends OneShotEffect { List perms = new ArrayList(); for (Player player: game.getPlayers().values()) { int numTargets = Math.min(amount, game.getBattlefield().countAll(filter, player.getId())); - filter.setTargetController(TargetController.YOU); TargetControlledPermanent target = new TargetControlledPermanent(numTargets, numTargets, filter, false); if (target.canChoose(source.getControllerId(), game)) { while (!target.isChosen()) {