From 48178e2ab5a93274c4b5b2700be58e2151ea2f3b Mon Sep 17 00:00:00 2001 From: Cowboy Date: Mon, 16 Dec 2013 02:42:11 -0500 Subject: [PATCH] Old Ward Sliver did not work. Newest based on Riders of Gavony and worked when tested. --- .../src/mage/sets/exodus/Cartographer.java | 71 +++++++++++ .../src/mage/sets/legions/WardSliver.java | 114 +++++++++++++---- .../src/mage/sets/odyssey/BeastAttack.java | 82 ++++++++++++ .../src/mage/sets/odyssey/Cartographer.java | 54 ++++++++ .../sets/odyssey/ChatterOfTheSquirrel.java | 67 ++++++++++ .../src/mage/sets/odyssey/Chlorophant.java | 73 +++++++++++ .../src/mage/sets/odyssey/CoffinPurge.java | 69 +++++++++++ .../mage/sets/odyssey/CrashingCentaur.java | 92 ++++++++++++++ .../mage/sets/odyssey/DevotedCaretaker.java | 87 +++++++++++++ .../src/mage/sets/odyssey/IvyElemental.java | 52 ++++++++ .../src/mage/sets/odyssey/PardicMiner.java | 117 ++++++++++++++++++ .../src/mage/sets/odyssey/SavageFirecat.java | 105 ++++++++++++++++ .../src/mage/sets/odyssey/ShowerOfCoals.java | 72 +++++++++++ .../src/mage/sets/odyssey/SparkMage.java | 115 +++++++++++++++++ .../src/mage/sets/odyssey/ThermalBlast.java | 70 +++++++++++ .../sets/odyssey/TouchOfInvisibility.java | 69 +++++++++++ Mage.Sets/src/mage/sets/odyssey/Tremble.java | 61 +++++++++ .../src/mage/sets/odyssey/VolcanicSpray.java | 74 +++++++++++ .../mage/sets/odyssey/VolleyOfBoulders.java | 67 ++++++++++ .../src/mage/sets/odyssey/Whipkeeper.java | 101 +++++++++++++++ .../src/mage/sets/odyssey/ZombieCannibal.java | 69 +++++++++++ .../mage/sets/planechase/IvyElemental.java | 67 ++++++++++ .../src/mage/sets/stronghold/SliverQueen.java | 84 +++++++++++++ 23 files changed, 1806 insertions(+), 26 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/exodus/Cartographer.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/BeastAttack.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/Cartographer.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/ChatterOfTheSquirrel.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/Chlorophant.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/CoffinPurge.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/CrashingCentaur.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/DevotedCaretaker.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/IvyElemental.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/PardicMiner.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/SavageFirecat.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/SparkMage.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/ThermalBlast.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/TouchOfInvisibility.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/Tremble.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/VolcanicSpray.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/VolleyOfBoulders.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/ZombieCannibal.java create mode 100644 Mage.Sets/src/mage/sets/planechase/IvyElemental.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/SliverQueen.java diff --git a/Mage.Sets/src/mage/sets/exodus/Cartographer.java b/Mage.Sets/src/mage/sets/exodus/Cartographer.java new file mode 100644 index 00000000000..57d2947dee2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/Cartographer.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.exodus; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author cbt33 + */ +public class Cartographer extends CardImpl { + + public Cartographer(UUID ownerId) { + super(ownerId, 107, "Cartographer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "EXO"; + this.subtype.add("Human"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Cartographer enters the battlefield, you may return target land card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(new FilterLandCard())); + this.addAbility(ability); + + } + + public Cartographer(final Cartographer card) { + super(card); + } + + @Override + public Cartographer copy() { + return new Cartographer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/WardSliver.java b/Mage.Sets/src/mage/sets/legions/WardSliver.java index af2a3a8751d..0bcc5ba371b 100644 --- a/Mage.Sets/src/mage/sets/legions/WardSliver.java +++ b/Mage.Sets/src/mage/sets/legions/WardSliver.java @@ -29,30 +29,40 @@ package mage.sets.legions; import java.util.UUID; import mage.MageInt; +import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continious.GainAbilityControlledEffect; -import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; +import mage.choices.Choice; import mage.choices.ChoiceColor; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; -import mage.filter.FilterCard; +import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; /** * - * @author cbt33, BetaSteward (Brave the Elements) + * @author cbt33, noxx (Riders of Gavony) */ public class WardSliver extends CardImpl { + static FilterPermanent filter = new FilterPermanent("chosen color"); + + public WardSliver(UUID ownerId) { super(ownerId, 25, "Ward Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); this.expansionSetCode = "LGN"; @@ -62,11 +72,13 @@ public class WardSliver extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); + // As Ward Sliver enters the battlefield, choose a color. + this.addAbility(new AsEntersBattlefieldAbility(new WardSliverEffect())); + // All Slivers have protection from the chosen color. - Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilitySourceEffect(new SimpleStaticAbility(Zone.BATTLEFIELD, new WardSliverEffect()))); - ability.addChoice(new ChoiceColor()); - this.addAbility(ability); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new WardSliverGainAbilityControlledEffect())); + } public WardSliver(final WardSliver card) { @@ -79,25 +91,36 @@ public class WardSliver extends CardImpl { } } -class WardSliverEffect extends GainAbilityControlledEffect { - - private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("sliver"); - - static { - filter1.add(new SubtypePredicate("Sliver")); - } - - private FilterCard filter2; +class WardSliverEffect extends OneShotEffect { public WardSliverEffect() { - super(new ProtectionAbility(new FilterCard()), Duration.WhileOnBattlefield, filter1); - filter2 = (FilterCard)((ProtectionAbility)getFirstAbility()).getFilter(); - staticText = "Choose a color. All Sliver creatures gain protection from the chosen color"; + super(Outcome.BoostCreature); + staticText = "choose a creature type"; } public WardSliverEffect(final WardSliverEffect effect) { super(effect); - this.filter2 = effect.filter2.copy(); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (player != null && permanent != null) { + Choice colorChoice = new ChoiceColor(); + colorChoice.setMessage("Choose color"); + while (!player.choose(Outcome.BoostCreature, colorChoice, game)) { + if (!player.isInGame()) { + return false; + } + } + if (colorChoice.getChoice() != null) { + game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); + game.getState().setValue(permanent.getId() + "_color", colorChoice.getChoice()); + permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getChoice().toString() + ""); + } + } + return false; } @Override @@ -105,13 +128,52 @@ class WardSliverEffect extends GainAbilityControlledEffect { return new WardSliverEffect(this); } +} + +class WardSliverGainAbilityControlledEffect extends ContinuousEffectImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Slivers"); + + static { + filter.add(new SubtypePredicate("Sliver")); + } + + protected FilterPermanent protectionFilter; + + public WardSliverGainAbilityControlledEffect() { + super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); + staticText = "Slivers have protection from the chosen color"; + } + + public WardSliverGainAbilityControlledEffect(final WardSliverGainAbilityControlledEffect effect) { + super(effect); + protectionFilter = effect.protectionFilter; + } + + @Override + public WardSliverGainAbilityControlledEffect copy() { + return new WardSliverGainAbilityControlledEffect(this); + } + @Override public boolean apply(Game game, Ability source) { - ChoiceColor choice = (ChoiceColor) source.getChoices().get(0); - filter2.add(new ColorPredicate(choice.getColor())); - filter2.setMessage(choice.getChoice()); - setAbility(new ProtectionAbility(new FilterCard(filter2))); - return super.apply(game, source); + if (protectionFilter == null) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + String color = (String) game.getState().getValue(permanent.getId() + "_color"); + if (color != null) { + protectionFilter = new FilterPermanent(color); + protectionFilter.add(new ColorPredicate(new ObjectColor(color))); + } + } + } + if (protectionFilter != null) { + for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { + perm.addAbility(new ProtectionAbility(protectionFilter), source.getSourceId(), game); + } + return true; + } + return false; } } diff --git a/Mage.Sets/src/mage/sets/odyssey/BeastAttack.java b/Mage.Sets/src/mage/sets/odyssey/BeastAttack.java new file mode 100644 index 00000000000..76a3d57e563 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/BeastAttack.java @@ -0,0 +1,82 @@ +/* + * 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.MageInt; +import mage.ObjectColor; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.game.permanent.token.Token; + +/** + * + * @author cbt33 + */ +public class BeastAttack extends CardImpl { + + public BeastAttack(UUID ownerId) { + super(ownerId, 230, "Beast Attack", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}{G}{G}"); + this.expansionSetCode = "ODY"; + + this.color.setGreen(true); + + // Put a 4/4 green Beast creature token onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken_44())); + + // Flashback {2}{G}{G}{G} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}{G}{G}"), TimingRule.INSTANT)); + } + + public BeastAttack(final BeastAttack card) { + super(card); + } + + @Override + public BeastAttack copy() { + return new BeastAttack(this); + } +} + +class BeastToken_44 extends Token { + + public BeastToken_44() { + super("Beast", "4/4 green Beast creature token"); + cardType.add(CardType.CREATURE); + color = ObjectColor.GREEN; + subtype.add("Beast"); + power = new MageInt(4); + toughness = new MageInt(4); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/odyssey/Cartographer.java b/Mage.Sets/src/mage/sets/odyssey/Cartographer.java new file mode 100644 index 00000000000..9fb276b0842 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Cartographer.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.odyssey; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author anonymous + */ +public class Cartographer extends mage.sets.exodus.Cartographer { + + public Cartographer(UUID ownerId) { + super(ownerId); + this.cardNumber = 232; + this.expansionSetCode = "ODY"; + this.rarity = Rarity.COMMON; + } + + public Cartographer(final Cartographer card) { + super(card); + } + + @Override + public Cartographer copy() { + return new Cartographer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/ChatterOfTheSquirrel.java b/Mage.Sets/src/mage/sets/odyssey/ChatterOfTheSquirrel.java new file mode 100644 index 00000000000..3fa0fbc7798 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/ChatterOfTheSquirrel.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.odyssey; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.game.permanent.token.SquirrelToken; + +/** + * + * @author cbt33 + */ +public class ChatterOfTheSquirrel extends CardImpl { + + public ChatterOfTheSquirrel(UUID ownerId) { + super(ownerId, 233, "Chatter of the Squirrel", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{G}"); + this.expansionSetCode = "ODY"; + + this.color.setGreen(true); + + // Put a 1/1 green Squirrel creature token onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new SquirrelToken())); + + // Flashback {1}{G} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{G}"), TimingRule.SORCERY)); + } + + public ChatterOfTheSquirrel(final ChatterOfTheSquirrel card) { + super(card); + } + + @Override + public ChatterOfTheSquirrel copy() { + return new ChatterOfTheSquirrel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Chlorophant.java b/Mage.Sets/src/mage/sets/odyssey/Chlorophant.java new file mode 100644 index 00000000000..ef2941fe736 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Chlorophant.java @@ -0,0 +1,73 @@ +/* + * 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.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; + +/** + * + * @author cbt33 + */ +public class Chlorophant extends CardImpl { + + public Chlorophant(UUID ownerId) { + super(ownerId, 234, "Chlorophant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}{G}{G}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Elemental"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, you may put a +1/+1 counter on Chlorophant. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, true)); + // Threshold - As long as seven or more cards are in your graveyard, Chlorophant has "At the beginning of your upkeep, you may put another +1/+1 counter on Chlorophant." + this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, true), + new CardsInControllerGraveCondition(7), + "{this} deals 2 damage to each of up to three target creatures and/or players.

Threshold - {this} deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard.")); + } + + public Chlorophant(final Chlorophant card) { + super(card); + } + + @Override + public Chlorophant copy() { + return new Chlorophant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/CoffinPurge.java b/Mage.Sets/src/mage/sets/odyssey/CoffinPurge.java new file mode 100644 index 00000000000..d867317eadc --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/CoffinPurge.java @@ -0,0 +1,69 @@ +/* + * 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.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author cbt33, jonubuu (Withered Wretch) + */ + +public class CoffinPurge extends CardImpl { + + public CoffinPurge(UUID ownerId) { + super(ownerId, 124, "Coffin Purge", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}"); + this.expansionSetCode = "ODY"; + + this.color.setBlack(true); + + // Exile target card from a graveyard. + + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInGraveyard()); + // Flashback {B} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{B}"), TimingRule.INSTANT)); + } + + public CoffinPurge(final CoffinPurge card) { + super(card); + } + + @Override + public CoffinPurge copy() { + return new CoffinPurge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/CrashingCentaur.java b/Mage.Sets/src/mage/sets/odyssey/CrashingCentaur.java new file mode 100644 index 00000000000..e04c0014e32 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/CrashingCentaur.java @@ -0,0 +1,92 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author cbt33 + */ +public class CrashingCentaur extends CardImpl { + + public CrashingCentaur(UUID ownerId) { + super(ownerId, 235, "Crashing Centaur", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Centaur"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // {G}, Discard a card: Crashing Centaur gains trample until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn), new ManaCostsImpl("{G}")); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + + // Threshold - As long as seven or more cards are in your graveyard, Crashing Centaur gets +2/+2 and has shroud. + Ability thresholdAbility = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), + new CardsInControllerGraveCondition(7), + "Threshold - If seven or more cards are in your graveyard, Crashing Centaur gets +2/+2")); + Effect effect = new ConditionalContinousEffect( + new GainAbilitySourceEffect(ShroudAbility.getInstance()), + new CardsInControllerGraveCondition(7), "and has shroud"); + thresholdAbility.addEffect(effect); + + } + + public CrashingCentaur(final CrashingCentaur card) { + super(card); + } + + @Override + public CrashingCentaur copy() { + return new CrashingCentaur(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/DevotedCaretaker.java b/Mage.Sets/src/mage/sets/odyssey/DevotedCaretaker.java new file mode 100644 index 00000000000..dad05739f1a --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/DevotedCaretaker.java @@ -0,0 +1,87 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.target.Target; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Loki (Ursapine), LevelX2 (Eight-and-a-Half Tails), cbt + */ +public class DevotedCaretaker extends CardImpl { + + private static final Filter filter = new FilterInstantOrSorceryCard(); + /*static { + filter.add(new CardTypePredicate(CardType.INSTANT)); + filter.add(new CardTypePredicate(CardType.SORCERY)); + }*/ + + public DevotedCaretaker(UUID ownerId) { + super(ownerId, 18, "Devoted Caretaker", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {W}, {tap}: Target permanent you control gains protection from instant spells and from sorcery spells until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new ProtectionAbility(filter), Duration.EndOfTurn), new ManaCostsImpl("{W}")); + ability.addCost(new TapSourceCost()); + Target target = new TargetControlledPermanent(); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + } + + public DevotedCaretaker(final DevotedCaretaker card) { + super(card); + } + + @Override + public DevotedCaretaker copy() { + return new DevotedCaretaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/IvyElemental.java b/Mage.Sets/src/mage/sets/odyssey/IvyElemental.java new file mode 100644 index 00000000000..c6f3a2b958e --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/IvyElemental.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.odyssey; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class IvyElemental extends mage.sets.planechase.IvyElemental { + + public IvyElemental(UUID ownerId) { + super(ownerId); + this.cardNumber = 245; + this.expansionSetCode = "ODY"; + } + + public IvyElemental(final IvyElemental card) { + super(card); + } + + @Override + public IvyElemental copy() { + return new IvyElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/PardicMiner.java b/Mage.Sets/src/mage/sets/odyssey/PardicMiner.java new file mode 100644 index 00000000000..5687b6fac38 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/PardicMiner.java @@ -0,0 +1,117 @@ +/* + * 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.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.TargetPlayer; + +/** + * + * @author cbt33 + */ +public class PardicMiner extends CardImpl { + + public PardicMiner(UUID ownerId) { + super(ownerId, 212, "Pardic Miner", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Dwarf"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Sacrifice Pardic Miner: Target player can't play lands this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PardicMinerEffect(), new SacrificeSourceCost()); + ability.addTarget(new TargetPlayer(true)); + this.addAbility(ability); + } + + public PardicMiner(final PardicMiner card) { + super(card); + } + + @Override + public PardicMiner copy() { + return new PardicMiner(this); + } +} + +class PardicMinerEffect extends ReplacementEffectImpl { + + public PardicMinerEffect() { + super(Duration.EndOfTurn, Outcome.Detriment); + staticText = "Target player can't play lands."; + } + + public PardicMinerEffect(final PardicMinerEffect effect) { + super(effect); + } + + @Override + public PardicMinerEffect copy() { + return new PardicMinerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.LAND_PLAYED && event.getPlayerId().equals(source.getFirstTarget())) { + // MageObject object = game.getObject(event.getSourceId()); + // if (object.getCardType().contains(CardType.LAND)) { + // return true; + // } + return true; + } + return false; + + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/odyssey/SavageFirecat.java b/Mage.Sets/src/mage/sets/odyssey/SavageFirecat.java new file mode 100644 index 00000000000..b4fb240bdfa --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/SavageFirecat.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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.common.PlusOneCounter; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author cbt33 + */ +public class SavageFirecat extends CardImpl { + + public SavageFirecat(UUID ownerId) { + super(ownerId, 218, "Savage Firecat", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Elemental"); + this.subtype.add("Cat"); + + this.color.setRed(true); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Savage Firecat enters the battlefield with seven +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(new PlusOneCounter(7)))); + // Whenever you tap a land for mana, remove a +1/+1 counter from Savage Firecat. + this.addAbility(new SavageFirecatTriggeredAbility()); + } + + public SavageFirecat(final SavageFirecat card) { + super(card); + } + + @Override + public SavageFirecat copy() { + return new SavageFirecat(this); + } +} + +class SavageFirecatTriggeredAbility extends TriggeredAbilityImpl { + + public SavageFirecatTriggeredAbility() { + super(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(new PlusOneCounter(1)), false); + } + + public SavageFirecatTriggeredAbility(final SavageFirecatTriggeredAbility ability) { + super(ability); + } + + @Override + public SavageFirecatTriggeredAbility copy() { + return new SavageFirecatTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.TAPPED_FOR_MANA && + game.getCard(event.getSourceId()).getCardType().contains(CardType.LAND) && + event.getPlayerId().equals(this.controllerId)){ + return true; + } + return false; +} + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java b/Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java new file mode 100644 index 00000000000..ccc35b998c4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java @@ -0,0 +1,72 @@ +/* + * 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.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +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 cbt33, LevelX2 (Kirtar's Wrath) + */ +public class ShowerOfCoals extends CardImpl { + + public ShowerOfCoals(UUID ownerId) { + super(ownerId, 221, "Shower of Coals", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); + this.expansionSetCode = "ODY"; + + this.color.setRed(true); + + // Shower of Coals deals 2 damage to each of up to three target creatures and/or players. + // Threshold - Shower of Coals deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard. + Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(4), + new DamageTargetEffect(2), + new CardsInControllerGraveCondition(7), + "{this} deals 2 damage to each of up to three target creatures and/or players.

Threshold - {this} deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard."); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(0,3)); + this.getSpellAbility().addEffect(effect); + + + } + + public ShowerOfCoals(final ShowerOfCoals card) { + super(card); + } + + @Override + public ShowerOfCoals copy() { + return new ShowerOfCoals(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/SparkMage.java b/Mage.Sets/src/mage/sets/odyssey/SparkMage.java new file mode 100644 index 00000000000..0baf0903e65 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/SparkMage.java @@ -0,0 +1,115 @@ +/* + * 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.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author cbt33, Loki (Ashling the Extinguisher) + */ +public class SparkMage extends CardImpl { + + public SparkMage(UUID ownerId) { + super(ownerId, 222, "Spark Mage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Dwarf"); + this.subtype.add("Wizard"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Spark Mage deals combat damage to a player, you may have Spark Mage deal 1 damage to target creature that player controls. + this.addAbility(new SparkMageTriggeredAbility()); + } + + public SparkMage(final SparkMage card) { + super(card); + } + + @Override + public SparkMage copy() { + return new SparkMage(this); + } +} + +class SparkMageTriggeredAbility extends TriggeredAbilityImpl { + + public SparkMageTriggeredAbility(){ + super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); + this.addTarget(new TargetCreaturePermanent()); + } + + public SparkMageTriggeredAbility(final SparkMageTriggeredAbility ability) { + super(ability); + } + +@Override + public SparkMageTriggeredAbility copy() { + return new SparkMageTriggeredAbility(this); + } + +@Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event instanceof DamagedPlayerEvent) { + DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event; + if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())){ + Player opponent = game.getPlayer(event.getPlayerId()); + if (opponent != null) { + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls"); + filter.add(new ControllerIdPredicate(opponent.getId())); + this.getTargets().clear(); + this.getTargets().add(new TargetCreaturePermanent(filter)); + return true; + } + } + } + return false; + } + +@Override + public String getRule() { + return "Whenever {this} deals combat damage to a player, you may have {this} deal 1 damage to target creature that player controls."; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/odyssey/ThermalBlast.java b/Mage.Sets/src/mage/sets/odyssey/ThermalBlast.java new file mode 100644 index 00000000000..5204fb74e73 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/ThermalBlast.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.odyssey; + +import java.util.UUID; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +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.TargetCreaturePermanent; + +/** + * + * @author cbt33 + */ +public class ThermalBlast extends CardImpl { + + public ThermalBlast(UUID ownerId) { + super(ownerId, 224, "Thermal Blast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{R}"); + this.expansionSetCode = "ODY"; + + this.color.setRed(true); + + // Thermal Blast deals 3 damage to target creature. + // Threshold - Thermal Blast deals 5 damage to that creature instead if seven or more cards are in your graveyard. + Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(3), + new DamageTargetEffect(5), + new CardsInControllerGraveCondition(7), + "{this} deals 3 damage to target creature.

Threshold - {this} deals 5 damage to that creature instead if seven or more cards are in your graveyard."); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(effect); + } + + public ThermalBlast(final ThermalBlast card) { + super(card); + } + + @Override + public ThermalBlast copy() { + return new ThermalBlast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/TouchOfInvisibility.java b/Mage.Sets/src/mage/sets/odyssey/TouchOfInvisibility.java new file mode 100644 index 00000000000..f4b6875e625 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/TouchOfInvisibility.java @@ -0,0 +1,69 @@ +/* + * 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.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.UnblockableAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author cbt33 + */ +public class TouchOfInvisibility extends CardImpl { + + public TouchOfInvisibility(UUID ownerId) { + super(ownerId, 109, "Touch of Invisibility", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{U}"); + this.expansionSetCode = "ODY"; + + this.color.setBlue(true); + + // Target creature is unblockable this turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new UnblockableAbility(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + + // + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardControllerEffect(1)); + } + + public TouchOfInvisibility(final TouchOfInvisibility card) { + super(card); + } + + @Override + public TouchOfInvisibility copy() { + return new TouchOfInvisibility(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Tremble.java b/Mage.Sets/src/mage/sets/odyssey/Tremble.java new file mode 100644 index 00000000000..3643f8ec846 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Tremble.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.odyssey; + +import java.util.UUID; +import mage.abilities.effects.common.SacrificeAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledLandPermanent; + +/** + * + * @author cbt33, jonubuu (Innocent Blood) + */ +public class Tremble extends CardImpl { + + public Tremble(UUID ownerId) { + super(ownerId, 225, "Tremble", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "ODY"; + + this.color.setRed(true); + + // Each player sacrifices a land. + this.getSpellAbility().addEffect(new SacrificeAllEffect(1, new FilterControlledLandPermanent("land"))); + } + + public Tremble(final Tremble card) { + super(card); + } + + @Override + public Tremble copy() { + return new Tremble(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/VolcanicSpray.java b/Mage.Sets/src/mage/sets/odyssey/VolcanicSpray.java new file mode 100644 index 00000000000..9e596e8db08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/VolcanicSpray.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.odyssey; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author cbt33 + */ +public class VolcanicSpray extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public VolcanicSpray(UUID ownerId) { + super(ownerId, 226, "Volcanic Spray", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "ODY"; + + this.color.setRed(true); + + // Volcanic Spray deals 1 damage to each creature without flying and each player. + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter)); + // Flashback {1}{R} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{R}"), TimingRule.SORCERY)); + } + + public VolcanicSpray(final VolcanicSpray card) { + super(card); + } + + @Override + public VolcanicSpray copy() { + return new VolcanicSpray(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/VolleyOfBoulders.java b/Mage.Sets/src/mage/sets/odyssey/VolleyOfBoulders.java new file mode 100644 index 00000000000..6b46ed0adb4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/VolleyOfBoulders.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.odyssey; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.target.common.TargetCreatureOrPlayerAmount; + +/** + * + * @author cbt33 + */ +public class VolleyOfBoulders extends CardImpl { + + public VolleyOfBoulders(UUID ownerId) { + super(ownerId, 227, "Volley of Boulders", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{8}{R}"); + this.expansionSetCode = "ODY"; + + this.color.setRed(true); + + // Volley of Boulders deals 6 damage divided as you choose among any number of target creatures and/or players. + this.getSpellAbility().addEffect(new DamageMultiEffect(6)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(6)); + // Flashback {R}{R}{R}{R}{R}{R} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{R}{R}{R}{R}{R}{R}"),TimingRule.SORCERY)); + } + + public VolleyOfBoulders(final VolleyOfBoulders card) { + super(card); + } + + @Override + public VolleyOfBoulders copy() { + return new VolleyOfBoulders(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java b/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java new file mode 100644 index 00000000000..5a5e9d7d679 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java @@ -0,0 +1,101 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +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.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author cbt33 + */ +public class Whipkeeper extends CardImpl { + + public Whipkeeper(UUID ownerId) { + super(ownerId, 228, "Whipkeeper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Dwarf"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Whipkeeper deals damage to target creature equal to the damage already dealt to it this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WhipkeeperEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + + } + + public Whipkeeper(final Whipkeeper card) { + super(card); + } + + @Override + public Whipkeeper copy() { + return new Whipkeeper(this); + } +} + +class WhipkeeperEffect extends OneShotEffect { + + public WhipkeeperEffect() { + super(Outcome.Damage); + staticText = "{tap}: {this} deals damage to target creature equal to the damage already dealt to it this turn."; + } + public WhipkeeperEffect(final WhipkeeperEffect effect) { + super(effect); + } + + @Override + public WhipkeeperEffect copy() { + return new WhipkeeperEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getFirstTarget()); + if (creature != null) { + creature.damage(creature.getDamage(), source.getSourceId(), game, true, false); + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/odyssey/ZombieCannibal.java b/Mage.Sets/src/mage/sets/odyssey/ZombieCannibal.java new file mode 100644 index 00000000000..3c77b9a069e --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/ZombieCannibal.java @@ -0,0 +1,69 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInOpponentsGraveyard; + +/** + * + * @author cbt33 + */ +public class ZombieCannibal extends CardImpl { + + public ZombieCannibal(UUID ownerId) { + super(ownerId, 169, "Zombie Cannibal", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Zombie"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Zombie Cannibal deals combat damage to a player, you may exile target card from that player's graveyard. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new ExileTargetEffect(), false, true); + ability.addTarget(new TargetCardInOpponentsGraveyard(new FilterCard())); + } + + public ZombieCannibal(final ZombieCannibal card) { + super(card); + } + + @Override + public ZombieCannibal copy() { + return new ZombieCannibal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/IvyElemental.java b/Mage.Sets/src/mage/sets/planechase/IvyElemental.java new file mode 100644 index 00000000000..9fb482e527c --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/IvyElemental.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.planechase; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.common.PlusOneCounter; + +/** + * + * @author cbt33 + */ +public class IvyElemental extends CardImpl { + + public IvyElemental(UUID ownerId) { + super(ownerId, 74, "Ivy Elemental", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{X}{G}"); + this.expansionSetCode = "HOP"; + this.subtype.add("Elemental"); + + this.color.setGreen(true); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Ivy Elemental enters the battlefield with X +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(new PlusOneCounter(), new ManacostVariableValue(), true))); + } + + public IvyElemental(final IvyElemental card) { + super(card); + } + + @Override + public IvyElemental copy() { + return new IvyElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SliverQueen.java b/Mage.Sets/src/mage/sets/stronghold/SliverQueen.java new file mode 100644 index 00000000000..37c0554536f --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SliverQueen.java @@ -0,0 +1,84 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author cbt33 + */ +public class SliverQueen extends CardImpl { + + public SliverQueen(UUID ownerId) { + super(ownerId, 141, "Sliver Queen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}"); + this.expansionSetCode = "STH"; + this.supertype.add("Legendary"); + this.subtype.add("Sliver"); + + this.color.setRed(true); + this.color.setBlue(true); + this.color.setGreen(true); + this.color.setBlack(true); + this.color.setWhite(true); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // {2}: Put a 1/1 colorless Sliver creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SliverToken()), new ManaCostsImpl("{2}"))); + } + + public SliverQueen(final SliverQueen card) { + super(card); + } + + @Override + public SliverQueen copy() { + return new SliverQueen(this); + } +} + +class SliverToken extends Token { + + public SliverToken() { + super("Sliver", "1/1 colorless Sliver creature token"); + cardType.add(CardType.CREATURE); + subtype.add("Sliver"); + power = new MageInt(1); + toughness = new MageInt(1); + } +} \ No newline at end of file