From 96868afa790b36cd4c6da6bd37916025eefdab1a Mon Sep 17 00:00:00 2001 From: fireshoes Date: Sat, 3 Jan 2015 17:18:09 -0600 Subject: [PATCH] Added Mardu Shadowspear and Joven --- .../sets/fatereforged/MarduShadowspear.java | 104 ++++++++++++++++++ Mage.Sets/src/mage/sets/homelands/Joven.java | 81 ++++++++++++++ Utils/mtg-cards-data.txt | 4 +- 3 files changed, 187 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/fatereforged/MarduShadowspear.java create mode 100644 Mage.Sets/src/mage/sets/homelands/Joven.java diff --git a/Mage.Sets/src/mage/sets/fatereforged/MarduShadowspear.java b/Mage.Sets/src/mage/sets/fatereforged/MarduShadowspear.java new file mode 100644 index 00000000000..782ab105f8b --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/MarduShadowspear.java @@ -0,0 +1,104 @@ +/* + * 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.fatereforged; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.DashAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.players.Players; +/** + * + * @author fireshoes + */ +public class MarduShadowspear extends CardImpl { + + public MarduShadowspear(UUID ownerId) { + super(ownerId, 74, "Mardu Shadowspear", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Mardu Shadowspear attacks, each opponent loses 1 life. + this.addAbility(new AttacksTriggeredAbility(new MarduShadowspearLoseLifeEffect(), false)); + // Dash {1}{B} + this.addAbility(new DashAbility(this, "{1}{B}")); + } + + public MarduShadowspear(final MarduShadowspear card) { + super(card); + } + + @Override + public MarduShadowspear copy() { + return new MarduShadowspear(this); + } +} + +class MarduShadowspearLoseLifeEffect extends OneShotEffect { + + private static final String effectText = "each opponent loses 1 life"; + + MarduShadowspearLoseLifeEffect ( ) { + super(Outcome.Damage); + staticText = effectText; + } + + MarduShadowspearLoseLifeEffect ( MarduShadowspearLoseLifeEffect 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 MarduShadowspearLoseLifeEffect copy() { + return new MarduShadowspearLoseLifeEffect(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/homelands/Joven.java b/Mage.Sets/src/mage/sets/homelands/Joven.java new file mode 100644 index 00000000000..a18863fc55c --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/Joven.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.homelands; + +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.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; +/** + * + * @author fireshoes + */ +public class Joven extends CardImpl { + + private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("noncreature artifact"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public Joven(UUID ownerId) { + super(ownerId, 133, "Joven", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "HML"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {R}{R}{R}, {tap}: Destroy target noncreature artifact. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{R}{R}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent(new FilterArtifactPermanent(filter))); + this.addAbility(ability); + } + + public Joven(final Joven card) { + super(card); + } + + @Override + public Joven copy() { + return new Joven(this); + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 31fcfab64f1..619eeeb7b6f 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -25244,8 +25244,8 @@ Brutal Hordechief|Fate Reforged|64|M|{3}{B}|Creature - Orc Warrior|3|3|Whenever Crux of Fate|Fate Reforged|65|R|{3}{B}{B}|Sorcery|||Choose one —$• Destroy all Dragon creatures.$• Destroy all non-Dragon creatures.| Gurmag Angler|Fate Reforged|72|C|{6}{B}|Creature - Zombie Fish|5|5|Delve| Hooded Assassin|Fate Reforged|73|C|{2}{B}|Creature - Human Assassin|1|2|When Hooded Assassin enters the battlefield, choose one —$• Put a +1/+1 counter on Hooded Assassin.$• Destroy target creature that was dealt damage this turn.| -Mardu Shadowpsear|Fate Reforged|74|U|{B}|Creature - Human Warrior|1|1|Whenever Mardu Shadowspear attacks, each opponent loses 1 life.$Dash {1}{B} (You may cast this spell for its dash cost. If you do, it gains haste, and it's returned from the battlefield to its owner's hand at the beginning of the next end step.)| -Mardu Strike Leader|Fate Reforged|75|R|{2}{B}{2}{B}|Creature - Human Warrior|3|23|2|Whenever Mardu Strike Leader attacks, put a 2/1 black Warrior creature token onto the battlefield.$Dash {3}{B} (You may cast this spell for its dash cost. If you do, it gains haste, and it is returned from the battlefield to your hand at the beginning of the next end step.)$Whenever Mardu Strike Leader attacks, put a 2/1 black Warrior creature token onto the battlefield.$Dash {3}{B} (You may cast this spell for its dash cost. If you do, it gains haste, and it is returned from the battlefield to your hand at the beginning of the next end step.)| +Mardu Shadowspear|Fate Reforged|74|U|{B}|Creature - Human Warrior|1|1|Whenever Mardu Shadowspear attacks, each opponent loses 1 life.$Dash {1}{B} (You may cast this spell for its dash cost. If you do, it gains haste, and it's returned from the battlefield to its owner's hand at the beginning of the next end step.)| +Mardu Strike Leader|Fate Reforged|75|R|{2}{B}{2}{B}|Creature - Human Warrior|3|2|Whenever Mardu Strike Leader attacks, put a 2/1 black Warrior creature token onto the battlefield.$Dash {3}{B} (You may cast this spell for its dash cost. If you do, it gains haste, and it is returned from the battlefield to your hand at the beginning of the next end step.)| Palace Siege|Fate Reforged|79|R|{3}{B}{B}|Enchantment|||As Palace Siege enters the battlefield, choose Khans or Dragons.$• Khans — At the beginning of your upkeep, return target creature card from your graveyard to your hand.$• Dragons — At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.| Soulflayer|Fate Reforged|84|R|{4}{B}{B}|Creature - Demon|4|4|Delve$If a creature card with flying was exiled with Soulflayer's delve ability, Soulflayer has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, reach, trample, and vigilance.| Flamerush Rider|Fate Reforged|99|R|{4}{R}|Creature - Human Warrior|3|3|Whenever Flamerush Rider attacks, put a token onto the battlefield tapped and attacking that's a copy of another target attacking creature. Exile the token at end of combat.$Dash {2}{R}{R} (You may cast this spell for its dash cost. If you do, it gains haste, and it's returned from the battlefield to its owner's hand at the beginning of the next end step.)|