From 35241d7805651b69b9fe0b11763911c3cb083582 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Mon, 22 Jun 2015 08:02:59 +0300 Subject: [PATCH 1/3] Implement cards: Ashnod's Transmogrant, Mountain Yeti, Sea Drake, and Unstable Mutation --- .../sets/antiquities/AshnodsTransmogrant.java | 55 ++++++++++++ .../sets/arabiannights/UnstableMutation.java | 81 ++++++++++++++++++ .../fifthedition/AshnodsTransmogrant.java | 84 +++++++++++++++++++ .../sets/fifthedition/UnstableMutation.java | 53 ++++++++++++ .../sets/fourthedition/UnstableMutation.java | 53 ++++++++++++ .../src/mage/sets/legends/MountainYeti.java | 75 +++++++++++++++++ .../mastersedition/AshnodsTransmogrant.java | 53 ++++++++++++ .../sets/mastersedition/MountainYeti.java | 55 ++++++++++++ .../mage/sets/masterseditionii/SeaDrake.java | 80 ++++++++++++++++++ .../mage/sets/portalsecondage/SeaDrake.java | 55 ++++++++++++ .../sets/revisededition/UnstableMutation.java | 53 ++++++++++++ .../sets/timeshifted/UnstableMutation.java | 55 ++++++++++++ .../mage/sets/vintagemasters/SeaDrake.java | 53 ++++++++++++ 13 files changed, 805 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/antiquities/AshnodsTransmogrant.java create mode 100644 Mage.Sets/src/mage/sets/arabiannights/UnstableMutation.java create mode 100644 Mage.Sets/src/mage/sets/fifthedition/AshnodsTransmogrant.java create mode 100644 Mage.Sets/src/mage/sets/fifthedition/UnstableMutation.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/UnstableMutation.java create mode 100644 Mage.Sets/src/mage/sets/legends/MountainYeti.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/AshnodsTransmogrant.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/MountainYeti.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/SeaDrake.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/SeaDrake.java create mode 100644 Mage.Sets/src/mage/sets/revisededition/UnstableMutation.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/UnstableMutation.java create mode 100644 Mage.Sets/src/mage/sets/vintagemasters/SeaDrake.java diff --git a/Mage.Sets/src/mage/sets/antiquities/AshnodsTransmogrant.java b/Mage.Sets/src/mage/sets/antiquities/AshnodsTransmogrant.java new file mode 100644 index 00000000000..697fba14be5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/antiquities/AshnodsTransmogrant.java @@ -0,0 +1,55 @@ +/* + * 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.antiquities; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class AshnodsTransmogrant extends mage.sets.fifthedition.AshnodsTransmogrant { + + public AshnodsTransmogrant(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "ATQ"; + this.rarity = Rarity.UNCOMMON; + } + + public AshnodsTransmogrant(final AshnodsTransmogrant card) { + super(card); + } + + @Override + public AshnodsTransmogrant copy() { + return new AshnodsTransmogrant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arabiannights/UnstableMutation.java b/Mage.Sets/src/mage/sets/arabiannights/UnstableMutation.java new file mode 100644 index 00000000000..aa36417fe61 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/UnstableMutation.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arabiannights; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class UnstableMutation extends CardImpl { + + public UnstableMutation(UUID ownerId) { + super(ownerId, 28, "Unstable Mutation", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "ARN"; + 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 +3/+3. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3))); + // At the beginning of the upkeep of enchanted creature's controller, put a -1/-1 counter on that creature. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAttachedEffect(CounterType.M1M1.createInstance(), "that creature"), + TargetController.CONTROLLER_ATTACHED_TO, false)); + } + + public UnstableMutation(final UnstableMutation card) { + super(card); + } + + @Override + public UnstableMutation copy() { + return new UnstableMutation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/AshnodsTransmogrant.java b/Mage.Sets/src/mage/sets/fifthedition/AshnodsTransmogrant.java new file mode 100644 index 00000000000..458a67e1bc1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/AshnodsTransmogrant.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.fifthedition; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class AshnodsTransmogrant extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonartifact creature"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + } + + public AshnodsTransmogrant(UUID ownerId) { + super(ownerId, 350, "Ashnod's Transmogrant", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "5ED"; + + // {T}, Sacrifice Ashnod's Transmogrant: Put a +1/+1 counter on target nonartifact creature. That creature becomes an artifact in addition to its other types. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + Effect effect = new AddCardTypeTargetEffect(CardType.ARTIFACT, Duration.WhileOnBattlefield); + effect.setText("That creature becomes an artifact in addition to its other types"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public AshnodsTransmogrant(final AshnodsTransmogrant card) { + super(card); + } + + @Override + public AshnodsTransmogrant copy() { + return new AshnodsTransmogrant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/UnstableMutation.java b/Mage.Sets/src/mage/sets/fifthedition/UnstableMutation.java new file mode 100644 index 00000000000..6c050c64333 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/UnstableMutation.java @@ -0,0 +1,53 @@ +/* + * 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.fifthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class UnstableMutation extends mage.sets.arabiannights.UnstableMutation { + + public UnstableMutation(UUID ownerId) { + super(ownerId); + this.cardNumber = 131; + this.expansionSetCode = "5ED"; + } + + public UnstableMutation(final UnstableMutation card) { + super(card); + } + + @Override + public UnstableMutation copy() { + return new UnstableMutation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/UnstableMutation.java b/Mage.Sets/src/mage/sets/fourthedition/UnstableMutation.java new file mode 100644 index 00000000000..fa1406f5f82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/UnstableMutation.java @@ -0,0 +1,53 @@ +/* + * 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.fourthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class UnstableMutation extends mage.sets.arabiannights.UnstableMutation { + + public UnstableMutation(UUID ownerId) { + super(ownerId); + this.cardNumber = 110; + this.expansionSetCode = "4ED"; + } + + public UnstableMutation(final UnstableMutation card) { + super(card); + } + + @Override + public UnstableMutation copy() { + return new UnstableMutation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/MountainYeti.java b/Mage.Sets/src/mage/sets/legends/MountainYeti.java new file mode 100644 index 00000000000..3ab9be24766 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/MountainYeti.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.legends; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.MountainwalkAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + + */ +public class MountainYeti extends CardImpl { + + private static final FilterCard filter = new FilterCard("White"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public MountainYeti(UUID ownerId) { + super(ownerId, 156, "Mountain Yeti", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "LEG"; + this.subtype.add("Yeti"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Mountainwalk + this.addAbility(new MountainwalkAbility()); + // protection from white + this.addAbility(new ProtectionAbility(filter)); + } + + public MountainYeti(final MountainYeti card) { + super(card); + } + + @Override + public MountainYeti copy() { + return new MountainYeti(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/AshnodsTransmogrant.java b/Mage.Sets/src/mage/sets/mastersedition/AshnodsTransmogrant.java new file mode 100644 index 00000000000..c3c23f16fe8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/AshnodsTransmogrant.java @@ -0,0 +1,53 @@ +/* + * 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.mastersedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class AshnodsTransmogrant extends mage.sets.fifthedition.AshnodsTransmogrant { + + public AshnodsTransmogrant(UUID ownerId) { + super(ownerId); + this.cardNumber = 152; + this.expansionSetCode = "MED"; + } + + public AshnodsTransmogrant(final AshnodsTransmogrant card) { + super(card); + } + + @Override + public AshnodsTransmogrant copy() { + return new AshnodsTransmogrant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/MountainYeti.java b/Mage.Sets/src/mage/sets/mastersedition/MountainYeti.java new file mode 100644 index 00000000000..776066c87fc --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/MountainYeti.java @@ -0,0 +1,55 @@ +/* + * 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.mastersedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class MountainYeti extends mage.sets.legends.MountainYeti { + + public MountainYeti(UUID ownerId) { + super(ownerId); + this.cardNumber = 105; + this.expansionSetCode = "MED"; + this.rarity = Rarity.COMMON; + } + + public MountainYeti(final MountainYeti card) { + super(card); + } + + @Override + public MountainYeti copy() { + return new MountainYeti(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/SeaDrake.java b/Mage.Sets/src/mage/sets/masterseditionii/SeaDrake.java new file mode 100644 index 00000000000..197e9045972 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/SeaDrake.java @@ -0,0 +1,80 @@ +/* + * 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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +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.permanent.ControllerPredicate; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + + */ +public class SeaDrake extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("land you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public SeaDrake(UUID ownerId) { + super(ownerId, 64, "Sea Drake", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ME2"; + this.subtype.add("Drake"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Sea Drake enters the battlefield, return two target lands you control to their owner's hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); + ability.addTarget(new TargetLandPermanent(2, 2, filter, false)); + this.addAbility(ability); + } + + public SeaDrake(final SeaDrake card) { + super(card); + } + + @Override + public SeaDrake copy() { + return new SeaDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/SeaDrake.java b/Mage.Sets/src/mage/sets/portalsecondage/SeaDrake.java new file mode 100644 index 00000000000..dcb6ce93997 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/SeaDrake.java @@ -0,0 +1,55 @@ +/* + * 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.portalsecondage; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class SeaDrake extends mage.sets.masterseditionii.SeaDrake { + + public SeaDrake(UUID ownerId) { + super(ownerId); + this.cardNumber = 45; + this.expansionSetCode = "PO2"; + this.rarity = Rarity.UNCOMMON; + } + + public SeaDrake(final SeaDrake card) { + super(card); + } + + @Override + public SeaDrake copy() { + return new SeaDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/revisededition/UnstableMutation.java b/Mage.Sets/src/mage/sets/revisededition/UnstableMutation.java new file mode 100644 index 00000000000..4a34fc53473 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/UnstableMutation.java @@ -0,0 +1,53 @@ +/* + * 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.revisededition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class UnstableMutation extends mage.sets.arabiannights.UnstableMutation { + + public UnstableMutation(UUID ownerId) { + super(ownerId); + this.cardNumber = 86; + this.expansionSetCode = "3ED"; + } + + public UnstableMutation(final UnstableMutation card) { + super(card); + } + + @Override + public UnstableMutation copy() { + return new UnstableMutation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/UnstableMutation.java b/Mage.Sets/src/mage/sets/timeshifted/UnstableMutation.java new file mode 100644 index 00000000000..c1a2b09f3fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/UnstableMutation.java @@ -0,0 +1,55 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class UnstableMutation extends mage.sets.arabiannights.UnstableMutation { + + public UnstableMutation(UUID ownerId) { + super(ownerId); + this.cardNumber = 33; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public UnstableMutation(final UnstableMutation card) { + super(card); + } + + @Override + public UnstableMutation copy() { + return new UnstableMutation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/SeaDrake.java b/Mage.Sets/src/mage/sets/vintagemasters/SeaDrake.java new file mode 100644 index 00000000000..ed188e40ead --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/SeaDrake.java @@ -0,0 +1,53 @@ +/* + * 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.vintagemasters; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class SeaDrake extends mage.sets.masterseditionii.SeaDrake { + + public SeaDrake(UUID ownerId) { + super(ownerId); + this.cardNumber = 92; + this.expansionSetCode = "VMA"; + } + + public SeaDrake(final SeaDrake card) { + super(card); + } + + @Override + public SeaDrake copy() { + return new SeaDrake(this); + } +} From 6ea6cc66566177ea0d25f8aa5c19e5c9d9f67c44 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Mon, 22 Jun 2015 20:08:31 +0300 Subject: [PATCH 2/3] Implement cards: Opal Archangel, Opal Caryatid, Opal Champion, Opal Gargoyle, and Opal Guardian --- .../mage/sets/timespiral/OpalGuardian.java | 95 +++++++++++++++++++ .../mage/sets/urzaslegacy/OpalChampion.java | 84 ++++++++++++++++ .../mage/sets/urzassaga/OpalArchangel.java | 86 +++++++++++++++++ .../src/mage/sets/urzassaga/OpalCaryatid.java | 82 ++++++++++++++++ .../src/mage/sets/urzassaga/OpalGargoyle.java | 84 ++++++++++++++++ .../common/SourceMatchesFilterCondition.java | 6 +- .../BecomesCreatureSourceEffect.java | 24 +++-- 7 files changed, 451 insertions(+), 10 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java create mode 100644 Mage.Sets/src/mage/sets/urzaslegacy/OpalChampion.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/OpalCaryatid.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/OpalGargoyle.java diff --git a/Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java b/Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java new file mode 100644 index 00000000000..04e6861f177 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java @@ -0,0 +1,95 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class OpalGuardian extends CardImpl { + + public OpalGuardian(UUID ownerId) { + super(ownerId, 30, "Opal Guardian", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{W}{W}{W}"); + this.expansionSetCode = "TSP"; + + // When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true), + new FilterCreatureSpell(), false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red.")); + } + + public OpalGuardian(final OpalGuardian card) { + super(card); + } + + @Override + public OpalGuardian copy() { + return new OpalGuardian(this); + } +} + +class OpalGuardianGargoyle extends Token { + + private static final FilterCard filter = new FilterCard("red"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public OpalGuardianGargoyle() { + super("Gargoyle", "a 3/4 Gargoyle creature with flying and protection from red"); + cardType.add(CardType.CREATURE); + subtype.add("Knight"); + power = new MageInt(3); + toughness = new MageInt(4); + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new ProtectionAbility(filter)); + } +} diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/OpalChampion.java b/Mage.Sets/src/mage/sets/urzaslegacy/OpalChampion.java new file mode 100644 index 00000000000..a0975dbf769 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzaslegacy/OpalChampion.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.urzaslegacy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class OpalChampion extends CardImpl { + + public OpalChampion(UUID ownerId) { + super(ownerId, 16, "Opal Champion", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "ULG"; + + // When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true), + new FilterCreatureSpell(), false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike.")); + } + + public OpalChampion(final OpalChampion card) { + super(card); + } + + @Override + public OpalChampion copy() { + return new OpalChampion(this); + } +} + +class OpalChampionKnight extends Token { + + public OpalChampionKnight() { + super("Knight", "a 3/3 Knight creature with first strike"); + cardType.add(CardType.CREATURE); + subtype.add("Knight"); + power = new MageInt(3); + toughness = new MageInt(3); + this.addAbility(FirstStrikeAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java b/Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java new file mode 100644 index 00000000000..274081c672d --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java @@ -0,0 +1,86 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class OpalArchangel extends CardImpl { + + public OpalArchangel(UUID ownerId) { + super(ownerId, 23, "Opal Archangel", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}"); + this.expansionSetCode = "USG"; + + // When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true), + new FilterCreatureSpell(), false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance.")); + } + + public OpalArchangel(final OpalArchangel card) { + super(card); + } + + @Override + public OpalArchangel copy() { + return new OpalArchangel(this); + } +} + +class OpalArchangelToken extends Token { + + public OpalArchangelToken() { + super("Angel", "a 3/3 Angelt creature with flying and vigilance"); + cardType.add(CardType.CREATURE); + subtype.add("Angel"); + power = new MageInt(5); + toughness = new MageInt(5); + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(VigilanceAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/OpalCaryatid.java b/Mage.Sets/src/mage/sets/urzassaga/OpalCaryatid.java new file mode 100644 index 00000000000..3981a15928c --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/OpalCaryatid.java @@ -0,0 +1,82 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class OpalCaryatid extends CardImpl { + + public OpalCaryatid(UUID ownerId) { + super(ownerId, 24, "Opal Caryatid", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + this.expansionSetCode = "USG"; + + // When an opponent casts a creature spell, if Opal Caryatid is an enchantment, Opal Caryatid becomes a 2/2 Soldier creature. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldier(), "", Duration.WhileOnBattlefield, true), + new FilterCreatureSpell(), false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature.")); + } + + public OpalCaryatid(final OpalCaryatid card) { + super(card); + } + + @Override + public OpalCaryatid copy() { + return new OpalCaryatid(this); + } +} + +class OpalCaryatidSoldier extends Token { + + public OpalCaryatidSoldier() { + super("Soldier", "a 2/2 Soldier creature"); + cardType.add(CardType.CREATURE); + subtype.add("Soldier"); + power = new MageInt(2); + toughness = new MageInt(2); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/OpalGargoyle.java b/Mage.Sets/src/mage/sets/urzassaga/OpalGargoyle.java new file mode 100644 index 00000000000..be650e80db5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/OpalGargoyle.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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class OpalGargoyle extends CardImpl { + + public OpalGargoyle(UUID ownerId) { + super(ownerId, 25, "Opal Gargoyle", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "USG"; + + // When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true), + new FilterCreatureSpell(), false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying.")); + } + + public OpalGargoyle(final OpalGargoyle card) { + super(card); + } + + @Override + public OpalGargoyle copy() { + return new OpalGargoyle(this); + } +} + +class OpalGargoyleToken extends Token { + + public OpalGargoyleToken() { + super("Gargoyle", "a 2/2 Gargoyle creature with flying"); + cardType.add(CardType.CREATURE); + subtype.add("Knight"); + power = new MageInt(2); + toughness = new MageInt(2); + this.addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage/src/mage/abilities/condition/common/SourceMatchesFilterCondition.java b/Mage/src/mage/abilities/condition/common/SourceMatchesFilterCondition.java index 7aeca178e79..8c2b39a8ad3 100644 --- a/Mage/src/mage/abilities/condition/common/SourceMatchesFilterCondition.java +++ b/Mage/src/mage/abilities/condition/common/SourceMatchesFilterCondition.java @@ -29,7 +29,7 @@ package mage.abilities.condition.common; import mage.abilities.Ability; import mage.abilities.condition.Condition; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -41,9 +41,9 @@ import mage.game.permanent.Permanent; */ public class SourceMatchesFilterCondition implements Condition { - private FilterCreaturePermanent filter; + private FilterPermanent filter; - public SourceMatchesFilterCondition(FilterCreaturePermanent filter) { + public SourceMatchesFilterCondition(FilterPermanent filter) { this.filter = filter; } diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java index 927f8974466..37d0e41ac46 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -49,25 +49,32 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements protected Token token; protected String type; + protected boolean losePreviousTypes; - public BecomesCreatureSourceEffect(Token token, String type, Duration duration) { + public BecomesCreatureSourceEffect(Token token, String type, Duration duration, boolean losePreviousTypes) { super(duration, Outcome.BecomeCreature); this.token = token; this.type = type; + this.losePreviousTypes = losePreviousTypes; setText(); } + public BecomesCreatureSourceEffect(Token token, String type, Duration duration) { + this(token, type, duration, false); + } + public BecomesCreatureSourceEffect(final BecomesCreatureSourceEffect effect) { super(effect); this.token = effect.token.copy(); this.type = effect.type; + this.losePreviousTypes = effect.losePreviousTypes; } @Override public BecomesCreatureSourceEffect copy() { return new BecomesCreatureSourceEffect(this); } - + @Override public void init(Ability source, Game game) { super.init(source, game); @@ -88,6 +95,9 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { + if (losePreviousTypes) { + permanent.getCardType().clear(); + } if (token.getCardType().size() > 0) { for (CardType t : token.getCardType()) { if (!permanent.getCardType().contains(t)) { From 43cb449a28ee00ae1ffc3798e472a14f87a5583a Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 23 Jun 2015 20:51:33 +0300 Subject: [PATCH 3/3] Implement cards: Llanowar Sentinel, Shrieking Grotesque, and Spectral Lynx --- .../mage/sets/apocalypse/SpectralLynx.java | 79 +++++++++++++ .../sets/guildpact/ShriekingGrotesque.java | 76 +++++++++++++ .../sets/tenthedition/LlanowarSentinel.java | 53 +++++++++ .../sets/weatherlight/LlanowarSentinel.java | 107 ++++++++++++++++++ 4 files changed, 315 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/apocalypse/SpectralLynx.java create mode 100644 Mage.Sets/src/mage/sets/guildpact/ShriekingGrotesque.java create mode 100644 Mage.Sets/src/mage/sets/tenthedition/LlanowarSentinel.java create mode 100644 Mage.Sets/src/mage/sets/weatherlight/LlanowarSentinel.java diff --git a/Mage.Sets/src/mage/sets/apocalypse/SpectralLynx.java b/Mage.Sets/src/mage/sets/apocalypse/SpectralLynx.java new file mode 100644 index 00000000000..81a0e9e9d69 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/SpectralLynx.java @@ -0,0 +1,79 @@ +/* + * 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.apocalypse; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + + */ +public class SpectralLynx extends CardImpl { + + private static final FilterCard filter = new FilterCard("green"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public SpectralLynx(UUID ownerId) { + super(ownerId, 17, "Spectral Lynx", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "APC"; + this.subtype.add("Cat"); + this.subtype.add("Spirit"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Protection from green + this.addAbility(new ProtectionAbility(filter)); + // {B}: Regenerate Spectral Lynx. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"))); + } + + public SpectralLynx(final SpectralLynx card) { + super(card); + } + + @Override + public SpectralLynx copy() { + return new SpectralLynx(this); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/ShriekingGrotesque.java b/Mage.Sets/src/mage/sets/guildpact/ShriekingGrotesque.java new file mode 100644 index 00000000000..2228930acbb --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/ShriekingGrotesque.java @@ -0,0 +1,76 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.guildpact; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.ManaWasSpentCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Rarity; +import mage.target.TargetPlayer; +import mage.watchers.common.ManaSpentToCastWatcher; + +/** + * + * @author LoneFox + + */ +public class ShriekingGrotesque extends CardImpl { + + public ShriekingGrotesque(UUID ownerId) { + super(ownerId, 15, "Shrieking Grotesque", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "GPT"; + this.subtype.add("Gargoyle"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Shrieking Grotesque enters the battlefield, if {B} was spent to cast it, target player discards a card. + TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(new ConditionalTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.B), + "if {B} was spent to cast {this}, target player discards a card."), new ManaSpentToCastWatcher()); + } + + public ShriekingGrotesque(final ShriekingGrotesque card) { + super(card); + } + + @Override + public ShriekingGrotesque copy() { + return new ShriekingGrotesque(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenthedition/LlanowarSentinel.java b/Mage.Sets/src/mage/sets/tenthedition/LlanowarSentinel.java new file mode 100644 index 00000000000..69943fff72f --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenthedition/LlanowarSentinel.java @@ -0,0 +1,53 @@ +/* + * 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.tenthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class LlanowarSentinel extends mage.sets.weatherlight.LlanowarSentinel { + + public LlanowarSentinel(UUID ownerId) { + super(ownerId); + this.cardNumber = 275; + this.expansionSetCode = "10E"; + } + + public LlanowarSentinel(final LlanowarSentinel card) { + super(card); + } + + @Override + public LlanowarSentinel copy() { + return new LlanowarSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/LlanowarSentinel.java b/Mage.Sets/src/mage/sets/weatherlight/LlanowarSentinel.java new file mode 100644 index 00000000000..840ab9ae1d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/LlanowarSentinel.java @@ -0,0 +1,107 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LoneFox + + */ +public class LlanowarSentinel extends CardImpl { + + public LlanowarSentinel(UUID ownerId) { + super(ownerId, 76, "Llanowar Sentinel", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Elf"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Llanowar Sentinel enters the battlefield, you may pay {1}{G}. If you do, search your library for a card named Llanowar Sentinel and put that card onto the battlefield. Then shuffle your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LlanowarSentinelEffect())); + } + + public LlanowarSentinel(final LlanowarSentinel card) { + super(card); + } + + @Override + public LlanowarSentinel copy() { + return new LlanowarSentinel(this); + } +} + +class LlanowarSentinelEffect extends OneShotEffect { + + LlanowarSentinelEffect() { + super(Outcome.Benefit); + this.staticText = "you may pay {1}{G}. If you do, search your library for a card named Llanowar Sentinel and put that card onto the battlefield. Then shuffle your library"; } + + LlanowarSentinelEffect(final LlanowarSentinelEffect effect) { + super(effect); + } + + @Override + public LlanowarSentinelEffect copy() { + return new LlanowarSentinelEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if(player != null) { + if(player.chooseUse(Outcome.BoostCreature, "Do you want to to pay {1}{G}?", game)) { + Cost cost = new ManaCostsImpl("{1}{G}"); + if(cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { + FilterCard filter = new FilterCard("card named Llanowar Sentinel"); + filter.add(new NamePredicate("Llanowar Sentinel")); + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, filter), false, true).apply(game, source); + } + return true; + } + } + return false; + } +}