From 0f54149b000e3470296d5ac86f77ab82a1ad4099 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 16 Sep 2015 16:57:45 +0300 Subject: [PATCH 01/16] Another fix to PutIntoGraveFromBattlefieldAllTriggeredAbility --- .../common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java b/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java index ffd61df5371..835cfeb2c2d 100644 --- a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java @@ -75,7 +75,7 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { if (filter.match(zEvent.getTarget(), this.getSourceId(), this.getControllerId(), game)) { - if(onlyToControllerGraveyard && !this.getControllerId().equals(zEvent.getPlayerId())) { + if(onlyToControllerGraveyard && !this.getControllerId().equals(game.getOwnerId(zEvent.getTargetId()))) { return false; } if (setTargetPointer) { From 12c842397e05c31fad81bd09c3a9d6d167e5b472 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 16 Sep 2015 18:41:48 +0300 Subject: [PATCH 02/16] Implement cards: Brush with Death, Crossbow Ambush, Furnace Spirit, and Leap --- .../mage/sets/stronghold/BrushWithDeath.java | 65 +++++++++++++++++ .../mage/sets/stronghold/CrossbowAmbush.java | 61 ++++++++++++++++ .../mage/sets/stronghold/FurnaceSpirit.java | 69 +++++++++++++++++++ Mage.Sets/src/mage/sets/stronghold/Leap.java | 65 +++++++++++++++++ 4 files changed, 260 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/stronghold/BrushWithDeath.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/CrossbowAmbush.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/FurnaceSpirit.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/Leap.java diff --git a/Mage.Sets/src/mage/sets/stronghold/BrushWithDeath.java b/Mage.Sets/src/mage/sets/stronghold/BrushWithDeath.java new file mode 100644 index 00000000000..9e7e567a4f6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/BrushWithDeath.java @@ -0,0 +1,65 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class BrushWithDeath extends CardImpl { + + public BrushWithDeath(UUID ownerId) { + super(ownerId, 2, "Brush with Death", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "STH"; + + // Buyback {2}{B}{B} + this.addAbility(new BuybackAbility("{2}{B}{B}")); + // Target opponent loses 2 life. You gain 2 life. + this.getSpellAbility().addEffect(new LoseLifeTargetEffect(2)); + this.getSpellAbility().addEffect(new GainLifeEffect(2)); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public BrushWithDeath(final BrushWithDeath card) { + super(card); + } + + @Override + public BrushWithDeath copy() { + return new BrushWithDeath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/CrossbowAmbush.java b/Mage.Sets/src/mage/sets/stronghold/CrossbowAmbush.java new file mode 100644 index 00000000000..e6b7a06173d --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/CrossbowAmbush.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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class CrossbowAmbush extends CardImpl { + + public CrossbowAmbush(UUID ownerId) { + super(ownerId, 55, "Crossbow Ambush", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "STH"; + + // Creatures you control gain reach until end of turn. + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures"))); + } + + public CrossbowAmbush(final CrossbowAmbush card) { + super(card); + } + + @Override + public CrossbowAmbush copy() { + return new CrossbowAmbush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/FurnaceSpirit.java b/Mage.Sets/src/mage/sets/stronghold/FurnaceSpirit.java new file mode 100644 index 00000000000..1463d52a822 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/FurnaceSpirit.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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class FurnaceSpirit extends CardImpl { + + public FurnaceSpirit(UUID ownerId) { + super(ownerId, 87, "Furnace Spirit", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spirit"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + // {R}: Furnace Spirit gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public FurnaceSpirit(final FurnaceSpirit card) { + super(card); + } + + @Override + public FurnaceSpirit copy() { + return new FurnaceSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Leap.java b/Mage.Sets/src/mage/sets/stronghold/Leap.java new file mode 100644 index 00000000000..2ad2988484e --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Leap.java @@ -0,0 +1,65 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Leap extends CardImpl { + + public Leap(UUID ownerId) { + super(ownerId, 35, "Leap", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "STH"; + + // Target creature gains flying until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Leap(final Leap card) { + super(card); + } + + @Override + public Leap copy() { + return new Leap(this); + } +} From a3c9c17bb364a1dc2bfbb9091d869955bfd326c0 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 16 Sep 2015 20:35:01 +0300 Subject: [PATCH 03/16] Implement cards: Amok, Contemplation, Hesitation, and Rabid Rats --- Mage.Sets/src/mage/sets/stronghold/Amok.java | 68 ++++++++++++++++++ .../mage/sets/stronghold/Contemplation.java | 59 +++++++++++++++ .../src/mage/sets/stronghold/Hesitation.java | 68 ++++++++++++++++++ .../src/mage/sets/stronghold/RabidRats.java | 71 +++++++++++++++++++ 4 files changed, 266 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/stronghold/Amok.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/Contemplation.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/Hesitation.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/RabidRats.java diff --git a/Mage.Sets/src/mage/sets/stronghold/Amok.java b/Mage.Sets/src/mage/sets/stronghold/Amok.java new file mode 100644 index 00000000000..730748afe88 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Amok.java @@ -0,0 +1,68 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Amok extends CardImpl { + + public Amok(UUID ownerId) { + super(ownerId, 76, "Amok", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "STH"; + + // {1}, Discard a card at random: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}")); + ability.addCost(new DiscardCardCost(true)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Amok(final Amok card) { + super(card); + } + + @Override + public Amok copy() { + return new Amok(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Contemplation.java b/Mage.Sets/src/mage/sets/stronghold/Contemplation.java new file mode 100644 index 00000000000..62520909369 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Contemplation.java @@ -0,0 +1,59 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Contemplation extends CardImpl { + + public Contemplation(UUID ownerId) { + super(ownerId, 104, "Contemplation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.expansionSetCode = "STH"; + + // Whenever you cast a spell, you gain 1 life. + this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), false)); + } + + public Contemplation(final Contemplation card) { + super(card); + } + + @Override + public Contemplation copy() { + return new Contemplation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Hesitation.java b/Mage.Sets/src/mage/sets/stronghold/Hesitation.java new file mode 100644 index 00000000000..da704679fb5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Hesitation.java @@ -0,0 +1,68 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.filter.FilterSpell; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; + +/** + * + * @author LoneFox + */ +public class Hesitation extends CardImpl { + + public Hesitation(UUID ownerId) { + super(ownerId, 33, "Hesitation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "STH"; + + // When a player casts a spell, sacrifice Hesitation and counter that spell. + Ability ability = new SpellCastAllTriggeredAbility(new SacrificeSourceEffect(), new FilterSpell("a spell"), false, SetTargetPointer.SPELL); + Effect effect = new CounterTargetEffect(); + effect.setText("and counter that spell"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public Hesitation(final Hesitation card) { + super(card); + } + + @Override + public Hesitation copy() { + return new Hesitation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/RabidRats.java b/Mage.Sets/src/mage/sets/stronghold/RabidRats.java new file mode 100644 index 00000000000..628d6224f67 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/RabidRats.java @@ -0,0 +1,71 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBlockingCreature; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RabidRats extends CardImpl { + + public RabidRats(UUID ownerId) { + super(ownerId, 17, "Rabid Rats", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "STH"; + this.subtype.add("Rat"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Target blocking creature gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(new FilterBlockingCreature())); + this.addAbility(ability); + } + + public RabidRats(final RabidRats card) { + super(card); + } + + @Override + public RabidRats copy() { + return new RabidRats(this); + } +} From 7de070dbc98f8f102bf21f24c78f3cf0aa77476d Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 17 Sep 2015 08:54:29 +0300 Subject: [PATCH 04/16] Implement cards: Skyshroud Archer, Spike Soldier, Spike Worker, and Torment --- .../mage/sets/stronghold/SkyshroudArcher.java | 80 ++++++++++++++++++ .../mage/sets/stronghold/SpikeSoldier.java | 82 +++++++++++++++++++ .../src/mage/sets/stronghold/SpikeWorker.java | 76 +++++++++++++++++ .../src/mage/sets/stronghold/Torment.java | 74 +++++++++++++++++ 4 files changed, 312 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/stronghold/SkyshroudArcher.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/SpikeSoldier.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/SpikeWorker.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/Torment.java diff --git a/Mage.Sets/src/mage/sets/stronghold/SkyshroudArcher.java b/Mage.Sets/src/mage/sets/stronghold/SkyshroudArcher.java new file mode 100644 index 00000000000..10d3bd2ee1e --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SkyshroudArcher.java @@ -0,0 +1,80 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SkyshroudArcher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public SkyshroudArcher(UUID ownerId) { + super(ownerId, 64, "Skyshroud Archer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "STH"; + this.subtype.add("Elf"); + this.subtype.add("Archer"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Target creature with flying gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SkyshroudArcher(final SkyshroudArcher card) { + super(card); + } + + @Override + public SkyshroudArcher copy() { + return new SkyshroudArcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SpikeSoldier.java b/Mage.Sets/src/mage/sets/stronghold/SpikeSoldier.java new file mode 100644 index 00000000000..503276d58e9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SpikeSoldier.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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpikeSoldier extends CardImpl { + + public SpikeSoldier(UUID ownerId) { + super(ownerId, 69, "Spike Soldier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spike"); + this.subtype.add("Soldier"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Spike Soldier enters the battlefield with three +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + // {2}, Remove a +1/+1 counter from Spike Soldier: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{2}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + // Remove a +1/+1 counter from Spike Soldier: Spike Soldier gets +2/+2 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), + new RemoveCountersSourceCost(CounterType.P1P1.createInstance()))); + } + + public SpikeSoldier(final SpikeSoldier card) { + super(card); + } + + @Override + public SpikeSoldier copy() { + return new SpikeSoldier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SpikeWorker.java b/Mage.Sets/src/mage/sets/stronghold/SpikeWorker.java new file mode 100644 index 00000000000..ae078c7b71a --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SpikeWorker.java @@ -0,0 +1,76 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpikeWorker extends CardImpl { + + public SpikeWorker(UUID ownerId) { + super(ownerId, 70, "Spike Worker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spike"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Spike Worker enters the battlefield with two +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); + // {2}, Remove a +1/+1 counter from Spike Worker: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{2}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SpikeWorker(final SpikeWorker card) { + super(card); + } + + @Override + public SpikeWorker copy() { + return new SpikeWorker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Torment.java b/Mage.Sets/src/mage/sets/stronghold/Torment.java new file mode 100644 index 00000000000..42f2de23cf2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Torment.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.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Torment extends CardImpl { + + public Torment(UUID ownerId) { + super(ownerId, 23, "Torment", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "STH"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature gets -3/-0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-3, 0, Duration.WhileOnBattlefield))); + } + + public Torment(final Torment card) { + super(card); + } + + @Override + public Torment copy() { + return new Torment(this); + } +} From c56f551c181fe1886ed3e29d503949043352e7e2 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Thu, 17 Sep 2015 01:25:39 -0500 Subject: [PATCH 05/16] [BFZ] Implemented Retreat to Coralhelm, Retreat to Valakut, Retreat to Hagra, Benthic Infiltrator, Scatter to the Winds, Scour from Existence, Beastcaller Expert, Mind Raker, Murk Strider, Part the Waterveil, Culling Drone, COmplete Disregard, Blighted Cataract --- .../battleforzendikar/BeastcallerExpert.java | 107 +++++++++++++ .../battleforzendikar/BenthicInfiltrator.java | 71 +++++++++ .../battleforzendikar/BlightedCataract.java | 71 +++++++++ .../battleforzendikar/CompleteDisregard.java | 73 +++++++++ .../sets/battleforzendikar/CullingDrone.java | 67 +++++++++ .../sets/battleforzendikar/MindRaker.java | 121 +++++++++++++++ .../sets/battleforzendikar/MurkStrider.java | 124 +++++++++++++++ .../battleforzendikar/PartTheWaterveil.java | 64 ++++++++ .../battleforzendikar/RetreatToCoralhelm.java | 67 +++++++++ .../battleforzendikar/RetreatToHagra.java | 75 +++++++++ .../battleforzendikar/RetreatToValakut.java | 71 +++++++++ .../battleforzendikar/ScatterToTheWinds.java | 64 ++++++++ .../battleforzendikar/ScourFromExistence.java | 60 ++++++++ .../mage/abilities/keyword/IngestAbility.java | 142 +++++++++--------- Utils/mtg-cards-data.txt | 2 +- 15 files changed, 1107 insertions(+), 72 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerExpert.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BenthicInfiltrator.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BlightedCataract.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/CompleteDisregard.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/CullingDrone.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/MindRaker.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/MurkStrider.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/PartTheWaterveil.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/RetreatToCoralhelm.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/RetreatToHagra.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/RetreatToValakut.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/ScatterToTheWinds.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/ScourFromExistence.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerExpert.java b/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerExpert.java new file mode 100644 index 00000000000..4db4e9cfb78 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerExpert.java @@ -0,0 +1,107 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.ConditionalMana; +import mage.MageInt; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.mana.ConditionalAnyColorManaAbility; +import mage.abilities.mana.builder.ConditionalManaBuilder; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.stack.Spell; + +/** + * + * @author fireshoes + */ +public class BeastcallerExpert extends CardImpl { + + public BeastcallerExpert(UUID ownerId) { + super(ownerId, 170, "Beastcaller Expert", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elf"); + this.subtype.add("Shaman"); + this.subtype.add("Ally"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast creature spells. + this.addAbility(new ConditionalAnyColorManaAbility(1, new BeastcallerExpertManaBuilder())); + } + + public BeastcallerExpert(final BeastcallerExpert card) { + super(card); + } + + @Override + public BeastcallerExpert copy() { + return new BeastcallerExpert(this); + } +} + +class BeastcallerExpertManaBuilder extends ConditionalManaBuilder { + + @Override + public ConditionalMana build(Object... options) { + return new BeastcallerExpertConditionalMana(this.mana); + } + + @Override + public String getRule() { + return "Spend this mana only to cast creature spells"; + } +} + +class BeastcallerExpertConditionalMana extends ConditionalMana { + + public BeastcallerExpertConditionalMana(Mana mana) { + super(mana); + this.staticText = "Spend this mana only to cast creature spells"; + addCondition(new BeastcallerExpertManaCondition()); + } +} + +class BeastcallerExpertManaCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + MageObject object = source.getSourceObject(game); + return object != null && (object instanceof Spell) && object.getCardType().contains(CardType.CREATURE); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BenthicInfiltrator.java b/Mage.Sets/src/mage/sets/battleforzendikar/BenthicInfiltrator.java new file mode 100644 index 00000000000..dd07f088f12 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BenthicInfiltrator.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BenthicInfiltrator extends CardImpl { + + public BenthicInfiltrator(UUID ownerId) { + super(ownerId, 55, "Benthic Infiltrator", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Ingest + this.addAbility(new IngestAbility()); + + // Benthic Infiltrator can't be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + } + + public BenthicInfiltrator(final BenthicInfiltrator card) { + super(card); + } + + @Override + public BenthicInfiltrator copy() { + return new BenthicInfiltrator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedCataract.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedCataract.java new file mode 100644 index 00000000000..a94c79afa25 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedCataract.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class BlightedCataract extends CardImpl { + + public BlightedCataract(UUID ownerId) { + super(ownerId, 229, "Blighted Cataract", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {5}{U}, {T}, Sacrifice Blighted Cataract: Draw two cards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(2), new ManaCostsImpl("{5}{U}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public BlightedCataract(final BlightedCataract card) { + super(card); + } + + @Override + public BlightedCataract copy() { + return new BlightedCataract(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CompleteDisregard.java b/Mage.Sets/src/mage/sets/battleforzendikar/CompleteDisregard.java new file mode 100644 index 00000000000..28a73d38ebe --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CompleteDisregard.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class CompleteDisregard extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + } + + public CompleteDisregard(UUID ownerId) { + super(ownerId, 90, "Complete Disregard", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Exile target creature with power 3 or less. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public CompleteDisregard(final CompleteDisregard card) { + super(card); + } + + @Override + public CompleteDisregard copy() { + return new CompleteDisregard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CullingDrone.java b/Mage.Sets/src/mage/sets/battleforzendikar/CullingDrone.java new file mode 100644 index 00000000000..a3aa372f585 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CullingDrone.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CullingDrone extends CardImpl { + + public CullingDrone(UUID ownerId) { + super(ownerId, 91, "Culling Drone", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Ingest + this.addAbility(new IngestAbility()); + } + + public CullingDrone(final CullingDrone card) { + super(card); + } + + @Override + public CullingDrone copy() { + return new CullingDrone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MindRaker.java b/Mage.Sets/src/mage/sets/battleforzendikar/MindRaker.java new file mode 100644 index 00000000000..a452f219ffc --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MindRaker.java @@ -0,0 +1,121 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInExile; + +/** + * + * @author fireshoes + */ +public class MindRaker extends CardImpl { + + public MindRaker(UUID ownerId) { + super(ownerId, 95, "Mind Raker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Mind Raker enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, each opponent discards a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new MindRakerEffect(), true)); + } + + public MindRaker(final MindRaker card) { + super(card); + } + + @Override + public MindRaker copy() { + return new MindRaker(this); + } +} + +class MindRakerEffect extends OneShotEffect { + + private final static FilterCard filter = new FilterCard("card an opponent owns from exile"); + + static { + filter.add(new OwnerPredicate(TargetController.OPPONENT)); + } + + public MindRakerEffect() { + super(Outcome.Discard); + this.staticText = "you may put a card an opponent owns from exile into that player's graveyard. If you do, each opponent discards a card."; + } + + public MindRakerEffect(final MindRakerEffect effect) { + super(effect); + } + + @Override + public MindRakerEffect copy() { + return new MindRakerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Target target = new TargetCardInExile(1, 1, filter, null); + if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { + if (controller.chooseTarget(outcome, target, source, game)) { + Cards cardsToGraveyard = new CardsImpl(target.getTargets()); + controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game); + return new DiscardEachPlayerEffect(TargetController.OPPONENT).apply(game, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MurkStrider.java b/Mage.Sets/src/mage/sets/battleforzendikar/MurkStrider.java new file mode 100644 index 00000000000..fc7edd52c3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MurkStrider.java @@ -0,0 +1,124 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInExile; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class MurkStrider extends CardImpl { + + public MurkStrider(UUID ownerId) { + super(ownerId, 62, "Murk Strider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Murk Strider enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, return target creature to its owner's hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new MurkStriderEffect(), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public MurkStrider(final MurkStrider card) { + super(card); + } + + @Override + public MurkStrider copy() { + return new MurkStrider(this); + } +} + +class MurkStriderEffect extends OneShotEffect { + + private final static FilterCard filter = new FilterCard("card an opponent owns from exile"); + + static { + filter.add(new OwnerPredicate(TargetController.OPPONENT)); + } + + public MurkStriderEffect() { + super(Outcome.Discard); + this.staticText = "you may put a card an opponent owns from exile into that player's graveyard. If you do, return target creature to its owner's hand."; + } + + public MurkStriderEffect(final MurkStriderEffect effect) { + super(effect); + } + + @Override + public MurkStriderEffect copy() { + return new MurkStriderEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Target target = new TargetCardInExile(1, 1, filter, null); + if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { + if (controller.chooseTarget(outcome, target, source, game)) { + Cards cardsToGraveyard = new CardsImpl(target.getTargets()); + controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game); + return new ReturnToHandTargetEffect().apply(game, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PartTheWaterveil.java b/Mage.Sets/src/mage/sets/battleforzendikar/PartTheWaterveil.java new file mode 100644 index 00000000000..b2f050b44e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PartTheWaterveil.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.ExileSpellEffect; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PartTheWaterveil extends CardImpl { + + public PartTheWaterveil(UUID ownerId) { + super(ownerId, 80, "Part the Waterveil", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); + this.expansionSetCode = "BFZ"; + + // Take an extra turn after this one. Exile Part the Waterveil. + this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect()); + this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); + + // Awaken 6-{6}{U}{U}{U} + this.addAbility(new AwakenAbility(this, 6, "{6}{U}{U}{U}")); + } + + public PartTheWaterveil(final PartTheWaterveil card) { + super(card); + } + + @Override + public PartTheWaterveil copy() { + return new PartTheWaterveil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToCoralhelm.java b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToCoralhelm.java new file mode 100644 index 00000000000..d331ef31a7a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToCoralhelm.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.MayTapOrUntapTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class RetreatToCoralhelm extends CardImpl { + + public RetreatToCoralhelm(UUID ownerId) { + super(ownerId, 82, "Retreat to Coralhelm", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + + // Landfall- Whenever a land enters the battlefield under your control, choose one - You may tap or untap target creature; or Scry 1. + LandfallAbility ability = new LandfallAbility(new MayTapOrUntapTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent()); + Mode mode = new Mode(); + mode.getEffects().add(new ScryEffect(1)); + ability.addMode(mode); + this.addAbility(ability); + } + + public RetreatToCoralhelm(final RetreatToCoralhelm card) { + super(card); + } + + @Override + public RetreatToCoralhelm copy() { + return new RetreatToCoralhelm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToHagra.java b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToHagra.java new file mode 100644 index 00000000000..03e0c89e393 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToHagra.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class RetreatToHagra extends CardImpl { + + public RetreatToHagra(UUID ownerId) { + super(ownerId, 121, "Retreat to Hagra", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + + // Landfall- Whenever a land enters the battlefield under your control, choose one - Target creature gets +1/+0 and gains deathtouch until end of turn; + LandfallAbility ability = new LandfallAbility(new BoostTargetEffect(1, 0, Duration.EndOfTurn), false); + ability.addEffect(new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent()); + + // or Each opponent loses 1 life and you gain 1 life. + Mode mode = new Mode(); + mode.getEffects().add(new LoseLifeOpponentsEffect(1)); + mode.getEffects().add(new GainLifeEffect(1)); + ability.addMode(mode); + this.addAbility(ability); + } + + public RetreatToHagra(final RetreatToHagra card) { + super(card); + } + + @Override + public RetreatToHagra copy() { + return new RetreatToHagra(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToValakut.java b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToValakut.java new file mode 100644 index 00000000000..d078c696bc8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToValakut.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class RetreatToValakut extends CardImpl { + + public RetreatToValakut(UUID ownerId) { + super(ownerId, 153, "Retreat to Valakut", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + + // Landfall- Whenever a land enters the battlefield under your control, choose one - Target creature gets +2/+0 until end of turn; + LandfallAbility ability = new LandfallAbility(new BoostTargetEffect(2, 0, Duration.EndOfTurn), false); + ability.addTarget(new TargetCreaturePermanent()); + + // or Target creature can't block this turn. + Mode mode = new Mode(); + mode.getEffects().add(new CantBlockTargetEffect(Duration.EndOfTurn)); + mode.getTargets().add(new TargetCreaturePermanent()); + ability.addMode(mode); + this.addAbility(ability); + } + + public RetreatToValakut(final RetreatToValakut card) { + super(card); + } + + @Override + public RetreatToValakut copy() { + return new RetreatToValakut(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ScatterToTheWinds.java b/Mage.Sets/src/mage/sets/battleforzendikar/ScatterToTheWinds.java new file mode 100644 index 00000000000..d040bebf35e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ScatterToTheWinds.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class ScatterToTheWinds extends CardImpl { + + public ScatterToTheWinds(UUID ownerId) { + super(ownerId, 85, "Scatter to the Winds", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + this.expansionSetCode = "BFZ"; + + // Counter target spell. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + + // Awaken 3-{4}{U}{U} + this.addAbility(new AwakenAbility(this, 3, "{4}{U}{U}")); + } + + public ScatterToTheWinds(final ScatterToTheWinds card) { + super(card); + } + + @Override + public ScatterToTheWinds copy() { + return new ScatterToTheWinds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ScourFromExistence.java b/Mage.Sets/src/mage/sets/battleforzendikar/ScourFromExistence.java new file mode 100644 index 00000000000..4b0f6795c60 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ScourFromExistence.java @@ -0,0 +1,60 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class ScourFromExistence extends CardImpl { + + public ScourFromExistence(UUID ownerId) { + super(ownerId, 13, "Scour from Existence", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{7}"); + this.expansionSetCode = "BFZ"; + + // Exile target permanent. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent()); + } + + public ScourFromExistence(final ScourFromExistence card) { + super(card); + } + + @Override + public ScourFromExistence copy() { + return new ScourFromExistence(this); + } +} diff --git a/Mage/src/mage/abilities/keyword/IngestAbility.java b/Mage/src/mage/abilities/keyword/IngestAbility.java index 40f68dc4b8f..8bc5c9857e5 100644 --- a/Mage/src/mage/abilities/keyword/IngestAbility.java +++ b/Mage/src/mage/abilities/keyword/IngestAbility.java @@ -1,71 +1,71 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package mage.abilities.keyword; - -import mage.abilities.Ability; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class IngestAbility extends DealsCombatDamageToAPlayerTriggeredAbility { - - public IngestAbility() { - super(new IngestEffect(), false, true); - - } - - public IngestAbility(IngestAbility ability) { - super(ability); - } - - @Override - public String getRule() { - return "Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)"; - } - - @Override - public IngestAbility copy() { - return new IngestAbility(this); - } -} - -class IngestEffect extends OneShotEffect { - - public IngestEffect() { - super(Outcome.Exile); - this.staticText = "that player exiles the top card of his or her library"; - } - - public IngestEffect(final IngestEffect effect) { - super(effect); - } - - @Override - public IngestEffect copy() { - return new IngestEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); - if (targetPlayer != null) { - Card card = targetPlayer.getLibrary().getFromTop(game); - if (card != null) { - targetPlayer.moveCards(card, Zone.LIBRARY, Zone.EXILED, source, game); - } - return true; - } - return false; - } -} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.keyword; + +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class IngestAbility extends DealsCombatDamageToAPlayerTriggeredAbility { + + public IngestAbility() { + super(new IngestEffect(), false, true); + + } + + public IngestAbility(IngestAbility ability) { + super(ability); + } + + @Override + public String getRule() { + return "Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)"; + } + + @Override + public IngestAbility copy() { + return new IngestAbility(this); + } +} + +class IngestEffect extends OneShotEffect { + + public IngestEffect() { + super(Outcome.Exile); + this.staticText = "that player exiles the top card of his or her library"; + } + + public IngestEffect(final IngestEffect effect) { + super(effect); + } + + @Override + public IngestEffect copy() { + return new IngestEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (targetPlayer != null) { + Card card = targetPlayer.getLibrary().getFromTop(game); + if (card != null) { + targetPlayer.moveCards(card, Zone.LIBRARY, Zone.EXILED, source, game); + } + return true; + } + return false; + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index c4c09c39715..d167dcc3e40 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -27422,7 +27422,7 @@ Retreat to Valakut|Battle for Zendikar|153|U|{2}{R}|Enchantment|||Landfall(This card has no color.)$At the beginning of your upkeep, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."${1}{G}, Sacrifice From Beyond: Search your library for an Eldrazi card, reveal it, put it into your hand, then shuffle your library.| -Beastcaller Expert|Battle for Zendikar|170|R|{1}{G}|Creature - Elf Shaman Ally|1|1|Haste${T}: Add one mana of any color to you mana pool. Use this mana only to cast creature spells.| +Beastcaller Expert|Battle for Zendikar|170|R|{1}{G}|Creature - Elf Shaman Ally|1|1|Haste${T}: Add one mana of any color to your mana pool. Spend this mana only to cast creature spells.| Greenwarden of Murasa|Battle for Zendikar|174|M|{4}{G}{G}|Creature - Elemental|5|4|When Greenwarden of Murasa enters the battlefield, you may return target card from your graveyard to your hand.$When Greenwarden of Murasa dies, you may exile it. If you do, return target card from your graveyard to your hand.| Nissa's Renewal|Battle for Zendikar|180|R|{5}{G}|Sorcery|||Search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library. You gain 7 life.| Oran-Rief Hydra|Battle for Zendikar|181|R|{4}{G}{G}|Creature - Hydra|5|5|Trample$Landfall - Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead.| From 2474472df637786c25dc47278f0ffc240d981259 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 17 Sep 2015 10:46:17 +0300 Subject: [PATCH 06/16] Implement cards: Bullwhip, Change of Heart, Mindwarper, and Mob Justice --- .../src/mage/sets/stronghold/Bullwhip.java | 73 ++++++++++++++++++ .../mage/sets/stronghold/ChangeOfHeart.java | 64 ++++++++++++++++ .../src/mage/sets/stronghold/Mindwarper.java | 76 +++++++++++++++++++ .../src/mage/sets/stronghold/MobJustice.java | 65 ++++++++++++++++ .../combat/AttacksIfAbleTargetEffect.java | 15 ++-- .../common/combat/CantAttackTargetEffect.java | 14 +++- 6 files changed, 300 insertions(+), 7 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/stronghold/Bullwhip.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/ChangeOfHeart.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/Mindwarper.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/MobJustice.java diff --git a/Mage.Sets/src/mage/sets/stronghold/Bullwhip.java b/Mage.Sets/src/mage/sets/stronghold/Bullwhip.java new file mode 100644 index 00000000000..f63732f299f --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Bullwhip.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.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Bullwhip extends CardImpl { + + public Bullwhip(UUID ownerId) { + super(ownerId, 126, "Bullwhip", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "STH"; + + // {2}, {tap}: Bullwhip deals 1 damage to target creature. That creature attacks this turn if able. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); + Effect effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn); + effect.setText("that creature attacks this turn if able"); + ability.addEffect(effect); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Bullwhip(final Bullwhip card) { + super(card); + } + + @Override + public Bullwhip copy() { + return new Bullwhip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/ChangeOfHeart.java b/Mage.Sets/src/mage/sets/stronghold/ChangeOfHeart.java new file mode 100644 index 00000000000..37bda326618 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/ChangeOfHeart.java @@ -0,0 +1,64 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.combat.CantAttackTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ChangeOfHeart extends CardImpl { + + public ChangeOfHeart(UUID ownerId) { + super(ownerId, 103, "Change of Heart", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "STH"; + + // Buyback {3} + this.addAbility(new BuybackAbility("{3}")); + // Target creature can't attack this turn. + this.getSpellAbility().addEffect(new CantAttackTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ChangeOfHeart(final ChangeOfHeart card) { + super(card); + } + + @Override + public ChangeOfHeart copy() { + return new ChangeOfHeart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Mindwarper.java b/Mage.Sets/src/mage/sets/stronghold/Mindwarper.java new file mode 100644 index 00000000000..336d9dcf743 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Mindwarper.java @@ -0,0 +1,76 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPlayer; + +/** + * + * @author LoneFox + */ +public class Mindwarper extends CardImpl { + + public Mindwarper(UUID ownerId) { + super(ownerId, 14, "Mindwarper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spirit"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Mindwarper enters the battlefield with three +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + // {2}{B}, Remove a +1/+1 counter from Mindwarper: Target player discards a card. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}{B}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public Mindwarper(final Mindwarper card) { + super(card); + } + + @Override + public Mindwarper copy() { + return new Mindwarper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/MobJustice.java b/Mage.Sets/src/mage/sets/stronghold/MobJustice.java new file mode 100644 index 00000000000..d2acb4c934c --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/MobJustice.java @@ -0,0 +1,65 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.TargetPlayer; + +/** + * + * @author LoneFox + */ +public class MobJustice extends CardImpl { + + public MobJustice(UUID ownerId) { + super(ownerId, 90, "Mob Justice", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "STH"; + + // Mob Justice deals damage to target player equal to the number of creatures you control. + Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())); + effect.setText("{this} deals damage to target player equal to the number of creatures you control"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public MobJustice(final MobJustice card) { + super(card); + } + + @Override + public MobJustice copy() { + return new MobJustice(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java b/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java index a3f5889ce3d..a06f8ddead7 100644 --- a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -74,6 +74,9 @@ public class AttacksIfAbleTargetEffect extends RequirementEffect { @Override public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } if (this.duration == Duration.EndOfTurn) { return new StringBuilder("Target ").append(mode.getTargets().get(0).getTargetName()).append(" attacks this turn if able").toString(); } @@ -82,4 +85,4 @@ public class AttacksIfAbleTargetEffect extends RequirementEffect { } } -} \ No newline at end of file +} diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java b/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java index 887c8f401d5..210b2d609de 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java @@ -28,9 +28,10 @@ package mage.abilities.effects.common.combat; -import mage.constants.Duration; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.effects.RestrictionEffect; +import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; @@ -63,4 +64,15 @@ public class CantAttackTargetEffect extends RestrictionEffect { return new CantAttackTargetEffect(this); } + @Override + public String getText(Mode mode) { + if(staticText != null && !staticText.isEmpty()) { + return staticText; + } + String text = "target " + mode.getTargets().get(0).getTargetName() + " can't attack"; + if(this.duration == Duration.EndOfTurn) { + text += " this turn"; + } + return text; + } } From 8ed312e7e94f3bd6baad81d536b918f419e384ec Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 17 Sep 2015 11:37:17 +0300 Subject: [PATCH 07/16] Remove some unnecessary custom effects. --- .../src/mage/sets/magic2010/Earthquake.java | 69 +++++------------ .../src/mage/sets/magic2010/MindSpring.java | 52 +++---------- .../src/mage/sets/magic2010/Weakness.java | 76 ++++--------------- .../mage/sets/scarsofmirrodin/GoldenUrn.java | 46 ++--------- .../mage/sets/stronghold/IntruderAlarm.java | 47 ++---------- 5 files changed, 54 insertions(+), 236 deletions(-) diff --git a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java index b49cd07434b..632d7fc6116 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java +++ b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -29,19 +29,15 @@ package mage.sets.magic2010; 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.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageEverythingEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -49,11 +45,18 @@ import mage.players.Player; */ public class Earthquake extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + public Earthquake(UUID ownerId) { super(ownerId, 134, "Earthquake", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{R}"); this.expansionSetCode = "M10"; - this.getSpellAbility().addEffect(new EarthquakeEffect()); + // Hurricane deals X damage to each creature with flying and each player. + this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter)); } public Earthquake(final Earthquake card) { @@ -65,41 +68,3 @@ public class Earthquake extends CardImpl { return new Earthquake(this); } } - -class EarthquakeEffect extends OneShotEffect { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); - - static { - filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); - } - - public EarthquakeEffect() { - super(Outcome.Damage); - staticText = "{this} deals X damage to each creature without flying and each player"; - } - - public EarthquakeEffect(final EarthquakeEffect effect) { - super(effect); - } - - @Override - public EarthquakeEffect copy() { - return new EarthquakeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - int amount = source.getManaCostsToPay().getX(); - for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { - permanent.damage(amount, source.getSourceId(), game, false, true); - } - for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) { - Player player = game.getPlayer(playerId); - if (player != null) - player.damage(amount, source.getSourceId(), game, false, true); - } - return true; - } - -} diff --git a/Mage.Sets/src/mage/sets/magic2010/MindSpring.java b/Mage.Sets/src/mage/sets/magic2010/MindSpring.java index 72955a428fb..db84d2644b3 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MindSpring.java +++ b/Mage.Sets/src/mage/sets/magic2010/MindSpring.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -29,14 +29,11 @@ package mage.sets.magic2010; 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.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; -import mage.game.Game; -import mage.players.Player; +import mage.constants.CardType; +import mage.constants.Rarity; /** * @@ -48,7 +45,7 @@ public class MindSpring extends CardImpl { super(ownerId, 64, "Mind Spring", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{U}{U}"); this.expansionSetCode = "M10"; - this.getSpellAbility().addEffect(new MindSpringEffect()); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new ManacostVariableValue())); } public MindSpring(final MindSpring card) { @@ -61,32 +58,3 @@ public class MindSpring extends CardImpl { } } - -class MindSpringEffect extends OneShotEffect { - - public MindSpringEffect() { - super(Outcome.DrawCard); - staticText = "Draw X cards"; - } - - public MindSpringEffect(final MindSpringEffect effect) { - super(effect); - } - - @Override - public MindSpringEffect copy() { - return new MindSpringEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - int amount = source.getManaCostsToPay().getX(); - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.drawCards(amount, game); - return true; - } - return false; - } - -} diff --git a/Mage.Sets/src/mage/sets/magic2010/Weakness.java b/Mage.Sets/src/mage/sets/magic2010/Weakness.java index 2047968193f..a30710683af 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Weakness.java +++ b/Mage.Sets/src/mage/sets/magic2010/Weakness.java @@ -29,21 +29,17 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.SubLayer; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -56,14 +52,16 @@ public class Weakness extends CardImpl { public Weakness(UUID ownerId) { super(ownerId, 121, "Weakness", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}"); this.expansionSetCode = "M10"; - this.subtype.add("Aura"); + + // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new WeaknessEffect())); + this.addAbility(ability); + // Enchanted creature gets -2/-1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-2, -1, Duration.WhileOnBattlefield))); } public Weakness(final Weakness card) { @@ -75,51 +73,3 @@ public class Weakness extends CardImpl { return new Weakness(this); } } - -class WeaknessEffect extends ContinuousEffectImpl { - - public WeaknessEffect() { - super(Duration.WhileOnBattlefield, Outcome.UnboostCreature); - staticText = "Enchanted creature gets -2/-1"; - } - - public WeaknessEffect(final WeaknessEffect effect) { - super(effect); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature != null) { - switch (layer) { - case PTChangingEffects_7: - if (sublayer == SubLayer.ModifyPT_7c) { - creature.addPower(-2); - creature.addToughness(-1); - } - break; - } - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.PTChangingEffects_7; - } - - @Override - public WeaknessEffect copy() { - return new WeaknessEffect(this); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java index 96a83ffbe4d..b05de39496e 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java @@ -30,23 +30,20 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; -import mage.constants.Outcome; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.TargetController; +import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -58,7 +55,7 @@ public class GoldenUrn extends CardImpl { super(ownerId, 158, "Golden Urn", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); this.expansionSetCode = "SOM"; this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, true)); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoldenUrnEffect(), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new CountersCount(CounterType.CHARGE)), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } @@ -73,34 +70,3 @@ public class GoldenUrn extends CardImpl { } } - -class GoldenUrnEffect extends OneShotEffect { - public GoldenUrnEffect() { - super(Outcome.GainLife); - staticText = "You gain life equal to the number of charge counters on {this}"; - } - - public GoldenUrnEffect(final GoldenUrnEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent p = game.getBattlefield().getPermanent(source.getSourceId()); - Player player = game.getPlayer(source.getControllerId()); - if (p == null) { - p = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - if (p != null && player != null) { - player.gainLife(p.getCounters().getCount(CounterType.CHARGE), game); - return true; - } - return false; - } - - @Override - public GoldenUrnEffect copy() { - return new GoldenUrnEffect(this); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java b/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java index 2fe7b279841..83e4c1a291b 100644 --- a/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java +++ b/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java @@ -28,18 +28,17 @@ package mage.sets.stronghold; import java.util.UUID; - -import mage.constants.*; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +import mage.abilities.effects.common.UntapAllEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -53,9 +52,9 @@ public class IntruderAlarm extends CardImpl { // Creatures don't untap during their controllers' untap steps. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent("Creatures")))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent("creatures")))); // Whenever a creature enters the battlefield, untap all creatures. - this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllCreatureEffect(), new FilterCreaturePermanent())); + this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllEffect(new FilterCreaturePermanent("creatures")), new FilterCreaturePermanent("a creature"))); } public IntruderAlarm(final IntruderAlarm card) { @@ -67,33 +66,3 @@ public class IntruderAlarm extends CardImpl { return new IntruderAlarm(this); } } - -class UntapAllCreatureEffect extends OneShotEffect { - - public UntapAllCreatureEffect() { - super(Outcome.Untap); - staticText = "untap all creatures"; - } - - public UntapAllCreatureEffect(final UntapAllCreatureEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - for (Permanent land: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) { - land.untap(game); - } - return true; - } - return false; - } - - @Override - public UntapAllCreatureEffect copy() { - return new UntapAllCreatureEffect(this); - } - -} From afe352168c2f13c60fcc0e5781a396566d06c43e Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 17 Sep 2015 16:18:39 +0200 Subject: [PATCH 08/16] Created a more generic ConditionalSpellManaBuilder. Replaced some custom mana builders (more to do). --- .../battleforzendikar/AllyEncampment.java | 12 ++- .../sets/dissension/PillarOfTheParuns.java | 61 +++------------ .../src/mage/sets/magic2015/SliverHive.java | 10 ++- .../sets/vintagemasters/MishrasWorkshop.java | 20 +---- .../AddConditionalColorlessManaEffect.java | 8 +- .../mana/ActivateIfConditionManaAbility.java | 19 +++-- .../mana/builder/SubtypeCastManaBuilder.java | 67 ---------------- .../ConditionalSpellManaBuilder.java | 77 +++++++++++++++++++ 8 files changed, 123 insertions(+), 151 deletions(-) delete mode 100644 Mage/src/mage/abilities/mana/builder/SubtypeCastManaBuilder.java create mode 100644 Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AllyEncampment.java b/Mage.Sets/src/mage/sets/battleforzendikar/AllyEncampment.java index 04eb573c2bf..0aeea5e3b1e 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/AllyEncampment.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AllyEncampment.java @@ -36,12 +36,14 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ConditionalAnyColorManaAbility; -import mage.abilities.mana.builder.SubtypeCastManaBuilder; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; +import mage.filter.FilterSpell; import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -50,6 +52,12 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public class AllyEncampment extends CardImpl { + private static final FilterSpell filter = new FilterSpell("an Ally spell"); + + static { + filter.add(new ColorlessPredicate()); + } + public AllyEncampment(UUID ownerId) { super(ownerId, 228, "Ally Encampment", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "BFZ"; @@ -58,7 +66,7 @@ public class AllyEncampment extends CardImpl { this.addAbility(new ColorlessManaAbility()); // {T} Add one mana of any color to your mana pool. Spend this mana only to cast an Ally spell. - this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new SubtypeCastManaBuilder("Ally"), true)); + this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(filter), true)); // {1}, {T}, Sacrifice Ally Encampment: Return target Ally you control to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(1)); diff --git a/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java b/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java index 629823f495a..a548ba5adeb 100644 --- a/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java +++ b/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java @@ -28,19 +28,13 @@ package mage.sets.dissension; import java.util.UUID; -import mage.ConditionalMana; -import mage.MageObject; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; -import mage.abilities.condition.Condition; import mage.abilities.mana.ConditionalAnyColorManaAbility; -import mage.abilities.mana.builder.ConditionalManaBuilder; -import mage.abilities.mana.conditional.ManaCondition; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.Game; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.MulticoloredPredicate; /** * @@ -48,12 +42,18 @@ import mage.game.Game; */ public class PillarOfTheParuns extends CardImpl { + private static final FilterSpell filter = new FilterSpell("a multicolored spell"); + + static { + filter.add(new MulticoloredPredicate()); + } + public PillarOfTheParuns(UUID ownerId) { super(ownerId, 176, "Pillar of the Paruns", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "DIS"; // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a multicolored spell. - this.addAbility(new ConditionalAnyColorManaAbility(1, new PillarOfTheParunsManaBuilder())); + this.addAbility(new ConditionalAnyColorManaAbility(1, new ConditionalSpellManaBuilder(filter))); } public PillarOfTheParuns(final PillarOfTheParuns card) { @@ -65,44 +65,3 @@ public class PillarOfTheParuns extends CardImpl { return new PillarOfTheParuns(this); } } - - -class PillarOfTheParunsManaBuilder extends ConditionalManaBuilder { - @Override - public ConditionalMana build(Object... options) { - return new PillarOfTheParunsConditionalMana(this.mana); - } - - @Override - public String getRule() { - return "Spend this mana only to cast a multicolored spell"; - } -} - -class PillarOfTheParunsConditionalMana extends ConditionalMana { - - public PillarOfTheParunsConditionalMana(Mana mana) { - super(mana); - staticText = "Spend this mana only to cast a multicolored spell"; - addCondition(new MultiColoredSpellCastManaCondition()); - } -} - -class MultiColoredSpellCastManaCondition extends ManaCondition implements Condition { - - @Override - public boolean apply(Game game, Ability source) { - if (source instanceof SpellAbility) { - MageObject object = game.getObject(source.getSourceId()); - if (object != null && object.getColor(game).getColorCount() > 1) { - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source, UUID originalId) { - return apply(game, source); - } -} diff --git a/Mage.Sets/src/mage/sets/magic2015/SliverHive.java b/Mage.Sets/src/mage/sets/magic2015/SliverHive.java index 48fb1338356..f5c40cb43e3 100644 --- a/Mage.Sets/src/mage/sets/magic2015/SliverHive.java +++ b/Mage.Sets/src/mage/sets/magic2015/SliverHive.java @@ -41,12 +41,13 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ConditionalAnyColorManaAbility; import mage.abilities.mana.builder.ConditionalManaBuilder; -import mage.abilities.mana.builder.SubtypeCastManaBuilder; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; import mage.abilities.mana.conditional.CreatureCastManaCondition; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; +import mage.filter.FilterSpell; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; @@ -59,9 +60,14 @@ import mage.game.permanent.token.Token; public class SliverHive extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent("Sliver"); + private static final FilterSpell filterSpell = new FilterSpell("a Sliver spell"); + + static { + } static { filter.add(new SubtypePredicate("Sliver")); + filterSpell.add(new SubtypePredicate("Sliver")); } public SliverHive(UUID ownerId) { @@ -72,7 +78,7 @@ public class SliverHive extends CardImpl { this.addAbility(new ColorlessManaAbility()); // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a Sliver spell. - this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new SubtypeCastManaBuilder("Sliver"), true)); + this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(filterSpell), true)); // {5}, {T}: Put a 1/1 colorless Sliver creature token onto the battlefield. Activate this ability only if you control a Sliver. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SliverToken()), new TapSourceCost(), diff --git a/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java b/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java index afac89175d6..f81f43f940b 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java @@ -28,14 +28,13 @@ package mage.sets.vintagemasters; import java.util.UUID; -import mage.ConditionalMana; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.mana.ConditionalColorlessManaAbility; -import mage.abilities.mana.builder.ConditionalManaBuilder; -import mage.abilities.mana.conditional.ArtifactCastConditionalMana; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.filter.common.FilterArtifactSpell; /** * @@ -48,7 +47,8 @@ public class MishrasWorkshop extends CardImpl { this.expansionSetCode = "VMA"; // {tap}: Add {3} to your mana pool. Spend this mana only to cast artifact spells. - this.addAbility(new ConditionalColorlessManaAbility(new TapSourceCost(), 3, new MishrasWorkshopManaBuilder())); + this.addAbility(new ConditionalColorlessManaAbility(new TapSourceCost(), 3, + new ConditionalSpellManaBuilder(new FilterArtifactSpell("artifact spells")))); } @@ -61,15 +61,3 @@ public class MishrasWorkshop extends CardImpl { return new MishrasWorkshop(this); } } - -class MishrasWorkshopManaBuilder extends ConditionalManaBuilder { - @Override - public ConditionalMana build(Object... options) { - return new ArtifactCastConditionalMana(this.mana); - } - - @Override - public String getRule() { - return "Spend this mana only to cast artifact spells"; - } -} diff --git a/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java b/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java index 495d234b7a5..7e0de77c756 100644 --- a/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java +++ b/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package mage.abilities.effects.common; import mage.Mana; @@ -16,7 +15,6 @@ import mage.players.Player; * * @author LevelX2 */ - public class AddConditionalColorlessManaEffect extends ManaEffect { private final int amount; @@ -26,7 +24,7 @@ public class AddConditionalColorlessManaEffect extends ManaEffect { super(); this.amount = amount; this.manaBuilder = manaBuilder; - staticText = "Add {" + amount + "} to your mana pool. " + manaBuilder.getRule(); + staticText = "Add {" + amount + "} to your mana pool. " + manaBuilder.getRule(); } public AddConditionalColorlessManaEffect(final AddConditionalColorlessManaEffect effect) { @@ -54,4 +52,8 @@ public class AddConditionalColorlessManaEffect extends ManaEffect { public Mana getMana(Game game, Ability source) { return manaBuilder.setMana(Mana.ColorlessMana(amount), source, game).build(); } + + public Mana getMana() { + return new Mana(0, 0, 0, 0, 0, amount, 0); + } } diff --git a/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java b/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java index e6a5ac7c8e6..33fb10bbef3 100644 --- a/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java +++ b/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java @@ -25,23 +25,16 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.mana; import java.util.UUID; -import mage.Mana; -import mage.constants.Zone; import mage.abilities.condition.Condition; import mage.abilities.costs.Cost; +import mage.abilities.effects.common.AddConditionalColorlessManaEffect; import mage.abilities.effects.common.BasicManaEffect; +import mage.constants.Zone; import mage.game.Game; -/** - * - * @author LevelX2 - */ - - public class ActivateIfConditionManaAbility extends ManaAbility { private final Condition condition; @@ -52,6 +45,12 @@ public class ActivateIfConditionManaAbility extends ManaAbility { this.condition = condition; } + public ActivateIfConditionManaAbility(Zone zone, AddConditionalColorlessManaEffect effect, Cost cost, Condition condition) { + super(zone, effect, cost); + this.netMana.add(effect.getMana()); + this.condition = condition; + } + public ActivateIfConditionManaAbility(ActivateIfConditionManaAbility ability) { super(ability); this.condition = ability.condition; @@ -75,7 +74,7 @@ public class ActivateIfConditionManaAbility extends ManaAbility { @Override public String getRule() { - return new StringBuilder(super.getRule()).append(" Activate this ability only if ").append(condition.toString()).append(".").toString() ; + return new StringBuilder(super.getRule()).append(" Activate this ability only if ").append(condition.toString()).append(".").toString(); } @Override diff --git a/Mage/src/mage/abilities/mana/builder/SubtypeCastManaBuilder.java b/Mage/src/mage/abilities/mana/builder/SubtypeCastManaBuilder.java deleted file mode 100644 index b3ef602f860..00000000000 --- a/Mage/src/mage/abilities/mana/builder/SubtypeCastManaBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package mage.abilities.mana.builder; - -import java.util.UUID; -import mage.ConditionalMana; -import mage.MageObject; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.mana.conditional.CreatureCastManaCondition; -import mage.game.Game; - -/** - * - * @author LevelX2 - */ -public class SubtypeCastManaBuilder extends ConditionalManaBuilder { - - private final String subtype; - - public SubtypeCastManaBuilder(String subtype) { - this.subtype = subtype; - } - - @Override - public ConditionalMana build(Object... options) { - this.mana.setFlag(true); // indicates that the mana is from second ability - return new SubtypeCastConditionalMana(this.mana, subtype); - } - - @Override - public String getRule() { - return "Spend this mana only to cast a " + subtype + " spell."; - } -} - -class SubtypeCastConditionalMana extends ConditionalMana { - - SubtypeCastConditionalMana(Mana mana, String subtype) { - super(mana); - staticText = "Spend this mana only to cast a " + subtype + " spell."; - addCondition(new SubtypeCastManaCondition(subtype)); - } -} - -class SubtypeCastManaCondition extends CreatureCastManaCondition { - - private final String subtype; - - public SubtypeCastManaCondition(String subtype) { - this.subtype = subtype; - } - - @Override - public boolean apply(Game game, Ability source, UUID manaProducer) { - if (super.apply(game, source)) { - MageObject object = game.getObject(source.getSourceId()); - if (object.hasSubtype(subtype)) { - return true; - } - } - return false; - } -} diff --git a/Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java b/Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java new file mode 100644 index 00000000000..5dfe2f7c3ae --- /dev/null +++ b/Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java @@ -0,0 +1,77 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.mana.conditional; + +import java.util.UUID; +import mage.ConditionalMana; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.condition.Condition; +import mage.abilities.mana.builder.ConditionalManaBuilder; +import mage.filter.FilterSpell; +import mage.game.Game; +import mage.game.stack.StackObject; + +/** + * + * @author LevelX2 + */ +public class ConditionalSpellManaBuilder extends ConditionalManaBuilder { + + private final FilterSpell filter; + + public ConditionalSpellManaBuilder(FilterSpell filter) { + this.filter = filter; + } + + @Override + public ConditionalMana build(Object... options) { + this.mana.setFlag(true); // indicates that the mana is from second ability + return new SpellCastConditionalMana(this.mana, filter); + } + + @Override + public String getRule() { + return "Spend this mana only to cast " + filter.getMessage() + "."; + } +} + +class SpellCastConditionalMana extends ConditionalMana { + + SpellCastConditionalMana(Mana mana, FilterSpell filter) { + super(mana); + staticText = "Spend this mana only to cast " + filter.getMessage() + "."; + addCondition(new SpellCastManaCondition(filter)); + } +} + +class SpellCastManaCondition extends ManaCondition implements Condition { + + private final FilterSpell filter; + + public SpellCastManaCondition(FilterSpell filter) { + this.filter = filter; + } + + @Override + public boolean apply(Game game, Ability source) { + if (source instanceof SpellAbility) { + MageObject object = game.getObject(source.getSourceId()); + if (object != null && (object instanceof StackObject)) { + return filter.match((StackObject) object, source.getSourceId(), source.getControllerId(), game); + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source, UUID originalId) { + return apply(game, source); + } + +} From 97a11708ec677508762f20405cec8a43823ac6f2 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 17 Sep 2015 16:19:13 +0200 Subject: [PATCH 09/16] [BFZ] Added Shrine of the Forsaken Gods. --- .../ShrineOfTheForsakenGods.java | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/ShrineOfTheForsakenGods.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ShrineOfTheForsakenGods.java b/Mage.Sets/src/mage/sets/battleforzendikar/ShrineOfTheForsakenGods.java new file mode 100644 index 00000000000..70a54cc1a08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ShrineOfTheForsakenGods.java @@ -0,0 +1,80 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddConditionalColorlessManaEffect; +import mage.abilities.mana.ActivateIfConditionManaAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class ShrineOfTheForsakenGods extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("colorless spells"); + + static { + filter.add(new ColorlessPredicate()); + } + + public ShrineOfTheForsakenGods(UUID ownerId) { + super(ownerId, 245, "Shrine of the Forsaken Gods", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T}: Add {2} to your mana pool. Spend this mana only to cast colorless spells. Activate this ability only if you control seven or more lands. + this.addAbility(new ActivateIfConditionManaAbility( + Zone.BATTLEFIELD, + new AddConditionalColorlessManaEffect(2, new ConditionalSpellManaBuilder(filter)), + new TapSourceCost(), + new PermanentsOnTheBattlefieldCondition(new FilterControlledLandPermanent("you control seven or more lands"), PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 6))); + } + + public ShrineOfTheForsakenGods(final ShrineOfTheForsakenGods card) { + super(card); + } + + @Override + public ShrineOfTheForsakenGods copy() { + return new ShrineOfTheForsakenGods(this); + } +} From 62e0d5eeeb3064b3d72e81a6c1f8862ba522a09b Mon Sep 17 00:00:00 2001 From: fireshoes Date: Thu, 17 Sep 2015 15:34:11 -0500 Subject: [PATCH 10/16] Added Oath of the Gatewatch and Zendikar Expeditions sets. Updated BFZ tokens and took V15 and DDP off of ignore for image download. Corrected translated named of Beastcaller Savant. Implemented Sire of Stagnation. --- .../src/mage/sets/OathOfTheGatewatch.java | 35 ++++++++ .../src/mage/sets/ZendikarExpeditions.java | 51 +++++++++++ ...llerExpert.java => BeastcallerSavant.java} | 26 +++--- .../battleforzendikar/SireOfStagnation.java | 84 +++++++++++++++++++ .../sets/zendikarexpeditions/AridMesa.java | 54 ++++++++++++ .../sets/zendikarexpeditions/BloodCrypt.java | 54 ++++++++++++ .../zendikarexpeditions/BloodstainedMire.java | 54 ++++++++++++ .../zendikarexpeditions/BreedingPool.java | 54 ++++++++++++ .../sets/zendikarexpeditions/CanopyVista.java | 54 ++++++++++++ .../sets/zendikarexpeditions/CinderGlade.java | 54 ++++++++++++ .../zendikarexpeditions/FloodedStrand.java | 54 ++++++++++++ .../zendikarexpeditions/GodlessShrine.java | 54 ++++++++++++ .../zendikarexpeditions/HallowedFountain.java | 54 ++++++++++++ .../sets/zendikarexpeditions/MarshFlats.java | 54 ++++++++++++ .../zendikarexpeditions/MistyRainforest.java | 54 ++++++++++++ .../zendikarexpeditions/OvergrownTomb.java | 54 ++++++++++++ .../zendikarexpeditions/PollutedDelta.java | 54 ++++++++++++ .../zendikarexpeditions/PrairieStream.java | 54 ++++++++++++ .../zendikarexpeditions/SacredFoundry.java | 54 ++++++++++++ .../zendikarexpeditions/ScaldingTarn.java | 54 ++++++++++++ .../zendikarexpeditions/SmolderingMarsh.java | 54 ++++++++++++ .../sets/zendikarexpeditions/SteamVents.java | 54 ++++++++++++ .../zendikarexpeditions/StompingGround.java | 54 ++++++++++++ .../zendikarexpeditions/SunkenHollow.java | 54 ++++++++++++ .../zendikarexpeditions/TempleGarden.java | 54 ++++++++++++ .../zendikarexpeditions/VerdantCatacombs.java | 54 ++++++++++++ .../sets/zendikarexpeditions/WateryGrave.java | 54 ++++++++++++ .../zendikarexpeditions/WindsweptHeath.java | 54 ++++++++++++ .../zendikarexpeditions/WoodedFoothills.java | 54 ++++++++++++ 29 files changed, 1533 insertions(+), 13 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/OathOfTheGatewatch.java create mode 100644 Mage.Sets/src/mage/sets/ZendikarExpeditions.java rename Mage.Sets/src/mage/sets/battleforzendikar/{BeastcallerExpert.java => BeastcallerSavant.java} (82%) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/SireOfStagnation.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/AridMesa.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/BloodCrypt.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/BloodstainedMire.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/BreedingPool.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/CanopyVista.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/CinderGlade.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/FloodedStrand.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/GodlessShrine.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/HallowedFountain.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/MarshFlats.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/MistyRainforest.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/OvergrownTomb.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/PollutedDelta.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/PrairieStream.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/SacredFoundry.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/ScaldingTarn.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/SmolderingMarsh.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/SteamVents.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/StompingGround.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/SunkenHollow.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/TempleGarden.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/VerdantCatacombs.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/WateryGrave.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/WindsweptHeath.java create mode 100644 Mage.Sets/src/mage/sets/zendikarexpeditions/WoodedFoothills.java diff --git a/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java b/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java new file mode 100644 index 00000000000..8d1d9030923 --- /dev/null +++ b/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java @@ -0,0 +1,35 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ +public class OathOfTheGatewatch extends ExpansionSet { + + private static final OathOfTheGatewatch fINSTANCE = new OathOfTheGatewatch(); + + public static OathOfTheGatewatch getInstance() { + return fINSTANCE; + } + + private OathOfTheGatewatch() { + super("Oath of the Gatewatch", "OGW", "mage.sets.oathofthegatewatch", new GregorianCalendar(2016, 1, 22).getTime(), SetType.EXPANSION); + this.blockName = "Battle for Zendikar"; + this.hasBoosters = true; + this.hasBasicLands = false; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 8; + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarExpeditions.java b/Mage.Sets/src/mage/sets/ZendikarExpeditions.java new file mode 100644 index 00000000000..ed7759f4c8e --- /dev/null +++ b/Mage.Sets/src/mage/sets/ZendikarExpeditions.java @@ -0,0 +1,51 @@ +/* + * 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; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ +public class ZendikarExpeditions extends ExpansionSet { + + private static final ZendikarExpeditions fINSTANCE = new ZendikarExpeditions(); + + public static ZendikarExpeditions getInstance() { + return fINSTANCE; + } + + private ZendikarExpeditions() { + super("Zendikar Expeditions", "EXP", "mage.sets.zendikarexpeditions", new GregorianCalendar(2015, 10, 2).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + this.hasBasicLands = false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerExpert.java b/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerSavant.java similarity index 82% rename from Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerExpert.java rename to Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerSavant.java index 4db4e9cfb78..7a5d26bc895 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerExpert.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerSavant.java @@ -47,10 +47,10 @@ import mage.game.stack.Spell; * * @author fireshoes */ -public class BeastcallerExpert extends CardImpl { +public class BeastcallerSavant extends CardImpl { - public BeastcallerExpert(UUID ownerId) { - super(ownerId, 170, "Beastcaller Expert", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + public BeastcallerSavant(UUID ownerId) { + super(ownerId, 170, "Beastcaller Savant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.expansionSetCode = "BFZ"; this.subtype.add("Elf"); this.subtype.add("Shaman"); @@ -62,24 +62,24 @@ public class BeastcallerExpert extends CardImpl { this.addAbility(HasteAbility.getInstance()); // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast creature spells. - this.addAbility(new ConditionalAnyColorManaAbility(1, new BeastcallerExpertManaBuilder())); + this.addAbility(new ConditionalAnyColorManaAbility(1, new BeastcallerSavantManaBuilder())); } - public BeastcallerExpert(final BeastcallerExpert card) { + public BeastcallerSavant(final BeastcallerSavant card) { super(card); } @Override - public BeastcallerExpert copy() { - return new BeastcallerExpert(this); + public BeastcallerSavant copy() { + return new BeastcallerSavant(this); } } -class BeastcallerExpertManaBuilder extends ConditionalManaBuilder { +class BeastcallerSavantManaBuilder extends ConditionalManaBuilder { @Override public ConditionalMana build(Object... options) { - return new BeastcallerExpertConditionalMana(this.mana); + return new BeastcallerSavantConditionalMana(this.mana); } @Override @@ -88,16 +88,16 @@ class BeastcallerExpertManaBuilder extends ConditionalManaBuilder { } } -class BeastcallerExpertConditionalMana extends ConditionalMana { +class BeastcallerSavantConditionalMana extends ConditionalMana { - public BeastcallerExpertConditionalMana(Mana mana) { + public BeastcallerSavantConditionalMana(Mana mana) { super(mana); this.staticText = "Spend this mana only to cast creature spells"; - addCondition(new BeastcallerExpertManaCondition()); + addCondition(new BeastcallerSavantManaCondition()); } } -class BeastcallerExpertManaCondition implements Condition { +class BeastcallerSavantManaCondition implements Condition { @Override public boolean apply(Game game, Ability source) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SireOfStagnation.java b/Mage.Sets/src/mage/sets/battleforzendikar/SireOfStagnation.java new file mode 100644 index 00000000000..126dbb1d10c --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SireOfStagnation.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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class SireOfStagnation extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent(); + private static final String rule = "Whenever a land enters the battlefield under an opponent's control, that player exiles the top two cards of his or her library and you draw two cards."; + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SireOfStagnation(UUID ownerId) { + super(ownerId, 206, "Sire of Stagnation", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{U}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.power = new MageInt(5); + this.toughness = new MageInt(7); + + // Devoid (This card has no color.) + this.addAbility(new DevoidAbility(this.color)); + + // Whenever a land enters the battlefield under an opponent's control, that player exiles the top two cards of his or her library and you draw two cards. + Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, + new ExileCardsFromTopOfLibraryTargetEffect(2, "that player"), filter, false, SetTargetPointer.PLAYER, rule, false); + ability.addEffect(new DrawCardSourceControllerEffect(2)); + this.addAbility(ability); + } + + public SireOfStagnation(final SireOfStagnation card) { + super(card); + } + + @Override + public SireOfStagnation copy() { + return new SireOfStagnation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/AridMesa.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/AridMesa.java new file mode 100644 index 00000000000..c74cea7246e --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/AridMesa.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class AridMesa extends mage.sets.zendikar.AridMesa { + + public AridMesa(UUID ownerId) { + super(ownerId); + this.cardNumber = 24; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public AridMesa(final AridMesa card) { + super(card); + } + + @Override + public AridMesa copy() { + return new AridMesa(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodCrypt.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodCrypt.java new file mode 100644 index 00000000000..75f2c346c37 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodCrypt.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BloodCrypt extends mage.sets.dissension.BloodCrypt { + + public BloodCrypt(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public BloodCrypt(final BloodCrypt card) { + super(card); + } + + @Override + public BloodCrypt copy() { + return new BloodCrypt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodstainedMire.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodstainedMire.java new file mode 100644 index 00000000000..30f5956274b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodstainedMire.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BloodstainedMire extends mage.sets.onslaught.BloodstainedMire { + + public BloodstainedMire(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public BloodstainedMire(final BloodstainedMire card) { + super(card); + } + + @Override + public BloodstainedMire copy() { + return new BloodstainedMire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/BreedingPool.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/BreedingPool.java new file mode 100644 index 00000000000..a7a407d5b3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/BreedingPool.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BreedingPool extends mage.sets.dissension.BreedingPool { + + public BreedingPool(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public BreedingPool(final BreedingPool card) { + super(card); + } + + @Override + public BreedingPool copy() { + return new BreedingPool(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/CanopyVista.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/CanopyVista.java new file mode 100644 index 00000000000..15a45bb0ae5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/CanopyVista.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CanopyVista extends mage.sets.battleforzendikar.CanopyVista { + + public CanopyVista(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public CanopyVista(final CanopyVista card) { + super(card); + } + + @Override + public CanopyVista copy() { + return new CanopyVista(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/CinderGlade.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/CinderGlade.java new file mode 100644 index 00000000000..c81265ccb5a --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/CinderGlade.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CinderGlade extends mage.sets.battleforzendikar.CinderGlade { + + public CinderGlade(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public CinderGlade(final CinderGlade card) { + super(card); + } + + @Override + public CinderGlade copy() { + return new CinderGlade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/FloodedStrand.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/FloodedStrand.java new file mode 100644 index 00000000000..f1da51bfc14 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/FloodedStrand.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class FloodedStrand extends mage.sets.onslaught.FloodedStrand { + + public FloodedStrand(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public FloodedStrand(final FloodedStrand card) { + super(card); + } + + @Override + public FloodedStrand copy() { + return new FloodedStrand(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/GodlessShrine.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/GodlessShrine.java new file mode 100644 index 00000000000..92fb6f57178 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/GodlessShrine.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class GodlessShrine extends mage.sets.guildpact.GodlessShrine { + + public GodlessShrine(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public GodlessShrine(final GodlessShrine card) { + super(card); + } + + @Override + public GodlessShrine copy() { + return new GodlessShrine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/HallowedFountain.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/HallowedFountain.java new file mode 100644 index 00000000000..a2221249147 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/HallowedFountain.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class HallowedFountain extends mage.sets.dissension.HallowedFountain { + + public HallowedFountain(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public HallowedFountain(final HallowedFountain card) { + super(card); + } + + @Override + public HallowedFountain copy() { + return new HallowedFountain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/MarshFlats.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/MarshFlats.java new file mode 100644 index 00000000000..030eb459e3a --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/MarshFlats.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MarshFlats extends mage.sets.zendikar.MarshFlats { + + public MarshFlats(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public MarshFlats(final MarshFlats card) { + super(card); + } + + @Override + public MarshFlats copy() { + return new MarshFlats(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/MistyRainforest.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/MistyRainforest.java new file mode 100644 index 00000000000..4c22fa52e19 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/MistyRainforest.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MistyRainforest extends mage.sets.zendikar.MistyRainforest { + + public MistyRainforest(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public MistyRainforest(final MistyRainforest card) { + super(card); + } + + @Override + public MistyRainforest copy() { + return new MistyRainforest(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/OvergrownTomb.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/OvergrownTomb.java new file mode 100644 index 00000000000..ae424e0f58f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/OvergrownTomb.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class OvergrownTomb extends mage.sets.ravnica.OvergrownTomb { + + public OvergrownTomb(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public OvergrownTomb(final OvergrownTomb card) { + super(card); + } + + @Override + public OvergrownTomb copy() { + return new OvergrownTomb(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/PollutedDelta.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/PollutedDelta.java new file mode 100644 index 00000000000..35fb00d05d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/PollutedDelta.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PollutedDelta extends mage.sets.onslaught.PollutedDelta { + + public PollutedDelta(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public PollutedDelta(final PollutedDelta card) { + super(card); + } + + @Override + public PollutedDelta copy() { + return new PollutedDelta(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/PrairieStream.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/PrairieStream.java new file mode 100644 index 00000000000..54965a94fdf --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/PrairieStream.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PrairieStream extends mage.sets.battleforzendikar.PrairieStream { + + public PrairieStream(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public PrairieStream(final PrairieStream card) { + super(card); + } + + @Override + public PrairieStream copy() { + return new PrairieStream(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SacredFoundry.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SacredFoundry.java new file mode 100644 index 00000000000..25d51b68ba3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SacredFoundry.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SacredFoundry extends mage.sets.ravnica.SacredFoundry { + + public SacredFoundry(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SacredFoundry(final SacredFoundry card) { + super(card); + } + + @Override + public SacredFoundry copy() { + return new SacredFoundry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/ScaldingTarn.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/ScaldingTarn.java new file mode 100644 index 00000000000..1d4a9534d33 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/ScaldingTarn.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ScaldingTarn extends mage.sets.zendikar.ScaldingTarn { + + public ScaldingTarn(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public ScaldingTarn(final ScaldingTarn card) { + super(card); + } + + @Override + public ScaldingTarn copy() { + return new ScaldingTarn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SmolderingMarsh.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SmolderingMarsh.java new file mode 100644 index 00000000000..3a9b4adabca --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SmolderingMarsh.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SmolderingMarsh extends mage.sets.battleforzendikar.SmolderingMarsh { + + public SmolderingMarsh(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SmolderingMarsh(final SmolderingMarsh card) { + super(card); + } + + @Override + public SmolderingMarsh copy() { + return new SmolderingMarsh(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SteamVents.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SteamVents.java new file mode 100644 index 00000000000..5f9f5adfc8f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SteamVents.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SteamVents extends mage.sets.guildpact.SteamVents { + + public SteamVents(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SteamVents(final SteamVents card) { + super(card); + } + + @Override + public SteamVents copy() { + return new SteamVents(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/StompingGround.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/StompingGround.java new file mode 100644 index 00000000000..06acf8a4b58 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/StompingGround.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class StompingGround extends mage.sets.guildpact.StompingGround { + + public StompingGround(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public StompingGround(final StompingGround card) { + super(card); + } + + @Override + public StompingGround copy() { + return new StompingGround(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SunkenHollow.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SunkenHollow.java new file mode 100644 index 00000000000..8ea9fe8546b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SunkenHollow.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SunkenHollow extends mage.sets.battleforzendikar.SunkenHollow { + + public SunkenHollow(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SunkenHollow(final SunkenHollow card) { + super(card); + } + + @Override + public SunkenHollow copy() { + return new SunkenHollow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/TempleGarden.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/TempleGarden.java new file mode 100644 index 00000000000..60feb64b6e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/TempleGarden.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class TempleGarden extends mage.sets.ravnica.TempleGarden { + + public TempleGarden(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public TempleGarden(final TempleGarden card) { + super(card); + } + + @Override + public TempleGarden copy() { + return new TempleGarden(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/VerdantCatacombs.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/VerdantCatacombs.java new file mode 100644 index 00000000000..339425a636c --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/VerdantCatacombs.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class VerdantCatacombs extends mage.sets.zendikar.VerdantCatacombs { + + public VerdantCatacombs(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public VerdantCatacombs(final VerdantCatacombs card) { + super(card); + } + + @Override + public VerdantCatacombs copy() { + return new VerdantCatacombs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/WateryGrave.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/WateryGrave.java new file mode 100644 index 00000000000..3cfc5781323 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/WateryGrave.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WateryGrave extends mage.sets.ravnica.WateryGrave { + + public WateryGrave(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public WateryGrave(final WateryGrave card) { + super(card); + } + + @Override + public WateryGrave copy() { + return new WateryGrave(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/WindsweptHeath.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/WindsweptHeath.java new file mode 100644 index 00000000000..7513ad9be8b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/WindsweptHeath.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WindsweptHeath extends mage.sets.onslaught.WindsweptHeath { + + public WindsweptHeath(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public WindsweptHeath(final WindsweptHeath card) { + super(card); + } + + @Override + public WindsweptHeath copy() { + return new WindsweptHeath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/WoodedFoothills.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/WoodedFoothills.java new file mode 100644 index 00000000000..30909248a96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/WoodedFoothills.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WoodedFoothills extends mage.sets.onslaught.WoodedFoothills { + + public WoodedFoothills(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public WoodedFoothills(final WoodedFoothills card) { + super(card); + } + + @Override + public WoodedFoothills copy() { + return new WoodedFoothills(this); + } +} From f2b7771d597720eb950a008a274b3ca6a8a8ab45 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Thu, 17 Sep 2015 20:35:14 -0500 Subject: [PATCH 11/16] [BFZ] Implemented Prism Array, Sanctum of Ugin, Spawning Bed, Makindi Sliderunner , Snapping Gnarlid, Molten Nursery, Pilgrim's Eye --- .../plugins/card/dl/sources/GathererSets.java | 2 +- .../dl/sources/MagicCardsImageSource.java | 2 + .../src/main/resources/card-pictures-tok.txt | 16 +++- .../src/main/resources/image.url.properties | 4 +- .../battleforzendikar/MakindiSliderunner.java | 68 +++++++++++++++ .../sets/battleforzendikar/MoltenNursery.java | 76 +++++++++++++++++ .../sets/battleforzendikar/PilgrimsEye.java | 54 ++++++++++++ .../sets/battleforzendikar/PrismArray.java | 81 ++++++++++++++++++ .../sets/battleforzendikar/SanctumOfUgin.java | 84 +++++++++++++++++++ .../battleforzendikar/SnappingGnarlid.java | 64 ++++++++++++++ .../sets/battleforzendikar/SpawningBed.java | 72 ++++++++++++++++ Mage/src/mage/counters/CounterType.java | 1 + Utils/known-sets.txt | 2 + Utils/mtg-cards-data.txt | 37 +++++++- Utils/mtg-sets-data.txt | 4 +- 15 files changed, 557 insertions(+), 10 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/MakindiSliderunner.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/MoltenNursery.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/PilgrimsEye.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/PrismArray.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/SanctumOfUgin.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/SnappingGnarlid.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/SpawningBed.java diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java index 9b6554de8f2..b18182f5e80 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java @@ -49,7 +49,7 @@ public class GathererSets implements Iterable { "THS", "BNG", "JOU", "CNS", "VMA", "TPR", "KTK", "FRF", "DTK", - "BFZ"}; + "BFZ", "EXP", "OGW"}; private static final HashMap symbolsReplacements = new HashMap<>(); static { diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java index 88653281241..23c02863284 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java @@ -16,6 +16,8 @@ public class MagicCardsImageSource implements CardImageSource { private static final Map setNameTokenReplacement = new HashMap() { { + put("ORG", "oath-of-the-gatewatch"); + put("EXP", "zendikar-expeditions"); put("BFZ", "battle-for-zendikar"); put("FVL", "from-the-vault-legends"); put("FVD", "from-the-vault-dragons"); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index eee4bed26eb..4421bbb0c39 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1,5 +1,17 @@ -#Generate|TOK:BFZ|Eldrazi Scion| -#Generate|TOK:BFZ|Elemental| +#Generate|TOK:BFZ|Dragon| +#Generate|TOK:BFZ|Eldrazi| +#Generate|TOK:BFZ|Eldrazi Scion 1| +#Generate|TOK:BFZ|Eldrazi Scion 2| +#Generate|TOK:BFZ|Eldrazi Scion 3| +#Generate|TOK:BFZ|Elemental 1| +#Generate|TOK:BFZ|Elemental 2| +#Generate|TOK:BFZ|Knight Ally| +#Generate|TOK:BFZ|Kor Ally| +#Generate|TOK:BFZ|Octopus| +#Generate|TOK:BFZ|Plant| +#|Generate|EMBLEM!:BFZ|Emblem Gideon, Ally of Zendikar| +#|Generate|EMBLEM!:BFZ|Emblem Kiora, Master of the Depths| +#|Generate|EMBLEM!:BFZ|Emblem Ob Nixilis Reignited| #Generate|TOK:DDP|Eldrazi Spawn 1| #Generate|TOK:DDP|Eldrazi Spawn 2| diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index 21627b43ec6..f0342705c71 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -64,6 +64,6 @@ ddd=gvl unh=uh dde=pvc # Remove setname as soon as the images can be downloaded -ignore.urls=TOK,V15,DDP +ignore.urls=TOK,EXP,OGW # sets ordered by release time (newest goes first) -token.lookup.order=DDP,BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file +token.lookup.order=OGW,EXP,DDP,BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MakindiSliderunner.java b/Mage.Sets/src/mage/sets/battleforzendikar/MakindiSliderunner.java new file mode 100644 index 00000000000..4f596ad3576 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MakindiSliderunner.java @@ -0,0 +1,68 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MakindiSliderunner extends CardImpl { + + public MakindiSliderunner(UUID ownerId) { + super(ownerId, 148, "Makindi Sliderunner", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Landfall- Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + } + + public MakindiSliderunner(final MakindiSliderunner card) { + super(card); + } + + @Override + public MakindiSliderunner copy() { + return new MakindiSliderunner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MoltenNursery.java b/Mage.Sets/src/mage/sets/battleforzendikar/MoltenNursery.java new file mode 100644 index 00000000000..71404a42606 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MoltenNursery.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class MoltenNursery extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("colorless spell"); + + static { + filter.add(new ColorlessPredicate()); + } + + public MoltenNursery(UUID ownerId) { + super(ownerId, 130, "Molten Nursery", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Whenever you cast a colorless spell, Molten Nursery deals 1 damage to target creature or player. + Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), filter, false); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + + } + + public MoltenNursery(final MoltenNursery card) { + super(card); + } + + @Override + public MoltenNursery copy() { + return new MoltenNursery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PilgrimsEye.java b/Mage.Sets/src/mage/sets/battleforzendikar/PilgrimsEye.java new file mode 100644 index 00000000000..67f74e4c74d --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PilgrimsEye.java @@ -0,0 +1,54 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PilgrimsEye extends mage.sets.worldwake.PilgrimsEye { + + public PilgrimsEye(UUID ownerId) { + super(ownerId); + this.cardNumber = 226; + this.expansionSetCode = "BFZ"; + this.rarity = Rarity.UNCOMMON; + } + + public PilgrimsEye(final PilgrimsEye card) { + super(card); + } + + @Override + public PilgrimsEye copy() { + return new PilgrimsEye(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PrismArray.java b/Mage.Sets/src/mage/sets/battleforzendikar/PrismArray.java new file mode 100644 index 00000000000..f1594a72cf4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PrismArray.java @@ -0,0 +1,81 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class PrismArray extends CardImpl { + + public PrismArray(UUID ownerId) { + super(ownerId, 81, "Prism Array", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}"); + this.expansionSetCode = "BFZ"; + + // Converge - Prism Array enters the battlefield with a crystal counter on it for each color of mana spent to cast it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.CRYSTAL.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true), + null, true, "Converge — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null)); + + // Remove a crystal counter from Prism Array: Tap target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new TapTargetEffect(), + new RemoveCountersSourceCost(CounterType.CRYSTAL.createInstance(1))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {W}{U}{B}{R}{G}: Scry 3. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(3), new ManaCostsImpl("{W}{U}{B}{R}{G}"))); + } + + public PrismArray(final PrismArray card) { + super(card); + } + + @Override + public PrismArray copy() { + return new PrismArray(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SanctumOfUgin.java b/Mage.Sets/src/mage/sets/battleforzendikar/SanctumOfUgin.java new file mode 100644 index 00000000000..43f2551ad26 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SanctumOfUgin.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter.ComparisonType; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class SanctumOfUgin extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("colorless creature card"); + private static final FilterSpell filterSpells = new FilterSpell("colorless spell with converted mana cost 7 or greater"); + + static { + filter.add(new ColorlessPredicate()); + filterSpells.add(new ColorlessPredicate()); + filterSpells.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 6)); + } + + public SanctumOfUgin(UUID ownerId) { + super(ownerId, 242, "Sanctum of Ugin", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // Whenever you cast a colorless spell with converted mana cost 7 or greater, you may sacrifice Sanctum of Ugin. + // If you do, search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library. + Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true); + effect.setText("search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library"); + this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new SacrificeSourceCost()), filterSpells, false)); + } + + public SanctumOfUgin(final SanctumOfUgin card) { + super(card); + } + + @Override + public SanctumOfUgin copy() { + return new SanctumOfUgin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SnappingGnarlid.java b/Mage.Sets/src/mage/sets/battleforzendikar/SnappingGnarlid.java new file mode 100644 index 00000000000..299d4bee641 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SnappingGnarlid.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SnappingGnarlid extends CardImpl { + + public SnappingGnarlid(UUID ownerId) { + super(ownerId, 190, "Snapping Gnarlid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Landfall- Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + } + + public SnappingGnarlid(final SnappingGnarlid card) { + super(card); + } + + @Override + public SnappingGnarlid copy() { + return new SnappingGnarlid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SpawningBed.java b/Mage.Sets/src/mage/sets/battleforzendikar/SpawningBed.java new file mode 100644 index 00000000000..1dc801574ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SpawningBed.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author fireshoes + */ +public class SpawningBed extends CardImpl { + + public SpawningBed(UUID ownerId) { + super(ownerId, 248, "Spawning Bed", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {6}, {T}, Sacrifice Spawning Bed: Put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new EldraziScionToken(), 3), new ManaCostsImpl("{6}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public SpawningBed(final SpawningBed card) { + super(card); + } + + @Override + public SpawningBed copy() { + return new SpawningBed(this); + } +} diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index f3adc108c16..1651ac2f3d2 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -41,6 +41,7 @@ public enum CounterType { BLAZE("blaze"), BRIBERY("bribery"), CHARGE("charge"), + CRYSTAL("crystal"), DELAY("delay"), DEPLETION("depletion"), DESPAIR("despair"), diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 2f7739ae8cf..9b462e003ae 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -101,6 +101,7 @@ Morningtide|morningtide| Nemesis|nemesis| New Phyrexia|newphyrexia| Ninth Edition|ninthedition| +Oath of the Gatewatch|oathofthegatewatch| Odyssey|odyssey| Onslaught|onslaught| Planar Chaos|planarchaos| @@ -147,3 +148,4 @@ World Magic Cup Qualifier|worldmagiccupqualifier| Worldwake|worldwake| WPN Gateway|wpngateway| Zendikar|zendikar| +Zendikar Expeditions|zendikarexpeditions| \ No newline at end of file diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index d167dcc3e40..caed568a831 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -27417,17 +27417,19 @@ Molten Nursery|Battle for Zendikar|130|U|{2}{R}|Enchantment|||Devoid (This ca Akoum Firebird|Battle for Zendikar|138|M|{2}{R}{R}|Creature - Phoenix|3|3|Flying, haste$Akoum Firebird attacks each turn if able.$Landfall-Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. If you do, return Akoum Firebird from your graveyard to the battlefield.| Akoum Hellkite|Battle for Zendikar|139|R|{4}{R}{R}|Creature - Dragon|4|4|Flying$Landfall-Whenever a land enters the battlefield under you control, Akoum Hellkite deals 1 damage to target creature or player. If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead.| Dragonmaster Outcast|Battle for Zendikar|144|M|Creature - Human Shaman|1|1|At the beginning of your upkeep, if you control six or more lands, put a 5/5 red Dragon creature token with flying onto the battlefield.| +Makindi Sliderunner|Battle for Zendikar|148|C|{1}{R}|Creature - Beast|2|1|Trample$Landfall- Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn.| Radiant Flames|Battle for Zendikar|151|R|{2}{R}|Sorcery||Converge - Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames.| Retreat to Valakut|Battle for Zendikar|153|U|{2}{R}|Enchantment|||Landfall- Whenever a land enters the battlefield under your control, choose one - Target creature gets +2/+0 until end of turn; or Target creature can't block this turn.| Rolling Thunder|Battle for Zendikar|154|U|{X}{R}{R}|Sorcery|||Rolling Thunder deals X damage divided as you choose among any number of target creatures and/or players.| Zada, Hedron Grinder|Battle for Zendikar|162|R|{3}{R}|Legendary Creature - Goblin Ally|3|3|Whenever you cast an instant or sorcery spell that targets only Zada, Hedron Grinder, copy that spell for each other creature you control that the spell could target. Each copy targets a different one of those creatures.| From Beyond|Battle for Zendikar|167|R|{3}{G}|Enchantment|||Devoid (This card has no color.)$At the beginning of your upkeep, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."${1}{G}, Sacrifice From Beyond: Search your library for an Eldrazi card, reveal it, put it into your hand, then shuffle your library.| -Beastcaller Expert|Battle for Zendikar|170|R|{1}{G}|Creature - Elf Shaman Ally|1|1|Haste${T}: Add one mana of any color to your mana pool. Spend this mana only to cast creature spells.| +Beastcaller Savant|Battle for Zendikar|170|R|{1}{G}|Creature - Elf Shaman Ally|1|1|Haste${T}: Add one mana of any color to your mana pool. Spend this mana only to cast creature spells.| Greenwarden of Murasa|Battle for Zendikar|174|M|{4}{G}{G}|Creature - Elemental|5|4|When Greenwarden of Murasa enters the battlefield, you may return target card from your graveyard to your hand.$When Greenwarden of Murasa dies, you may exile it. If you do, return target card from your graveyard to your hand.| Nissa's Renewal|Battle for Zendikar|180|R|{5}{G}|Sorcery|||Search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library. You gain 7 life.| Oran-Rief Hydra|Battle for Zendikar|181|R|{4}{G}{G}|Creature - Hydra|5|5|Trample$Landfall - Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead.| Retreat to Kazandu|Battle for Zendikar|186||U|{2}{G}|Enchantment|||Landfall-Whenever a land enters the battlefield under your control, choose one - Put a +1/+1 counter on target creature; or You gain 2 life.| Scythe Leopard|Battle for Zendikar|188|U|{G}|Creature - Cat|1|1|Landfall-Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn.| +Snapping Gnarlid|Battle for Zendikar|190|C|{1}{G}|Creature - Beast|2|2|Landfall- Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn.| Sylvan Scrying|Battle for Zendikar|192|U|{1}{G}|Sorcery|||Search your library for a land card, reveal it, and put it into your hand. Then shuffle your library.| Tajuru Warcaller|Battle for Zendikar|195|U|{3}{G}{G}|Creature - Elf Warrior Ally|2|1|Rally-Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn.| Undergrowth Champion|Battle for Zendikar|197|M|{1}{G}{G}|Creature - Elemental|2|2|If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion.$Landfall-Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion.| @@ -27439,6 +27441,7 @@ Dust Stalker|Battle for Zendikar|202|R|{2}{B}{R}|Creautre - Eldrazi|5|3|Devoid < Fathom Feeder|Battle for Zendikar|203|R|{U}{B}|Creature - Eldrazi Drone|1|1|Devoid (This card has no color.)$Deathtouch$Ingest Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)${3}{U}{B}: Draw a card. Each opponent exiles the top card of his or her library.| Forerunner of Slaughter|Battle for Zendikar|204|U|{B}{R}|Creature - Eldrazi Drone|3|2|Devoid (This card has no color.)${1}: Target colorless creature gains haste until end of turn.| Herald of Kozilek|Battle for Zendikar|205|U|{1}{U}{R}|Creature - Eldrazi Drone|2|4|Devoid (This card has no color.)$Colorless spells you cast cost {1} less to cast.| +Sire of Stagnation|Battle for Zendikar|206|M|{4}{U}{B}|Creature - Eldrazi|5|7|Devoid (This card has no color.)$Whenever a land enters the battlefield under an opponent's control, that player exiles the top two cards of his or her library and you draw two cards.| Ulamog's Nullifier|Battle for Zendikar|207|U|{2}{U}{B}|Creature - Eldrazi Processor|2|3|Devoid (This card has no color.)$Flash$Flying$When Ulamog's Nullifier enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, counter target spell.| Angelic Captain|Battle for Zendikar|208|R|{3}{R}{W}|Creature - Angel Ally|4|3|Flying$Whenever Angelic Captain attacks, it gets +1/+1 until end of turn for each other attacking Ally.| Bring to Light|Battle for Zendikar|209|R|{3}{G}{U}|Sorcery|||Converge-Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost.| @@ -27456,17 +27459,18 @@ Skyrider Elf|Battle for Zendikar|220|U|{X}{G}{U}|Creature - Elf Warrior Ally|0|0 Veteran Warleader|Battle for Zendikar|221|R|{1}{G}{W}|Creature - Human Soldier Ally|0|0|Veteran Warleader's power and toughness are each equal to the number of creatures you control.$Tap another untapped Ally you control: Veteran Warleader gains your choice of first strike, vigilance, or trample until end of turn.| Aligned Hedron Network|Battle for Zendikar|222|R|{4}|Artifact|||When Aligned Hedron Network enters the battlefield, exile all creatures with power 5 or greater until Aligned Hedron Network leaves the battlefield. (Those creatures return under their owners' control.)| Hedron Archive|Battle for Zendikar|223|U|{4}|Artifact|||{T}: Add {2} to your mana pool.${2}, {T}, Sacrifice Hedron Archive: Draw two cards.| +Pilgrim's Eye|Battle for Zendikar|226|U|{3}|Artifact Creature - Thopter|1|1|Flying$When Pilgrim's Eye enters the battlefield, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.| Ally Encampment|Battle for Zendikar|228|R||Land|||{T}: Add {1} to your mana pool.${T} Add one mana of any color to your mana pool. Spend this mana only to cast an Ally spell.${1}, {T}, Sacrifice Ally Encampment: Return target Ally you control to its owner's hand.| Blighted Cataract|Battle for Zendikar|229|U||Land|||{T}: Add {1} to your mana pool.${5}{U}, {T}, Sacrifice Blighted Cataract: Draw two cards.| Canopy Vista|Battle for Zendikar|234|R||Land - Forest Plains|||Canopy Vista enters the battlefield tapped unless you control two or more basic lands.| Cinder Glade|Battle for Zendikar|235|R||Land - Mountain Forest|||Cinder Glade enters the battlefield tapped unless you control two or more basic lands.| Evolving Wilds|Battle for Zendikar|236|C||Land|||{T}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library.| -Fertile Thicket|Battle for Zendikar|237|C||Land|||Fertile Thicket enters the battlefield tapped.$When Fertile Thicket enters the battlefield, you may look at the top five cards of your library. If you do, reveal up to one basic land card from among them, then put that card on top of your library and the rest on the bottom in any order.| +Fertile Thicket|Battle for Zendikar|237|C||Land|||Fertile Thicket enters the battlefield tapped.$When Fertile Thicket enters the battlefield, you may look at the top five cards of your library. If you do, reveal up to one basic land card from among them, then put that card on top of your library and the rest on the bottom in any order.${T}: Add {G} to your mana pool.| Looming Spires|Battle for Zendikar|238|C||Land|||Looming Spires enters the battlefield tapped.$When Looming Spires enters the battlefield, target creature gets +1/+1 and gain first strike until end of turn.${T}: Add {R} to your mana pool.| Lumbering Falls|Battle for Zendikar|239|R||Land|||Lumbering Falls enters the battlefield tapped.${T}: Add {G} or {U} to your mana pool.${2}{G}{U}: Lumbering Falls becomes a 3/3 green and blue Elemental creature with hexproof until end of turn. It's still a land.| Mortuary Mire|Battle for Zendikar|240|C||Land|||Mortuary Mire enters the battlefield tapped.$When Mortuary Mire enters the battlefield, you may put target creature card from your graveyard on top of your library.${T}: Add {B} to your mana pool.| Prairie Stream|Battle for Zendikar|241|R||Land - Plains Island|||Prairie Stream enters the battlefield tapped unless you control two or more basic lands.| -Sanctum of Ugin|Battle for Zendikar|242|R||Land|||{T}: Add {1} to your mana pool.$Whenever you cast a colorless spell with converted mana costs 7 or greater, you may sacrifice Sanctum of Ugin. If you do, search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library.| +Sanctum of Ugin|Battle for Zendikar|242|R||Land|||{T}: Add {1} to your mana pool.$Whenever you cast a colorless spell with converted mana cost 7 or greater, you may sacrifice Sanctum of Ugin. If you do, search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library.| Sandstone Bridge|Battle for Zendikar|243|C||Land|||Sandstone Bridge enters the battlefield tapped.$When Sandstone Bridge enters the battlefield, target creature gets +1/+1 and gains vigilance until end of turn.${T}: Add {W} to your mana pool.| Shambling Vent|Battle for Zendikar|244|R||Land|||Shambling Vent enters the battlefield tapped.${T}: Add {W} or {B} to your mana pool.${1}{W}{B}: Shambling Vent becomes a 2/3 white and black Elemental creature with lifelink until end of turn. It's still a land.| Shrine of the Forsaken Gods|Battle for Zendikar|245|R||Land|||{T}: Add {1} to your mana pool.${T}: Add {2} to your mana pool. Spend this mana only to cast colorless spells. Activate this ability only if you control seven or more lands.| @@ -27498,4 +27502,29 @@ Forest|Battle for Zendikar|270|L||Basic Land - Forest|||G| Forest|Battle for Zendikar|271|L||Basic Land - Forest|||G| Forest|Battle for Zendikar|272|L||Basic Land - Forest|||G| Forest|Battle for Zendikar|273|L||Basic Land - Forest|||G| -Forest|Battle for Zendikar|274|L||Basic Land - Forest|||G| \ No newline at end of file +Forest|Battle for Zendikar|274|L||Basic Land - Forest|||G| +Prairie Stream|Zendikar Expeditions|1|M||Land - Plains Island|||Prairie Stream enters the battlefield tapped unless you control two or more basic lands.| +Sunken Hollow|Zendikar Expeditions|2|M||Land - Island Swamp|||Sunken Hollow enters the battlefield tapped unless you control two or more basic lands.| +Smoldering Marsh|Zendikar Expeditions|3|M||Land - Swamp Mountain|||Smoldering Marsh enters the battlefield tapped unless you control two or more basic lands.| +Cinder Glade|Zendikar Expeditions|4|M||Land - Mountain Forest|||Cinder Glade enters the battlefield tapped unless you control two or more basic lands.| +Canopy Vista|Zendikar Expeditions|5|M||Land - Forest Plains|||Canopy Vista enters the battlefield tapped unless you control two or more basic lands.| +Hallowed Fountain|Zendikar Expeditions|6|M||Land - Plains Island|||({tap}: Add {W} or {U} to your mana pool.)$As Hallowed Fountain enters the battlefield, you may pay 2 life. If you don't, Hallowed Fountain enters the battlefield tapped.| +Watery Grave|Zendikar Expeditions|7|M||Land - Island Swamp|||({tap}: Add {U} or {B} to your mana pool.)$As Watery Grave enters the battlefield, you may pay 2 life. If you don't, Watery Grave enters the battlefield tapped.| +Blood Crypt|Zendikar Expeditions|8|M||Land - Swamp Mountain|||({tap}: Add {B} or {R} to your mana pool.)$As Blood Crypt enters the battlefield, you may pay 2 life. If you don't, Blood Crypt enters the battlefield tapped.| +Stomping Ground|Zendikar Expeditions|9|M||Land - Mountain Forest|||({tap}: Add {R} or {G} to your mana pool.)$As Stomping Ground enters the battlefield, you may pay 2 life. If you don't, Stomping Ground enters the battlefield tapped.| +Temple Garden|Zendikar Expeditions|10|M||Land - Forest Plains|||({tap}: Add {G} or {W} to your mana pool.)$As Temple Garden enters the battlefield, you may pay 2 life. If you don't, Temple Garden enters the battlefield tapped.| +Godless Shrine|Zendikar Expeditions|11|M||Land - Plains Swamp|||({tap}: Add {W} or {B} to your mana pool.)$As Godless Shrine enters the battlefield, you may pay 2 life. If you don't, Godless Shrine enters the battlefield tapped.| +Steam Vents|Zendikar Expeditions|12|M||Land - Island Mountain|||({tap}: Add {U} or {R} to your mana pool.)$As Steam Vents enters the battlefield, you may pay 2 life. If you don't, Steam Vents enters the battlefield tapped.| +Overgrown Tomb|Zendikar Expeditions|13|M||Land - Swamp Forest|||({tap}: Add {B} or {G} to your mana pool.)$As Overgrown Tomb enters the battlefield, you may pay 2 life. If you don't, Overgrown Tomb enters the battlefield tapped.| +Sacred Foundry|Zendikar Expeditions|14|M||Land - Mountain Plains|||({tap}: Add {R} or {W} to your mana pool.)$As Sacred Foundry enters the battlefield, you may pay 2 life. If you don't, Sacred Foundry enters the battlefield tapped.| +Breeding Pool|Zendikar Expeditions|15|M||Land - Forest Island|||({tap}: Add {G} or {U} to your mana pool.)$As Breeding Pool enters the battlefield, you may pay 2 life. If you don't, Breeding Pool enters the battlefield tapped.| +Flooded Strand|Zendikar Expeditions|16|M||Land|||{tap}, Pay 1 life, Sacrifice Flooded Strand: Search your library for a Plains or Island card and put it onto the battlefield. Then shuffle your library.| +Polluted Delta|Zendikar Expeditions|17|M||Land|||{tap}, Pay 1 life, Sacrifice Polluted Delta: Search your library for an Island or Swamp card and put it onto the battlefield. Then shuffle your library.| +Bloodstained Mire|Zendikar Expeditions|18|M||Land|||{tap}, Pay 1 life, Sacrifice Bloodstained Mire: Search your library for a Swamp or Mountain card and put it onto the battlefield. Then shuffle your library.| +Wooded Foothills|Zendikar Expeditions|19|M||Land|||{tap}, Pay 1 life, Sacrifice Wooded Foothills: Search your library for a Mountain or Forest card and put it onto the battlefield. Then shuffle your library.| +Windswept Heath|Zendikar Expeditions|20|M||Land|||{tap}, Pay 1 life, Sacrifice Windswept Heath: Search your library for a Forest or Plains card and put it onto the battlefield. Then shuffle your library.| +Marsh Flats|Zendikar Expeditions|21|M||Land|||{tap}, Pay 1 life, Sacrifice Marsh Flats: Search your library for a Plains or Swamp card and put it onto the battlefield. Then shuffle your library.| +Scalding Tarn|Zendikar Expeditions|22|M||Land|||{tap}, Pay 1 life, Sacrifice Scalding Tarn: Search your library for an Island or Mountain card and put it onto the battlefield. Then shuffle your library.| +Verdant Catacombs|Zendikar Expeditions|23|M||Land|||{tap}, Pay 1 life, Sacrifice Verdant Catacombs: Search your library for a Swamp or Forest card and put it onto the battlefield. Then shuffle your library.| +Arid Mesa|Zendikar Expeditions|24|M||Land|||{tap}, Pay 1 life, Sacrifice Arid Mesa: Search your library for a Mountain or Plains card and put it onto the battlefield. Then shuffle your library.| +Misty Rainforest|Zendikar Expeditions|25|M||Land|||{tap}, Pay 1 life, Sacrifice Misty Rainforest: Search your library for a Forest or Island card and put it onto the battlefield. Then shuffle your library.| \ No newline at end of file diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index cec0f4dfbf2..83e479e4585 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -110,6 +110,7 @@ MTGO Vanguard|VGO| New Phyrexia|NPH| Ninth Edition|9ED| Nemesis|NMS| +Oath of the Gatewatch|OGW| Odyssey|ODY| Onslaught|ONS| Prophecy|PCY| @@ -160,4 +161,5 @@ Weatherlight|WTH| World Magic Cup Qualifier|WMCQ| Worldwake|WWK| WPN Gateway|GRC| -Zendikar|ZEN| \ No newline at end of file +Zendikar|ZEN| +Zendikar Expeditions|EXP| \ No newline at end of file From 105b8ea6facd93f79ed7cb70b9ecf9414b04cb73 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Thu, 17 Sep 2015 23:32:35 -0500 Subject: [PATCH 12/16] [BFZ] Implemented Wasteland Strangler, Gruesome Slaughter, Angelic Captain, Drana Liberator of Malakir, Ugin's Insight --- .../sets/battleforzendikar/AkoumHellkite.java | 1 + .../battleforzendikar/AngelicCaptain.java | 81 ++++++++++++ .../DranaLiberatorOfMalakir.java | 83 ++++++++++++ .../battleforzendikar/GruesomeSlaughter.java | 79 +++++++++++ .../sets/battleforzendikar/UginsInsight.java | 102 ++++++++++++++ .../battleforzendikar/WastelandStrangler.java | 125 ++++++++++++++++++ 6 files changed, 471 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java index 8bafa7e7456..b1987a95f8f 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java @@ -78,6 +78,7 @@ public class AkoumHellkite extends CardImpl { return new AkoumHellkite(this); } } + class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl { private static final String text = "Landfall - Whenever a land enters the battlefield under your control, {this} deals 1 damage to target creature or player. " diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java new file mode 100644 index 00000000000..f984cb8a502 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java @@ -0,0 +1,81 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author fireshoes + */ +public class AngelicCaptain extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Ally"); + + static { + filter.add(new SubtypePredicate("Ally")); + filter.add(new AnotherPredicate()); + } + + public AngelicCaptain(UUID ownerId) { + super(ownerId, 208, "Angelic Captain", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Angel"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Angelic Captain attacks, it gets +1/+1 until end of turn for each other attacking Ally. + PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, value, Duration.EndOfTurn, true), false)); + } + + public AngelicCaptain(final AngelicCaptain card) { + super(card); + } + + @Override + public AngelicCaptain copy() { + return new AngelicCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java b/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java new file mode 100644 index 00000000000..e6076d394af --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class DranaLiberatorOfMalakir extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("each attacking creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DranaLiberatorOfMalakir(UUID ownerId) { + super(ownerId, 109, "Drana, Liberator of Malakir", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "BFZ"; + this.supertype.add("Legendary"); + this.subtype.add("Vampire"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Whenever Drana, Liberator of Malakir deals combat damage to player, put a +1/+1 counter on each attacking creature you control. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false)); + } + + public DranaLiberatorOfMalakir(final DranaLiberatorOfMalakir card) { + super(card); + } + + @Override + public DranaLiberatorOfMalakir copy() { + return new DranaLiberatorOfMalakir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java b/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java new file mode 100644 index 00000000000..189f4108e21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class GruesomeSlaughter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("colorless creatures you control"); + + static { + filter.add(new ColorlessPredicate()); + } + + public GruesomeSlaughter(UUID ownerId) { + super(ownerId, 9, "Gruesome Slaughter", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{6}"); + this.expansionSetCode = "BFZ"; + + // Until end of turn, colorless creatures you control gain "{T}: This creature deals damage equal to its power to target creature." + Effect effect = new DamageTargetEffect(new SourcePermanentPowerCount()); + effect.setText("{this} deals damage equal to its power to target creature."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn, filter)); + } + + public GruesomeSlaughter(final GruesomeSlaughter card) { + super(card); + } + + @Override + public GruesomeSlaughter copy() { + return new GruesomeSlaughter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java new file mode 100644 index 00000000000..7b1b6ded224 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java @@ -0,0 +1,102 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class UginsInsight extends CardImpl { + + public UginsInsight(UUID ownerId) { + super(ownerId, 87, "Ugin's Insight", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}{U}"); + this.expansionSetCode = "BFZ"; + + // Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards. + this.getSpellAbility().addEffect(new UginsInsightEffect()); + } + + public UginsInsight(final UginsInsight card) { + super(card); + } + + @Override + public UginsInsight copy() { + return new UginsInsight(this); + } +} + +class UginsInsightEffect extends OneShotEffect { + + public UginsInsightEffect() { + super(Outcome.DrawCard); + this.staticText = "Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards"; + } + + public UginsInsightEffect(final UginsInsightEffect effect) { + super(effect); + } + + @Override + public UginsInsightEffect copy() { + return new UginsInsightEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int highCMC = 0; + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { + if (permanent.getSpellAbility() != null) { + int cmc = permanent.getSpellAbility().getManaCosts().convertedManaCost(); + if (cmc > highCMC) { + highCMC = cmc; + } + } + } + if (highCMC > 0) { + controller.scry(highCMC, source, game); + } + controller.drawCards(3, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java b/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java new file mode 100644 index 00000000000..0b98f9db22e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java @@ -0,0 +1,125 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInExile; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class WastelandStrangler extends CardImpl { + + public WastelandStrangler(UUID ownerId) { + super(ownerId, 102, "Wasteland Strangler", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Wasteland Strangler enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, target creature gets -3/-3 until end of turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new WastelandStranglerEffect(), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public WastelandStrangler(final WastelandStrangler card) { + super(card); + } + + @Override + public WastelandStrangler copy() { + return new WastelandStrangler(this); + } +} + +class WastelandStranglerEffect extends OneShotEffect { + + private final static FilterCard filter = new FilterCard("card an opponent owns from exile"); + + static { + filter.add(new OwnerPredicate(TargetController.OPPONENT)); + } + + public WastelandStranglerEffect() { + super(Outcome.Discard); + this.staticText = "you may put a card an opponent owns from exile into that player's graveyard. If you do, target creature gets -3/-3 until end of turn."; + } + + public WastelandStranglerEffect(final WastelandStranglerEffect effect) { + super(effect); + } + + @Override + public WastelandStranglerEffect copy() { + return new WastelandStranglerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Target target = new TargetCardInExile(1, 1, filter, null); + if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { + if (controller.chooseTarget(outcome, target, source, game)) { + Cards cardsToGraveyard = new CardsImpl(target.getTargets()); + controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game); + game.addEffect(new BoostTargetEffect(-3, -3, Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } +} From e86d33ff97f3754f026240ec3bd8411b53fc9ad6 Mon Sep 17 00:00:00 2001 From: Brendan O'Dowd Date: Fri, 18 Sep 2015 06:10:31 -0400 Subject: [PATCH 13/16] [USG] Implemented 7 cards --- .../src/mage/sets/urzassaga/Crosswinds.java | 70 +++++++++++++++ .../src/mage/sets/urzassaga/Despondency.java | 80 +++++++++++++++++ .../src/mage/sets/urzassaga/Fortitude.java | 90 +++++++++++++++++++ .../src/mage/sets/urzassaga/GaeasBounty.java | 67 ++++++++++++++ .../src/mage/sets/urzassaga/MonkIdealist.java | 77 ++++++++++++++++ .../mage/sets/urzassaga/SkitteringSkirge.java | 75 ++++++++++++++++ .../sets/urzassaga/ViashinoWeaponsmith.java | 64 +++++++++++++ 7 files changed, 523 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/urzassaga/Crosswinds.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/Despondency.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/Fortitude.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/GaeasBounty.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/MonkIdealist.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/ViashinoWeaponsmith.java diff --git a/Mage.Sets/src/mage/sets/urzassaga/Crosswinds.java b/Mage.Sets/src/mage/sets/urzassaga/Crosswinds.java new file mode 100644 index 00000000000..73aaa540fba --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Crosswinds.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.urzassaga; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author hanasu + */ +public class Crosswinds extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Creatures with flying"); + + static { + filter1.add(new AbilityPredicate(FlyingAbility.class)); + } + + public Crosswinds(UUID ownerId) { + super(ownerId, 246, "Crosswinds", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "USG"; + + // Creatures with flying get -2/-0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(-2, 0, Duration.WhileOnBattlefield, filter1, false))); + } + + public Crosswinds(final Crosswinds card) { + super(card); + } + + @Override + public Crosswinds copy() { + return new Crosswinds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Despondency.java b/Mage.Sets/src/mage/sets/urzassaga/Despondency.java new file mode 100644 index 00000000000..603c895cee1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Despondency.java @@ -0,0 +1,80 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class Despondency extends CardImpl { + + public Despondency(UUID ownerId) { + super(ownerId, 129, "Despondency", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets -2/-0. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-2, 0)); + this.addAbility(ability); + + // When Despondency is put into a graveyard from the battlefield, return Despondency to its owner's hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); + } + + public Despondency(final Despondency card) { + super(card); + } + + @Override + public Despondency copy() { + return new Despondency(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Fortitude.java b/Mage.Sets/src/mage/sets/urzassaga/Fortitude.java new file mode 100644 index 00000000000..34e1c426be3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Fortitude.java @@ -0,0 +1,90 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.RegenerateAttachedEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class Fortitude extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Forest"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public Fortitude(UUID ownerId) { + super(ownerId, 253, "Fortitude", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "USG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Sacrifice a Forest: Regenerate enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), new SacrificeTargetCost(new TargetControlledPermanent(filter)))); + + // When Fortitude is put into a graveyard from the battlefield, return Fortitude to its owner's hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); + } + + public Fortitude(final Fortitude card) { + super(card); + } + + @Override + public Fortitude copy() { + return new Fortitude(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/GaeasBounty.java b/Mage.Sets/src/mage/sets/urzassaga/GaeasBounty.java new file mode 100644 index 00000000000..a97e7cc9aa8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/GaeasBounty.java @@ -0,0 +1,67 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author hanasu + */ +public class GaeasBounty extends CardImpl { + + private static final FilterLandCard filter = new FilterLandCard("Forest"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public GaeasBounty(UUID ownerId) { + super(ownerId, 254, "Gaea's Bounty", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "USG"; + + // Search your library for up to two Forest cards, reveal those cards, and put them into your hand. Then shuffle your library. + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, filter), false)); + } + + public GaeasBounty(final GaeasBounty card) { + super(card); + } + + @Override + public GaeasBounty copy() { + return new GaeasBounty(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/MonkIdealist.java b/Mage.Sets/src/mage/sets/urzassaga/MonkIdealist.java new file mode 100644 index 00000000000..8e24a1ac389 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/MonkIdealist.java @@ -0,0 +1,77 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author hanasu + */ +public class MonkIdealist extends CardImpl { + + private static final FilterCard filter = new FilterCard("enchantment card from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + } + + public MonkIdealist(UUID ownerId) { + super(ownerId, 20, "Monk Idealist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "USG"; + this.subtype.add("Human"); + this.subtype.add("Monk"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Monk Idealist enters the battlefield, return target enchantment card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + public MonkIdealist(final MonkIdealist card) { + super(card); + } + + @Override + public MonkIdealist copy() { + return new MonkIdealist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java b/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java new file mode 100644 index 00000000000..be3d7a99302 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author hanasu + */ +public class SkitteringSkirge extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a creature spell"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public SkitteringSkirge(UUID ownerId) { + super(ownerId, 158, "Skittering Skirge", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Imp"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When you cast a creature spell, sacrifice Skittering Skirge. + this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, true)); + } + + public SkitteringSkirge(final SkitteringSkirge card) { + super(card); + } + + @Override + public SkitteringSkirge copy() { + return new SkitteringSkirge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/ViashinoWeaponsmith.java b/Mage.Sets/src/mage/sets/urzassaga/ViashinoWeaponsmith.java new file mode 100644 index 00000000000..fef2a24dfe9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/ViashinoWeaponsmith.java @@ -0,0 +1,64 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author hanasu + */ +public class ViashinoWeaponsmith extends CardImpl { + + public ViashinoWeaponsmith(UUID ownerId) { + super(ownerId, 226, "Viashino Weaponsmith", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "USG"; + this.subtype.add("Viashino"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Viashino Weaponsmith becomes blocked by a creature, Viashino Weaponsmith gets +2/+2 until end of turn. + this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + } + + public ViashinoWeaponsmith(final ViashinoWeaponsmith card) { + super(card); + } + + @Override + public ViashinoWeaponsmith copy() { + return new ViashinoWeaponsmith(this); + } +} From 6f15e38b27107fabd86b1b78e6381429b529ac21 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 18 Sep 2015 13:07:01 +0200 Subject: [PATCH 14/16] [BFZ] Added Fertile Thicket, Brutal Expulsion and Guul Draz Overseer. --- .../battleforzendikar/BrutalExpulsion.java | 93 ++++++++++++++ .../battleforzendikar/FertileThicket.java | 116 ++++++++++++++++++ .../battleforzendikar/GuulDrazOverseer.java | 107 ++++++++++++++++ .../abilities/common/LandfallAbility.java | 83 ++++++++----- .../LookLibraryAndPickControllerEffect.java | 91 +++++++------- .../common/ReturnToHandTargetEffect.java | 15 +-- .../filter/common/FilterSpellOrPermanent.java | 8 ++ 7 files changed, 421 insertions(+), 92 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BrutalExpulsion.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/FertileThicket.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/GuulDrazOverseer.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BrutalExpulsion.java b/Mage.Sets/src/mage/sets/battleforzendikar/BrutalExpulsion.java new file mode 100644 index 00000000000..fcddf947e1b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BrutalExpulsion.java @@ -0,0 +1,93 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterSpellOrPermanent; +import mage.target.common.TargetCreatureOrPlaneswalker; +import mage.target.common.TargetSpellOrPermanent; +import mage.watchers.common.DamagedByWatcher; + +/** + * + * @author LevelX2 + */ +public class BrutalExpulsion extends CardImpl { + + private static final FilterSpellOrPermanent filter = new FilterSpellOrPermanent("spell or creature"); + + static { + filter.setPermanentFilter(new FilterCreaturePermanent()); + } + + public BrutalExpulsion(UUID ownerId) { + super(ownerId, 200, "Brutal Expulsion", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{U}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Choose one or both + this.getSpellAbility().getModes().setMinModes(1); + this.getSpellAbility().getModes().setMaxModes(2); + // - Return target spell or creature to its owner's hand; + this.getSpellAbility().addTarget(new TargetSpellOrPermanent(1, 1, filter, false)); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + // or Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead. + Mode mode = new Mode(); + mode.getEffects().add(new DamageTargetEffect(2)); + mode.getTargets().add(new TargetCreatureOrPlaneswalker()); + Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); + effect.setText("If that permanent would be put into a graveyard this turn, exile it instead"); + mode.getEffects().add(effect); + this.getSpellAbility().addMode(mode); + this.getSpellAbility().addWatcher(new DamagedByWatcher()); + } + + public BrutalExpulsion(final BrutalExpulsion card) { + super(card); + } + + @Override + public BrutalExpulsion copy() { + return new BrutalExpulsion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/FertileThicket.java b/Mage.Sets/src/mage/sets/battleforzendikar/FertileThicket.java new file mode 100644 index 00000000000..fde59a38378 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/FertileThicket.java @@ -0,0 +1,116 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author LevelX2 + */ +public class FertileThicket extends CardImpl { + + public FertileThicket(UUID ownerId) { + super(ownerId, 237, "Fertile Thicket", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // Fertile Thicket enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Fertile Thicket enters the battlefield, you may look at the top five cards of your library. If you do, reveal up to one basic land card from among them, then put that card on top of your library and the rest on the bottom in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new FertileThicketEffect(), true)); + + // {T}: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + } + + public FertileThicket(final FertileThicket card) { + super(card); + } + + @Override + public FertileThicket copy() { + return new FertileThicket(this); + } +} + +class FertileThicketEffect extends OneShotEffect { + + public FertileThicketEffect() { + super(Outcome.Benefit); + this.staticText = "you may look at the top five cards of your library. If you do, reveal up to one basic land card from among them, then put that card on top of your library and the rest on the bottom in any order"; + } + + public FertileThicketEffect(final FertileThicketEffect effect) { + super(effect); + } + + @Override + public FertileThicketEffect copy() { + return new FertileThicketEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + Cards cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, 5)); + controller.lookAtCards(sourceObject.getIdName(), cards, game); + TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, new FilterBasicLandCard()); + controller.chooseTarget(outcome, cards, target, source, game); + Cards cardsRevealed = new CardsImpl(target.getTargets()); + if (!cardsRevealed.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), cardsRevealed, game); + cards.removeAll(cardsRevealed); + controller.putCardsOnTopOfLibrary(cardsRevealed, game, source, true); + } + controller.putCardsOnBottomOfLibrary(cards, game, source, true); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GuulDrazOverseer.java b/Mage.Sets/src/mage/sets/battleforzendikar/GuulDrazOverseer.java new file mode 100644 index 00000000000..745e55c2a94 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GuulDrazOverseer.java @@ -0,0 +1,107 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class GuulDrazOverseer extends CardImpl { + + public GuulDrazOverseer(UUID ownerId) { + super(ownerId, 112, "Guul Draz Overseer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Vampire"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Landfall- Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead. + this.addAbility(new LandfallAbility(Zone.BATTLEFIELD, new GuulDrazOverseerEffect(), false, SetTargetPointer.PERMANENT)); + } + + public GuulDrazOverseer(final GuulDrazOverseer card) { + super(card); + } + + @Override + public GuulDrazOverseer copy() { + return new GuulDrazOverseer(this); + } +} + +class GuulDrazOverseerEffect extends OneShotEffect { + + public GuulDrazOverseerEffect() { + super(Outcome.BoostCreature); + this.staticText = "other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead"; + } + + public GuulDrazOverseerEffect(final GuulDrazOverseerEffect effect) { + super(effect); + } + + @Override + public GuulDrazOverseerEffect copy() { + return new GuulDrazOverseerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent land = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); + if (controller != null && land != null) { + int boost = 1; + if (land.getSubtype().contains("Swamp")) { + boost = 2; + } + game.addEffect(new BoostControlledEffect(boost, 0, Duration.EndOfTurn, true), source); + return true; + } + return false; + } +} diff --git a/Mage/src/mage/abilities/common/LandfallAbility.java b/Mage/src/mage/abilities/common/LandfallAbility.java index db19efb0ffd..84f3e3087e4 100644 --- a/Mage/src/mage/abilities/common/LandfallAbility.java +++ b/Mage/src/mage/abilities/common/LandfallAbility.java @@ -1,40 +1,41 @@ /* -* 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. -*/ - + * 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.abilities.common; -import mage.constants.CardType; -import mage.constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; /** * @@ -42,16 +43,24 @@ import mage.game.permanent.Permanent; */ public class LandfallAbility extends TriggeredAbilityImpl { + protected SetTargetPointer setTargetPointer; + public LandfallAbility(Effect effect, boolean optional) { - this(Zone.BATTLEFIELD, effect, optional); + this(Zone.BATTLEFIELD, effect, optional); } - public LandfallAbility (Zone zone, Effect effect, Boolean optional ) { + public LandfallAbility(Zone zone, Effect effect, Boolean optional) { + this(zone, effect, optional, SetTargetPointer.NONE); + } + + public LandfallAbility(Zone zone, Effect effect, Boolean optional, SetTargetPointer setTargetPointer) { super(zone, effect, optional); + this.setTargetPointer = setTargetPointer; } public LandfallAbility(final LandfallAbility ability) { super(ability); + this.setTargetPointer = ability.setTargetPointer; } @Override @@ -62,7 +71,17 @@ public class LandfallAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - return permanent != null && permanent.getCardType().contains(CardType.LAND) && permanent.getControllerId().equals(this.controllerId); + if (permanent != null + && permanent.getCardType().contains(CardType.LAND) + && permanent.getControllerId().equals(this.controllerId)) { + if (setTargetPointer.equals(SetTargetPointer.PERMANENT)) { + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(permanent, game)); + } + } + return true; + } + return false; } @Override diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index 88121480466..89b065c0306 100644 --- a/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -1,5 +1,5 @@ /* - * + * * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -25,10 +25,11 @@ * 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.abilities.effects.common; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.dynamicvalue.DynamicValue; @@ -42,32 +43,28 @@ import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; - -import java.util.List; -import java.util.UUID; import mage.util.CardUtil; /** * * @author LevelX */ - public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEffect { protected FilterCard filter; // which kind of cards to reveal protected DynamicValue numberToPick; protected boolean revealPickedCards = true; - protected Zone targetPickedCards = Zone.HAND; // HAND + protected Zone targetPickedCards = Zone.HAND; // HAND protected int foundCardsToPick = 0; protected boolean optional; private boolean upTo; public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, FilterCard pickFilter, boolean putOnTop) { - this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, putOnTop, true); + this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, putOnTop, true); } public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, FilterCard pickFilter, boolean putOnTop, boolean reveal) { - this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, Zone.LIBRARY, putOnTop, reveal); + this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, Zone.LIBRARY, putOnTop, reveal); } public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, @@ -92,13 +89,13 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, FilterCard pickFilter, Zone targetZoneLookedCards, boolean putOnTop, boolean reveal, boolean upTo, Zone targetZonePickedCards, boolean optional) { - super(Outcome.DrawCard, numberOfCards, mayShuffleAfter, targetZoneLookedCards, putOnTop); - this.numberToPick = numberToPick; - this.filter = pickFilter; - this.revealPickedCards = reveal; - this.targetPickedCards = targetZonePickedCards; - this.upTo = upTo; - this.optional = optional; + super(Outcome.DrawCard, numberOfCards, mayShuffleAfter, targetZoneLookedCards, putOnTop); + this.numberToPick = numberToPick; + this.filter = pickFilter; + this.revealPickedCards = reveal; + this.targetPickedCards = targetZonePickedCards; + this.upTo = upTo; + this.optional = optional; } public LookLibraryAndPickControllerEffect(final LookLibraryAndPickControllerEffect effect) { @@ -116,6 +113,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff return new LookLibraryAndPickControllerEffect(this); } + @Override protected void cardLooked(Card card, Game game, Ability source) { if (numberToPick.calculate(game, source, this) > 0 && filter.match(card, game)) { @@ -130,7 +128,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff if (!optional || player.chooseUse(Outcome.DrawCard, getMayText(), source, game)) { FilterCard pickFilter = filter.copy(); pickFilter.setMessage(getPickText()); - TargetCard target = new TargetCard((upTo ? 0:numberToPick.calculate(game, source, this)),numberToPick.calculate(game, source, this), Zone.PICK, pickFilter); + TargetCard target = new TargetCard((upTo ? 0 : numberToPick.calculate(game, source, this)), numberToPick.calculate(game, source, this), Zone.PICK, pickFilter); if (player.choose(Outcome.DrawCard, cards, target, game)) { Cards reveal = new CardsImpl(); for (UUID cardId : target.getTargets()) { @@ -141,8 +139,9 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); } else { card.moveToZone(targetPickedCards, source.getSourceId(), game, false); - if (!game.isSimulation()) + if (!game.isSimulation()) { game.informPlayers(player.getLogName() + " moves a card to " + targetPickedCards.toString().toLowerCase()); + } } if (revealPickedCards) { reveal.add(card); @@ -161,7 +160,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff private String getMayText() { StringBuilder sb = new StringBuilder("Do you wish to "); - switch(targetPickedCards) { + switch (targetPickedCards) { case HAND: if (revealPickedCards) { sb.append("reveal ").append(filter.getMessage()).append(" and put into your hand"); @@ -181,7 +180,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff private String getPickText() { StringBuilder sb = new StringBuilder(filter.getMessage()).append(" to "); - switch(targetPickedCards) { + switch (targetPickedCards) { case HAND: if (revealPickedCards) { sb.append("reveal and put into your hand"); @@ -206,37 +205,37 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff } StringBuilder sb = new StringBuilder(); if (numberToPick.calculate(null, null, this) > 0) { - - if (revealPickedCards) { - sb.append(". You may reveal "); - sb.append(filter.getMessage()).append(" from among them and put it into your "); + + if (revealPickedCards) { + sb.append(". You may reveal "); + sb.append(filter.getMessage()).append(" from among them and put it into your "); + } else { + if (targetPickedCards.equals(Zone.BATTLEFIELD)) { + sb.append(". You "); + if (optional) { + sb.append("may "); + } + sb.append("put ").append(filter.getMessage()).append(" from among them onto the "); } else { - if (targetPickedCards.equals(Zone.BATTLEFIELD)) { - sb.append(". You "); - if (optional) { - sb.append("may "); - } - sb.append("put ").append(filter.getMessage()).append(" from among them onto the "); - } else { - sb.append(". Put "); - if (numberToPick.calculate(null, null, this) > 1 ) { - if (upTo) { - if (numberToPick.calculate(null, null, this) == (numberOfCards.calculate(null, null, this))) { - sb.append("any number"); - } else { - sb.append("up to ").append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); - } - } else{ - sb.append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); + sb.append(". Put "); + if (numberToPick.calculate(null, null, this) > 1) { + if (upTo) { + if (numberToPick.calculate(null, null, this) == (numberOfCards.calculate(null, null, this))) { + sb.append("any number"); + } else { + sb.append("up to ").append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); } } else { - sb.append("one"); + sb.append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); } - - sb.append(" of them into your "); + } else { + sb.append("one"); } + + sb.append(" of them into your "); } - sb.append(targetPickedCards.toString().toLowerCase()); + } + sb.append(targetPickedCards.toString().toLowerCase()); if (targetZoneLookedCards == Zone.LIBRARY) { sb.append(". Put the rest "); @@ -252,6 +251,6 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff } // get text frame from super class and inject action text return setText(mode, sb.toString()); - } + } } diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java index ebf5260bbb5..7e6d25c1477 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -27,13 +27,9 @@ */ package mage.abilities.effects.common; -import java.util.UUID; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.Outcome; import mage.constants.Zone; @@ -74,16 +70,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect { if (controller == null) { return false; } - Cards cardsToHand = new CardsImpl(); - Zone fromZone = game.getState().getZone(targetPointer.getFirst(game, source)); - - for (UUID targetId : targetPointer.getTargets(game, source)) { - MageObject mageObject = game.getObject(targetId); - if (mageObject instanceof Card) { - cardsToHand.add((Card) mageObject); - } - } - return controller.moveCards(cardsToHand, fromZone, Zone.HAND, source, game); + return controller.moveCards(new CardsImpl(targetPointer.getTargets(game, source)), null, Zone.HAND, source, game); } @Override diff --git a/Mage/src/mage/filter/common/FilterSpellOrPermanent.java b/Mage/src/mage/filter/common/FilterSpellOrPermanent.java index a4d3371cf63..e0d6a093065 100644 --- a/Mage/src/mage/filter/common/FilterSpellOrPermanent.java +++ b/Mage/src/mage/filter/common/FilterSpellOrPermanent.java @@ -91,6 +91,14 @@ public class FilterSpellOrPermanent extends FilterImpl implements Filter return this.spellFilter; } + public void setPermanentFilter(FilterPermanent permanentFilter) { + this.permanentFilter = permanentFilter; + } + + public void setSpellFilter(FilterSpell spellFilter) { + this.spellFilter = spellFilter; + } + @Override public FilterSpellOrPermanent copy() { return new FilterSpellOrPermanent(this); From cb629f022864a8964e31cd1b48e6138d93941ec2 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 18 Sep 2015 15:02:20 +0200 Subject: [PATCH 15/16] [BFZ] Added Emeria Shepherd, Blighted Steppe, Blighted Woodland and BlightedGorge. --- .../sets/battleforzendikar/BlightedGorge.java | 75 ++++++++++++++++++ .../battleforzendikar/BlightedSteppe.java | 75 ++++++++++++++++++ .../battleforzendikar/BlightedWoodland.java | 75 ++++++++++++++++++ .../battleforzendikar/EmeriaShepherd.java | 79 +++++++++++++++++++ 4 files changed, 304 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BlightedGorge.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BlightedSteppe.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BlightedWoodland.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedGorge.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedGorge.java new file mode 100644 index 00000000000..f1e27410aea --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedGorge.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class BlightedGorge extends CardImpl { + + public BlightedGorge(UUID ownerId) { + super(ownerId, 231, "Blighted Gorge", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {4}{R}, {T}, Sacrifice Blighted Gorge: Blighted Gorge deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(2), + new ManaCostsImpl<>("{3}{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public BlightedGorge(final BlightedGorge card) { + super(card); + } + + @Override + public BlightedGorge copy() { + return new BlightedGorge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedSteppe.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedSteppe.java new file mode 100644 index 00000000000..c0c4d00ff6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedSteppe.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class BlightedSteppe extends CardImpl { + + public BlightedSteppe(UUID ownerId) { + super(ownerId, 232, "Blighted Steppe", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {3}{W}, {T}, Sacrifice Blighted Steppe: You gain 2 life for each creature you control. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creature you control"), 2)), + new ManaCostsImpl<>("{3}{W}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public BlightedSteppe(final BlightedSteppe card) { + super(card); + } + + @Override + public BlightedSteppe copy() { + return new BlightedSteppe(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedWoodland.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedWoodland.java new file mode 100644 index 00000000000..694a2e74187 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedWoodland.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class BlightedWoodland extends CardImpl { + + public BlightedWoodland(UUID ownerId) { + super(ownerId, 233, "Blighted Woodland", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {3}{G}, {T}, Sacrifice Blighted Woodland: Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()), true, true), + new ManaCostsImpl<>("{3}{G}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public BlightedWoodland(final BlightedWoodland card) { + super(card); + } + + @Override + public BlightedWoodland copy() { + return new BlightedWoodland(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java b/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java new file mode 100644 index 00000000000..663f22d37c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class EmeriaShepherd extends CardImpl { + + private static final FilterPermanentCard filter = new FilterPermanentCard("nonland permanent card from your graveyard"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public EmeriaShepherd(UUID ownerId) { + super(ownerId, 22, "Emeria Shepherd", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Angel"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Landfall — Whenever a land enters the battlefield under your control, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead. + Ability ability = new LandfallAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterPermanentCard(filter))); + this.addAbility(ability); + } + + public EmeriaShepherd(final EmeriaShepherd card) { + super(card); + } + + @Override + public EmeriaShepherd copy() { + return new EmeriaShepherd(this); + } +} From fcbc9ce3a5dc0ea8b93981a215eddea34b7d30b5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 18 Sep 2015 15:31:49 +0200 Subject: [PATCH 16/16] Fixed a bug of TargetSpellOrPermanent. --- .../target/common/TargetSpellOrPermanent.java | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Mage/src/mage/target/common/TargetSpellOrPermanent.java b/Mage/src/mage/target/common/TargetSpellOrPermanent.java index 0e338680926..fea5811abbf 100644 --- a/Mage/src/mage/target/common/TargetSpellOrPermanent.java +++ b/Mage/src/mage/target/common/TargetSpellOrPermanent.java @@ -1,5 +1,5 @@ /* - * + * * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -25,7 +25,7 @@ * 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.target.common; @@ -51,7 +51,6 @@ import mage.target.TargetImpl; public class TargetSpellOrPermanent extends TargetImpl { protected FilterSpellOrPermanent filter; - protected FilterPermanent filterPermanent; public TargetSpellOrPermanent() { this(1, 1); @@ -62,28 +61,28 @@ public class TargetSpellOrPermanent extends TargetImpl { } public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets) { - this.minNumberOfTargets = minNumTargets; - this.maxNumberOfTargets = maxNumTargets; - this.zone = Zone.ALL; - this.filter = new FilterSpellOrPermanent(); - this.targetName = filter.getMessage(); - this.filterPermanent = new FilterPermanent(); + this(minNumTargets, maxNumTargets, false); } public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets, boolean notTarget) { - this(minNumTargets, maxNumTargets); + this(minNumTargets, maxNumTargets, new FilterSpellOrPermanent(), notTarget); this.notTarget = notTarget; } - public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets, FilterSpellOrPermanent filter,boolean notTarget) { - this(minNumTargets, maxNumTargets); + public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets, FilterSpellOrPermanent filter, boolean notTarget) { + super(notTarget); + this.minNumberOfTargets = minNumTargets; + this.maxNumberOfTargets = maxNumTargets; + this.zone = Zone.ALL; + this.targetName = filter.getMessage(); this.notTarget = notTarget; this.filter = filter; + this.targetName = filter.getMessage(); } + public TargetSpellOrPermanent(final TargetSpellOrPermanent target) { super(target); this.filter = target.filter.copy(); - this.filterPermanent = target.filterPermanent.copy(); } @Override @@ -92,7 +91,7 @@ public class TargetSpellOrPermanent extends TargetImpl { } public FilterPermanent getPermanentFilter() { - return this.filterPermanent; + return this.filter.getPermanentFilter(); } public void setFilter(FilterSpellOrPermanent filter) { @@ -136,19 +135,21 @@ public class TargetSpellOrPermanent extends TargetImpl { } /** - * Checks if there are enough {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} that can be chosen. Should only be used - * for Ability targets since this checks for protection, shroud etc. + * Checks if there are enough {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} that can be chosen. Should only be used for + * Ability targets since this checks for protection, shroud etc. * * @param sourceId - the target event source * @param sourceControllerId - controller of the target event source * @param game - * @return - true if enough valid {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} exist + * @return - true if enough valid {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} exist */ @Override public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { int count = 0; MageObject targetSource = game.getObject(sourceId); - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); if (spell != null && filter.match(spell, sourceId, sourceControllerId, game)) { count++; @@ -157,7 +158,7 @@ public class TargetSpellOrPermanent extends TargetImpl { } } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) { count++; if (count >= this.minNumberOfTargets) { @@ -169,17 +170,19 @@ public class TargetSpellOrPermanent extends TargetImpl { } /** - * Checks if there are enough {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} that can be selected. Should not be used + * Checks if there are enough {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} that can be selected. Should not be used * for Ability targets since this does not check for protection, shroud etc. * * @param sourceControllerId - controller of the select event * @param game - * @return - true if enough valid {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} exist + * @return - true if enough valid {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} exist */ @Override public boolean canChoose(UUID sourceControllerId, Game game) { int count = 0; - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); if (spell != null && filter.match(spell, null, sourceControllerId, game) && filter.match(spell, game)) { count++; @@ -188,7 +191,7 @@ public class TargetSpellOrPermanent extends TargetImpl { } } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (filter.match(permanent, null, sourceControllerId, game) && filter.match(permanent, game)) { count++; if (count >= this.minNumberOfTargets) { @@ -203,13 +206,13 @@ public class TargetSpellOrPermanent extends TargetImpl { public Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { Set possibleTargets = new HashSet<>(); MageObject targetSource = game.getObject(sourceId); - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); if (spell != null && filter.match(spell, null, sourceControllerId, game) && filter.match(spell, game)) { possibleTargets.add(spell.getId()); } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) { possibleTargets.add(permanent.getId()); } @@ -220,13 +223,13 @@ public class TargetSpellOrPermanent extends TargetImpl { @Override public Set possibleTargets(UUID sourceControllerId, Game game) { Set possibleTargets = new HashSet<>(); - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); if (spell != null && filter.match(spell, null, sourceControllerId, game) && filter.match(spell, game)) { possibleTargets.add(spell.getId()); } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (filter.match(permanent, null, sourceControllerId, game)) { possibleTargets.add(permanent.getId()); } @@ -237,12 +240,11 @@ public class TargetSpellOrPermanent extends TargetImpl { @Override public String getTargetedName(Game game) { StringBuilder sb = new StringBuilder(); - for (UUID targetId: getTargets()) { + for (UUID targetId : getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { sb.append(permanent.getLogName()).append(" "); - } - else { + } else { Spell spell = game.getStack().getSpell(targetId); sb.append(spell.getLogName()).append(" "); }