From 59c832123e7e9c7e9474e54f064e97874774405a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 10 Dec 2013 22:38:21 +0100 Subject: [PATCH] Added Skysribing, True-Name Nemesis, Steeling Stance. --- .../src/mage/sets/commander/Skyscribing.java | 52 ++++++ .../mage/sets/commander2013/Skyscribing.java | 63 +++++++ .../sets/commander2013/TrueNameNemesis.java | 160 ++++++++++++++++++ .../src/mage/sets/dissension/Skyscribing.java | 52 ++++++ .../mage/sets/dissension/SteelingStance.java | 70 ++++++++ 5 files changed, 397 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/commander/Skyscribing.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/Skyscribing.java create mode 100644 Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java create mode 100644 Mage.Sets/src/mage/sets/dissension/Skyscribing.java create mode 100644 Mage.Sets/src/mage/sets/dissension/SteelingStance.java diff --git a/Mage.Sets/src/mage/sets/commander/Skyscribing.java b/Mage.Sets/src/mage/sets/commander/Skyscribing.java new file mode 100644 index 00000000000..d0c3f06654c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/Skyscribing.java @@ -0,0 +1,52 @@ +/* + * 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.commander; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Skyscribing extends mage.sets.commander2013.Skyscribing { + + public Skyscribing(UUID ownerId) { + super(ownerId); + this.cardNumber = 61; + this.expansionSetCode = "CMD"; + } + + public Skyscribing(final Skyscribing card) { + super(card); + } + + @Override + public Skyscribing copy() { + return new Skyscribing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/Skyscribing.java b/Mage.Sets/src/mage/sets/commander2013/Skyscribing.java new file mode 100644 index 00000000000..4492e30c8fd --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/Skyscribing.java @@ -0,0 +1,63 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.keyword.ForecastAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class Skyscribing extends CardImpl { + + public Skyscribing(UUID ownerId) { + super(ownerId, 57, "Skyscribing", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{U}{U}"); + this.expansionSetCode = "C13"; + this.color.setBlue(true); + // Each player draws X cards. + this.getSpellAbility().addEffect(new DrawCardAllEffect(new ManacostVariableValue())); + // Forecast - {2}{U}, Reveal Skyscribing from your hand: Each player draws a card. + this.addAbility(new ForecastAbility(new DrawCardAllEffect(1), new ManaCostsImpl("{2}{U}"))); + } + + public Skyscribing(final Skyscribing card) { + super(card); + } + + @Override + public Skyscribing copy() { + return new Skyscribing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java b/Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java new file mode 100644 index 00000000000..836144b9a73 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2013/TrueNameNemesis.java @@ -0,0 +1,160 @@ +/* + * 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.commander2013; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.game.stack.StackObject; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * Protection from a player is a new variant of the protection ability. It means the following: + * -- True-Name Nemesis can’t be the target of spells or abilities controlled by the chosen player. + * -- True-Name Nemesis can’t be enchanted by Auras or equipped by Equipment controlled + * by the chosen player. (The same is true for Fortifications controlled by the chosen player, + * if True-Name Nemesis becomes a land.) + * -- True-Name Nemesis can’t be blocked by creatures controlled by the chosen player. + * -- All damage that would be dealt to True-Name Nemesis by sources controlled by the chosen player + * is prevented. (The same is true for sources owned by the chosen player that don’t have controllers.) + * @author LevelX2 + */ +public class TrueNameNemesis extends CardImpl { + + public TrueNameNemesis(UUID ownerId) { + super(ownerId, 63, "True-Name Nemesis", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "C13"; + this.subtype.add("Merfolk"); + this.subtype.add("Rogue"); + + this.color.setBlue(true); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // As True-Name Nemesis enters the battlefield, choose a player. + this.addAbility(new AsEntersBattlefieldAbility(new TrueNameNemesisChoosePlayerEffect())); + // True-Name Nemesis has protection from the chosen player. + this.addAbility(new ProtectionFromPlayerAbility()); + } + + public TrueNameNemesis(final TrueNameNemesis card) { + super(card); + } + + @Override + public TrueNameNemesis copy() { + return new TrueNameNemesis(this); + } +} + +class TrueNameNemesisChoosePlayerEffect extends OneShotEffect { + + public TrueNameNemesisChoosePlayerEffect() { + super(Outcome.Detriment); + this.staticText = "choose a player"; + } + + public TrueNameNemesisChoosePlayerEffect(final TrueNameNemesisChoosePlayerEffect effect) { + super(effect); + } + + @Override + public TrueNameNemesisChoosePlayerEffect copy() { + return new TrueNameNemesisChoosePlayerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (player != null && permanent != null) { + TargetPlayer target = new TargetPlayer(true); + if (player.choose(this.outcome, target, source.getSourceId(), game)) { + Player chosenPlayer = game.getPlayer(target.getFirstTarget()); + if (chosenPlayer != null) { + game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName()); + game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget()); + permanent.addInfo("chosen player", "Chosen player: " + chosenPlayer.getName() + ""); + return true; + } + } + } + return false; + } +} + +class ProtectionFromPlayerAbility extends ProtectionAbility { + + public ProtectionFromPlayerAbility() { + super(new FilterCard()); + } + + public ProtectionFromPlayerAbility(final ProtectionFromPlayerAbility ability) { + super(ability); + } + + @Override + public ProtectionFromPlayerAbility copy() { + return new ProtectionFromPlayerAbility(this); + } + + @Override + public String getRule() { + return "{this} has protection from the chosen player."; + } + + @Override + public boolean canTarget(MageObject source, Game game) { + UUID playerId = (UUID) game.getState().getValue(this.getSourceId() + "_player"); + if (playerId != null && source != null) { + if (source instanceof Permanent) { + return !((Permanent) source).getControllerId().equals(playerId); + } + if (source instanceof Spell) { + return !((Spell) source).getControllerId().equals(playerId); + } + if (source instanceof StackObject) { + return !((StackObject) source).getControllerId().equals(playerId); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/Skyscribing.java b/Mage.Sets/src/mage/sets/dissension/Skyscribing.java new file mode 100644 index 00000000000..bc7c3a80360 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/Skyscribing.java @@ -0,0 +1,52 @@ +/* + * 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.dissension; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Skyscribing extends mage.sets.commander2013.Skyscribing { + + public Skyscribing(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "DIS"; + } + + public Skyscribing(final Skyscribing card) { + super(card); + } + + @Override + public Skyscribing copy() { + return new Skyscribing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/SteelingStance.java b/Mage.Sets/src/mage/sets/dissension/SteelingStance.java new file mode 100644 index 00000000000..4e8be8046a3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/SteelingStance.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dissension; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.keyword.ForecastAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SteelingStance extends CardImpl { + + public SteelingStance(UUID ownerId) { + super(ownerId, 18, "Steeling Stance", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}{W}"); + this.expansionSetCode = "DIS"; + + this.color.setWhite(true); + + // Creatures you control get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1,1, Duration.EndOfTurn)); + // Forecast - {W}, Reveal Steeling Stance from your hand: Target creature gets +1/+1 until end of turn. + Ability ability = new ForecastAbility(new BoostTargetEffect(1,1, Duration.EndOfTurn), new ManaCostsImpl("{W}")); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + } + + public SteelingStance(final SteelingStance card) { + super(card); + } + + @Override + public SteelingStance copy() { + return new SteelingStance(this); + } +}