From 7289cec6affff7d63e766c8b0edbf67b02243f5a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 27 Sep 2012 16:32:46 +0200 Subject: [PATCH] [RTR] 11 red cards [BOK] Aura Barbs --- .../sets/betrayersofkamigawa/AuraBarbs.java | 114 ++++++++++++++ .../returntoravnica/AnnihilatingFire.java | 119 ++++++++++++++ .../mage/sets/returntoravnica/Batterhorn.java | 69 ++++++++ .../sets/returntoravnica/BellowsLizard.java | 67 ++++++++ .../sets/returntoravnica/Cobblebrute.java | 60 +++++++ .../sets/returntoravnica/ExplosiveImpact.java | 63 ++++++++ .../sets/returntoravnica/GoblinRally.java | 62 ++++++++ .../sets/returntoravnica/Guttersnipe.java | 115 ++++++++++++++ .../mage/sets/returntoravnica/LobberCrew.java | 147 ++++++++++++++++++ .../returntoravnica/MinotaurAggressor.java | 67 ++++++++ .../sets/returntoravnica/PursuitOfFlight.java | 84 ++++++++++ .../sets/returntoravnica/Pyroconvergence.java | 100 ++++++++++++ 12 files changed, 1067 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/Batterhorn.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/BellowsLizard.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/Cobblebrute.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/ExplosiveImpact.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/GoblinRally.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/Guttersnipe.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/LobberCrew.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/MinotaurAggressor.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/PursuitOfFlight.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/Pyroconvergence.java diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java new file mode 100644 index 00000000000..1ec26fc6dc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java @@ -0,0 +1,114 @@ +/* + * 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 LIAB8LE 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.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class AuraBarbs extends CardImpl { + + public AuraBarbs(UUID ownerId) { + super(ownerId, 94, "Aura Barbs", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "BOK"; + this.subtype.add("Arcane"); + this.color.setRed(true); + + // Each enchantment deals 2 damage to its controller, then each Aura attached to a creature deals 2 damage to the creature it's attached to. + this.getSpellAbility().addEffect(new AuraBarbsEffect()); + } + + public AuraBarbs(final AuraBarbs card) { + super(card); + } + + @Override + public AuraBarbs copy() { + return new AuraBarbs(this); + } + + private class AuraBarbsEffect extends OneShotEffect { + + public AuraBarbsEffect() { + super(Constants.Outcome.Detriment); + staticText = "Each enchantment deals 2 damage to its controller, then each Aura attached to a creature deals 2 damage to the creature it's attached to"; + } + + public AuraBarbsEffect(final AuraBarbsEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + + FilterPermanent filterEnchantments = new FilterPermanent(); + filterEnchantments.add(new CardTypePredicate(CardType.ENCHANTMENT)); + + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filterEnchantments, game)) { + Player controller = game.getPlayer(permanent.getControllerId()); + if (controller != null) { + controller.damage(2, permanent.getId(), game, false, true); + game.informPlayers("2 damage assigned to " + controller.getName() + " from " + permanent.getName()); + } + } + + filterEnchantments.add(new SubtypePredicate("Aura")); + for (Permanent auraEnchantment : game.getBattlefield().getAllActivePermanents(filterEnchantments, game)) { + if (auraEnchantment.getAttachedTo() != null) { + Permanent attachedToCreature = game.getPermanent(auraEnchantment.getAttachedTo()); + if (attachedToCreature != null && attachedToCreature.getCardType().contains(CardType.CREATURE)) { + attachedToCreature.damage(2, auraEnchantment.getId(), game, true, false); + game.informPlayers("2 damage assigned to " + attachedToCreature.getName() + " from " + auraEnchantment.getName()); + } + } + } + return true; + } + + @Override + public AuraBarbsEffect copy() { + return new AuraBarbsEffect(this); + } + + } +} + diff --git a/Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java b/Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java new file mode 100644 index 00000000000..e6ee5bfa7be --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java @@ -0,0 +1,119 @@ +/* + * + * 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.returntoravnica; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.common.DamagedByWatcher; + +/** + * + * @author LevelX2 + */ +public class AnnihilatingFire extends CardImpl { + + public AnnihilatingFire(UUID ownerId) { + super(ownerId, 85, "Annihilating Fire", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); + this.expansionSetCode = "RTR"; + this.color.setRed(true); + + // Annihilating Fire deals 3 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + + // If a creature dealt damage this way would die this turn, exile it instead. + this.getSpellAbility().addEffect(new AnnihilatingFireEffect()); + this.addWatcher(new DamagedByWatcher()); + } + + public AnnihilatingFire(final AnnihilatingFire card) { + super(card); + } + + @Override + public AnnihilatingFire copy() { + return new AnnihilatingFire(this); + } +} + +class AnnihilatingFireEffect extends ReplacementEffectImpl { + + public AnnihilatingFireEffect() { + super(Duration.EndOfTurn, Outcome.Exile); + staticText = "If a creature dealt damage this way would die this turn, exile it instead"; + } + + public AnnihilatingFireEffect(final AnnihilatingFireEffect effect) { + super(effect); + } + + @Override + public AnnihilatingFireEffect copy() { + return new AnnihilatingFireEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent permanent = ((ZoneChangeEvent)event).getTarget(); + if (permanent != null) { + return permanent.moveToExile(null, "", source.getId(), game); + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) { + DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId()); + if (watcher != null) { + return watcher.damagedCreatures.contains(event.getTargetId()); + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/Batterhorn.java b/Mage.Sets/src/mage/sets/returntoravnica/Batterhorn.java new file mode 100644 index 00000000000..f0c7a1babca --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/Batterhorn.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.returntoravnica; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author LevelX2 + */ +public class Batterhorn extends CardImpl { + + public Batterhorn (UUID ownerId) { + super(ownerId, 87, "Batterhorn", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Beast"); + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Batterhorn enters the battlefield, you may destroy target artifact. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); + ability.addTarget(new TargetArtifactPermanent()); + this.addAbility(ability); + } + + public Batterhorn (final Batterhorn card) { + super(card); + } + + @Override + public Batterhorn copy() { + return new Batterhorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/BellowsLizard.java b/Mage.Sets/src/mage/sets/returntoravnica/BellowsLizard.java new file mode 100644 index 00000000000..3f87e4cc660 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/BellowsLizard.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.returntoravnica; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.cards.CardImpl; + +/** + * + * @author LevelX2 + */ +public class BellowsLizard extends CardImpl { + + public BellowsLizard (UUID ownerId) { + super(ownerId, 88, "Bellows Lizard", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Lizard"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{R}: Bellows Lizard gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Constants.Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); + } + + public BellowsLizard (final BellowsLizard card) { + super(card); + } + + @Override + public BellowsLizard copy() { + return new BellowsLizard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/Cobblebrute.java b/Mage.Sets/src/mage/sets/returntoravnica/Cobblebrute.java new file mode 100644 index 00000000000..85cead54b3d --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/Cobblebrute.java @@ -0,0 +1,60 @@ +/* + * 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.returntoravnica; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.cards.CardImpl; + +/** + * + * @author LevelX2 + */ +public class Cobblebrute extends CardImpl { + + public Cobblebrute (UUID ownerId) { + super(ownerId, 91, "Cobblebrute", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Elemental"); + this.color.setRed(true); + this.power = new MageInt(5); + this.toughness = new MageInt(2); + } + + public Cobblebrute (final Cobblebrute card) { + super(card); + } + + @Override + public Cobblebrute copy() { + return new Cobblebrute(this); + } +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ExplosiveImpact.java b/Mage.Sets/src/mage/sets/returntoravnica/ExplosiveImpact.java new file mode 100644 index 00000000000..cd43263c95e --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/ExplosiveImpact.java @@ -0,0 +1,63 @@ +/* + * 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.returntoravnica; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class ExplosiveImpact extends CardImpl { + + public ExplosiveImpact(UUID ownerId) { + super(ownerId, 94, "Explosive Impact", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{5}{R}"); + this.expansionSetCode = "RTR"; + this.color.setRed(true); + + // Explosive Impact deals 5 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + } + + public ExplosiveImpact(final ExplosiveImpact card) { + super(card); + } + + @Override + public ExplosiveImpact copy() { + return new ExplosiveImpact(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/GoblinRally.java b/Mage.Sets/src/mage/sets/returntoravnica/GoblinRally.java new file mode 100644 index 00000000000..b0b087a21ee --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/GoblinRally.java @@ -0,0 +1,62 @@ +/* + * 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.returntoravnica; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.game.permanent.token.GoblinToken; + +/** + * + * @author LevelX2 + */ +public class GoblinRally extends CardImpl { + + public GoblinRally(UUID ownerId) { + super(ownerId, 95, "Goblin Rally", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); + this.expansionSetCode = "RTR"; + this.color.setRed(true); + + // Put four 1/1 red Goblin creature tokens onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), 4)); + } + + public GoblinRally(final GoblinRally card) { + super(card); + } + + @Override + public GoblinRally copy() { + return new GoblinRally(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/Guttersnipe.java b/Mage.Sets/src/mage/sets/returntoravnica/Guttersnipe.java new file mode 100644 index 00000000000..743fcda0ee2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/Guttersnipe.java @@ -0,0 +1,115 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.returntoravnica; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class Guttersnipe extends CardImpl { + + private final static FilterSpell filter = new FilterSpell("an instant or sorcery spell"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + public Guttersnipe (UUID ownerId) { + super(ownerId, 98, "Guttersnipe", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Goblin"); + this.subtype.add("Shaman"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever you cast an instant or sorcery spell, Guttersnipe deals 2 damage to each opponent. + this.addAbility(new SpellCastTriggeredAbility(new GuttersnipeEffect(), filter, false)); + } + + public Guttersnipe (final Guttersnipe card) { + super(card); + } + + @Override + public Guttersnipe copy() { + return new Guttersnipe(this); + } + + private class GuttersnipeEffect extends OneShotEffect { + + public GuttersnipeEffect() { + super(Constants.Outcome.Damage); + staticText = "{this} deals 2 damage to each opponent"; + } + + public GuttersnipeEffect(final GuttersnipeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId: controller.getInRange()) { + if (playerId != source.getControllerId()) { + Player opponent = game.getPlayer(playerId); + if (opponent != null) { + opponent.damage(2, source.getId(), game, false, true); + } + } + } + return true; + } + return false; + } + + @Override + public GuttersnipeEffect copy() { + return new GuttersnipeEffect(this); + } + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/LobberCrew.java b/Mage.Sets/src/mage/sets/returntoravnica/LobberCrew.java new file mode 100644 index 00000000000..247b191f36f --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/LobberCrew.java @@ -0,0 +1,147 @@ +/* + * 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.returntoravnica; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class LobberCrew extends CardImpl { + + public LobberCrew (UUID ownerId) { + super(ownerId, 99, "Lobber Crew", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + this.color.setRed(true); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // {T}: Lobber Crew deals 1 damage to each opponent. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LobberCrewEffect(), new TapSourceCost())); + // Whenever you cast a multicolored spell, untap Lobber Crew. + + this.addAbility(new LobberCrewTriggeredAbility()); + } + + public LobberCrew (final LobberCrew card) { + super(card); + } + + @Override + public LobberCrew copy() { + return new LobberCrew(this); + } + + private class LobberCrewEffect extends OneShotEffect { + + public LobberCrewEffect() { + super(Constants.Outcome.Damage); + staticText = "{this} deals 1 damage to each opponent"; + } + + public LobberCrewEffect(final LobberCrewEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId: controller.getInRange()) { + if (playerId != source.getControllerId()) { + Player opponent = game.getPlayer(playerId); + if (opponent != null) { + opponent.damage(1, source.getId(), game, false, true); + } + } + } + return true; + } + return false; + } + + @Override + public LobberCrewEffect copy() { + return new LobberCrewEffect(this); + } + } +} + +class LobberCrewTriggeredAbility extends TriggeredAbilityImpl { + public LobberCrewTriggeredAbility() { + super(Constants.Zone.BATTLEFIELD, new UntapSourceEffect()); + } + + public LobberCrewTriggeredAbility(final LobberCrewTriggeredAbility ability) { + super(ability); + } + + @Override + public LobberCrewTriggeredAbility copy() { + return new LobberCrewTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.SPELL_CAST) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && spell.getColor().isMulticolored() && event.getPlayerId().equals(getControllerId())) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever you cast a multicolored spell, untap {this}"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/MinotaurAggressor.java b/Mage.Sets/src/mage/sets/returntoravnica/MinotaurAggressor.java new file mode 100644 index 00000000000..5dffb71a539 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/MinotaurAggressor.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.returntoravnica; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; + +/** + * + * @author LevelX2 + */ +public class MinotaurAggressor extends CardImpl { + + public MinotaurAggressor (UUID ownerId) { + super(ownerId, 100, "Minotaur Aggressor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Minotaur"); + this.subtype.add("Berserker"); + this.color.setRed(true); + this.power = new MageInt(6); + this.toughness = new MageInt(2); + + // First strike, haste + this.addAbility(FirstStrikeAbility.getInstance()); + this.addAbility(HasteAbility.getInstance()); + } + + public MinotaurAggressor (final MinotaurAggressor card) { + super(card); + } + + @Override + public MinotaurAggressor copy() { + return new MinotaurAggressor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/PursuitOfFlight.java b/Mage.Sets/src/mage/sets/returntoravnica/PursuitOfFlight.java new file mode 100644 index 00000000000..4181ffe908f --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/PursuitOfFlight.java @@ -0,0 +1,84 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.returntoravnica; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class PursuitOfFlight extends CardImpl { + + public PursuitOfFlight(UUID ownerId) { + super(ownerId, 102, "Pursuit of Flight", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "RTR"; + this.color.setRed(true); + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +2/+2 and has "{U}: This creature gains flying until end of turn." + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), new ManaCostsImpl("{U}")), Constants.AttachmentType.AURA))); + } + + public PursuitOfFlight(final PursuitOfFlight card) { + super(card); + } + + @Override + public PursuitOfFlight copy() { + return new PursuitOfFlight(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/Pyroconvergence.java b/Mage.Sets/src/mage/sets/returntoravnica/Pyroconvergence.java new file mode 100644 index 00000000000..61de90c937d --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/Pyroconvergence.java @@ -0,0 +1,100 @@ +/* + * 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.returntoravnica; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class Pyroconvergence extends CardImpl { + + public Pyroconvergence(UUID ownerId) { + super(ownerId, 103, "Pyroconvergence", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}"); + this.expansionSetCode = "RTR"; + this.color.setRed(true); + + // Whenever you cast a multicolored spell, Pyroconvergence deals 2 damage to target creature or player. + this.addAbility(new PyroconvergenceTriggeredAbility()); + } + + public Pyroconvergence(final Pyroconvergence card) { + super(card); + } + + @Override + public Pyroconvergence copy() { + return new Pyroconvergence(this); + } +} +class PyroconvergenceTriggeredAbility extends TriggeredAbilityImpl { + public PyroconvergenceTriggeredAbility() { + super(Constants.Zone.BATTLEFIELD, new DamageTargetEffect(2)); + TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); + target.setRequired(true); + this.addTarget(target); + } + + public PyroconvergenceTriggeredAbility(final PyroconvergenceTriggeredAbility ability) { + super(ability); + } + + @Override + public PyroconvergenceTriggeredAbility copy() { + return new PyroconvergenceTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.SPELL_CAST) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && spell.getColor().isMulticolored() && event.getPlayerId().equals(getControllerId())) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever you cast a multicolored spell, {this} deals 2 damage to target creature or player"; + } +} \ No newline at end of file