From 4da225475f1ef32788cc322aeda2e49d3fdd3dcf Mon Sep 17 00:00:00 2001 From: fireshoes Date: Mon, 31 Aug 2015 18:58:45 -0500 Subject: [PATCH] Changed some existing cards to use PermanentsOnTheBattlefieldCondition instead of adding a cost.[BFZ] Implemented Brood Butcher.[CSP] Implemented Heidar Rimewind Master, Rimewind Cryomancer, and Rimewind Taskmage.[LEG] Implemented Hyperion Blacksmith. --- .../sets/battleforzendikar/BroodButcher.java | 87 ++++++ .../championsofkamigawa/BloodthirstyOgre.java | 24 +- .../sets/coldsnap/HeidarRimewindMaster.java | 86 ++++++ .../sets/coldsnap/RimewindCryomancer.java | 85 ++++++ .../mage/sets/coldsnap/RimewindTaskmage.java | 85 ++++++ .../src/mage/sets/futuresight/NimbusMaze.java | 37 +-- .../mage/sets/innistrad/BloodlineKeeper.java | 237 +++++++-------- .../mage/sets/legends/HyperionBlacksmith.java | 79 +++++ .../sets/shadowmoor/LeechriddenSwamp.java | 271 ++++++++---------- .../sets/shadowmoor/MadblindMountain.java | 175 +++++------ .../mage/sets/shadowmoor/MoonringIsland.java | 179 ++++++------ .../mage/sets/shadowmoor/SapseepForest.java | 175 +++++------ .../permanent/token/EldraziScionToken.java | 2 +- Utils/mtg-cards-data.txt | 2 + 14 files changed, 957 insertions(+), 567 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/BroodButcher.java create mode 100644 Mage.Sets/src/mage/sets/coldsnap/HeidarRimewindMaster.java create mode 100644 Mage.Sets/src/mage/sets/coldsnap/RimewindCryomancer.java create mode 100644 Mage.Sets/src/mage/sets/coldsnap/RimewindTaskmage.java create mode 100644 Mage.Sets/src/mage/sets/legends/HyperionBlacksmith.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BroodButcher.java b/Mage.Sets/src/mage/sets/battleforzendikar/BroodButcher.java new file mode 100644 index 00000000000..15f532eb8db --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BroodButcher.java @@ -0,0 +1,87 @@ +/* + * 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.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.permanent.token.EldraziScionToken; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class BroodButcher extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a creature"); + + public BroodButcher(UUID ownerId) { + super(ownerId, 199, "Brood Butcher", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Brood Butcher enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new EldraziScionToken()), false)); + + // {B}{G}, Sacrifice a creature: Target creature gets -2/-2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl("{B}{G}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public BroodButcher(final BroodButcher card) { + super(card); + } + + @Override + public BroodButcher copy() { + return new BroodButcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BloodthirstyOgre.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BloodthirstyOgre.java index ac0d7e7614c..d1a0b5dda3c 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/BloodthirstyOgre.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BloodthirstyOgre.java @@ -28,14 +28,11 @@ package mage.sets.championsofkamigawa; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ControlPermanentCost; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CountersCount; @@ -43,6 +40,10 @@ import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; 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.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -54,7 +55,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class BloodthirstyOgre extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control a Demon"); + static { filter.add(new SubtypePredicate("Demon")); } @@ -71,11 +73,13 @@ public class BloodthirstyOgre extends CardImpl { // {T}: Put a devotion counter on Bloodthirsty Ogre this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.DEVOTION.createInstance()),new TapSourceCost())); + // {T}: Target creature gets -X/-X until end of turn, where X is the number of devotion counters on Bloodthirsty Ogre. Activate this ability only if you control a Demon. DynamicValue devotionCounters = new SignInversionDynamicValue(new CountersCount(CounterType.DEVOTION)); - Ability ability; - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(devotionCounters,devotionCounters, Duration.EndOfTurn, true),new TapSourceCost()); - ability.addCost(new ControlPermanentCost(filter)); + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(devotionCounters,devotionCounters, Duration.EndOfTurn, true), + new TapSourceCost(), + new PermanentsOnTheBattlefieldCondition(filter)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } @@ -87,6 +91,6 @@ public class BloodthirstyOgre extends CardImpl { @Override public BloodthirstyOgre copy() { return new BloodthirstyOgre(this); - } + } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/coldsnap/HeidarRimewindMaster.java b/Mage.Sets/src/mage/sets/coldsnap/HeidarRimewindMaster.java new file mode 100644 index 00000000000..6011ac418d9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/HeidarRimewindMaster.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class HeidarRimewindMaster extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control four or more snow permanents"); + + static { + filter.add(new SupertypePredicate("Snow")); + } + + public HeidarRimewindMaster(UUID ownerId) { + super(ownerId, 36, "Heidar, Rimewind Master", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}, {tap}: Return target permanent to its owner's hand. Activate this ability only if you control four or more snow permanents. + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new ReturnToHandTargetEffect(), + new GenericManaCost(2), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 3)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public HeidarRimewindMaster(final HeidarRimewindMaster card) { + super(card); + } + + @Override + public HeidarRimewindMaster copy() { + return new HeidarRimewindMaster(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/RimewindCryomancer.java b/Mage.Sets/src/mage/sets/coldsnap/RimewindCryomancer.java new file mode 100644 index 00000000000..41775a35a3b --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/RimewindCryomancer.java @@ -0,0 +1,85 @@ +/* + * 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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetActivatedAbility; + +/** + * + * @author fireshoes + */ +public class RimewindCryomancer extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control four or more snow permanents"); + + static { + filter.add(new SupertypePredicate("Snow")); + } + + public RimewindCryomancer(UUID ownerId) { + super(ownerId, 43, "Rimewind Cryomancer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {1}, {tap}: Counter target activated ability. Activate this ability only if you control four or more snow permanents. + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new CounterTargetEffect(), + new GenericManaCost(1), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 3)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetActivatedAbility()); + this.addAbility(ability); + } + + public RimewindCryomancer(final RimewindCryomancer card) { + super(card); + } + + @Override + public RimewindCryomancer copy() { + return new RimewindCryomancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/RimewindTaskmage.java b/Mage.Sets/src/mage/sets/coldsnap/RimewindTaskmage.java new file mode 100644 index 00000000000..420ca2ecc6c --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/RimewindTaskmage.java @@ -0,0 +1,85 @@ +/* + * 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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.MayTapOrUntapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class RimewindTaskmage extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control four or more snow permanents"); + + static { + filter.add(new SupertypePredicate("Snow")); + } + + public RimewindTaskmage(UUID ownerId) { + super(ownerId, 44, "Rimewind Taskmage", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {1}, {tap}: You may tap or untap target permanent. Activate this ability only if you control four or more snow permanents. + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new MayTapOrUntapTargetEffect(), + new GenericManaCost(1), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 3)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public RimewindTaskmage(final RimewindTaskmage card) { + super(card); + } + + @Override + public RimewindTaskmage copy() { + return new RimewindTaskmage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java b/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java index a5c250207e9..75026f82f29 100644 --- a/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java +++ b/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java @@ -28,20 +28,21 @@ package mage.sets.futuresight; import java.util.UUID; - +import mage.Mana; import mage.abilities.Ability; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.CostImpl; -import mage.abilities.mana.BlueManaAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.BasicManaEffect; +import mage.abilities.mana.ActivateIfConditionManaAbility; import mage.abilities.mana.ColorlessManaAbility; -import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; /** @@ -50,14 +51,12 @@ import mage.game.Game; */ public class NimbusMaze extends CardImpl { - private static final FilterPermanent controlIsland = new FilterPermanent("you control an Island"); - private static final FilterPermanent controlPlains = new FilterPermanent("you control a Plains"); + private static final FilterControlledPermanent controlIsland = new FilterControlledPermanent("you control an Island"); + private static final FilterControlledPermanent controlPlains = new FilterControlledPermanent("you control a Plains"); + static { controlIsland.add(new SubtypePredicate("Island")); - controlIsland.add(new ControllerPredicate(TargetController.YOU)); - controlPlains.add(new SubtypePredicate("Plains")); - controlPlains.add(new ControllerPredicate(TargetController.YOU)); } public NimbusMaze(UUID ownerId) { @@ -67,13 +66,17 @@ public class NimbusMaze extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {tap}: Add {W} to your mana pool. Activate this ability only if you control an Island. - Ability addW = new WhiteManaAbility(); - addW.addCost(new FilterPermanentCost(controlIsland)); - this.addAbility(addW); + this.addAbility(new ActivateIfConditionManaAbility( + Zone.BATTLEFIELD, + new BasicManaEffect(Mana.WhiteMana), + new TapSourceCost(), + new PermanentsOnTheBattlefieldCondition(controlIsland))); // {tap}: Add {U} to your mana pool. Activate this ability only if you control a Plains. - Ability addU = new BlueManaAbility(); - addU.addCost(new FilterPermanentCost(controlPlains)); - this.addAbility(addU); + this.addAbility(new ActivateIfConditionManaAbility( + Zone.BATTLEFIELD, + new BasicManaEffect(Mana.BlueMana), + new TapSourceCost(), + new PermanentsOnTheBattlefieldCondition(controlPlains))); } public NimbusMaze(final NimbusMaze card) { diff --git a/Mage.Sets/src/mage/sets/innistrad/BloodlineKeeper.java b/Mage.Sets/src/mage/sets/innistrad/BloodlineKeeper.java index 94a3961d9d5..90391f49bf5 100644 --- a/Mage.Sets/src/mage/sets/innistrad/BloodlineKeeper.java +++ b/Mage.Sets/src/mage/sets/innistrad/BloodlineKeeper.java @@ -1,131 +1,106 @@ -/* - * 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.innistrad; - -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.CostImpl; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ColoredManaCost; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.TransformSourceEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.TransformAbility; -import mage.cards.CardImpl; -import mage.constants.ColoredManaSymbol; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.permanent.token.Token; - -/** - * - * @author Loki - */ -public class BloodlineKeeper extends CardImpl { - - public BloodlineKeeper(UUID ownerId) { - super(ownerId, 90, "Bloodline Keeper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.expansionSetCode = "ISD"; - this.subtype.add("Vampire"); - - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - this.canTransform = true; - this.secondSideCard = new LordOfLineage(ownerId); - - this.addAbility(FlyingAbility.getInstance()); - // {T}: Put a 2/2 black Vampire creature token with flying onto the battlefield. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new VampireToken()), new TapSourceCost())); - // {B}: Transform Bloodline Keeper. Activate this ability only if you control five or more Vampires. - this.addAbility(new TransformAbility()); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ColoredManaCost(ColoredManaSymbol.B)); - ability.addCost(new ControlFiveVampiresCost()); - this.addAbility(ability); - } - - public BloodlineKeeper(final BloodlineKeeper card) { - super(card); - } - - @Override - public BloodlineKeeper copy() { - return new BloodlineKeeper(this); - } -} - -class VampireToken extends Token { - VampireToken() { - super("Vampire", "a 2/2 black Vampire creature token with flying"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Vampire"); - power = new MageInt(2); - toughness = new MageInt(2); - addAbility(FlyingAbility.getInstance()); - } -} - -class ControlFiveVampiresCost extends CostImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); - - static { - filter.add(new SubtypePredicate("Vampire")); - } - - public ControlFiveVampiresCost() { - this.text = "Activate this ability only if you control five or more Vampires"; - } - - public ControlFiveVampiresCost(final ControlFiveVampiresCost cost) { - super(cost); - } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - return game.getBattlefield().contains(filter, controllerId, 5, game); - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { - this.paid = true; - return paid; - } - - @Override - public ControlFiveVampiresCost copy() { - return new ControlFiveVampiresCost(this); - } -} \ No newline at end of file +/* + * 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.innistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.Token; + +/** + * + * @author Loki + */ +public class BloodlineKeeper extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control five or more Vampires"); + + static { + filter.add(new SubtypePredicate("Vampire")); + } + + public BloodlineKeeper(UUID ownerId) { + super(ownerId, 90, "Bloodline Keeper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "ISD"; + this.subtype.add("Vampire"); + + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + this.canTransform = true; + this.secondSideCard = new LordOfLineage(ownerId); + + this.addAbility(FlyingAbility.getInstance()); + // {T}: Put a 2/2 black Vampire creature token with flying onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new VampireToken()), new TapSourceCost())); + // {B}: Transform Bloodline Keeper. Activate this ability only if you control five or more Vampires. + this.addAbility(new TransformAbility()); + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new TransformSourceEffect(true), + new ManaCostsImpl("{B}"), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 4)); + this.addAbility(ability); + } + + public BloodlineKeeper(final BloodlineKeeper card) { + super(card); + } + + @Override + public BloodlineKeeper copy() { + return new BloodlineKeeper(this); + } +} + +class VampireToken extends Token { + VampireToken() { + super("Vampire", "a 2/2 black Vampire creature token with flying"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Vampire"); + power = new MageInt(2); + toughness = new MageInt(2); + addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/HyperionBlacksmith.java b/Mage.Sets/src/mage/sets/legends/HyperionBlacksmith.java new file mode 100644 index 00000000000..6eca10aafc0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/HyperionBlacksmith.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.legends; + +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.MayTapOrUntapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author fireshoes + */ +public class HyperionBlacksmith extends CardImpl { + + private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public HyperionBlacksmith(UUID ownerId) { + super(ownerId, 150, "Hyperion Blacksmith", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "LEG"; + this.subtype.add("Human"); + this.subtype.add("Artificer"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {tap}: You may tap or untap target artifact an opponent controls. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MayTapOrUntapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetArtifactPermanent(filter)); + this.addAbility(ability); + } + + public HyperionBlacksmith(final HyperionBlacksmith card) { + super(card); + } + + @Override + public HyperionBlacksmith copy() { + return new HyperionBlacksmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java b/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java index fdbce5bbd6d..900fb98760c 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java @@ -1,148 +1,123 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.shadowmoor; - -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.Mana; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.CostImpl; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.players.Player; -import mage.players.Players; - -/** - * - * @author jeffwadsworth - */ -public class LeechriddenSwamp extends CardImpl { - - public LeechriddenSwamp(UUID ownerId) { - super(ownerId, 273, "Leechridden Swamp", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); - this.expansionSetCode = "SHM"; - this.subtype.add("Swamp"); - - // ({tap}: Add {B} to your mana pool.) - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost())); - - // Leechridden Swamp enters the battlefield tapped. - this.addAbility(new EntersBattlefieldTappedAbility()); - - // {B}, {tap}: Each opponent loses 1 life. Activate this ability only if you control two or more black permanents. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LeechriddenSwampLoseLifeEffect(), new ManaCostsImpl("{B}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new ControlTwoOrMoreBlackPermanentsCost()); - this.addAbility(ability); - } - - public LeechriddenSwamp(final LeechriddenSwamp card) { - super(card); - } - - @Override - public LeechriddenSwamp copy() { - return new LeechriddenSwamp(this); - } -} - -class ControlTwoOrMoreBlackPermanentsCost extends CostImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent(); - - static { - filter.add(new ColorPredicate(ObjectColor.BLACK)); - } - - public ControlTwoOrMoreBlackPermanentsCost() { - this.text = "Activate this ability only if you control two or more black permanents"; - } - - public ControlTwoOrMoreBlackPermanentsCost(final ControlTwoOrMoreBlackPermanentsCost cost) { - super(cost); - } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - return game.getBattlefield().contains(filter, controllerId, 2, game); - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { - this.paid = true; - return paid; - } - - @Override - public ControlTwoOrMoreBlackPermanentsCost copy() { - return new ControlTwoOrMoreBlackPermanentsCost(this); - } -} - -class LeechriddenSwampLoseLifeEffect extends OneShotEffect { - - private static final String effectText = "each opponent loses 1 life"; - - LeechriddenSwampLoseLifeEffect ( ) { - super(Outcome.Damage); - staticText = effectText; - } - - LeechriddenSwampLoseLifeEffect ( LeechriddenSwampLoseLifeEffect effect ) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Players players = game.getPlayers(); - for ( Player player : players.values() ) { - if ( !player.getId().equals(source.getControllerId()) ) { - player.loseLife(1, game); - } - } - return true; - } - - @Override - public LeechriddenSwampLoseLifeEffect copy() { - return new LeechriddenSwampLoseLifeEffect(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.shadowmoor; + +import java.util.UUID; +import mage.Mana; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +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.ColorPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.players.Players; + +/** + * + * @author jeffwadsworth + */ +public class LeechriddenSwamp extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control two or more black permanents"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public LeechriddenSwamp(UUID ownerId) { + super(ownerId, 273, "Leechridden Swamp", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "SHM"; + this.subtype.add("Swamp"); + + // ({tap}: Add {B} to your mana pool.) + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost())); + + // Leechridden Swamp enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // {B}, {tap}: Each opponent loses 1 life. Activate this ability only if you control two or more black permanents. + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new LeechriddenSwampLoseLifeEffect(), + new ManaCostsImpl("{B}"), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public LeechriddenSwamp(final LeechriddenSwamp card) { + super(card); + } + + @Override + public LeechriddenSwamp copy() { + return new LeechriddenSwamp(this); + } +} + +class LeechriddenSwampLoseLifeEffect extends OneShotEffect { + + private static final String effectText = "each opponent loses 1 life"; + + LeechriddenSwampLoseLifeEffect ( ) { + super(Outcome.Damage); + staticText = effectText; + } + + LeechriddenSwampLoseLifeEffect ( LeechriddenSwampLoseLifeEffect effect ) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Players players = game.getPlayers(); + for ( Player player : players.values() ) { + if ( !player.getId().equals(source.getControllerId()) ) { + player.loseLife(1, game); + } + } + return true; + } + + @Override + public LeechriddenSwampLoseLifeEffect copy() { + return new LeechriddenSwampLoseLifeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/MadblindMountain.java b/Mage.Sets/src/mage/sets/shadowmoor/MadblindMountain.java index eb94b65c287..b106cfe9c93 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/MadblindMountain.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/MadblindMountain.java @@ -1,86 +1,89 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.shadowmoor; - -import java.util.UUID; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.common.ShuffleLibrarySourceEffect; -import mage.abilities.mana.RedManaAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.ColorPredicate; - -/** - * - * @author jeffwadsworth - */ -public class MadblindMountain extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("if you control two or more red permanents"); - - static { - filter.add(new ColorPredicate(ObjectColor.RED)); - } - - public MadblindMountain(UUID ownerId) { - super(ownerId, 274, "Madblind Mountain", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); - this.expansionSetCode = "SHM"; - this.subtype.add("Mountain"); - - // ({tap}: Add {R} to your mana pool.) - this.addAbility(new RedManaAbility()); - - // Madblind Mountain enters the battlefield tapped. - this.addAbility(new EntersBattlefieldTappedAbility()); - - // {R}, {tap}: Shuffle your library. Activate this ability only if you control two or more red permanents. - Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new ShuffleLibrarySourceEffect(), new ManaCostsImpl("{R}"), new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1)); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - - } - - public MadblindMountain(final MadblindMountain card) { - super(card); - } - - @Override - public MadblindMountain copy() { - return new MadblindMountain(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.shadowmoor; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.ShuffleLibrarySourceEffect; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author jeffwadsworth + */ +public class MadblindMountain extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("if you control two or more red permanents"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public MadblindMountain(UUID ownerId) { + super(ownerId, 274, "Madblind Mountain", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "SHM"; + this.subtype.add("Mountain"); + + // ({tap}: Add {R} to your mana pool.) + this.addAbility(new RedManaAbility()); + + // Madblind Mountain enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // {R}, {tap}: Shuffle your library. Activate this ability only if you control two or more red permanents. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new ShuffleLibrarySourceEffect(), + new ManaCostsImpl("{R}"), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public MadblindMountain(final MadblindMountain card) { + super(card); + } + + @Override + public MadblindMountain copy() { + return new MadblindMountain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/MoonringIsland.java b/Mage.Sets/src/mage/sets/shadowmoor/MoonringIsland.java index 4f087d879c2..4dc1458dcbf 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/MoonringIsland.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/MoonringIsland.java @@ -1,88 +1,91 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.shadowmoor; - -import java.util.UUID; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.common.LookLibraryTopCardTargetPlayerEffect; -import mage.abilities.mana.BlueManaAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.TargetPlayer; - -/** - * - * @author jeffwadsworth - */ -public class MoonringIsland extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("if you control two or more blue permanents"); - - static { - filter.add(new ColorPredicate(ObjectColor.BLUE)); - } - - public MoonringIsland(UUID ownerId) { - super(ownerId, 276, "Moonring Island", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); - this.expansionSetCode = "SHM"; - this.subtype.add("Island"); - - // ({tap}: Add {U} to your mana pool.) - this.addAbility(new BlueManaAbility()); - - // Moonring Island enters the battlefield tapped. - this.addAbility(new EntersBattlefieldTappedAbility()); - - // {U}, {tap}: Look at the top card of target player's library. Activate this ability only if you control two or more blue permanents. - Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new LookLibraryTopCardTargetPlayerEffect(), new ManaCostsImpl("{U}"), new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1)); - ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); - - } - - public MoonringIsland(final MoonringIsland card) { - super(card); - } - - @Override - public MoonringIsland copy() { - return new MoonringIsland(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.shadowmoor; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.LookLibraryTopCardTargetPlayerEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetPlayer; + +/** + * + * @author jeffwadsworth + */ +public class MoonringIsland extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("if you control two or more blue permanents"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public MoonringIsland(UUID ownerId) { + super(ownerId, 276, "Moonring Island", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "SHM"; + this.subtype.add("Island"); + + // ({tap}: Add {U} to your mana pool.) + this.addAbility(new BlueManaAbility()); + + // Moonring Island enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // {U}, {tap}: Look at the top card of target player's library. Activate this ability only if you control two or more blue permanents. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new LookLibraryTopCardTargetPlayerEffect(), + new ManaCostsImpl("{U}"), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + } + + public MoonringIsland(final MoonringIsland card) { + super(card); + } + + @Override + public MoonringIsland copy() { + return new MoonringIsland(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/SapseepForest.java b/Mage.Sets/src/mage/sets/shadowmoor/SapseepForest.java index 9ae7bb434cb..96f78b9329b 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/SapseepForest.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/SapseepForest.java @@ -1,86 +1,89 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.shadowmoor; - -import java.util.UUID; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.mana.GreenManaAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.ColorPredicate; - -/** - * - * @author jeffwadsworth - */ -public class SapseepForest extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("if you control two or more green permanents"); - - static { - filter.add(new ColorPredicate(ObjectColor.GREEN)); - } - - public SapseepForest(UUID ownerId) { - super(ownerId, 279, "Sapseep Forest", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); - this.expansionSetCode = "SHM"; - this.subtype.add("Forest"); - - // ({tap}: Add {G} to your mana pool.) - this.addAbility(new GreenManaAbility()); - - // Sapseep Forest enters the battlefield tapped. - this.addAbility(new EntersBattlefieldTappedAbility()); - - // {G}, {tap}: You gain 1 life. Activate this ability only if you control two or more green permanents. - Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl("{G}"), new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1)); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - - } - - public SapseepForest(final SapseepForest card) { - super(card); - } - - @Override - public SapseepForest copy() { - return new SapseepForest(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.shadowmoor; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author jeffwadsworth + */ +public class SapseepForest extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("if you control two or more green permanents"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public SapseepForest(UUID ownerId) { + super(ownerId, 279, "Sapseep Forest", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "SHM"; + this.subtype.add("Forest"); + + // ({tap}: Add {G} to your mana pool.) + this.addAbility(new GreenManaAbility()); + + // Sapseep Forest enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // {G}, {tap}: You gain 1 life. Activate this ability only if you control two or more green permanents. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new GainLifeEffect(1), + new ManaCostsImpl("{G}"), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public SapseepForest(final SapseepForest card) { + super(card); + } + + @Override + public SapseepForest copy() { + return new SapseepForest(this); + } +} diff --git a/Mage/src/mage/game/permanent/token/EldraziScionToken.java b/Mage/src/mage/game/permanent/token/EldraziScionToken.java index 90074e28aa5..1b8e1cd6a74 100644 --- a/Mage/src/mage/game/permanent/token/EldraziScionToken.java +++ b/Mage/src/mage/game/permanent/token/EldraziScionToken.java @@ -42,7 +42,7 @@ import mage.constants.Zone; public class EldraziScionToken extends Token { public EldraziScionToken() { - super("Eldrazi Scion", "1/1 colorless Eldrazi Scion creature with \"Sacrifice this creature: Add {1} to your mana pool.\""); + super("Eldrazi Scion", "1/1 colorless Eldrazi Scion creature token with \"Sacrifice this creature: Add {1} to your mana pool.\""); cardType.add(CardType.CREATURE); subtype.add("Eldrazi"); subtype.add("Scion"); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 104234f9397..21372f8ee9f 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -27335,6 +27335,7 @@ Felidar Cub|Battle for Zendikar|25|C|{1}{W}|Creature - Cat Beast|2|2|Sacrifice F Gideon, Ally of Zendikar|Battle for Zendikar|29|M|{2}{W}{W}|Planeswalker - Gideon|||+1: Until end of turn, Gideon, Ally of Zendikar becomes a 5/5 Human Soldier Ally creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.$0: Put a 2/2 white Knight Ally creature token onto the battlefield.$-4: You get an emblem with "Creatures you control get +1/+1."| Gideon's Reproach|Battle for Zendikar|30|C|{1}{W}|Instant|||Gideon's Reproach deals 4 damage to target attacking or blocking creature.| Hero of Goma Fada|Battle for Zendikar|31|R|{4}{W}|Creature - Human Knight Ally|4|3|Rally - Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn.| +Lantern Scout|Battle for Zendikar|37|R|{2}{W}|Creature - Human Scout Ally|3|2|Rally - Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn.| Retreat to Emeria|Battle for Zendikar|44|U|{3}{W}|Enchantment|||Landfall - Whenever a land enters the battlefield under you control, choose one - Put a 1/1 white Kor Ally creature token onto the battlefield; or Creatures you control get +1/+1 until end of turn.| Sheer Drop|Battle for Zendikar|48|C|{2}{W}|Sorcery|||Destroy target tapped creature.$Awaken 3-{5}{W} (If you cast this spell for {5}{W}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| Incubator Drone|Battle for Zendikar|60|C|{3}{U}|Creature - Eldrazi Drone|2|3|Devoid (This card has no color.)$Whenever Incubator Drone enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| @@ -27351,6 +27352,7 @@ Rolling Thunder|Battle for Zendikar|154|U|{X}{R}{R}|Sorcery|||Rolling Thunder de 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.| +Brood Butcher|Battle for Zendikar|199|R|{3}{B}{G}|Creature - Eldrazi Drone|3|3|Devoid (This card has no color.)$When Brood Butcher enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."${B}{G}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.| 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.| Omnath, Locus of Rage|Battle for Zendikar|217|M|{3}{R}{R}{G}{G}|Legendary Creature - Elemental|5|5|Landfall - Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield.$Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player.| 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.|