From dd616efcb9891d87217b57fb2cfbe7c3e20459cf Mon Sep 17 00:00:00 2001 From: "maurer.it" Date: Sun, 6 Mar 2011 22:13:43 -0500 Subject: [PATCH] GftT, Eldrazi Temple (possibly hacky), Abyssal Persecutor, Disfigure --- .../sets/mirrodinbesieged/GofortheThroat.java | 71 +++++++++++ .../sets/riseoftheeldrazi/EldraziTemple.java | 110 +++++++++++++++++ .../sets/worldwake/AbyssalPersecutor.java | 114 ++++++++++++++++++ .../src/mage/sets/zendikar/Disfigure.java | 61 ++++++++++ 4 files changed, 356 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/mirrodinbesieged/GofortheThroat.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/AbyssalPersecutor.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Disfigure.java diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/GofortheThroat.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/GofortheThroat.java new file mode 100644 index 0000000000..e34cc49195 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/GofortheThroat.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodinbesieged; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class GofortheThroat extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.getCardType().add(CardType.ARTIFACT); + filter.setNotCardType(true); + } + + public GofortheThroat(UUID ownerId) { + super(ownerId, 43, "Go for the Throat", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "MBS"; + this.color.setBlack(true); + + Target target = new TargetCreaturePermanent(filter); + target.setTargetName("nonartifact creature"); + this.getSpellAbility().addTarget(target); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public GofortheThroat(final GofortheThroat card) { + super(card); + } + + @Override + public GofortheThroat copy() { + return new GofortheThroat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java new file mode 100644 index 0000000000..ba7b7445ce --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EldraziTemple.java @@ -0,0 +1,110 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Mana; +import mage.abilities.effects.common.ManaEffect; +import mage.abilities.mana.BasicManaAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.game.stack.SpellStack; +import mage.game.stack.StackObject; + +/** + * + * @author Loki + */ +public class EldraziTemple extends CardImpl { + + public EldraziTemple(UUID ownerId) { + super(ownerId, 227, "Eldrazi Temple", Rarity.RARE, new CardType[]{ CardType.LAND }, null); + this.expansionSetCode = "ROE"; + + this.addAbility(new ColorlessManaAbility()); + this.addAbility(new EldraziTempleManaAbility()); + } + + public EldraziTemple(final EldraziTemple card) { + super(card); + } + + @Override + public EldraziTemple copy() { + return new EldraziTemple(this); + } +} + +class EldraziTempleManaAbility extends BasicManaAbility { + + private static final String abilityText = "Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi. " + + "(Mage Tip: This ability can only be activated when an Eldrazi spell or ability is on the stack.)"; + + EldraziTempleManaAbility ( ) { + super(new ManaEffect(Mana.ColorlessMana(2))); + this.netMana.setColorless(2); + } + + EldraziTempleManaAbility ( EldraziTempleManaAbility ability ) { + super(ability); + } + + @Override + public boolean canActivate(UUID playerId, Game game) { + boolean eldraziSpellBeingCast = false; + + SpellStack stack = game.getStack(); + for ( int idx = 0; idx < stack.size(); idx++ ) { + StackObject stackObject = stack.get(idx); + if ( stackObject.getControllerId().equals(playerId) ) { + eldraziSpellBeingCast |= stackObject.getSubtype().contains("Eldrazi"); + } + } + + return super.canActivate(playerId, game) && eldraziSpellBeingCast; + } + + @Override + public String getRule() { + return super.getRule() + " " + abilityText; + } + + @Override + public String getRule(String source) { + return super.getRule(source); + } + + @Override + public EldraziTempleManaAbility copy ( ) { + return new EldraziTempleManaAbility(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/AbyssalPersecutor.java b/Mage.Sets/src/mage/sets/worldwake/AbyssalPersecutor.java new file mode 100644 index 0000000000..74375a5baf --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/AbyssalPersecutor.java @@ -0,0 +1,114 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author Loki + */ +public class AbyssalPersecutor extends CardImpl { + + public AbyssalPersecutor(UUID ownerId) { + super(ownerId, 47, "Abyssal Persecutor", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Demon"); + this.color.setBlack(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(TrampleAbility.getInstance()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbyssalPersecutorCannotWinEffect())); + } + + public AbyssalPersecutor(final AbyssalPersecutor card) { + super(card); + } + + @Override + public AbyssalPersecutor copy() { + return new AbyssalPersecutor(this); + } +} + +class AbyssalPersecutorCannotWinEffect extends ReplacementEffectImpl { + + AbyssalPersecutorCannotWinEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + } + + AbyssalPersecutorCannotWinEffect ( final AbyssalPersecutorCannotWinEffect effect ) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if ((event.getType() == EventType.LOSES && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) + || (event.getType() == EventType.WINS && event.getPlayerId().equals(source.getControllerId()))) { + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public String getText(Ability source) { + return "You can't win the game and your opponents can't lose the game"; + } + + @Override + public AbyssalPersecutorCannotWinEffect copy() { + return new AbyssalPersecutorCannotWinEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/Disfigure.java b/Mage.Sets/src/mage/sets/zendikar/Disfigure.java new file mode 100644 index 0000000000..8d97f6bd8d --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Disfigure.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.zendikar; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class Disfigure extends CardImpl { + + public Disfigure(UUID ownerId) { + super(ownerId, 87, "Disfigure", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}"); + this.expansionSetCode = "ZEN"; + + this.color.setBlack(true); + this.getSpellAbility().addEffect(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public Disfigure(final Disfigure card) { + super(card); + } + + @Override + public Disfigure copy() { + return new Disfigure(this); + } +}