From eeead4a8b46505f426a90597f2f9d69601a540bd Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 23 May 2014 16:38:14 -0500 Subject: [PATCH] - Added Polluted Bonds, Deep-Slumber Titan, and Torture. --- .../src/mage/sets/fifthedition/Torture.java | 53 ++++++++ .../src/mage/sets/homelands/Torture.java | 85 +++++++++++++ .../sets/shadowmoor/DeepSlumberTitan.java | 78 ++++++++++++ .../mage/sets/shadowmoor/PollutedBonds.java | 113 ++++++++++++++++++ .../src/mage/sets/shadowmoor/Torture.java | 53 ++++++++ 5 files changed, 382 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fifthedition/Torture.java create mode 100644 Mage.Sets/src/mage/sets/homelands/Torture.java create mode 100644 Mage.Sets/src/mage/sets/shadowmoor/DeepSlumberTitan.java create mode 100644 Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java create mode 100644 Mage.Sets/src/mage/sets/shadowmoor/Torture.java diff --git a/Mage.Sets/src/mage/sets/fifthedition/Torture.java b/Mage.Sets/src/mage/sets/fifthedition/Torture.java new file mode 100644 index 00000000000..d17b911323b --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/Torture.java @@ -0,0 +1,53 @@ +/* + * 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.fifthedition; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + + */ +public class Torture extends mage.sets.homelands.Torture { + + public Torture(UUID ownerId) { + super(ownerId); + this.cardNumber = 61; + this.expansionSetCode = "5ED"; + } + + public Torture(final Torture card) { + super(card); + } + + @Override + public Torture copy() { + return new Torture(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/Torture.java b/Mage.Sets/src/mage/sets/homelands/Torture.java new file mode 100644 index 00000000000..61b60874269 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/Torture.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.homelands; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +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.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + + */ +public class Torture extends CardImpl { + + private static final String rule = "Testing rules"; + + public Torture(UUID ownerId) { + super(ownerId, 23, "Torture", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}"); + this.expansionSetCode = "HML"; + this.subtype.add("Aura"); + + this.color.setBlack(true); + + // 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); + + // {1}{B}: Put a -1/-1 counter on enchanted creature. + //this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAttachedEffect(CounterType.M1M1.createInstance(), rule), new ManaCostsImpl("[1}{B}"))); + this.addAbility(new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new AddCountersAttachedEffect(CounterType.M1M1.createInstance(),"enchanted creature"), + new ManaCostsImpl("{1}{B}"))); + } + + public Torture(final Torture card) { + super(card); + } + + @Override + public Torture copy() { + return new Torture(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/DeepSlumberTitan.java b/Mage.Sets/src/mage/sets/shadowmoor/DeepSlumberTitan.java new file mode 100644 index 00000000000..04cdb3c77c4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowmoor/DeepSlumberTitan.java @@ -0,0 +1,78 @@ +/* + * 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.MageInt; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.SkipUntapSourceEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author jeffwadsworth + + */ +public class DeepSlumberTitan extends CardImpl { + + public DeepSlumberTitan(UUID ownerId) { + super(ownerId, 89, "Deep-Slumber Titan", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "SHM"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // Deep-Slumber Titan enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // Deep-Slumber Titan doesn't untap during your untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipUntapSourceEffect())); + + // Whenever Deep-Slumber Titan is dealt damage, untap it. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), false)); + + } + + public DeepSlumberTitan(final DeepSlumberTitan card) { + super(card); + } + + @Override + public DeepSlumberTitan copy() { + return new DeepSlumberTitan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java b/Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java new file mode 100644 index 00000000000..b533d50869e --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java @@ -0,0 +1,113 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.shadowmoor; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + + */ +public class PollutedBonds 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 loses 2 life and you gain 2 life."; + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public PollutedBonds(UUID ownerId) { + super(ownerId, 74, "Polluted Bonds", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); + this.expansionSetCode = "SHM"; + + this.color.setBlack(true); + + // Whenever a land enters the battlefield under an opponent's control, that player loses 2 life and you gain 2 life. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new PollutedBondsEffect(), filter, false, true, rule, true)); + + } + + public PollutedBonds(final PollutedBonds card) { + super(card); + } + + @Override + public PollutedBonds copy() { + return new PollutedBonds(this); + } +} + +class PollutedBondsEffect extends OneShotEffect { + + public PollutedBondsEffect() { + super(Outcome.Benefit); + staticText = "that player loses 2 life and you gain 2 life"; + } + + public PollutedBondsEffect(final PollutedBondsEffect effect) { + super(effect); + } + + @Override + public PollutedBondsEffect copy() { + return new PollutedBondsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + Player opponent = null; + Permanent land = game.getPermanent(targetPointer.getFirst(game, source)); + if (land != null) { + opponent = game.getPlayer(land.getControllerId()); + } + if (opponent != null) { + opponent.loseLife(2, game); + } + if (you != null) { + you.gainLife(2, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/Torture.java b/Mage.Sets/src/mage/sets/shadowmoor/Torture.java new file mode 100644 index 00000000000..d2e7c5a67ac --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowmoor/Torture.java @@ -0,0 +1,53 @@ +/* + * 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; + +/** + * + * @author jeffwadsworth + + */ +public class Torture extends mage.sets.homelands.Torture { + + public Torture(UUID ownerId) { + super(ownerId); + this.cardNumber = 80; + this.expansionSetCode = "SHM"; + } + + public Torture(final Torture card) { + super(card); + } + + @Override + public Torture copy() { + return new Torture(this); + } +}