From 0883ceeff552a4686d0f49e31cd7a24797624813 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 8 Apr 2014 16:29:58 +0200 Subject: [PATCH] [JOU] Added 11 cards. --- .../mage/sets/conflux/KederektParasite.java | 20 +-- .../mage/sets/gatecrash/FoundryChampion.java | 2 +- .../DawnbringerCharioteers.java | 73 +++++++++ .../sets/journeyintonyx/DictateOfKruphix.java | 99 ++++++++++++ .../journeyintonyx/DictateOfTheTwinGods.java | 129 ++++++++++++++++ .../sets/journeyintonyx/DoomwakeGiant.java | 75 +++++++++ .../journeyintonyx/KeranosGodOfStorms.java | 143 ++++++++++++++++++ .../sets/journeyintonyx/ScourgeOfFleets.java | 118 +++++++++++++++ .../sets/journeyintonyx/SpawnOfThraxes.java | 81 ++++++++++ .../journeyintonyx/SquelchingLeeches.java | 76 ++++++++++ .../sets/journeyintonyx/TempleOfEpiphany.java | 67 ++++++++ .../sets/journeyintonyx/TempleOfMalady.java | 68 +++++++++ .../journeyintonyx/UnderworldCoinsmith.java | 77 ++++++++++ .../sets/magic2012/RitesOfFlourishing.java | 5 - .../mage/watchers/common/MiracleWatcher.java | 2 +- 15 files changed, 1019 insertions(+), 16 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/DawnbringerCharioteers.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/DictateOfKruphix.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/DoomwakeGiant.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/KeranosGodOfStorms.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/ScourgeOfFleets.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/SpawnOfThraxes.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/SquelchingLeeches.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/TempleOfEpiphany.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/TempleOfMalady.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/UnderworldCoinsmith.java diff --git a/Mage.Sets/src/mage/sets/conflux/KederektParasite.java b/Mage.Sets/src/mage/sets/conflux/KederektParasite.java index 8d187d7c8c6..fdb03467ca4 100644 --- a/Mage.Sets/src/mage/sets/conflux/KederektParasite.java +++ b/Mage.Sets/src/mage/sets/conflux/KederektParasite.java @@ -87,17 +87,19 @@ class KederektParasiteTriggeredAbility extends TriggeredAbilityImpl { //When Foundry Champion enters the battlefield, it deals damage to target creature or player equal to the number of creatures you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetCreatureOrPlayer(true)); this.addAbility(ability); //{R}: Foundry Champion gets +1/+0 until end of turn. diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DawnbringerCharioteers.java b/Mage.Sets/src/mage/sets/journeyintonyx/DawnbringerCharioteers.java new file mode 100644 index 00000000000..45e1c8b0428 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DawnbringerCharioteers.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.MageInt; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HeroicAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class DawnbringerCharioteers extends CardImpl { + + public DawnbringerCharioteers(UUID ownerId) { + super(ownerId, 6, "Dawnbringer Charioteers", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + // Heroic - Whenever you cast a spell that targets Dawnbringer Charioteers, put a +1/+1 counter on Dawnbringer Charioteers. + this.addAbility(new HeroicAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()))); + } + + public DawnbringerCharioteers(final DawnbringerCharioteers card) { + super(card); + } + + @Override + public DawnbringerCharioteers copy() { + return new DawnbringerCharioteers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfKruphix.java b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfKruphix.java new file mode 100644 index 00000000000..f2f5e31c8fd --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfKruphix.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.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class DictateOfKruphix extends CardImpl { + + public DictateOfKruphix(UUID ownerId) { + super(ownerId, 37, "Dictate of Kruphix", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}"); + this.expansionSetCode = "JOU"; + + this.color.setBlue(true); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // At the beginning of each player's draw step, that player draws an additional card. + this.addAbility(new DictateOfKruphixAbility()); + } + + public DictateOfKruphix(final DictateOfKruphix card) { + super(card); + } + + @Override + public DictateOfKruphix copy() { + return new DictateOfKruphix(this); + } +} + +class DictateOfKruphixAbility extends TriggeredAbilityImpl { + + public DictateOfKruphixAbility() { + super(Zone.BATTLEFIELD, new DrawCardTargetEffect(1)); + } + + public DictateOfKruphixAbility(final DictateOfKruphixAbility ability) { + super(ability); + } + + @Override + public DictateOfKruphixAbility copy() { + return new DictateOfKruphixAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DRAW_STEP_PRE) { + this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); + return true; + } + return false; + } + + @Override + public String getRule() { + return "At the beginning of each player's draw step, that player draws an additional card."; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java new file mode 100644 index 00000000000..55cd55b42d1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java @@ -0,0 +1,129 @@ +/* + * 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.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlashAbility; +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.DamageEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import static mage.game.events.GameEvent.EventType.DAMAGE_CREATURE; +import static mage.game.events.GameEvent.EventType.DAMAGE_PLAYER; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class DictateOfTheTwinGods extends CardImpl { + + public DictateOfTheTwinGods(UUID ownerId) { + super(ownerId, 95, "Dictate of the Twin Gods", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}"); + this.expansionSetCode = "JOU"; + + this.color.setRed(true); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // If a source would deal damage to a permanent or player, it deals double that damage to that permanent or player instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DictateOfTheTwinGodsEffect())); + + } + + public DictateOfTheTwinGods(final DictateOfTheTwinGods card) { + super(card); + } + + @Override + public DictateOfTheTwinGods copy() { + return new DictateOfTheTwinGods(this); + } +} + +class DictateOfTheTwinGodsEffect extends ReplacementEffectImpl { + + public DictateOfTheTwinGodsEffect() { + super(Duration.WhileOnBattlefield, Outcome.Damage); + staticText = "If a source would deal damage to a permanent or player, that source deals double that damage to that permanent or player instead"; + } + + public DictateOfTheTwinGodsEffect(final DictateOfTheTwinGodsEffect effect) { + super(effect); + } + + @Override + public DictateOfTheTwinGodsEffect copy() { + return new DictateOfTheTwinGodsEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + switch (event.getType()) { + case DAMAGE_PLAYER: + case DAMAGE_CREATURE: + case DAMAGE_PLANESWALKER: + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + DamageEvent damageEvent = (DamageEvent)event; + if (damageEvent.getType() == EventType.DAMAGE_PLAYER) { + Player targetPlayer = game.getPlayer(event.getTargetId()); + if (targetPlayer != null) { + targetPlayer.damage(damageEvent.getAmount()*2, damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + return true; + } + } else { + Permanent targetPermanent = game.getPermanent(event.getTargetId()); + if (targetPermanent != null) { + targetPermanent.damage(damageEvent.getAmount()*2, damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DoomwakeGiant.java b/Mage.Sets/src/mage/sets/journeyintonyx/DoomwakeGiant.java new file mode 100644 index 00000000000..73209c54c0a --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DoomwakeGiant.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.effects.common.continious.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class DoomwakeGiant extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public DoomwakeGiant(UUID ownerId) { + super(ownerId, 66, "Doomwake Giant", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Giant"); + + this.color.setBlack(true); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // Constellation - When Doomwake Giant or another enchantment enters the battlefield under your control, creatures your opponents control get -1/-1 until end of turn. + this.addAbility(new ConstellationAbility(new BoostAllEffect(-1,-1, Duration.EndOfTurn, filter, false))); + } + + public DoomwakeGiant(final DoomwakeGiant card) { + super(card); + } + + @Override + public DoomwakeGiant copy() { + return new DoomwakeGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/KeranosGodOfStorms.java b/Mage.Sets/src/mage/sets/journeyintonyx/KeranosGodOfStorms.java new file mode 100644 index 00000000000..ca211ade3d2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/KeranosGodOfStorms.java @@ -0,0 +1,143 @@ +/* + * 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.TriggeredAbilityImpl; +import mage.abilities.common.EmptyEffect; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.DevotionCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continious.LoseCreatureTypeSourceEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class KeranosGodOfStorms extends CardImpl { + + + public KeranosGodOfStorms(UUID ownerId) { + super(ownerId, 156, "Keranos, God of Storms", Rarity.MYTHIC, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{U}{R}"); + this.expansionSetCode = "JOU"; + this.supertype.add("Legendary"); + this.subtype.add("God"); + + this.color.setRed(true); + this.color.setBlue(true); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Indestructible + this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to blue and red is less than seven, Keranos isn't a creature. + Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.R), 7); + effect.setText("As long as your devotion to blue and red is less than seven, Keranos isn't a creature"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + // Reveal the first card you draw on each of your turns. + // Whenever you reveal a land card this way, draw a card. + // Whenever you reveal a nonland card this way, Keranos deals 3 damage to target creature or player. + this.addAbility(new KeranosGodOfStormsTriggeredAbility()); + + + } + + public KeranosGodOfStorms(final KeranosGodOfStorms card) { + super(card); + } + + @Override + public KeranosGodOfStorms copy() { + return new KeranosGodOfStorms(this); + } +} + +class KeranosGodOfStormsTriggeredAbility extends TriggeredAbilityImpl { + + private int lastTriggeredTurn; + + KeranosGodOfStormsTriggeredAbility() { + super(Zone.BATTLEFIELD, new EmptyEffect(""), false); + } + + KeranosGodOfStormsTriggeredAbility(final KeranosGodOfStormsTriggeredAbility ability) { + super(ability); + } + + @Override + public KeranosGodOfStormsTriggeredAbility copy() { + return new KeranosGodOfStormsTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DREW_CARD && event.getPlayerId().equals(this.getControllerId())) { + if (game.getActivePlayerId().equals(this.getControllerId()) && this.lastTriggeredTurn != game.getTurnNum()) { + Card card = game.getCard(event.getTargetId()); + Player controller = game.getPlayer(this.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(this.getSourceId()); + if (card != null && controller != null && sourcePermanent != null) { + lastTriggeredTurn = game.getTurnNum(); + controller.revealCards(sourcePermanent.getName(), new CardsImpl(card), game); + this.getTargets().clear(); + this.getEffects().clear(); + if (card.getCardType().contains(CardType.LAND)) { + this.addEffect(new DrawCardSourceControllerEffect(1)); + } else { + this.addEffect(new DamageTargetEffect(3)); + this.addTarget(new TargetCreatureOrPlayer(true)); + } + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Reveal the first card you draw on each of your turns. Whenever you reveal a land card this way, draw a card. Whenever you reveal a nonland card this way, Keranos deals 3 damage to target creature or player."; + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/ScourgeOfFleets.java b/Mage.Sets/src/mage/sets/journeyintonyx/ScourgeOfFleets.java new file mode 100644 index 00000000000..a6cdef057b2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/ScourgeOfFleets.java @@ -0,0 +1,118 @@ +/* + * 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.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class ScourgeOfFleets extends CardImpl { + + public ScourgeOfFleets(UUID ownerId) { + super(ownerId, 51, "Scourge of Fleets", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Kraken"); + + this.color.setBlue(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // When Scourge of Fleets enters the battlefield, return each creature your opponents control with toughness X or less, where X is the number of Islands you control. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ScourgeOfFleetsEffect(), false)); + } + + public ScourgeOfFleets(final ScourgeOfFleets card) { + super(card); + } + + @Override + public ScourgeOfFleets copy() { + return new ScourgeOfFleets(this); + } +} + +class ScourgeOfFleetsEffect extends OneShotEffect { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("number of Islands you control"); + + static { + filter.add(new SubtypePredicate("Island")); + } + + public ScourgeOfFleetsEffect() { + super(Outcome.Benefit); + this.staticText = "return each creature your opponents control with toughness X or less, where X is the number of Islands you control"; + } + + public ScourgeOfFleetsEffect(final ScourgeOfFleetsEffect effect) { + super(effect); + } + + @Override + public ScourgeOfFleetsEffect copy() { + return new ScourgeOfFleetsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int islands = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); + FilterPermanent creatureFilter = new FilterCreaturePermanent(); + creatureFilter.add(new ControllerPredicate(TargetController.OPPONENT)); + creatureFilter.add(new PowerPredicate(Filter.ComparisonType.LessThan, islands +1)); + for (Permanent permanent: game.getBattlefield().getActivePermanents(creatureFilter, source.getControllerId(), source.getSourceId(), game)) { + controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/SpawnOfThraxes.java b/Mage.Sets/src/mage/sets/journeyintonyx/SpawnOfThraxes.java new file mode 100644 index 00000000000..bc465d36d83 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/SpawnOfThraxes.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class SpawnOfThraxes extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountains you control"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public SpawnOfThraxes(UUID ownerId) { + super(ownerId, 112, "Spawn of Thraxes", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Dragon"); + + this.color.setRed(true); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Spawn of Thraxes enters the battlefield, it deals damage to target creature or player equal to the number of Mountains you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); + ability.addTarget(new TargetCreatureOrPlayer(true)); + this.addAbility(ability); + } + + public SpawnOfThraxes(final SpawnOfThraxes card) { + super(card); + } + + @Override + public SpawnOfThraxes copy() { + return new SpawnOfThraxes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/SquelchingLeeches.java b/Mage.Sets/src/mage/sets/journeyintonyx/SquelchingLeeches.java new file mode 100644 index 00000000000..960288fe8e5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/SquelchingLeeches.java @@ -0,0 +1,76 @@ +/* + * 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.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LevelX2 + */ +public class SquelchingLeeches extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamps you control"); + + static { + filter.add(new SubtypePredicate("Swamp")); + } + + public SquelchingLeeches(UUID ownerId) { + super(ownerId, 84, "Squelching Leeches", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Leech"); + + this.color.setBlack(true); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Squelching Leeches's power and toughness are each equal to the number of Swamps you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); + } + + public SquelchingLeeches(final SquelchingLeeches card) { + super(card); + } + + @Override + public SquelchingLeeches copy() { + return new SquelchingLeeches(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/TempleOfEpiphany.java b/Mage.Sets/src/mage/sets/journeyintonyx/TempleOfEpiphany.java new file mode 100644 index 00000000000..f708a9f640f --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/TempleOfEpiphany.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.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class TempleOfEpiphany extends CardImpl { + + public TempleOfEpiphany(UUID ownerId) { + super(ownerId, 164, "Temple of Epiphany", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "JOU"; + + // Temple of Epiphany enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + // When Temple of Epiphany enters the battlefield, scry 1. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(1))); + // {T}: Add {U} or {R} to your mana pool. + this.addAbility(new BlueManaAbility()); + this.addAbility(new RedManaAbility()); + } + + public TempleOfEpiphany(final TempleOfEpiphany card) { + super(card); + } + + @Override + public TempleOfEpiphany copy() { + return new TempleOfEpiphany(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/TempleOfMalady.java b/Mage.Sets/src/mage/sets/journeyintonyx/TempleOfMalady.java new file mode 100644 index 00000000000..c15816e9a2f --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/TempleOfMalady.java @@ -0,0 +1,68 @@ +/* + * 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.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class TempleOfMalady extends CardImpl { + + public TempleOfMalady(UUID ownerId) { + super(ownerId, 165, "Temple of Malady", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "JOU"; + + // Temple of Malady enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + // When Temple of Malady enters the battlefield, scry 1. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(1))); + // {T}: Add {B} or {G} to your mana pool. + this.addAbility(new BlackManaAbility()); + this.addAbility(new GreenManaAbility()); + + } + + public TempleOfMalady(final TempleOfMalady card) { + super(card); + } + + @Override + public TempleOfMalady copy() { + return new TempleOfMalady(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/UnderworldCoinsmith.java b/Mage.Sets/src/mage/sets/journeyintonyx/UnderworldCoinsmith.java new file mode 100644 index 00000000000..9858c403ceb --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/UnderworldCoinsmith.java @@ -0,0 +1,77 @@ +/* + * 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.abilityword.ConstellationAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class UnderworldCoinsmith extends CardImpl { + + public UnderworldCoinsmith(UUID ownerId) { + super(ownerId, 157, "Underworld Coinsmith", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{W}{B}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setBlack(true); + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Constellation - Whenever Underworld Coinsmith or an enchantment enters the battlefield under your control, you gain 1 life. + this.addAbility(new ConstellationAbility(new GainLifeEffect(1))); + // {W}{B}, Pay 1 life: Each opponent loses 1 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(1), new ManaCostsImpl("{W}{B}")); + ability.addCost(new PayLifeCost(1)); + this.addAbility(ability); + } + + public UnderworldCoinsmith(final UnderworldCoinsmith card) { + super(card); + } + + @Override + public UnderworldCoinsmith copy() { + return new UnderworldCoinsmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2012/RitesOfFlourishing.java b/Mage.Sets/src/mage/sets/magic2012/RitesOfFlourishing.java index 2423d40a4b1..7d26e069fc3 100644 --- a/Mage.Sets/src/mage/sets/magic2012/RitesOfFlourishing.java +++ b/Mage.Sets/src/mage/sets/magic2012/RitesOfFlourishing.java @@ -92,11 +92,6 @@ class RitesOfFlourishingAbility extends TriggeredAbilityImpl { - private Map amountOfCardsDrawnThisTurn = new HashMap(); + private final Map amountOfCardsDrawnThisTurn = new HashMap<>(); public MiracleWatcher() { super("MiracleWatcher", WatcherScope.GAME);