From cc21f8c8b13e5551182bf321a03d19a5ffd58514 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Mon, 5 Oct 2015 19:47:21 +0300 Subject: [PATCH 1/5] Implement cards: Khabal Ghoul, Osai Vultures, and Scavenging Ghoul --- .../mage/sets/arabiannights/KhabalGhoul.java | 54 +++++++++++++ .../mage/sets/fourthedition/OsaiVultures.java | 54 +++++++++++++ .../sets/fourthedition/ScavengingGhoul.java | 52 ++++++++++++ .../src/mage/sets/legends/OsaiVultures.java | 80 +++++++++++++++++++ .../sets/limitedalpha/ScavengingGhoul.java | 75 +++++++++++++++++ .../sets/limitedbeta/ScavengingGhoul.java | 52 ++++++++++++ .../mage/sets/mastersedition/KhabalGhoul.java | 68 ++++++++++++++++ .../sets/masterseditioniv/OsaiVultures.java | 52 ++++++++++++ .../masterseditioniv/ScavengingGhoul.java | 52 ++++++++++++ .../sets/revisededition/ScavengingGhoul.java | 52 ++++++++++++ .../unlimitededition/ScavengingGhoul.java | 52 ++++++++++++ .../common/CreaturesDiedThisTurnCount.java | 65 +++++++++++++++ Mage/src/mage/counters/CounterType.java | 2 + 13 files changed, 710 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/arabiannights/KhabalGhoul.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/OsaiVultures.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/ScavengingGhoul.java create mode 100644 Mage.Sets/src/mage/sets/legends/OsaiVultures.java create mode 100644 Mage.Sets/src/mage/sets/limitedalpha/ScavengingGhoul.java create mode 100644 Mage.Sets/src/mage/sets/limitedbeta/ScavengingGhoul.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/KhabalGhoul.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/OsaiVultures.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/ScavengingGhoul.java create mode 100644 Mage.Sets/src/mage/sets/revisededition/ScavengingGhoul.java create mode 100644 Mage.Sets/src/mage/sets/unlimitededition/ScavengingGhoul.java create mode 100644 Mage/src/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java diff --git a/Mage.Sets/src/mage/sets/arabiannights/KhabalGhoul.java b/Mage.Sets/src/mage/sets/arabiannights/KhabalGhoul.java new file mode 100644 index 0000000000..6ba202dbc5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/KhabalGhoul.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class KhabalGhoul extends mage.sets.mastersedition.KhabalGhoul { + + public KhabalGhoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "ARN"; + this.rarity = Rarity.UNCOMMON; + } + + public KhabalGhoul(final KhabalGhoul card) { + super(card); + } + + @Override + public KhabalGhoul copy() { + return new KhabalGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/OsaiVultures.java b/Mage.Sets/src/mage/sets/fourthedition/OsaiVultures.java new file mode 100644 index 0000000000..2bbcdbce66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/OsaiVultures.java @@ -0,0 +1,54 @@ +/* + * 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; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class OsaiVultures extends mage.sets.legends.OsaiVultures { + + public OsaiVultures(UUID ownerId) { + super(ownerId); + this.cardNumber = 288; + this.expansionSetCode = "4ED"; + this.rarity = Rarity.UNCOMMON; + } + + public OsaiVultures(final OsaiVultures card) { + super(card); + } + + @Override + public OsaiVultures copy() { + return new OsaiVultures(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/ScavengingGhoul.java b/Mage.Sets/src/mage/sets/fourthedition/ScavengingGhoul.java new file mode 100644 index 0000000000..e6c3af13f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/ScavengingGhoul.java @@ -0,0 +1,52 @@ +/* + * 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 ScavengingGhoul extends mage.sets.limitedalpha.ScavengingGhoul { + + public ScavengingGhoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "4ED"; + } + + public ScavengingGhoul(final ScavengingGhoul card) { + super(card); + } + + @Override + public ScavengingGhoul copy() { + return new ScavengingGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/OsaiVultures.java b/Mage.Sets/src/mage/sets/legends/OsaiVultures.java new file mode 100644 index 0000000000..1aa3c739ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/OsaiVultures.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.legends; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.MorbidCondition; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class OsaiVultures extends CardImpl { + + public OsaiVultures(UUID ownerId) { + super(ownerId, 198, "Osai Vultures", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "LEG"; + this.subtype.add("Bird"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // At the beginning of each end step, if a creature died this turn, put a carrion counter on Osai Vultures. + this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( + new AddCountersSourceEffect(CounterType.CARRION.createInstance()), TargetController.ANY, false), MorbidCondition.getInstance(), + "At the beginning of each end step, if a creature died this turn, put a carrion counter on {this}.")); + // Remove two carrion counters from Osai Vultures: Osai Vultures gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), + new RemoveCountersSourceCost(CounterType.CARRION.createInstance(2)))); + } + + public OsaiVultures(final OsaiVultures card) { + super(card); + } + + @Override + public OsaiVultures copy() { + return new OsaiVultures(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/ScavengingGhoul.java b/Mage.Sets/src/mage/sets/limitedalpha/ScavengingGhoul.java new file mode 100644 index 0000000000..d69bbee0f1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedalpha/ScavengingGhoul.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.limitedalpha; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.dynamicvalue.common.CreaturesDiedThisTurnCount; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.watchers.common.CreaturesDiedWatcher; + +/** + * + * @author LoneFox + */ +public class ScavengingGhoul extends CardImpl { + + public ScavengingGhoul(UUID ownerId) { + super(ownerId, 35, "Scavenging Ghoul", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "LEA"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // At the beginning of each end step, put a corpse counter on Scavenging Ghoul for each creature that died this turn. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.CORPSE.createInstance(), + new CreaturesDiedThisTurnCount(), true), TargetController.ANY, false), new CreaturesDiedWatcher()); + // Remove a corpse counter from Scavenging Ghoul: Regenerate Scavenging Ghoul. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), + new RemoveCountersSourceCost(CounterType.CORPSE.createInstance()))); + } + + public ScavengingGhoul(final ScavengingGhoul card) { + super(card); + } + + @Override + public ScavengingGhoul copy() { + return new ScavengingGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedbeta/ScavengingGhoul.java b/Mage.Sets/src/mage/sets/limitedbeta/ScavengingGhoul.java new file mode 100644 index 0000000000..b3c4bb3cc1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedbeta/ScavengingGhoul.java @@ -0,0 +1,52 @@ +/* + * 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.limitedbeta; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ScavengingGhoul extends mage.sets.limitedalpha.ScavengingGhoul { + + public ScavengingGhoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "LEB"; + } + + public ScavengingGhoul(final ScavengingGhoul card) { + super(card); + } + + @Override + public ScavengingGhoul copy() { + return new ScavengingGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/KhabalGhoul.java b/Mage.Sets/src/mage/sets/mastersedition/KhabalGhoul.java new file mode 100644 index 0000000000..b8e28ac2e5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/KhabalGhoul.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.dynamicvalue.common.CreaturesDiedThisTurnCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.watchers.common.CreaturesDiedWatcher; + +/** + * + * @author LoneFox + */ +public class KhabalGhoul extends CardImpl { + + public KhabalGhoul(UUID ownerId) { + super(ownerId, 75, "Khabal Ghoul", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "MED"; + this.subtype.add("Zombie"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of each end step, put a +1/+1 counter on Khabal Ghoul for each creature that died this turn. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), + new CreaturesDiedThisTurnCount(), true), TargetController.ANY, false), new CreaturesDiedWatcher()); + } + + public KhabalGhoul(final KhabalGhoul card) { + super(card); + } + + @Override + public KhabalGhoul copy() { + return new KhabalGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/OsaiVultures.java b/Mage.Sets/src/mage/sets/masterseditioniv/OsaiVultures.java new file mode 100644 index 0000000000..f7d15e6661 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/OsaiVultures.java @@ -0,0 +1,52 @@ +/* + * 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.masterseditioniv; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class OsaiVultures extends mage.sets.legends.OsaiVultures { + + public OsaiVultures(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "ME4"; + } + + public OsaiVultures(final OsaiVultures card) { + super(card); + } + + @Override + public OsaiVultures copy() { + return new OsaiVultures(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/ScavengingGhoul.java b/Mage.Sets/src/mage/sets/masterseditioniv/ScavengingGhoul.java new file mode 100644 index 0000000000..700e284c55 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/ScavengingGhoul.java @@ -0,0 +1,52 @@ +/* + * 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.masterseditioniv; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ScavengingGhoul extends mage.sets.limitedalpha.ScavengingGhoul { + + public ScavengingGhoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 95; + this.expansionSetCode = "ME4"; + } + + public ScavengingGhoul(final ScavengingGhoul card) { + super(card); + } + + @Override + public ScavengingGhoul copy() { + return new ScavengingGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/revisededition/ScavengingGhoul.java b/Mage.Sets/src/mage/sets/revisededition/ScavengingGhoul.java new file mode 100644 index 0000000000..2fcc75753e --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/ScavengingGhoul.java @@ -0,0 +1,52 @@ +/* + * 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 ScavengingGhoul extends mage.sets.limitedalpha.ScavengingGhoul { + + public ScavengingGhoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 36; + this.expansionSetCode = "3ED"; + } + + public ScavengingGhoul(final ScavengingGhoul card) { + super(card); + } + + @Override + public ScavengingGhoul copy() { + return new ScavengingGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/unlimitededition/ScavengingGhoul.java b/Mage.Sets/src/mage/sets/unlimitededition/ScavengingGhoul.java new file mode 100644 index 0000000000..b98e8feaee --- /dev/null +++ b/Mage.Sets/src/mage/sets/unlimitededition/ScavengingGhoul.java @@ -0,0 +1,52 @@ +/* + * 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.unlimitededition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ScavengingGhoul extends mage.sets.limitedalpha.ScavengingGhoul { + + public ScavengingGhoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "2ED"; + } + + public ScavengingGhoul(final ScavengingGhoul card) { + super(card); + } + + @Override + public ScavengingGhoul copy() { + return new ScavengingGhoul(this); + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java b/Mage/src/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java new file mode 100644 index 0000000000..5f596b8353 --- /dev/null +++ b/Mage/src/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java @@ -0,0 +1,65 @@ +/* + * 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.abilities.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.watchers.common.CreaturesDiedWatcher; + +/** + * @author LoneFox + */ +public class CreaturesDiedThisTurnCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + CreaturesDiedWatcher watcher = (CreaturesDiedWatcher)game.getState().getWatchers().get("CreaturesDiedWatcher"); + if (watcher != null) { + return watcher.getAmountOfCreaturesDiesThisTurn(); + } + return 0; + } + + @Override + public CreaturesDiedThisTurnCount copy() { + return new CreaturesDiedThisTurnCount(); + } + + @Override + public String toString() { + return "X"; + } + + @Override + public String getMessage() { + return "creature that died this turn"; + } + +} diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 3f952c8ef9..86abda9c38 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -40,7 +40,9 @@ public enum CounterType { AWAKENING("awakening"), BLAZE("blaze"), BRIBERY("bribery"), + CARRION("carrion"), CHARGE("charge"), + CORPSE("corpse"), CRYSTAL("crystal"), DELAY("delay"), DEPLETION("depletion"), From cf5fa1915ed7f7d676b443134234d2226fc8ac91 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 6 Oct 2015 20:01:36 +0300 Subject: [PATCH 2/5] Implement cards: Bounty Hunter, Chandler, Downhill Charge, and Roterothopter --- .../src/mage/sets/homelands/Chandler.java | 81 +++++++++++++++++ .../mage/sets/homelands/Roterothopter.java | 69 ++++++++++++++ .../sets/masterseditionii/Roterothopter.java | 52 +++++++++++ .../src/mage/sets/nemesis/DownhillCharge.java | 79 ++++++++++++++++ .../src/mage/sets/tempest/BountyHunter.java | 90 +++++++++++++++++++ .../sets/venservskoth/DownhillCharge.java | 52 +++++++++++ Mage/src/mage/counters/CounterType.java | 1 + 7 files changed, 424 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/homelands/Chandler.java create mode 100644 Mage.Sets/src/mage/sets/homelands/Roterothopter.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/Roterothopter.java create mode 100644 Mage.Sets/src/mage/sets/nemesis/DownhillCharge.java create mode 100644 Mage.Sets/src/mage/sets/tempest/BountyHunter.java create mode 100644 Mage.Sets/src/mage/sets/venservskoth/DownhillCharge.java diff --git a/Mage.Sets/src/mage/sets/homelands/Chandler.java b/Mage.Sets/src/mage/sets/homelands/Chandler.java new file mode 100644 index 0000000000..a14bed9ddb --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/Chandler.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.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Chandler extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } + + public Chandler(UUID ownerId) { + super(ownerId, 88, "Chandler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "HML"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {R}{R}{R}, {tap}: Destroy target artifact creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{R}{R}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public Chandler(final Chandler card) { + super(card); + } + + @Override + public Chandler copy() { + return new Chandler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/Roterothopter.java b/Mage.Sets/src/mage/sets/homelands/Roterothopter.java new file mode 100644 index 0000000000..40fabe57d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/Roterothopter.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class Roterothopter extends CardImpl { + + public Roterothopter(UUID ownerId) { + super(ownerId, 134, "Roterothopter", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); + this.expansionSetCode = "HML"; + this.subtype.add("Thopter"); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {2}: Roterothopter gets +1/+0 until end of turn. Activate this ability no more than twice each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{2}"), 2)); + } + + public Roterothopter(final Roterothopter card) { + super(card); + } + + @Override + public Roterothopter copy() { + return new Roterothopter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Roterothopter.java b/Mage.Sets/src/mage/sets/masterseditionii/Roterothopter.java new file mode 100644 index 0000000000..1f9a63dd49 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/Roterothopter.java @@ -0,0 +1,52 @@ +/* + * 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; + +/** + * + * @author LoneFox + */ +public class Roterothopter extends mage.sets.homelands.Roterothopter { + + public Roterothopter(UUID ownerId) { + super(ownerId); + this.cardNumber = 218; + this.expansionSetCode = "ME2"; + } + + public Roterothopter(final Roterothopter card) { + super(card); + } + + @Override + public Roterothopter copy() { + return new Roterothopter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/DownhillCharge.java b/Mage.Sets/src/mage/sets/nemesis/DownhillCharge.java new file mode 100644 index 0000000000..cddd20e8ac --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/DownhillCharge.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.nemesis; + +import java.util.UUID; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DownhillCharge extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Mountain"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public DownhillCharge(UUID ownerId) { + super(ownerId, 79, "Downhill Charge", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "NMS"; + + // You may sacrifice a Mountain rather than pay Downhill Charge's mana cost. + this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(filter)))); + // Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control. + Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn); + effect.setText("Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control."); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public DownhillCharge(final DownhillCharge card) { + super(card); + } + + @Override + public DownhillCharge copy() { + return new DownhillCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/BountyHunter.java b/Mage.Sets/src/mage/sets/tempest/BountyHunter.java new file mode 100644 index 0000000000..d73314cfd3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/BountyHunter.java @@ -0,0 +1,90 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +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.ColorPredicate; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BountyHunter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature with a bounty counter on it"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + filter2.add(new CounterPredicate(CounterType.BOUNTY)); + } + + public BountyHunter(UUID ownerId) { + super(ownerId, 4, "Bounty Hunter", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Human"); + this.subtype.add("Archer"); + this.subtype.add("Minion"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {tap}: Put a bounty counter on target nonblack creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + // {tap}: Destroy target creature with a bounty counter on it. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter2)); + this.addAbility(ability); + } + + public BountyHunter(final BountyHunter card) { + super(card); + } + + @Override + public BountyHunter copy() { + return new BountyHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/venservskoth/DownhillCharge.java b/Mage.Sets/src/mage/sets/venservskoth/DownhillCharge.java new file mode 100644 index 0000000000..328f17486b --- /dev/null +++ b/Mage.Sets/src/mage/sets/venservskoth/DownhillCharge.java @@ -0,0 +1,52 @@ +/* + * 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.venservskoth; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class DownhillCharge extends mage.sets.nemesis.DownhillCharge { + + public DownhillCharge(UUID ownerId) { + super(ownerId); + this.cardNumber = 69; + this.expansionSetCode = "DDI"; + } + + public DownhillCharge(final DownhillCharge card) { + super(card); + } + + @Override + public DownhillCharge copy() { + return new DownhillCharge(this); + } +} diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 86abda9c38..eaf7bde19e 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -39,6 +39,7 @@ public enum CounterType { ARROWHEAD("arrowhead"), AWAKENING("awakening"), BLAZE("blaze"), + BOUNTY("bounty"), BRIBERY("bribery"), CARRION("carrion"), CHARGE("charge"), From efae15f6c2b32c906a4af94af3a79dfc64c88d0a Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 6 Oct 2015 20:46:59 +0300 Subject: [PATCH 3/5] Implement cards: Despoil, Flowering Field, Heightened Awareness, and Spiketail Drake --- Mage.Sets/src/mage/sets/prophecy/Despoil.java | 62 ++++++++++++++ .../mage/sets/prophecy/FloweringField.java | 84 +++++++++++++++++++ .../sets/prophecy/HeightenedAwareness.java | 65 ++++++++++++++ .../mage/sets/prophecy/SpiketailDrake.java | 71 ++++++++++++++++ 4 files changed, 282 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/prophecy/Despoil.java create mode 100644 Mage.Sets/src/mage/sets/prophecy/FloweringField.java create mode 100644 Mage.Sets/src/mage/sets/prophecy/HeightenedAwareness.java create mode 100644 Mage.Sets/src/mage/sets/prophecy/SpiketailDrake.java diff --git a/Mage.Sets/src/mage/sets/prophecy/Despoil.java b/Mage.Sets/src/mage/sets/prophecy/Despoil.java new file mode 100644 index 0000000000..9213946c2e --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/Despoil.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.prophecy; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.LoseLifeTargetControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class Despoil extends CardImpl { + + public Despoil(UUID ownerId) { + super(ownerId, 62, "Despoil", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "PCY"; + + // Destroy target land. Its controller loses 2 life. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(2)); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + } + + public Despoil(final Despoil card) { + super(card); + } + + @Override + public Despoil copy() { + return new Despoil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/FloweringField.java b/Mage.Sets/src/mage/sets/prophecy/FloweringField.java new file mode 100644 index 0000000000..87415a3e34 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/FloweringField.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.prophecy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class FloweringField extends CardImpl { + + public FloweringField(UUID ownerId) { + super(ownerId, 9, "Flowering Field", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "PCY"; + this.subtype.add("Aura"); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted land has "{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn." + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); + effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public FloweringField(final FloweringField card) { + super(card); + } + + @Override + public FloweringField copy() { + return new FloweringField(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/HeightenedAwareness.java b/Mage.Sets/src/mage/sets/prophecy/HeightenedAwareness.java new file mode 100644 index 0000000000..777baabd40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/HeightenedAwareness.java @@ -0,0 +1,65 @@ +/* + * 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.prophecy; + +import java.util.UUID; +import mage.abilities.common.BeginningOfDrawTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.discard.DiscardHandControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class HeightenedAwareness extends CardImpl { + + public HeightenedAwareness(UUID ownerId) { + super(ownerId, 37, "Heightened Awareness", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); + this.expansionSetCode = "PCY"; + + // As Heightened Awareness enters the battlefield, discard your hand. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardHandControllerEffect())); + // At the beginning of your draw step, draw an additional card. + this.addAbility(new BeginningOfDrawTriggeredAbility(new DrawCardSourceControllerEffect(1), + TargetController.YOU, false)); + } + + public HeightenedAwareness(final HeightenedAwareness card) { + super(card); + } + + @Override + public HeightenedAwareness copy() { + return new HeightenedAwareness(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/SpiketailDrake.java b/Mage.Sets/src/mage/sets/prophecy/SpiketailDrake.java new file mode 100644 index 0000000000..d63e858fa3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/SpiketailDrake.java @@ -0,0 +1,71 @@ +/* + * 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.prophecy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetSpell; + +/** + * + * @author LoneFox + */ +public class SpiketailDrake extends CardImpl { + + public SpiketailDrake(UUID ownerId) { + super(ownerId, 48, "Spiketail Drake", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "PCY"; + this.subtype.add("Drake"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Sacrifice Spiketail Drake: Counter target spell unless its controller pays {3}. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new ManaCostsImpl("{3}")), new SacrificeSourceCost()); ability.addTarget(new TargetSpell()); this.addAbility(ability); + } + + public SpiketailDrake(final SpiketailDrake card) { + super(card); + } + + @Override + public SpiketailDrake copy() { + return new SpiketailDrake(this); + } +} From 5e44c9bf2dc32438043fd52058249076436b8311 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 6 Oct 2015 23:11:16 +0300 Subject: [PATCH 4/5] Implement cards: Fencer Clique, Mageta's Boon, Wall of Nets, and Weed-Pruner Poplar --- .../src/mage/sets/exodus/WallOfNets.java | 76 ++++++++++++++++++ .../mage/sets/morningtide/FencerClique.java | 69 ++++++++++++++++ .../sets/morningtide/WeedPrunerPoplar.java | 78 +++++++++++++++++++ .../src/mage/sets/prophecy/MagetasBoon.java | 77 ++++++++++++++++++ 4 files changed, 300 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/exodus/WallOfNets.java create mode 100644 Mage.Sets/src/mage/sets/morningtide/FencerClique.java create mode 100644 Mage.Sets/src/mage/sets/morningtide/WeedPrunerPoplar.java create mode 100644 Mage.Sets/src/mage/sets/prophecy/MagetasBoon.java diff --git a/Mage.Sets/src/mage/sets/exodus/WallOfNets.java b/Mage.Sets/src/mage/sets/exodus/WallOfNets.java new file mode 100644 index 0000000000..9871010c3e --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/WallOfNets.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.exodus; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EndOfCombatTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ExileAllEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.BlockedByIdPredicate; + +/** + * + * @author LoneFox + */ +public class WallOfNets extends CardImpl { + + public WallOfNets(UUID ownerId) { + super(ownerId, 24, "Wall of Nets", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "EXO"; + this.subtype.add("Wall"); + this.power = new MageInt(0); + this.toughness = new MageInt(7); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // At end of combat, exile all creatures blocked by Wall of Nets. + FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures blocked by {this}"); + filter.add(new BlockedByIdPredicate(this.getId())); + this.addAbility(new EndOfCombatTriggeredAbility(new ExileAllEffect(filter, this.getId(), this.getIdName()), false)); + // When Wall of Nets leaves the battlefield, return all cards exiled with Wall of Nets to the battlefield under their owners' control. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileEffect(this.getId(), + Zone.BATTLEFIELD, "return all cards exiled with {this} to the battlefield under their owners' control"), false)); + } + + public WallOfNets(final WallOfNets card) { + super(card); + } + + @Override + public WallOfNets copy() { + return new WallOfNets(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/FencerClique.java b/Mage.Sets/src/mage/sets/morningtide/FencerClique.java new file mode 100644 index 0000000000..60f71959c3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/FencerClique.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PutOnLibrarySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class FencerClique extends CardImpl { + + public FencerClique(UUID ownerId) { + super(ownerId, 33, "Fencer Clique", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Faerie"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {U}: Put Fencer Clique on top of its owner's library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibrarySourceEffect(true), new ManaCostsImpl("{U}"))); + } + + public FencerClique(final FencerClique card) { + super(card); + } + + @Override + public FencerClique copy() { + return new FencerClique(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/WeedPrunerPoplar.java b/Mage.Sets/src/mage/sets/morningtide/WeedPrunerPoplar.java new file mode 100644 index 0000000000..7bba0a6d3b --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/WeedPrunerPoplar.java @@ -0,0 +1,78 @@ +/* + * 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.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class WeedPrunerPoplar extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature other than {this}"); + + static { + filter.add(new AnotherPredicate()); + } + + public WeedPrunerPoplar(UUID ownerId) { + super(ownerId, 83, "Weed-Pruner Poplar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Treefolk"); + this.subtype.add("Assassin"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of your upkeep, target creature other than Weed-Pruner Poplar gets -1/-1 until end of turn. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new BoostTargetEffect(-1, -1, Duration.EndOfTurn), TargetController.YOU, false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public WeedPrunerPoplar(final WeedPrunerPoplar card) { + super(card); + } + + @Override + public WeedPrunerPoplar copy() { + return new WeedPrunerPoplar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/MagetasBoon.java b/Mage.Sets/src/mage/sets/prophecy/MagetasBoon.java new file mode 100644 index 0000000000..5d793edf44 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/MagetasBoon.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.prophecy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class MagetasBoon extends CardImpl { + + public MagetasBoon(UUID ownerId) { + super(ownerId, 14, "Mageta's Boon", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "PCY"; + this.subtype.add("Aura"); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // 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 +1/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield))); + } + + public MagetasBoon(final MagetasBoon card) { + super(card); + } + + @Override + public MagetasBoon copy() { + return new MagetasBoon(this); + } +} From b8bd54533d442d2fd936d9ceb2dad5a0455a8deb Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 7 Oct 2015 08:11:08 +0300 Subject: [PATCH 5/5] Implement cards: Boris Devilboon, Disciple of Tevesh Szat, Fugitive Druid, and Metrognome --- .../sets/coldsnap/DiscipleOfTeveshSzat.java | 79 +++++++++++ .../src/mage/sets/legends/BorisDevilboon.java | 85 ++++++++++++ .../masterseditioniii/BorisDevilboon.java | 54 ++++++++ .../src/mage/sets/tempest/FugitiveDruid.java | 72 ++++++++++ .../src/mage/sets/urzassaga/Metrognome.java | 123 ++++++++++++++++++ .../common/BecomesTargetTriggeredAbility.java | 17 ++- 6 files changed, 427 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/coldsnap/DiscipleOfTeveshSzat.java create mode 100644 Mage.Sets/src/mage/sets/legends/BorisDevilboon.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/BorisDevilboon.java create mode 100644 Mage.Sets/src/mage/sets/tempest/FugitiveDruid.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/Metrognome.java diff --git a/Mage.Sets/src/mage/sets/coldsnap/DiscipleOfTeveshSzat.java b/Mage.Sets/src/mage/sets/coldsnap/DiscipleOfTeveshSzat.java new file mode 100644 index 0000000000..4d5297e101 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/DiscipleOfTeveshSzat.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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DiscipleOfTeveshSzat extends CardImpl { + + public DiscipleOfTeveshSzat(UUID ownerId) { + super(ownerId, 55, "Disciple of Tevesh Szat", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // {tap}: Target creature gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + // {4}{B}{B}, {tap}, Sacrifice Disciple of Tevesh Szat: Target creature gets -6/-6 until end of turn. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-6, -6, Duration.EndOfTurn), new ManaCostsImpl("{4}{B}{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public DiscipleOfTeveshSzat(final DiscipleOfTeveshSzat card) { + super(card); + } + + @Override + public DiscipleOfTeveshSzat copy() { + return new DiscipleOfTeveshSzat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/BorisDevilboon.java b/Mage.Sets/src/mage/sets/legends/BorisDevilboon.java new file mode 100644 index 0000000000..cda9278c4c --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/BorisDevilboon.java @@ -0,0 +1,85 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class BorisDevilboon extends CardImpl { + + public BorisDevilboon(UUID ownerId) { + super(ownerId, 263, "Boris Devilboon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{R}"); + this.expansionSetCode = "LEG"; + this.supertype.add("Legendary"); + this.subtype.add("Zombie"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {2}{B}{R}, {tap}: Put a 1/1 black and red Demon creature token named Minor Demon onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new MinorDemonToken()), new ManaCostsImpl("{2}{B}{R}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public BorisDevilboon(final BorisDevilboon card) { + super(card); + } + + @Override + public BorisDevilboon copy() { + return new BorisDevilboon(this); + } +} + +class MinorDemonToken extends Token { + + public MinorDemonToken() { + super("Minor Demon", "1/1 black and red Demon creature token named Minor Demon"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + color.setRed(true); + subtype.add("Demon"); + power = new MageInt(1); + toughness = new MageInt(1); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/BorisDevilboon.java b/Mage.Sets/src/mage/sets/masterseditioniii/BorisDevilboon.java new file mode 100644 index 0000000000..ad273286c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/BorisDevilboon.java @@ -0,0 +1,54 @@ +/* + * 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.masterseditioniii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BorisDevilboon extends mage.sets.legends.BorisDevilboon { + + public BorisDevilboon(UUID ownerId) { + super(ownerId); + this.cardNumber = 146; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.UNCOMMON; + } + + public BorisDevilboon(final BorisDevilboon card) { + super(card); + } + + @Override + public BorisDevilboon copy() { + return new BorisDevilboon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/FugitiveDruid.java b/Mage.Sets/src/mage/sets/tempest/FugitiveDruid.java new file mode 100644 index 0000000000..a2811d685b --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/FugitiveDruid.java @@ -0,0 +1,72 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesTargetTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class FugitiveDruid extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("an Aura spell"); + + static { + filter.add(new SubtypePredicate("Aura")); + } + + public FugitiveDruid(UUID ownerId) { + super(ownerId, 123, "Fugitive Druid", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Whenever Fugitive Druid becomes the target of an Aura spell, you draw a card. + this.addAbility(new BecomesTargetTriggeredAbility(new DrawCardSourceControllerEffect(1), filter)); + } + + public FugitiveDruid(final FugitiveDruid card) { + super(card); + } + + @Override + public FugitiveDruid copy() { + return new FugitiveDruid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Metrognome.java b/Mage.Sets/src/mage/sets/urzassaga/Metrognome.java new file mode 100644 index 0000000000..4bae5c0bea --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Metrognome.java @@ -0,0 +1,123 @@ +/* + * 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.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.game.permanent.token.Token; +import mage.game.stack.StackObject; + +/** + * + * @author LoneFox + */ +public class Metrognome extends CardImpl { + + public Metrognome(UUID ownerId) { + super(ownerId, 301, "Metrognome", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "USG"; + + // When a spell or ability an opponent controls causes you to discard Metrognome, put four 1/1 colorless Gnome artifact creature tokens onto the battlefield. + this.addAbility(new MetrognomeTriggeredAbility()); + // {4}, {tap}: Put a 1/1 colorless Gnome artifact creature token onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GnomeToken()), new ManaCostsImpl("{4}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public Metrognome(final Metrognome card) { + super(card); + } + + @Override + public Metrognome copy() { + return new Metrognome(this); + } +} + +class MetrognomeTriggeredAbility extends TriggeredAbilityImpl { + + MetrognomeTriggeredAbility() { + super(Zone.ALL, new CreateTokenEffect(new GnomeToken(), 4)); + } + + MetrognomeTriggeredAbility(final MetrognomeTriggeredAbility ability) { + super(ability); + } + + @Override + public MetrognomeTriggeredAbility copy() { + return new MetrognomeTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DISCARDED_CARD; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (getSourceId().equals(event.getTargetId())) { + StackObject stackObject = game.getStack().getStackObject(event.getSourceId()); + if (stackObject != null) { + return game.getOpponents(this.getControllerId()).contains(stackObject.getControllerId()); + } + } + return false; + } + + @Override + public String getRule() { + return "When a spell or ability an opponent controls causes you to discard {this}, " + super.getRule(); + } +} + +class GnomeToken extends Token { + + public GnomeToken() { + super("Gnome", "1/1 colorless Gnome artifact creature token"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add("Gnome"); + power = new MageInt(1); + toughness = new MageInt(1); + } +} diff --git a/Mage/src/mage/abilities/common/BecomesTargetTriggeredAbility.java b/Mage/src/mage/abilities/common/BecomesTargetTriggeredAbility.java index c80efba210..8232f7e1b2 100644 --- a/Mage/src/mage/abilities/common/BecomesTargetTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/BecomesTargetTriggeredAbility.java @@ -27,11 +27,13 @@ */ package mage.abilities.common; -import mage.constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.Zone; +import mage.filter.FilterStackObject; import mage.game.Game; import mage.game.events.GameEvent; +import mage.game.stack.StackObject; /** * @@ -39,12 +41,20 @@ import mage.game.events.GameEvent; */ public class BecomesTargetTriggeredAbility extends TriggeredAbilityImpl { + private final FilterStackObject filter; + public BecomesTargetTriggeredAbility(Effect effect) { + this(effect, new FilterStackObject("a spell or ability")); + } + + public BecomesTargetTriggeredAbility(Effect effect, FilterStackObject filter) { super(Zone.BATTLEFIELD, effect); + this.filter = filter.copy(); } public BecomesTargetTriggeredAbility(final BecomesTargetTriggeredAbility ability) { super(ability); + this.filter = ability.filter.copy(); } @Override @@ -59,11 +69,12 @@ public class BecomesTargetTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - return event.getTargetId().equals(getSourceId()); + StackObject sourceObject = game.getStack().getStackObject(event.getSourceId()); + return event.getTargetId().equals(getSourceId()) && filter.match(sourceObject, getSourceId(), getControllerId(), game); } @Override public String getRule() { - return "When {this} becomes the target of a spell or ability, " + super.getRule(); + return "When {this} becomes the target of " + filter.getMessage() + ", " + super.getRule(); } }