From fae92f9041354c6db2babc3e5d1eec00183ea4b8 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 14 Oct 2012 23:50:18 +0200 Subject: [PATCH] [RTR] 5 cards --- .../returntoravnica/IzzetStaticaster.java | 117 ++++++++++++++++++ .../returntoravnica/MercurialChemister.java | 83 +++++++++++++ .../returntoravnica/SurveyTheWreckage.java | 64 ++++++++++ .../sets/returntoravnica/UtvaraHellkite.java | 91 ++++++++++++++ .../returntoravnica/ViashinoRacketeer.java | 68 ++++++++++ 5 files changed, 423 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/MercurialChemister.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/SurveyTheWreckage.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/UtvaraHellkite.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/ViashinoRacketeer.java diff --git a/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java b/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java new file mode 100644 index 00000000000..9d70bdf1387 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java @@ -0,0 +1,117 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.returntoravnica; + +import java.util.List; +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.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class IzzetStaticaster extends CardImpl { + + public IzzetStaticaster(UUID ownerId) { + super(ownerId, 173, "Izzet Staticaster", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Human"); + this.subtype.add("Wizzard"); + this.color.setBlue(true); + this.color.setRed(true); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Flash (You may cast this spell any time you could cast an instant.) + this.addAbility(FlashAbility.getInstance()); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {T}: Izzet Staticaster deals 1 damage to target creature and each other creature with the same name as that creature. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new IzzetStaticasterDamageEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public IzzetStaticaster(final IzzetStaticaster card) { + super(card); + } + + @Override + public IzzetStaticaster copy() { + return new IzzetStaticaster(this); + } +} + +class IzzetStaticasterDamageEffect extends OneShotEffect { + + public IzzetStaticasterDamageEffect() { + super(Constants.Outcome.Exile); + this.staticText = "{this} deals 1 damage to target creature and each other creature with the same name as that creature"; + } + + public IzzetStaticasterDamageEffect(final IzzetStaticasterDamageEffect effect) { + super(effect); + } + + @Override + public IzzetStaticasterDamageEffect copy() { + return new IzzetStaticasterDamageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source)); + if (targetPermanent != null) { + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new NamePredicate(targetPermanent.getName())); + List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getId(), game); + for (Permanent permanent : permanents) { + permanent.damage(1, source.getSourceId(), game, true, false); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/MercurialChemister.java b/Mage.Sets/src/mage/sets/returntoravnica/MercurialChemister.java new file mode 100644 index 00000000000..7af46a8fcb0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/MercurialChemister.java @@ -0,0 +1,83 @@ +/* + * 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.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.DiscardCostCardConvertedMana; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class MercurialChemister extends CardImpl { + + public MercurialChemister(UUID ownerId) { + super(ownerId, 180, "Mercurial Chemister", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{U}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.color.setBlue(true); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {U}, {T}: Draw two cards. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(2), new ManaCostsImpl("{U}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {R}, {T}, Discard a card: Mercurial Chemister deals damage to target creature equal to the discarded card's converted mana cost. + ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DamageTargetEffect(new DiscardCostCardConvertedMana()), new ManaCostsImpl("{R}")); + ability.addTarget(new TargetCreaturePermanent()); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public MercurialChemister(final MercurialChemister card) { + super(card); + } + + @Override + public MercurialChemister copy() { + return new MercurialChemister(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/SurveyTheWreckage.java b/Mage.Sets/src/mage/sets/returntoravnica/SurveyTheWreckage.java new file mode 100644 index 00000000000..7b41b7c8e3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/SurveyTheWreckage.java @@ -0,0 +1,64 @@ +/* + * 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.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.game.permanent.token.GoblinToken; +import mage.target.common.TargetLandPermanent; + +/** + * @author LevelX2 + */ +public class SurveyTheWreckage extends CardImpl { + + public SurveyTheWreckage(UUID ownerId) { + super(ownerId, 107, "Survey the Wreckage", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}"); + this.expansionSetCode = "RTR"; + + this.color.setRed(true); + + // Destroy target land. Put a 1/1 red Goblin creature token onto the battlefield. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken())); + } + + public SurveyTheWreckage(final SurveyTheWreckage card) { + super(card); + } + + @Override + public SurveyTheWreckage copy() { + return new SurveyTheWreckage(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/UtvaraHellkite.java b/Mage.Sets/src/mage/sets/returntoravnica/UtvaraHellkite.java new file mode 100644 index 00000000000..38e0e84eb76 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/UtvaraHellkite.java @@ -0,0 +1,91 @@ +/* + * 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.ObjectColor; +import mage.abilities.common.AttacksCreatureYourControlTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.DragonToken; +import mage.game.permanent.token.Token; + +/** + * + * @author LevelX2 + */ +public class UtvaraHellkite extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Dragon you control"); + static { + filter.add(new SubtypePredicate("Dragon")); + } + + public UtvaraHellkite(UUID ownerId) { + super(ownerId, 110, "Utvara Hellkite", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Dragon"); + + this.color.setRed(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever a Dragon you control attacks, put a 6/6 red Dragon creature token with flying onto the battlefield. + this.addAbility(new AttacksCreatureYourControlTriggeredAbility(new CreateTokenEffect(new UtvaraHellkiteDragonToken()),false, filter)); + } + + public UtvaraHellkite(final UtvaraHellkite card) { + super(card); + } + + @Override + public UtvaraHellkite copy() { + return new UtvaraHellkite(this); + } + public class UtvaraHellkiteDragonToken extends Token { + + private UtvaraHellkiteDragonToken() { + super("Dragon", "6/6 red Dragon creature token with flying"); + cardType.add(CardType.CREATURE); + color = ObjectColor.RED; + subtype.add("Dragon"); + power = new MageInt(6); + toughness = new MageInt(6); + addAbility(FlyingAbility.getInstance()); + } + } +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ViashinoRacketeer.java b/Mage.Sets/src/mage/sets/returntoravnica/ViashinoRacketeer.java new file mode 100644 index 00000000000..f39c15cc677 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/ViashinoRacketeer.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.returntoravnica; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; + +/** + * + * @author LevelX2 + */ +public class ViashinoRacketeer extends CardImpl { + + public ViashinoRacketeer(UUID ownerId) { + super(ownerId, 112, "Viashino Racketeer", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Viashino"); + this.subtype.add("Rogue"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Viashino Racketeer enters the battlefield, you may discard a card. If you do, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DrawCardControllerEffect(1), new DiscardCardCost()))); + } + + public ViashinoRacketeer(final ViashinoRacketeer card) { + super(card); + } + + @Override + public ViashinoRacketeer copy() { + return new ViashinoRacketeer(this); + } +}