From ab67c12e9af5ac542cdb66612d51382bca859d02 Mon Sep 17 00:00:00 2001 From: jeffwadsworth <> Date: Thu, 16 Aug 2012 09:21:42 -0500 Subject: [PATCH] - Added Viashino Sandstalker, Pillage, Cursed Scroll, Fireblast, Hammer of Bogardan, Jackal Pup. --- .../mage/sets/mirage/HammerOfBogardan.java | 74 ++++++++++ .../ninthedition/ViashinoSandstalker.java | 105 ++++++++++++++ .../src/mage/sets/seventhedition/Pillage.java | 74 ++++++++++ .../src/mage/sets/tempest/CursedScroll.java | 133 ++++++++++++++++++ .../src/mage/sets/tempest/JackalPup.java | 131 +++++++++++++++++ .../src/mage/sets/visions/Fireblast.java | 85 +++++++++++ .../sets/visions/ViashinoSandstalker.java | 53 +++++++ .../costs/common/SacrificeTargetCost.java | 4 + 8 files changed, 659 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/mirage/HammerOfBogardan.java create mode 100644 Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Pillage.java create mode 100644 Mage.Sets/src/mage/sets/tempest/CursedScroll.java create mode 100644 Mage.Sets/src/mage/sets/tempest/JackalPup.java create mode 100644 Mage.Sets/src/mage/sets/visions/Fireblast.java create mode 100644 Mage.Sets/src/mage/sets/visions/ViashinoSandstalker.java diff --git a/Mage.Sets/src/mage/sets/mirage/HammerOfBogardan.java b/Mage.Sets/src/mage/sets/mirage/HammerOfBogardan.java new file mode 100644 index 0000000000..bbf170358d --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/HammerOfBogardan.java @@ -0,0 +1,74 @@ +/* + * 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.mirage; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.OnlyDuringUpkeepCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author jeffwadsworth + * + */ +public class HammerOfBogardan extends CardImpl { + + public HammerOfBogardan(UUID ownerId) { + super(ownerId, 181, "Hammer of Bogardan", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + this.expansionSetCode = "MIR"; + + this.color.setRed(true); + + // Hammer of Bogardan deals 3 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + + // {2}{R}{R}{R}: Return Hammer of Bogardan from your graveyard to your hand. Activate this ability only during your upkeep. + Ability ability = new SimpleActivatedAbility(Constants.Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{2}{R}{R}{R}")); + ability.addCost(new OnlyDuringUpkeepCost()); + this.addAbility(ability); + } + + public HammerOfBogardan(final HammerOfBogardan card) { + super(card); + } + + @Override + public HammerOfBogardan copy() { + return new HammerOfBogardan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java b/Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java new file mode 100644 index 0000000000..9258992ff2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java @@ -0,0 +1,105 @@ +/* + * 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.ninthedition; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author jeffwadsworth + * + */ +public class ViashinoSandstalker extends CardImpl { + + public ViashinoSandstalker(UUID ownerId) { + super(ownerId, 225, "Viashino Sandstalker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Viashino"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // At the beginning of the end step, return Viashino Sandstalker to its owner's hand. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new ReturnToHandSourceEffect(true), false)); + + } + + public ViashinoSandstalker(final ViashinoSandstalker card) { + super(card); + } + + @Override + public ViashinoSandstalker copy() { + return new ViashinoSandstalker(this); + } +} + +class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl { + + public BeginningOfEndStepTriggeredAbility(Effect effect, boolean optional) { + super(Constants.Zone.BATTLEFIELD, effect, optional); + } + + public BeginningOfEndStepTriggeredAbility(final BeginningOfEndStepTriggeredAbility ability) { + super(ability); + } + + @Override + public BeginningOfEndStepTriggeredAbility copy() { + return new BeginningOfEndStepTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.END_PHASE_PRE) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "At the beginning of the end step, return {this} to its owner's hand"; + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Pillage.java b/Mage.Sets/src/mage/sets/seventhedition/Pillage.java new file mode 100644 index 0000000000..2cd1aee6f1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Pillage.java @@ -0,0 +1,74 @@ +/* + * 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.seventhedition; + +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.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author jeffwadsworth + * + */ +public class Pillage extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or land"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.LAND))); + } + + public Pillage(UUID ownerId) { + super(ownerId, 207, "Pillage", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + this.expansionSetCode = "7ED"; + + this.color.setRed(true); + + // Destroy target artifact or land. It can't be regenerated. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public Pillage(final Pillage card) { + super(card); + } + + @Override + public Pillage copy() { + return new Pillage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/CursedScroll.java b/Mage.Sets/src/mage/sets/tempest/CursedScroll.java new file mode 100644 index 0000000000..1214a4cac1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/CursedScroll.java @@ -0,0 +1,133 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +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.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.sets.Sets; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author jeffwadsworth + * + */ +public class CursedScroll extends CardImpl { + + public CursedScroll(UUID ownerId) { + super(ownerId, 271, "Cursed Scroll", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "TMP"; + + // {3}, {tap}: Name a card. Reveal a card at random from your hand. If it's the named card, Cursed Scroll deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CursedScrollEffect(), new ManaCostsImpl("{3}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public CursedScroll(final CursedScroll card) { + super(card); + } + + @Override + public CursedScroll copy() { + return new CursedScroll(this); + } +} + +class CursedScrollEffect extends OneShotEffect { + + public CursedScrollEffect() { + super(Constants.Outcome.Neutral); + staticText = "Name a card. Reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; + } + + public CursedScrollEffect(final CursedScrollEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + if (you != null) { + Choice cardChoice = new ChoiceImpl(); + cardChoice.setChoices(Sets.getCardNames()); + cardChoice.clearChoice(); + while (!you.choose(Constants.Outcome.Damage, cardChoice, game)) { + game.debugMessage("player canceled choosing name. retrying."); + } + String cardName = cardChoice.getChoice(); + game.informPlayers("Cursed Scroll, named card: [" + cardName + "]"); + if (you.getHand().size() > 0) { + Cards revealed = new CardsImpl(); + Card card = you.getHand().getRandom(game); + revealed.add(card); + you.revealCards("Cursed Scroll", revealed, game); + if (card.getName().equals(cardName)) { + TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); + if (target.canChoose(you.getId(), game)) { + if (you.chooseTarget(Constants.Outcome.Damage, target, source, game)) { + Permanent creature = game.getPermanent(target.getFirstTarget()); + if (creature != null) { + creature.damage(2, source.getSourceId(), game, true, false); + return true; + } + Player player = game.getPlayer(target.getFirstTarget()); + if (player != null) { + player.damage(2, source.getSourceId(), game, true, false); + return true; + } + return false; + } + } + } + } + } + return false; + } + + @Override + public CursedScrollEffect copy() { + return new CursedScrollEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/JackalPup.java b/Mage.Sets/src/mage/sets/tempest/JackalPup.java new file mode 100644 index 0000000000..7114f8f38b --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/JackalPup.java @@ -0,0 +1,131 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + + */ +public class JackalPup extends CardImpl { + + public JackalPup(UUID ownerId) { + super(ownerId, 183, "Jackal Pup", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Hound"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Whenever Jackal Pup is dealt damage, it deals that much damage to you. + this.addAbility(new JackalPupTriggeredAbility()); + + } + + public JackalPup(final JackalPup card) { + super(card); + } + + @Override + public JackalPup copy() { + return new JackalPup(this); + } +} + +class JackalPupTriggeredAbility extends TriggeredAbilityImpl { + + public JackalPupTriggeredAbility() { + super(Constants.Zone.BATTLEFIELD, new JackalPupEffect()); + } + + public JackalPupTriggeredAbility(final JackalPupTriggeredAbility effect) { + super(effect); + } + + @Override + public JackalPupTriggeredAbility copy() { + return new JackalPupTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE && event.getTargetId().equals(this.sourceId)) { + this.getEffects().get(0).setValue("damageAmount", event.getAmount()); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} is dealt damage, " + super.getRule(); + } +} + + +class JackalPupEffect extends OneShotEffect { + + public JackalPupEffect() { + super(Constants.Outcome.Damage); + staticText = "it deals that much damage to you"; + } + + public JackalPupEffect(final JackalPupEffect effect) { + super(effect); + } + + @Override + public JackalPupEffect copy() { + return new JackalPupEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + if (you != null) { + you.damage((Integer) this.getValue("damageAmount"), source.getSourceId(), game, false, true); + } + return true; + } + + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/visions/Fireblast.java b/Mage.Sets/src/mage/sets/visions/Fireblast.java new file mode 100644 index 0000000000..30d77970d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/Fireblast.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.visions; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.abilities.costs.AlternativeCostImpl; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author jeffwadsworth + + */ +public class Fireblast extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Mountain"); + + static { + filter.add(new CardTypePredicate(CardType.LAND)); + filter.add(new SubtypePredicate("Mountain")); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + private static final String ALTERNATIVE_COST_DESCRIPTION = "You may sacrifice two Mountains rather than pay Fireblast's mana cost"; + + public Fireblast(UUID ownerId) { + super(ownerId, 79, "Fireblast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{R}{R}"); + this.expansionSetCode = "VIS"; + + this.color.setRed(true); + + // You may sacrifice two Mountains rather than pay Fireblast's mana cost. + this.getSpellAbility().addAlternativeCost(new AlternativeCostImpl(ALTERNATIVE_COST_DESCRIPTION, new SacrificeTargetCost(new TargetControlledPermanent(2, 2, filter, true), true))); + + // Fireblast deals 4 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + + } + + public Fireblast(final Fireblast card) { + super(card); + } + + @Override + public Fireblast copy() { + return new Fireblast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/ViashinoSandstalker.java b/Mage.Sets/src/mage/sets/visions/ViashinoSandstalker.java new file mode 100644 index 0000000000..4fbefe189f --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/ViashinoSandstalker.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.visions; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + + */ +public class ViashinoSandstalker extends mage.sets.ninthedition.ViashinoSandstalker { + + public ViashinoSandstalker(UUID ownerId) { + super(ownerId); + this.cardNumber = 100; + this.expansionSetCode = "VIS"; + } + + public ViashinoSandstalker(final ViashinoSandstalker card) { + super(card); + } + + @Override + public ViashinoSandstalker copy() { + return new ViashinoSandstalker(this); + } +} diff --git a/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java b/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java index ce88bf236f..14d4d0cd60 100644 --- a/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java @@ -51,6 +51,10 @@ public class SacrificeTargetCost extends CostImpl { this.addTarget(target); this.text = "Sacrifice " + target.getTargetName(); } + + public SacrificeTargetCost(TargetControlledPermanent target, boolean noText) { + this.addTarget(target); + } public SacrificeTargetCost(SacrificeTargetCost cost) { super(cost);