From 93ab989fd4d3fc1856f1227b66bf1c56dbe43a44 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 16 Oct 2012 17:26:52 +0200 Subject: [PATCH] [RTR] 4 cards --- .../mage/sets/returntoravnica/SkymarkRoc.java | 116 ++++++++++++++++++ .../returntoravnica/SphinxsRevelation.java | 66 ++++++++++ .../sets/returntoravnica/SupremeVerdict.java | 67 ++++++++++ .../sets/returntoravnica/WildBeastmaster.java | 69 +++++++++++ 4 files changed, 318 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/SkymarkRoc.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/SphinxsRevelation.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.java create mode 100644 Mage.Sets/src/mage/sets/returntoravnica/WildBeastmaster.java diff --git a/Mage.Sets/src/mage/sets/returntoravnica/SkymarkRoc.java b/Mage.Sets/src/mage/sets/returntoravnica/SkymarkRoc.java new file mode 100644 index 00000000000..fb9500b8637 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/SkymarkRoc.java @@ -0,0 +1,116 @@ + +/* + * 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.TriggeredAbilityImpl; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ToughnessPredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SkymarkRoc extends CardImpl { + + public SkymarkRoc(UUID ownerId) { + super(ownerId, 196, "Skymark Roc", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Bird"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Skymark Roc attacks, you may return target creature defending player controls with toughness 2 or less to its owner's hand. + this.addAbility(new SkymarkRocAbility()); + } + + public SkymarkRoc(final SkymarkRoc card) { + super(card); + } + + @Override + public SkymarkRoc copy() { + return new SkymarkRoc(this); + } +} + +class SkymarkRocAbility extends TriggeredAbilityImpl { + + public SkymarkRocAbility() { + super(Constants.Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), true); + } + + public SkymarkRocAbility(final SkymarkRocAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) { + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls with toughness 2 or less"); + UUID defenderId = game.getCombat().getDefendingPlayer(sourceId); + filter.add(new ControllerIdPredicate(defenderId)); + filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); + + this.getTargets().clear(); + TargetCreaturePermanent target = new TargetCreaturePermanent(filter); + target.setRequired(true); + this.addTarget(target); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} attacks, you may return target creature defending player controls with toughness 2 or less to its owner's hand."; + } + + @Override + public SkymarkRocAbility copy() { + return new SkymarkRocAbility(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/SphinxsRevelation.java b/Mage.Sets/src/mage/sets/returntoravnica/SphinxsRevelation.java new file mode 100644 index 00000000000..b12c5ccbb56 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/SphinxsRevelation.java @@ -0,0 +1,66 @@ +/* + * 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.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; + +/** + * + * @author LevelX2 + */ +public class SphinxsRevelation extends CardImpl { + + public SphinxsRevelation (UUID ownerId) { + super(ownerId, 200, "Sphinx's Revelation", Rarity.MYTHIC, new CardType[]{CardType.INSTANT}, "{X}{W}{U}{U}"); + this.expansionSetCode = "RTR"; + + this.color.setWhite(true); + this.color.setBlue(true); + + // You gain X life and draw X cards. + ManacostVariableValue manaX = new ManacostVariableValue(); + this.getSpellAbility().addEffect(new GainLifeEffect(manaX)); + this.getSpellAbility().addEffect(new DrawCardControllerEffect(manaX)); + } + + public SphinxsRevelation (final SphinxsRevelation card) { + super(card); + } + + @Override + public SphinxsRevelation copy() { + return new SphinxsRevelation(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.java b/Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.java new file mode 100644 index 00000000000..8d8a6315618 --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.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.abilities.effects.common.CantCounterSourceEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SupremeVerdict extends CardImpl { + + public SupremeVerdict (UUID ownerId) { + super(ownerId, 201, "Supreme Verdict", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{W}{W}{U}"); + this.expansionSetCode = "RTR"; + + this.color.setWhite(true); + this.color.setBlue(true); + + // Supreme Verdict can't be countered. + this.getSpellAbility().addEffect(new CantCounterSourceEffect()); + + // Destroy all creatures. + this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent())); + } + + public SupremeVerdict (final SupremeVerdict card) { + super(card); + } + + @Override + public SupremeVerdict copy() { + return new SupremeVerdict(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/returntoravnica/WildBeastmaster.java b/Mage.Sets/src/mage/sets/returntoravnica/WildBeastmaster.java new file mode 100644 index 00000000000..47900a4b0aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/returntoravnica/WildBeastmaster.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.Duration; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class WildBeastmaster extends CardImpl { + + public WildBeastmaster(UUID ownerId) { + super(ownerId, 139, "Wild Beastmaster", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "RTR"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Wild Beastmaster attacks, each other creature you control gets +X/+X until end of turn, where X is Wild Beastmaster's power. + SourcePermanentPowerCount creaturePower = new SourcePermanentPowerCount(); + this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(creaturePower, creaturePower, Duration.EndOfTurn, new FilterCreaturePermanent(),true, true), false)); + } + + public WildBeastmaster(final WildBeastmaster card) { + super(card); + } + + @Override + public WildBeastmaster copy() { + return new WildBeastmaster(this); + } +} \ No newline at end of file