From 75c67644bc7190267e5f5f5047b853c2f86a9bf2 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 7 Apr 2014 17:14:55 +0200 Subject: [PATCH] [JOU] Added 9 cards. --- .../journeyintonyx/CyclopsOfEternalFury.java | 71 ++++++++ .../mage/sets/journeyintonyx/DakraMystic.java | 121 ++++++++++++++ .../journeyintonyx/EidolonOfBlossoms.java | 65 ++++++++ .../journeyintonyx/ExtinguishAllHope.java | 73 +++++++++ .../sets/journeyintonyx/GnarledScarhide.java | 82 ++++++++++ .../sets/journeyintonyx/HallOfTriumph.java | 151 ++++++++++++++++++ .../journeyintonyx/IroasGodOfVictory.java | 99 ++++++++++++ .../journeyintonyx/RavenousLeucrocota.java | 67 ++++++++ .../sets/journeyintonyx/SatyrHoplite.java | 67 ++++++++ .../src/mage/sets/legions/WardSliver.java | 2 +- .../RuneTailKitsuneAscendant.java | 8 - .../common/PreventAllDamageToEffect.java | 6 +- Utils/mtg-cards-data.txt | 16 +- 13 files changed, 816 insertions(+), 12 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/CyclopsOfEternalFury.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/EidolonOfBlossoms.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/ExtinguishAllHope.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/GnarledScarhide.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/IroasGodOfVictory.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/RavenousLeucrocota.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/SatyrHoplite.java diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/CyclopsOfEternalFury.java b/Mage.Sets/src/mage/sets/journeyintonyx/CyclopsOfEternalFury.java new file mode 100644 index 00000000000..df419b636ea --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/CyclopsOfEternalFury.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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class CyclopsOfEternalFury extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); + + public CyclopsOfEternalFury(UUID ownerId) { + super(ownerId, 92, "Cyclops of Eternal Fury", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{4}{R}{R}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Cyclops"); + + this.color.setRed(true); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Creatures you control have haste. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + } + + public CyclopsOfEternalFury(final CyclopsOfEternalFury card) { + super(card); + } + + @Override + public CyclopsOfEternalFury copy() { + return new CyclopsOfEternalFury(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java b/Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java new file mode 100644 index 00000000000..9aa7b59a02c --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DakraMystic.java @@ -0,0 +1,121 @@ +/* + * 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.journeyintonyx; + +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.OneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class DakraMystic extends CardImpl { + + public DakraMystic(UUID ownerId) { + super(ownerId, 35, "Dakra Mystic", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {U},{T}:Each player reveals the top card of his or her library. You may put the revealed cards into their owners graveyard. If you don't, each player draws a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DakraMysticEffect(), new ManaCostsImpl("{U}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + + } + + public DakraMystic(final DakraMystic card) { + super(card); + } + + @Override + public DakraMystic copy() { + return new DakraMystic(this); + } +} + +class DakraMysticEffect extends OneShotEffect { + + public DakraMysticEffect() { + super(Outcome.Detriment); + this.staticText = "Each player reveals the top card of his or her library. You may put the revealed cards into their owners graveyard. If you don't, each player draws a card"; + } + + public DakraMysticEffect(final DakraMysticEffect effect) { + super(effect); + } + + @Override + public DakraMysticEffect copy() { + return new DakraMysticEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for(UUID playerId: controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null && player.getLibrary().size() > 0) { + player.revealCards(player.getName(), new CardsImpl(player.getLibrary().getFromTop(game)), game); + } + } + if (controller.chooseUse(outcome, "Put revealed cards into graveyard?", game)) { + for(UUID playerId: controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null && player.getLibrary().size() > 0) { + controller.moveCardToGraveyardWithInfo(player.getLibrary().getFromTop(game), source.getSourceId(), game, Zone.LIBRARY); + } + } + } else { + new DrawCardAllEffect(1).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/EidolonOfBlossoms.java b/Mage.Sets/src/mage/sets/journeyintonyx/EidolonOfBlossoms.java new file mode 100644 index 00000000000..d3ce91812e3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/EidolonOfBlossoms.java @@ -0,0 +1,65 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class EidolonOfBlossoms extends CardImpl { + + public EidolonOfBlossoms(UUID ownerId) { + super(ownerId, 122, "Eidolon of Blossoms", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Spirit"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Constellation - Whenever Eidolon of Blossoms or another enchantment enters the battlefield under your control, draw a card. + this.addAbility(new ConstellationAbility(new DrawCardSourceControllerEffect(1))); + } + + public EidolonOfBlossoms(final EidolonOfBlossoms card) { + super(card); + } + + @Override + public EidolonOfBlossoms copy() { + return new EidolonOfBlossoms(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/ExtinguishAllHope.java b/Mage.Sets/src/mage/sets/journeyintonyx/ExtinguishAllHope.java new file mode 100644 index 00000000000..a8ecc339512 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/ExtinguishAllHope.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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author LevelX2 + */ +public class ExtinguishAllHope extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("nonenchantment creatures"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(Predicates.not(new CardTypePredicate(CardType.ENCHANTMENT))); + } + + + public ExtinguishAllHope(UUID ownerId) { + //TODO: Fix card number + super(ownerId, 999, "Extinguish All Hope", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "JOU"; + + this.color.setBlack(true); + + // Destroy all nonenchantment creatures. + this.getSpellAbility().addEffect(new DestroyAllEffect(filter)); + + } + + public ExtinguishAllHope(final ExtinguishAllHope card) { + super(card); + } + + @Override + public ExtinguishAllHope copy() { + return new ExtinguishAllHope(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/GnarledScarhide.java b/Mage.Sets/src/mage/sets/journeyintonyx/GnarledScarhide.java new file mode 100644 index 00000000000..d27b476e054 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/GnarledScarhide.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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CantBlockAttachedEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.keyword.BestowAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class GnarledScarhide extends CardImpl { + + public GnarledScarhide(UUID ownerId) { + super(ownerId, 72, "Gnarled Scarhide", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{B}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Minotaur"); + + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Bestow {3}{B} + this.addAbility(new BestowAbility(this, "{3}{B}")); + // Gnarled Scarhide can't block. + this.addAbility(new CantBlockAbility()); + // Enchanted creature gets +2/+1 and can't block. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2,1, Duration.WhileOnBattlefield)); + Effect effect = new CantBlockAttachedEffect(AttachmentType.AURA); + effect.setText("and can't block"); + ability.addEffect(effect); + this.addAbility(ability); + + } + + public GnarledScarhide(final GnarledScarhide card) { + super(card); + } + + @Override + public GnarledScarhide copy() { + return new GnarledScarhide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java b/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java new file mode 100644 index 00000000000..6e7adacfe29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java @@ -0,0 +1,151 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +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.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + + +/** + * + * @author LevelX2 + */ +public class HallOfTriumph extends CardImpl { + + public HallOfTriumph(UUID ownerId) { + super(ownerId, 162, "Hall of Triumph", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "JOU"; + this.supertype.add("Legendary"); + + // As Hall of Triumph enters the battlefield choose a color. + this.addAbility(new AsEntersBattlefieldAbility(new HallOfTriumphEffect())); + // Creatures you control of the chosen color get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HallOfTriumphBoostControlledEffect())); + } + + public HallOfTriumph(final HallOfTriumph card) { + super(card); + } + + @Override + public HallOfTriumph copy() { + return new HallOfTriumph(this); + } +} + +class HallOfTriumphEffect extends OneShotEffect { + + public HallOfTriumphEffect() { + super(Outcome.BoostCreature); + staticText = "choose a color"; + } + + public HallOfTriumphEffect(final HallOfTriumphEffect effect) { + super(effect); + } + + @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) { + ChoiceColor 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.getColor()); + permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getChoice().toString() + ""); + } + } + return false; + } + + @Override + public HallOfTriumphEffect copy() { + return new HallOfTriumphEffect(this); + } + +} + +class HallOfTriumphBoostControlledEffect extends ContinuousEffectImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + public HallOfTriumphBoostControlledEffect() { + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + staticText = "Creatures you control of the chosen color get +1/+1"; + } + + public HallOfTriumphBoostControlledEffect(final HallOfTriumphBoostControlledEffect effect) { + super(effect); + } + + @Override + public HallOfTriumphBoostControlledEffect copy() { + return new HallOfTriumphBoostControlledEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); + if (color != null) { + for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { + if (perm.getColor().shares(color)) { + perm.addPower(1); + perm.addToughness(1); + } + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/IroasGodOfVictory.java b/Mage.Sets/src/mage/sets/journeyintonyx/IroasGodOfVictory.java new file mode 100644 index 00000000000..a5fe2af6935 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/IroasGodOfVictory.java @@ -0,0 +1,99 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.DevotionCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventAllDamageToEffect; +import mage.abilities.effects.common.combat.CantBeBlockedByOneAllEffect; +import mage.abilities.effects.common.continious.LoseCreatureTypeSourceEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreatureInPlay; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class IroasGodOfVictory extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control"); + private static final FilterControlledCreatureInPlay filterAttacking = new FilterControlledCreatureInPlay("attacking creatures you control"); + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filterAttacking.add(new AttackingPredicate()); + } + + public IroasGodOfVictory(UUID ownerId) { + super(ownerId, 150, "Iroas, God of Victory", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); + this.expansionSetCode = "JOU"; + this.supertype.add("Legendary"); + this.supertype.add("Enhantment"); + this.subtype.add("God"); + + this.color.setRed(true); + this.color.setWhite(true); + this.power = new MageInt(7); + this.toughness = new MageInt(4); + + // Indestructible + this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to red and white is less than seven, Iroas isn't a creature. + Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.W), 7); + effect.setText("As long as your devotion to red and white is less than seven, Iroas isn't a creature"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + // Creatures you control can't be blocked except by two or more creatures. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByOneAllEffect(2, filter))); + + // Prevent all damage that would be dealt to attacking creatures you control. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToEffect(Duration.WhileOnBattlefield, filterAttacking))); + + } + + public IroasGodOfVictory(final IroasGodOfVictory card) { + super(card); + } + + @Override + public IroasGodOfVictory copy() { + return new IroasGodOfVictory(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/RavenousLeucrocota.java b/Mage.Sets/src/mage/sets/journeyintonyx/RavenousLeucrocota.java new file mode 100644 index 00000000000..8e6250c3fe7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/RavenousLeucrocota.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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MonstrosityAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class RavenousLeucrocota extends CardImpl { + + public RavenousLeucrocota(UUID ownerId) { + super(ownerId, 136, "Ravenous Leucrocota", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Beast"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + // {6}{G}: Monstrosity 3. + this.addAbility(new MonstrosityAbility("{6}{G}", 3)); + } + + public RavenousLeucrocota(final RavenousLeucrocota card) { + super(card); + } + + @Override + public RavenousLeucrocota copy() { + return new RavenousLeucrocota(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/SatyrHoplite.java b/Mage.Sets/src/mage/sets/journeyintonyx/SatyrHoplite.java new file mode 100644 index 00000000000..ea371f5d25d --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/SatyrHoplite.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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class SatyrHoplite extends CardImpl { + + public SatyrHoplite(UUID ownerId) { + super(ownerId, 110, "Satyr Hoplite", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Satyr"); + this.subtype.add("Soldier"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Heroic - Whenever you cast a spell that targets Satyr Hoplite, put a +1/+1 counter on Satyr Hoplite. + this.addAbility(new HeroicAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()))); + } + + public SatyrHoplite(final SatyrHoplite card) { + super(card); + } + + @Override + public SatyrHoplite copy() { + return new SatyrHoplite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/WardSliver.java b/Mage.Sets/src/mage/sets/legions/WardSliver.java index 0bcc5ba371b..9f2b9517fe7 100644 --- a/Mage.Sets/src/mage/sets/legions/WardSliver.java +++ b/Mage.Sets/src/mage/sets/legions/WardSliver.java @@ -95,7 +95,7 @@ class WardSliverEffect extends OneShotEffect { public WardSliverEffect() { super(Outcome.BoostCreature); - staticText = "choose a creature type"; + staticText = "choose a color"; } public WardSliverEffect(final WardSliverEffect effect) { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java index 0c564708082..db57a71ec17 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java @@ -29,24 +29,16 @@ package mage.sets.saviorsofkamigawa; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.StateTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.FlipSourceEffect; import mage.abilities.effects.common.PreventAllDamageToEffect; -import mage.abilities.effects.common.continious.BoostControlledEffect; -import mage.abilities.effects.common.continious.BoostSourceEffect; -import mage.abilities.effects.common.continious.GainAbilityControlledEffect; -import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledCreatureInPlay; -import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.token.Token; diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageToEffect.java b/Mage/src/mage/abilities/effects/common/PreventAllDamageToEffect.java index b114a2472fc..3fa3ce40542 100644 --- a/Mage/src/mage/abilities/effects/common/PreventAllDamageToEffect.java +++ b/Mage/src/mage/abilities/effects/common/PreventAllDamageToEffect.java @@ -82,13 +82,15 @@ public class PreventAllDamageToEffect extends PreventionEffectImpl