diff --git a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfAshes.java b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfAshes.java new file mode 100644 index 00000000000..30afc19cf32 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfAshes.java @@ -0,0 +1,94 @@ +/* + * 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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.RevealTargetFromHandCostCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCardInHand; + +/** + * + * @author emerald000 + */ +public class MartyrOfAshes extends CardImpl { + + private static final FilterCard filterHand = new FilterCard("X red cards from your hand"); + private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creatures without flying"); + + static { + filterHand.add(new ColorPredicate(ObjectColor.RED)); + filterCreature.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public MartyrOfAshes(UUID ownerId) { + super(ownerId, 92, "Martyr of Ashes", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}, Reveal X red cards from your hand, Sacrifice Martyr of Ashes: Martyr of Ashes deals X damage to each creature without flying. + Effect effect = new DamageAllEffect(new RevealTargetFromHandCostCount(), filterCreature); + effect.setText("Martyr of Ashes deals X damage to each creature without flying."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2)); + ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filterHand))); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public MartyrOfAshes(final MartyrOfAshes card) { + super(card); + } + + @Override + public MartyrOfAshes copy() { + return new MartyrOfAshes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfBones.java b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfBones.java new file mode 100644 index 00000000000..20a7fe1c47f --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfBones.java @@ -0,0 +1,142 @@ +/* + * 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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.VariableCost; +import mage.abilities.costs.VariableCostImpl; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInASingleGraveyard; +import mage.target.common.TargetCardInHand; + +/** + * + * @author emerald000 + */ +public class MartyrOfBones extends CardImpl { + + public MartyrOfBones(UUID ownerId) { + super(ownerId, 65, "Martyr of Bones", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}, Reveal X black cards from your hand, Sacrifice Martyr of Bones: Exile up to X target cards from a single graveyard. + Effect effect = new ExileTargetEffect(null, null, Zone.GRAVEYARD); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1)); + ability.addCost(new RevealVariableBlackCardsFromHandCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCardInASingleGraveyard(0, 1, new FilterCard("cards in a single graveyard"))); + this.addAbility(ability); + } + + public MartyrOfBones(final MartyrOfBones card) { + super(card); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SimpleActivatedAbility) { + int amount = 0; + for (Cost cost : ability.getCosts()) { + if (cost instanceof RevealVariableBlackCardsFromHandCost) { + amount = ((VariableCost) cost).getAmount(); + } + } + ability.getTargets().clear(); + ability.addTarget(new TargetCardInASingleGraveyard(0, amount, new FilterCard())); + } + } + + @Override + public MartyrOfBones copy() { + return new MartyrOfBones(this); + } +} + +class RevealVariableBlackCardsFromHandCost extends VariableCostImpl { + + private static final FilterCard filter = new FilterCard("X black cards from your hand"); + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + RevealVariableBlackCardsFromHandCost() { + super("black cards to reveal"); + this.text = new StringBuilder("Reveal ").append(xText).append(" black cards from {this}").toString(); + } + + RevealVariableBlackCardsFromHandCost(final RevealVariableBlackCardsFromHandCost cost) { + super(cost); + } + + @Override + public RevealVariableBlackCardsFromHandCost copy() { + return new RevealVariableBlackCardsFromHandCost(this); + } + + @Override + public Cost getFixedCostsFromAnnouncedValue(int xValue) { + return new RevealTargetFromHandCost(new TargetCardInHand(0, xValue, filter)); + } + + @Override + public int getMinValue(Ability source, Game game) { + return 0; + } + + @Override + public int getMaxValue(Ability source, Game game) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + return player.getHand().getCards(filter, game).size(); + } + return 0; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfFrost.java b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfFrost.java new file mode 100644 index 00000000000..cd94aa8914a --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfFrost.java @@ -0,0 +1,89 @@ +/* + * 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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.RevealTargetFromHandCostCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetSpell; +import mage.target.common.TargetCardInHand; + +/** + * + * @author emerald000 + */ +public class MartyrOfFrost extends CardImpl { + + private static final FilterCard filter = new FilterCard("X blue cards from your hand"); + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public MartyrOfFrost(UUID ownerId) { + super(ownerId, 40, "Martyr of Frost", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}, Reveal X blue cards from your hand, Sacrifice Martyr of Frost: Counter target spell unless its controller pays {X}. + Effect effect = new CounterUnlessPaysEffect(new RevealTargetFromHandCostCount()); + effect.setText("Counter target spell unless its controller pays {X}."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2)); + ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter))); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetSpell()); + this.addAbility(ability); + } + + public MartyrOfFrost(final MartyrOfFrost card) { + super(card); + } + + @Override + public MartyrOfFrost copy() { + return new MartyrOfFrost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfSands.java b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfSands.java index 2f719974399..4c9f1bfc66c 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfSands.java +++ b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfSands.java @@ -28,25 +28,23 @@ package mage.sets.coldsnap; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; import mage.abilities.costs.common.RevealTargetFromHandCost; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.RevealTargetFromHandCostCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.players.Player; import mage.target.common.TargetCardInHand; /** @@ -71,8 +69,10 @@ public class MartyrOfSands extends CardImpl { this.toughness = new MageInt(1); // {1}, Reveal X white cards from your hand, Sacrifice Martyr of Sands: You gain three times X life. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MartyrOfSandsEffect(), new ManaCostsImpl("{1}")); - ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0,Integer.MAX_VALUE, filter))); + Effect effect = new GainLifeEffect(new MultipliedValue(new RevealTargetFromHandCostCount(), 3)); + effect.setText("You gain three times X life."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}")); + ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter))); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } @@ -86,45 +86,3 @@ public class MartyrOfSands extends CardImpl { return new MartyrOfSands(this); } } - -class MartyrOfSandsEffect extends OneShotEffect { - - public MartyrOfSandsEffect() { - super(Outcome.GainLife); - this.staticText = "You gain three times X life"; - } - - public MartyrOfSandsEffect(final MartyrOfSandsEffect effect) { - super(effect); - } - - @Override - public MartyrOfSandsEffect copy() { - return new MartyrOfSandsEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - RevealTargetFromHandCost revealCost = null; - for (Cost cost : source.getCosts()) { - if (cost instanceof RevealTargetFromHandCost) { - revealCost = (RevealTargetFromHandCost) cost; - } - } - - Player controller = game.getPlayer(source.getControllerId()); - Card sourceCard = game.getCard(source.getSourceId()); - if (controller != null && sourceCard != null && revealCost != null) { - int live = revealCost.getNumberRevealedCards() * 3; - if (live > 0) { - controller.gainLife(live, game); - } - game.informPlayers(new StringBuilder(sourceCard.getName()) - .append(": ").append(controller.getName()).append(" revealed ") - .append(revealCost.getNumberRevealedCards()).append(revealCost.getNumberRevealedCards() == 1 ?"white card":"white cards") - .append(" and gained ").append(live).append(" live").toString()); - return true; - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfSpores.java b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfSpores.java new file mode 100644 index 00000000000..37bacfe1c76 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfSpores.java @@ -0,0 +1,90 @@ +/* + * 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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.RevealTargetFromHandCostCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class MartyrOfSpores extends CardImpl { + + private static final FilterCard filter = new FilterCard("X green cards from your hand"); + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public MartyrOfSpores(UUID ownerId) { + super(ownerId, 113, "Martyr of Spores", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}, Reveal X green cards from your hand, Sacrifice Martyr of Spores: Target creature gets +X/+X until end of turn. + Effect effect = new BoostTargetEffect(new RevealTargetFromHandCostCount(), new RevealTargetFromHandCostCount(), Duration.EndOfTurn, true); + effect.setText("Target creature gets +X/+X until end of turn."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1)); + ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter))); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public MartyrOfSpores(final MartyrOfSpores card) { + super(card); + } + + @Override + public MartyrOfSpores copy() { + return new MartyrOfSpores(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eighthedition/SuddenImpact.java b/Mage.Sets/src/mage/sets/eighthedition/SuddenImpact.java new file mode 100644 index 00000000000..89f9fdbdb44 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eighthedition/SuddenImpact.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.eighthedition; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class SuddenImpact extends mage.sets.seventhedition.SuddenImpact { + + public SuddenImpact(UUID ownerId) { + super(ownerId); + this.cardNumber = 226; + this.expansionSetCode = "8ED"; + } + + public SuddenImpact(final SuddenImpact card) { + super(card); + } + + @Override + public SuddenImpact copy() { + return new SuddenImpact(this); + } +} diff --git a/Mage.Sets/src/mage/sets/jacevschandra/MartyrOfFrost.java b/Mage.Sets/src/mage/sets/jacevschandra/MartyrOfFrost.java new file mode 100644 index 00000000000..e18df0ea115 --- /dev/null +++ b/Mage.Sets/src/mage/sets/jacevschandra/MartyrOfFrost.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.jacevschandra; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class MartyrOfFrost extends mage.sets.coldsnap.MartyrOfFrost { + + public MartyrOfFrost(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "DD2"; + } + + public MartyrOfFrost(final MartyrOfFrost card) { + super(card); + } + + @Override + public MartyrOfFrost copy() { + return new MartyrOfFrost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/Exhaustion.java b/Mage.Sets/src/mage/sets/ninthedition/Exhaustion.java new file mode 100644 index 00000000000..075e5de7f42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/Exhaustion.java @@ -0,0 +1,54 @@ +/* + * 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.Rarity; + +/** + * + * @author emerald000 + */ +public class Exhaustion extends mage.sets.portalthreekingdoms.Exhaustion { + + public Exhaustion(UUID ownerId) { + super(ownerId); + this.cardNumber = 76; + this.expansionSetCode = "9ED"; + this.rarity = Rarity.UNCOMMON; + } + + public Exhaustion(final Exhaustion card) { + super(card); + } + + @Override + public Exhaustion copy() { + return new Exhaustion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/SuddenImpact.java b/Mage.Sets/src/mage/sets/ninthedition/SuddenImpact.java new file mode 100644 index 00000000000..aa294a1f7ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/SuddenImpact.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.ninthedition; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class SuddenImpact extends mage.sets.seventhedition.SuddenImpact { + + public SuddenImpact(UUID ownerId) { + super(ownerId); + this.cardNumber = 222; + this.expansionSetCode = "9ED"; + } + + public SuddenImpact(final SuddenImpact card) { + super(card); + } + + @Override + public SuddenImpact copy() { + return new SuddenImpact(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/PetrifiedField.java b/Mage.Sets/src/mage/sets/odyssey/PetrifiedField.java new file mode 100644 index 00000000000..c0546c5710b --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/PetrifiedField.java @@ -0,0 +1,75 @@ +/* + * 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.odyssey; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author emerald000 + */ +public class PetrifiedField extends CardImpl { + + public PetrifiedField(UUID ownerId) { + super(ownerId, 323, "Petrified Field", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "ODY"; + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {tap}, Sacrifice Petrified Field: Return target land card from your graveyard to your hand. + Effect effect = new ReturnFromGraveyardToHandTargetEffect(); + effect.setText("Return target land card from your graveyard to your hand."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCardInYourGraveyard(new FilterLandCard())); + this.addAbility(ability); + } + + public PetrifiedField(final PetrifiedField card) { + super(card); + } + + @Override + public PetrifiedField copy() { + return new PetrifiedField(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/Exhaustion.java b/Mage.Sets/src/mage/sets/portal/Exhaustion.java new file mode 100644 index 00000000000..8987df56403 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Exhaustion.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.portal; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class Exhaustion extends mage.sets.portalthreekingdoms.Exhaustion { + + public Exhaustion(UUID ownerId) { + super(ownerId); + this.cardNumber = 42; + this.expansionSetCode = "POR"; + } + + public Exhaustion(final Exhaustion card) { + super(card); + } + + @Override + public Exhaustion copy() { + return new Exhaustion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/Exhaustion.java b/Mage.Sets/src/mage/sets/portalsecondage/Exhaustion.java new file mode 100644 index 00000000000..76a1bb17a07 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/Exhaustion.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.portalsecondage; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class Exhaustion extends mage.sets.portalthreekingdoms.Exhaustion { + + public Exhaustion(UUID ownerId) { + super(ownerId); + this.cardNumber = 37; + this.expansionSetCode = "PO2"; + } + + public Exhaustion(final Exhaustion card) { + super(card); + } + + @Override + public Exhaustion copy() { + return new Exhaustion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/Exhaustion.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/Exhaustion.java new file mode 100644 index 00000000000..4697f8c1eed --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/Exhaustion.java @@ -0,0 +1,148 @@ +/* + * 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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author emerald000 + */ +public class Exhaustion extends CardImpl { + + public Exhaustion(UUID ownerId) { + super(ownerId, 42, "Exhaustion", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "PTK"; + + this.color.setBlue(true); + + // Creatures and lands target opponent controls don't untap during his or her next untap step. + this.getSpellAbility().addEffect(new ExhaustionEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public Exhaustion(final Exhaustion card) { + super(card); + } + + @Override + public Exhaustion copy() { + return new Exhaustion(this); + } +} + +class ExhaustionEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); + } + + ExhaustionEffect() { + super(Outcome.Detriment); + this.staticText = "Creatures and lands target opponent controls don't untap during his or her next untap step."; + } + + ExhaustionEffect(final ExhaustionEffect effect) { + super(effect); + } + + @Override + public ExhaustionEffect copy() { + return new ExhaustionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { + game.addEffect(new ExhaustionReplacementEffect(permanent.getId()), source); + } + return true; + } + return false; + } +} + +class ExhaustionReplacementEffect extends ReplacementEffectImpl { + + protected UUID permanentId; + + ExhaustionReplacementEffect(UUID permanentId) { + super(Duration.OneUse, Outcome.Detriment); + this.permanentId = permanentId; + } + + ExhaustionReplacementEffect(final ExhaustionReplacementEffect effect) { + super(effect); + permanentId = effect.permanentId; + } + + @Override + public ExhaustionReplacementEffect copy() { + return new ExhaustionReplacementEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + used = true; + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return game.getTurn().getStepType() == PhaseStep.UNTAP && + event.getType() == GameEvent.EventType.UNTAP && + event.getTargetId().equals(permanentId); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/EbonyOwlNetsuke.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/EbonyOwlNetsuke.java new file mode 100644 index 00000000000..493051e084e --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/EbonyOwlNetsuke.java @@ -0,0 +1,128 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author emerald000 + */ +public class EbonyOwlNetsuke extends CardImpl { + + public EbonyOwlNetsuke(UUID ownerId) { + super(ownerId, 154, "Ebony Owl Netsuke", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "SOK"; + + // At the beginning of each opponent's upkeep, if that player has seven or more cards in hand, Ebony Owl Netsuke deals 4 damage to him or her. + this.addAbility(new EbonyOwlNetsukeTriggeredAbility()); + } + + public EbonyOwlNetsuke(final EbonyOwlNetsuke card) { + super(card); + } + + @Override + public EbonyOwlNetsuke copy() { + return new EbonyOwlNetsuke(this); + } +} + +class EbonyOwlNetsukeTriggeredAbility extends TriggeredAbilityImpl { + + EbonyOwlNetsukeTriggeredAbility() { + super(Zone.BATTLEFIELD, null, false); + } + + EbonyOwlNetsukeTriggeredAbility(final EbonyOwlNetsukeTriggeredAbility ability) { + super(ability); + } + + @Override + public EbonyOwlNetsukeTriggeredAbility copy() { + return new EbonyOwlNetsukeTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE && game.getOpponents(controllerId).contains(event.getPlayerId())) { + Player player = game.getPlayer(event.getPlayerId()); + if (player != null && player.getHand().size() >= 7) { + EbonyOwlNetsukeEffect effect = new EbonyOwlNetsukeEffect(); + effect.setTargetPointer(new FixedTarget(player.getId())); + this.addEffect(effect); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "At the beginning of each opponent's upkeep, if that player has seven or more cards in hand, {this} deals 4 damage to him or her."; + } +} + +class EbonyOwlNetsukeEffect extends OneShotEffect { + + EbonyOwlNetsukeEffect() { + super(Outcome.Damage); + this.staticText = "{this} deals 4 damage to him or her"; + } + + EbonyOwlNetsukeEffect(final EbonyOwlNetsukeEffect effect) { + super(effect); + } + + @Override + public EbonyOwlNetsukeEffect copy() { + return new EbonyOwlNetsukeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null && player.getHand().size() >= 7) { + player.damage(4, source.getSourceId(), game, false, true); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SpiralingEmbers.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SpiralingEmbers.java new file mode 100644 index 00000000000..3ba5fec6dec --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SpiralingEmbers.java @@ -0,0 +1,67 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author emerald000 + */ +public class SpiralingEmbers extends CardImpl { + + public SpiralingEmbers(UUID ownerId) { + super(ownerId, 116, "Spiraling Embers", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Arcane"); + + this.color.setRed(true); + + // Spiraling Embers deals damage to target creature or player equal to the number of cards in your hand. + Effect effect = new DamageTargetEffect(new CardsInControllerHandCount()); + effect.setText("{this} deals damage to target creature or player equal to the number of cards in your hand."); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public SpiralingEmbers(final SpiralingEmbers card) { + super(card); + } + + @Override + public SpiralingEmbers copy() { + return new SpiralingEmbers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/SuddenImpact.java b/Mage.Sets/src/mage/sets/seventhedition/SuddenImpact.java new file mode 100644 index 00000000000..18494fbe3df --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/SuddenImpact.java @@ -0,0 +1,97 @@ +/* + * 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.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author emerald000 + */ +public class SuddenImpact extends CardImpl { + + public SuddenImpact(UUID ownerId) { + super(ownerId, 223, "Sudden Impact", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{R}"); + this.expansionSetCode = "7ED"; + + this.color.setRed(true); + + // Sudden Impact deals damage to target player equal to the number of cards in that player's hand. + Effect effect = new DamageTargetEffect(new TargetPlayerCardsInHandCount()); + effect.setText("{this} deals damage to target player equal to the number of cards in that player's hand."); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public SuddenImpact(final SuddenImpact card) { + super(card); + } + + @Override + public SuddenImpact copy() { + return new SuddenImpact(this); + } +} + +class TargetPlayerCardsInHandCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility) { + Player targetPlayer = game.getPlayer(sourceAbility.getFirstTarget()); + if (targetPlayer != null) { + return targetPlayer.getHand().size(); + } + + return 0; + } + + @Override + public DynamicValue copy() { + return new TargetPlayerCardsInHandCount(); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return "target player's cards in hand"; + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/Exhaustion.java b/Mage.Sets/src/mage/sets/starter1999/Exhaustion.java new file mode 100644 index 00000000000..bcbcfb56caf --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/Exhaustion.java @@ -0,0 +1,54 @@ +/* + * 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.starter1999; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author emerald000 + */ +public class Exhaustion extends mage.sets.portalthreekingdoms.Exhaustion { + + public Exhaustion(UUID ownerId) { + super(ownerId); + this.cardNumber = 36; + this.expansionSetCode = "S99"; + this.rarity = Rarity.UNCOMMON; + } + + public Exhaustion(final Exhaustion card) { + super(card); + } + + @Override + public Exhaustion copy() { + return new Exhaustion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/SuddenImpact.java b/Mage.Sets/src/mage/sets/tempest/SuddenImpact.java new file mode 100644 index 00000000000..3666474ae8c --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/SuddenImpact.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.tempest; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class SuddenImpact extends mage.sets.seventhedition.SuddenImpact { + + public SuddenImpact(UUID ownerId) { + super(ownerId); + this.cardNumber = 208; + this.expansionSetCode = "TMP"; + } + + public SuddenImpact(final SuddenImpact card) { + super(card); + } + + @Override + public SuddenImpact copy() { + return new SuddenImpact(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/SuddenImpact.java b/Mage.Sets/src/mage/sets/tenth/SuddenImpact.java new file mode 100644 index 00000000000..1eb9c9d7e0b --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/SuddenImpact.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.tenth; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class SuddenImpact extends mage.sets.seventhedition.SuddenImpact { + + public SuddenImpact(UUID ownerId) { + super(ownerId); + this.cardNumber = 241; + this.expansionSetCode = "10E"; + } + + public SuddenImpact(final SuddenImpact card) { + super(card); + } + + @Override + public SuddenImpact copy() { + return new SuddenImpact(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Exhaustion.java b/Mage.Sets/src/mage/sets/urzassaga/Exhaustion.java new file mode 100644 index 00000000000..b44d58fc3be --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Exhaustion.java @@ -0,0 +1,54 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author emerald000 + */ +public class Exhaustion extends mage.sets.portalthreekingdoms.Exhaustion { + + public Exhaustion(UUID ownerId) { + super(ownerId); + this.cardNumber = 74; + this.expansionSetCode = "USG"; + this.rarity = Rarity.UNCOMMON; + } + + public Exhaustion(final Exhaustion card) { + super(card); + } + + @Override + public Exhaustion copy() { + return new Exhaustion(this); + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java b/Mage/src/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java new file mode 100644 index 00000000000..daf18f5f0c8 --- /dev/null +++ b/Mage/src/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java @@ -0,0 +1,46 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package mage.abilities.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.game.Game; + +/** + * + * @author emerald000 + */ +public class RevealTargetFromHandCostCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility) { + for (Cost cost: sourceAbility.getCosts()) { + if (cost instanceof RevealTargetFromHandCost) { + return ((RevealTargetFromHandCost) cost).getNumberRevealedCards(); + } + } + return 0; + } + + @Override + public String getMessage() { + return "number of revealed cards"; + } + + @Override + public DynamicValue copy() { + return new RevealTargetFromHandCostCount(); + } + + @Override + public String toString() { + return "X"; + } + +}