From 6a2df3d935a1de60b33ac6f1939a92812487716a Mon Sep 17 00:00:00 2001 From: Backfir3 Date: Thu, 22 Aug 2013 14:06:20 +0200 Subject: [PATCH 1/2] Added [USG] Titania's Boon; Titania's Chosen [UDS] Rofellos, Llanowar Emissary --- .../RofellosLlanowarEmissary.java | 77 +++++++++++++ .../src/mage/sets/urzassaga/TitaniasBoon.java | 62 ++++++++++ .../mage/sets/urzassaga/TitaniasChosen.java | 106 ++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/TitaniasBoon.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/TitaniasChosen.java diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java b/Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java new file mode 100644 index 0000000000..509af425b9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java @@ -0,0 +1,77 @@ +/* + * 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.urzasdestiny; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.mana.DynamicManaAbility; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Backfir3 + */ +public class RofellosLlanowarEmissary extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("for each Forest you control"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public RofellosLlanowarEmissary(UUID ownerId) { + super(ownerId, 118, "Rofellos, Llanowar Emissary", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}{G}"); + this.expansionSetCode = "UDS"; + this.supertype.add("Legendary"); + this.subtype.add("Elf"); + this.subtype.add("Druid"); + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {tap}: Add {G} to your mana pool for each Forest you control. + this.addAbility(new DynamicManaAbility(Mana.GreenMana, new PermanentsOnBattlefieldCount(filter))); + } + + public RofellosLlanowarEmissary(final RofellosLlanowarEmissary card) { + super(card); + } + + @Override + public RofellosLlanowarEmissary copy() { + return new RofellosLlanowarEmissary(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/TitaniasBoon.java b/Mage.Sets/src/mage/sets/urzassaga/TitaniasBoon.java new file mode 100644 index 0000000000..aa6eece463 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/TitaniasBoon.java @@ -0,0 +1,62 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.urzassaga; + +import java.util.UUID; +import mage.constants.CardType; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.cards.CardImpl; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author Backfir3 + */ +public class TitaniasBoon extends CardImpl { + + public TitaniasBoon(UUID ownerId) { + super(ownerId, 276, "Titania's Boon", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}"); + this.expansionSetCode = "USG"; + this.color.setGreen(true); + + // Put a +1/+1 counter on each creature you control. + this.getSpellAbility().addEffect(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent("creature you control"))); + } + + public TitaniasBoon(final TitaniasBoon card) { + super(card); + } + + @Override + public TitaniasBoon copy() { + return new TitaniasBoon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/TitaniasChosen.java b/Mage.Sets/src/mage/sets/urzassaga/TitaniasChosen.java new file mode 100644 index 0000000000..e32704bc0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/TitaniasChosen.java @@ -0,0 +1,106 @@ +/* + * 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.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.stack.Spell; + +/** + * + * @author Backfir3 + */ +public class TitaniasChosen extends CardImpl { + + public TitaniasChosen(UUID ownerId) { + super(ownerId, 277, "Titania's Chosen", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "USG"; + this.subtype.add("Elf"); + this.subtype.add("Archer"); + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever a player casts a green spell, put a +1/+1 counter on Titania's Chosen. + this.addAbility(new TitaniasChosenAbility()); + } + + public TitaniasChosen(final TitaniasChosen card) { + super(card); + } + + @Override + public TitaniasChosen copy() { + return new TitaniasChosen(this); + } + +} + +class TitaniasChosenAbility extends TriggeredAbilityImpl { + + public TitaniasChosenAbility() { + super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance())); + } + + public TitaniasChosenAbility(final TitaniasChosenAbility ability) { + super(ability); + } + + @Override + public TitaniasChosenAbility copy() { + return new TitaniasChosenAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.SPELL_CAST) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && spell.getColor().isGreen()) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player casts a green spell, put a +1/+1 counter on Titania's Chosen."; + } + +} From f6d6ede9b26083a37891acfa2289adb6ac99cb41 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Thu, 22 Aug 2013 16:32:50 -0400 Subject: [PATCH 2/2] Create AbandonedOutpost This is untested. Unsure if it works. --- .../src/mage/sets/odyssey/AbandonedOutpost | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/AbandonedOutpost diff --git a/Mage.Sets/src/mage/sets/odyssey/AbandonedOutpost b/Mage.Sets/src/mage/sets/odyssey/AbandonedOutpost new file mode 100644 index 0000000000..96f344ea12 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/AbandonedOutpost @@ -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.odyssey + +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.cards.CardImpl; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.mana.AnyColorManaAbility; + + +import java.util.UUID; + +public class AbandonedOutpost extends CardImpl { + + public AbandonedOutpost(ownerId UUID){ + super(ownerId, 312, "Abandoned Outpost", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "ODY"; + + // This enters the battlefield tapped + this.addAbility(new EntersBattlefieldTappedAbility()) + + // Tap to add [W] to your mana pool + this.addAbility(new WhiteManaAbility()); + + // Tap to add any color mana to your mana pool. Sacrifice Abandoned Outpost. + Ability ability = new AnyColorManaAbility()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + + } + + public AbandonedOutpost(final AbandonedOutpost card) { + super(card); + } + + @Override + public AbandonedOutpost copy() { + return new AbandonedOutpost(this); + } + +}