From 7eb074b85c5de69099b8b964749b95f97a1ebab2 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 24 Oct 2013 10:17:54 +0200 Subject: [PATCH] Added Desert, Mirror Gallery, Loaming Shaman, Prahv Spires of Order, Blasting Station, Drowned Rusalka, Fa'adiyah Seer, Supression Field. --- .../src/mage/sets/arabiannights/Desert.java | 54 ++++++ .../betrayersofkamigawa/MirrorGallery.java | 104 ++++++++++ .../mage/sets/dissension/LoamingShaman.java | 148 ++++++++++++++ .../sets/dissension/PrahvSpiresOfOrder.java | 133 +++++++++++++ .../src/mage/sets/eventide/CauldronHaze.java | 68 +++++++ .../mage/sets/eventide/MarshdrinkerGiant.java | 85 ++++++++ .../mage/sets/eventide/TalarasBattalion.java | 181 ++++++++++++++++++ .../mage/sets/eventide/TillingTreefolk.java | 75 ++++++++ .../mage/sets/fifthdawn/BlastingStation.java | 74 +++++++ .../mage/sets/guildpact/DrownedRusalka.java | 75 ++++++++ .../heroesvsmonsters/SkarrganFirebird.java | 2 +- .../mage/sets/odyssey/RepentantVampire.java | 1 - .../mage/sets/planarchaos/FaadiyahSeer.java | 110 +++++++++++ .../mage/sets/ravnika/SuppressionField.java | 108 +++++++++++ .../sets/returntoravnica/AzorsElocutors.java | 2 +- .../src/mage/sets/timeshifted/Desert.java | 102 ++++++++++ 16 files changed, 1319 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/arabiannights/Desert.java create mode 100644 Mage.Sets/src/mage/sets/betrayersofkamigawa/MirrorGallery.java create mode 100644 Mage.Sets/src/mage/sets/dissension/LoamingShaman.java create mode 100644 Mage.Sets/src/mage/sets/dissension/PrahvSpiresOfOrder.java create mode 100644 Mage.Sets/src/mage/sets/eventide/CauldronHaze.java create mode 100644 Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java create mode 100644 Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java create mode 100644 Mage.Sets/src/mage/sets/eventide/TillingTreefolk.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/BlastingStation.java create mode 100644 Mage.Sets/src/mage/sets/guildpact/DrownedRusalka.java create mode 100644 Mage.Sets/src/mage/sets/planarchaos/FaadiyahSeer.java create mode 100644 Mage.Sets/src/mage/sets/ravnika/SuppressionField.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/Desert.java diff --git a/Mage.Sets/src/mage/sets/arabiannights/Desert.java b/Mage.Sets/src/mage/sets/arabiannights/Desert.java new file mode 100644 index 00000000000..194bd480f0a --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/Desert.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.arabiannights; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class Desert extends mage.sets.timeshifted.Desert { + + public Desert(UUID ownerId) { + super(ownerId); + this.cardNumber = 86; + this.expansionSetCode = "ARN"; + this.rarity = Rarity.COMMON; + } + + public Desert(final Desert card) { + super(card); + } + + @Override + public Desert copy() { + return new Desert(this); + } +} diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MirrorGallery.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MirrorGallery.java new file mode 100644 index 00000000000..cfb1f7c583a --- /dev/null +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MirrorGallery.java @@ -0,0 +1,104 @@ +/* + * 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.betrayersofkamigawa; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +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.game.Game; + +/** + * + * @author LevelX2 + */ +public class MirrorGallery extends CardImpl { + + public MirrorGallery(UUID ownerId) { + super(ownerId, 154, "Mirror Gallery", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}"); + this.expansionSetCode = "BOK"; + + // The "legend rule" doesn't apply. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MirrorGalleryRuleEffect())); + } + + public MirrorGallery(final MirrorGallery card) { + super(card); + } + + @Override + public MirrorGallery copy() { + return new MirrorGallery(this); + } +} + +class MirrorGalleryRuleEffect extends ContinuousEffectImpl { + + public MirrorGalleryRuleEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "The \"legend rule\" doesn't apply"; + } + + public MirrorGalleryRuleEffect(final MirrorGalleryRuleEffect effect) { + super(effect); + } + + @Override + public MirrorGalleryRuleEffect copy() { + return new MirrorGalleryRuleEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + switch (layer) { + case RulesEffects: + // Change the rule + game.getState().setLegendaryRuleActive(false); + break; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.RulesEffects; + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/LoamingShaman.java b/Mage.Sets/src/mage/sets/dissension/LoamingShaman.java new file mode 100644 index 00000000000..e74a4ae9dd8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/LoamingShaman.java @@ -0,0 +1,148 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dissension; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class LoamingShaman extends CardImpl { + + public LoamingShaman(UUID ownerId) { + super(ownerId, 87, "Loaming Shaman", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "DIS"; + this.subtype.add("Centaur"); + this.subtype.add("Shaman"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Loaming Shaman enters the battlefield, target player shuffles any number of target cards from his or her graveyard into his or her library. + Ability ability = new EntersBattlefieldTriggeredAbility(new LoamingShamanEffect(), false); + ability.addTarget(new TargetPlayer(true)); + ability.addTarget(new LoamingShamanTargetCardsInGraveyard(0, Integer.MAX_VALUE, new FilterCard("cards in target player's graveyard"))); + this.addAbility(ability); + } + + public LoamingShaman(final LoamingShaman card) { + super(card); + } + + @Override + public LoamingShaman copy() { + return new LoamingShaman(this); + } +} + +class LoamingShamanEffect extends OneShotEffect { + + public LoamingShamanEffect() { + super(Outcome.Benefit); + this.staticText = "target player shuffles any number of target cards from his or her graveyard into his or her library"; + } + + public LoamingShamanEffect(final LoamingShamanEffect effect) { + super(effect); + } + + @Override + public LoamingShamanEffect copy() { + return new LoamingShamanEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + if (targetPlayer != null) { + for (UUID targetCard : source.getTargets().get(1).getTargets()) { + Card card = targetPlayer.getGraveyard().get(targetCard, game); + if (card != null) { + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + } + } + targetPlayer.getLibrary().shuffle(); + return true; + } + return false; + } +} + +class LoamingShamanTargetCardsInGraveyard extends TargetCard { + + public LoamingShamanTargetCardsInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) { + super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter); + this.targetName = filter.getMessage(); + } + + public LoamingShamanTargetCardsInGraveyard(final LoamingShamanTargetCardsInGraveyard target) { + super(target); + } + + @Override + public boolean canTarget(UUID id, Ability source, Game game) { + UUID targetPlayerId = source.getFirstTarget(); + UUID firstTarget = this.getFirstTarget(); + Card targetCard = game.getCard(id); + if (firstTarget != null) { + Card card = game.getCard(firstTarget); + if (card == null || targetCard == null + || !card.getOwnerId().equals(targetCard.getOwnerId())) { + return false; + } + } else { + if (targetCard == null || !targetCard.getOwnerId().equals(targetPlayerId)) { + return false; + } + } + return super.canTarget(id, source, game); + } + + + @Override + public LoamingShamanTargetCardsInGraveyard copy() { + return new LoamingShamanTargetCardsInGraveyard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/PrahvSpiresOfOrder.java b/Mage.Sets/src/mage/sets/dissension/PrahvSpiresOfOrder.java new file mode 100644 index 00000000000..128adc75e97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/PrahvSpiresOfOrder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dissension; + +import java.util.UUID; +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.PreventionEffectImpl; +import mage.abilities.mana.ColorlessManaAbility; +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.target.TargetSource; + +/** + * + * @author LevelX2 + */ +public class PrahvSpiresOfOrder extends CardImpl { + + public PrahvSpiresOfOrder(UUID ownerId) { + super(ownerId, 177, "Prahv, Spires of Order", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "DIS"; + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + // {4}{W}{U}, {tap}: Prevent all damage a source of your choice would deal this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PrahvSpiresOfOrderPreventionEffect(), new ManaCostsImpl("{4}{W}{U}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public PrahvSpiresOfOrder(final PrahvSpiresOfOrder card) { + super(card); + } + + @Override + public PrahvSpiresOfOrder copy() { + return new PrahvSpiresOfOrder(this); + } +} + +class PrahvSpiresOfOrderPreventionEffect extends PreventionEffectImpl { + private TargetSource target = new TargetSource(); + + public PrahvSpiresOfOrderPreventionEffect() { + super(Duration.EndOfTurn); + staticText = "Prevent all damage a source of your choice would deal to you this turn"; + } + + public PrahvSpiresOfOrderPreventionEffect(final PrahvSpiresOfOrderPreventionEffect effect) { + super(effect); + this.target = effect.target.copy(); + } + + @Override + public PrahvSpiresOfOrderPreventionEffect copy() { + return new PrahvSpiresOfOrderPreventionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public void init(Ability source, Game game) { + this.target.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), game); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + if (event.getSourceId().equals(target.getFirstTarget())) { + preventDamage(event, source, target.getFirstTarget(), game); + return true; + } + return false; + } + + private void preventDamage(GameEvent event, Ability source, UUID target, Game game) { + GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, target, source.getId(), source.getControllerId(), event.getAmount(), false); + if (!game.replaceEvent(preventEvent)) { + int damage = event.getAmount(); + event.setAmount(0); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, target, source.getId(), source.getControllerId(), damage)); + } + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event instanceof DamageEvent && super.applies(event, source, game)) { + if (event.getSourceId().equals(target.getFirstTarget())) { + return true; + } + } + return false; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eventide/CauldronHaze.java b/Mage.Sets/src/mage/sets/eventide/CauldronHaze.java new file mode 100644 index 00000000000..4ba559d14da --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/CauldronHaze.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.eventide; + +import java.util.UUID; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.PersistAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class CauldronHaze extends CardImpl { + + private String rule = "Choose any number of target creatures. Each of those creatures gains persist until end of turn"; + + public CauldronHaze(UUID ownerId) { + super(ownerId, 84, "Cauldron Haze", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W/B}"); + this.expansionSetCode = "EVE"; + + this.color.setBlack(true); + this.color.setWhite(true); + + // Choose any number of target creatures. Each of those creatures gains persist until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new PersistAbility(), Duration.EndOfTurn, rule)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); + + } + + public CauldronHaze(final CauldronHaze card) { + super(card); + } + + @Override + public CauldronHaze copy() { + return new CauldronHaze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java b/Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java new file mode 100644 index 00000000000..f000dd9e289 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java @@ -0,0 +1,85 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author jeffwadsworth + */ +public class MarshdrinkerGiant extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("Island or Swamp an opponent controls"); + + static { + filter.add(Predicates.or( + new SubtypePredicate("Island"), + new SubtypePredicate("Swamp"))); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public MarshdrinkerGiant(UUID ownerId) { + super(ownerId, 69, "Marshdrinker Giant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Marshdrinker Giant enters the battlefield, destroy target Island or Swamp an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetLandPermanent(filter)); + this.addAbility(ability); + + } + + public MarshdrinkerGiant(final MarshdrinkerGiant card) { + super(card); + } + + @Override + public MarshdrinkerGiant copy() { + return new MarshdrinkerGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java b/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java new file mode 100644 index 00000000000..0653831b861 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java @@ -0,0 +1,181 @@ +/* + * 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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.stack.Spell; +import mage.watchers.WatcherImpl; + +/** + * + * @author jeffwadsworth + */ +public class TalarasBattalion extends CardImpl { + + public TalarasBattalion(UUID ownerId) { + super(ownerId, 77, "Talara's Battalion", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Cast Talara's Battalion only if you've cast another green spell this turn. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new TalarasBattalionEffect())); + this.addWatcher(new TalarasBattalionWatcher(this.getId())); + + } + + public TalarasBattalion(final TalarasBattalion card) { + super(card); + } + + @Override + public TalarasBattalion copy() { + return new TalarasBattalion(this); + } +} + +class TalarasBattalionEffect extends ReplacementEffectImpl { + + TalarasBattalionEffect() { + super(Duration.EndOfGame, Outcome.Detriment); + staticText = "Cast {this} only if you've cast another green spell this turn"; + } + + TalarasBattalionEffect(final TalarasBattalionEffect effect) { + super(effect); + } + + @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.CAST_SPELL + && event.getSourceId().equals(source.getSourceId())) { + CastGreenSpellThisTurnCondition condition = new CastGreenSpellThisTurnCondition(); + return (!condition.apply(game, source)); + } + return false; + + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public TalarasBattalionEffect copy() { + return new TalarasBattalionEffect(this); + } +} + +class CastGreenSpellThisTurnCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + TalarasBattalionWatcher watcher = (TalarasBattalionWatcher) game.getState().getWatchers().get("TalarasBattalionWatcher", source.getControllerId()); + if (watcher != null) { + return watcher.conditionMet(); + } + return false; + } +} + +class TalarasBattalionWatcher extends WatcherImpl { + + private static final FilterSpell filter = new FilterSpell(); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + private UUID cardId; + + public TalarasBattalionWatcher(UUID cardId) { + super("TalarasBattalionWatcher", WatcherScope.PLAYER); + this.cardId = cardId; + } + + public TalarasBattalionWatcher(final TalarasBattalionWatcher watcher) { + super(watcher); + this.cardId = watcher.cardId; + } + + @Override + public TalarasBattalionWatcher copy() { + return new TalarasBattalionWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (condition == true) { //no need to check - condition has already occured + return; + } + if (event.getType() == EventType.SPELL_CAST + && controllerId == event.getPlayerId()) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (!spell.getSourceId().equals(cardId) && filter.match(spell, game)) { + condition = true; + } + } + } + + @Override + public void reset() { + super.reset(); + condition = false; + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/TillingTreefolk.java b/Mage.Sets/src/mage/sets/eventide/TillingTreefolk.java new file mode 100644 index 00000000000..fd8fc1de562 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/TillingTreefolk.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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +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 jeffwadsworth + */ +public class TillingTreefolk extends CardImpl { + + public TillingTreefolk(UUID ownerId) { + super(ownerId, 78, "Tilling Treefolk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Treefolk"); + this.subtype.add("Druid"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // When Tilling Treefolk enters the battlefield, you may return up to two target land cards from your graveyard to your hand. + Effect effect = new ReturnFromGraveyardToHandTargetEffect(true); + effect.setText("you may return up to two target land cards from your graveyard to your hand"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); + ability.addTarget(new TargetCardInYourGraveyard(0, 2, new FilterLandCard())); + this.addAbility(ability); + + } + + public TillingTreefolk(final TillingTreefolk card) { + super(card); + } + + @Override + public TillingTreefolk copy() { + return new TillingTreefolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/BlastingStation.java b/Mage.Sets/src/mage/sets/fifthdawn/BlastingStation.java new file mode 100644 index 00000000000..0d7db292e35 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/BlastingStation.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.fifthdawn; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class BlastingStation extends CardImpl { + + public BlastingStation(UUID ownerId) { + super(ownerId, 107, "Blasting Station", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "5DN"; + + // {tap}, Sacrifice a creature: Blasting Station deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(true))); + ability.addTarget(new TargetCreatureOrPlayer(true)); + this.addAbility(ability); + // Whenever a creature enters the battlefield, you may untap Blasting Station. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterCreaturePermanent("a creature"), true)); + + } + + public BlastingStation(final BlastingStation card) { + super(card); + } + + @Override + public BlastingStation copy() { + return new BlastingStation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/DrownedRusalka.java b/Mage.Sets/src/mage/sets/guildpact/DrownedRusalka.java new file mode 100644 index 00000000000..1b1dd8b1b13 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/DrownedRusalka.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.guildpact; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DiscardControllerEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class DrownedRusalka extends CardImpl { + + public DrownedRusalka(UUID ownerId) { + super(ownerId, 24, "Drowned Rusalka", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "GPT"; + this.subtype.add("Spirit"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {U}, Sacrifice a creature: Discard a card, then draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardControllerEffect(1), new ManaCostsImpl("{U}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("a creature"), true, true))); + ability.addEffect(new DrawCardControllerEffect(1)); + this.addAbility(ability); + } + + public DrownedRusalka(final DrownedRusalka card) { + super(card); + } + + @Override + public DrownedRusalka copy() { + return new DrownedRusalka(this); + } +} diff --git a/Mage.Sets/src/mage/sets/heroesvsmonsters/SkarrganFirebird.java b/Mage.Sets/src/mage/sets/heroesvsmonsters/SkarrganFirebird.java index d05451b998b..64ce559f577 100644 --- a/Mage.Sets/src/mage/sets/heroesvsmonsters/SkarrganFirebird.java +++ b/Mage.Sets/src/mage/sets/heroesvsmonsters/SkarrganFirebird.java @@ -94,6 +94,6 @@ class OpponentWasDealtDamageCondition implements Condition { @Override public String toString() { - return "an opponent was dealt damage this turn"; + return "if an opponent was dealt damage this turn"; } } diff --git a/Mage.Sets/src/mage/sets/odyssey/RepentantVampire.java b/Mage.Sets/src/mage/sets/odyssey/RepentantVampire.java index 35ed0b88bd2..805f15f7d80 100644 --- a/Mage.Sets/src/mage/sets/odyssey/RepentantVampire.java +++ b/Mage.Sets/src/mage/sets/odyssey/RepentantVampire.java @@ -36,7 +36,6 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalContinousEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect; diff --git a/Mage.Sets/src/mage/sets/planarchaos/FaadiyahSeer.java b/Mage.Sets/src/mage/sets/planarchaos/FaadiyahSeer.java new file mode 100644 index 00000000000..a7ef9cfd68f --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/FaadiyahSeer.java @@ -0,0 +1,110 @@ +/* + * 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.planarchaos; + +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.Card; +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.filter.FilterCard; +import mage.filter.common.FilterLandCard; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class FaadiyahSeer extends CardImpl { + + public FaadiyahSeer(UUID ownerId) { + super(ownerId, 146, "Fa'adiyah Seer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Draw a card and reveal it. If it isn't a land card, discard it. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new FaadiyahSeerEffect(), new TapSourceCost())); + } + + public FaadiyahSeer(final FaadiyahSeer card) { + super(card); + } + + @Override + public FaadiyahSeer copy() { + return new FaadiyahSeer(this); + } +} + +class FaadiyahSeerEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterLandCard(); + + public FaadiyahSeerEffect() { + super(Outcome.DrawCard); + this.staticText = "Draw a card and reveal it. If it isn't a land card, discard it"; + } + + public FaadiyahSeerEffect(final FaadiyahSeerEffect effect) { + super(effect); + } + + @Override + public FaadiyahSeerEffect copy() { + return new FaadiyahSeerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = controller.getLibrary().getFromTop(game); + controller.drawCards(1, game); + controller.revealCards("Fa'adiyah Seer", new CardsImpl(card), game); + if (filter.match(card, game)) { + controller.discard(card, source, game); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ravnika/SuppressionField.java b/Mage.Sets/src/mage/sets/ravnika/SuppressionField.java new file mode 100644 index 00000000000..611ec8c286a --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnika/SuppressionField.java @@ -0,0 +1,108 @@ +/* + * 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.ravnika; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.ActivatedAbility; +import mage.abilities.SpellAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.CostModificationEffectImpl; +import mage.abilities.keyword.FlashbackAbility; +import mage.abilities.keyword.RetraceAbility; +import mage.abilities.mana.ManaAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class SuppressionField extends CardImpl { + + public SuppressionField(UUID ownerId) { + super(ownerId, 31, "Suppression Field", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "RAV"; + + this.color.setWhite(true); + + // Activated abilities cost {2} more to activate unless they're mana abilities. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SuppressionFieldCostReductionEffect() )); + } + + public SuppressionField(final SuppressionField card) { + super(card); + } + + @Override + public SuppressionField copy() { + return new SuppressionField(this); + } +} + +class SuppressionFieldCostReductionEffect extends CostModificationEffectImpl { + + SuppressionFieldCostReductionEffect ( ) { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); + staticText = "Activated abilities cost {2} more to activate unless they're mana abilities"; + } + + SuppressionFieldCostReductionEffect(SuppressionFieldCostReductionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + CardUtil.increaseCost(abilityToModify, 2); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + if (abilityToModify instanceof ActivatedAbility + && !(abilityToModify instanceof ManaAbility) + && !(abilityToModify instanceof SpellAbility)) { + return true; + } + return false; + } + + @Override + public SuppressionFieldCostReductionEffect copy() { + return new SuppressionFieldCostReductionEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java b/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java index 8a5fe173111..5cc8302e5ee 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java @@ -115,11 +115,11 @@ class AzorsElocutorsEffect extends OneShotEffect { public AzorsElocutorsEffect() { super(Outcome.Benefit); + staticText = "put a filibuster counter on Azor's Elocutors. Then if Azor's Elocutors has five or more filibuster counters on it, you win the game"; } public AzorsElocutorsEffect(final AzorsElocutorsEffect effect) { super(effect); - staticText = "put a filibuster counter on Azor's Elocutors. Then if Azor's Elocutors has five or more filibuster counters on it, you win the game"; } @Override diff --git a/Mage.Sets/src/mage/sets/timeshifted/Desert.java b/Mage.Sets/src/mage/sets/timeshifted/Desert.java new file mode 100644 index 00000000000..4801edf7216 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/Desert.java @@ -0,0 +1,102 @@ +/* + * 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.timeshifted; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.game.Game; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Desert extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking creature"); + static { + filter.add(new AttackingPredicate()); + } + + public Desert(UUID ownerId) { + super(ownerId, 118, "Desert", Rarity.SPECIAL, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "TSB"; + this.subtype.add("Desert"); + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + // {tap}: Desert deals 1 damage to target attacking creature. Activate this ability only during the end of combat step. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), IsEndOfCombatStep.getInstance(), null); + Target target = new TargetCreaturePermanent(filter); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + } + + public Desert(final Desert card) { + super(card); + } + + @Override + public Desert copy() { + return new Desert(this); + } +} + +class IsEndOfCombatStep implements Condition { + + private static IsEndOfCombatStep fInstance = new IsEndOfCombatStep(); + + public static Condition getInstance() { + return fInstance; + } + + @Override + public boolean apply(Game game, Ability source) { + return game.getStep().getType() == PhaseStep.END_COMBAT; + } + + @Override + public String toString() { + return "during the end of combat step"; + } + +} \ No newline at end of file