From da479b69abb45c4f1fa6bb98f1653f43c8ab8082 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 25 Jun 2015 10:43:06 +0300 Subject: [PATCH 1/5] Implement cards: Hidden Ancients, Hidden Gibbons, Hidden Guerrillas, and Hidden Spider --- .../mage/sets/urzaslegacy/HiddenGibbons.java | 89 ++++++++++++++++++ .../mage/sets/urzassaga/HiddenAncients.java | 89 ++++++++++++++++++ .../mage/sets/urzassaga/HiddenGuerrillas.java | 85 +++++++++++++++++ .../src/mage/sets/urzassaga/HiddenSpider.java | 92 +++++++++++++++++++ 4 files changed, 355 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/urzaslegacy/HiddenGibbons.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/HiddenAncients.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/HiddenGuerrillas.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/HiddenSpider.java diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/HiddenGibbons.java b/Mage.Sets/src/mage/sets/urzaslegacy/HiddenGibbons.java new file mode 100644 index 00000000000..a2c33c01ae4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzaslegacy/HiddenGibbons.java @@ -0,0 +1,89 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.urzaslegacy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class HiddenGibbons extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("instant spell"); + + static { + filter.add(new CardTypePredicate(CardType.INSTANT)); + } + + public HiddenGibbons(UUID ownerId) { + super(ownerId, 104, "Hidden Gibbons", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "ULG"; + + // When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true), + filter, false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature.")); + } + + public HiddenGibbons(final HiddenGibbons card) { + super(card); + } + + @Override + public HiddenGibbons copy() { + return new HiddenGibbons(this); + } +} + +class HiddenGibbonsApe extends Token { + + public HiddenGibbonsApe() { + super("Ape", "a 4/4 Ape creature"); + cardType.add(CardType.CREATURE); + subtype.add("Ape"); + power = new MageInt(4); + toughness = new MageInt(4); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/HiddenAncients.java b/Mage.Sets/src/mage/sets/urzassaga/HiddenAncients.java new file mode 100644 index 00000000000..14a081bac10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/HiddenAncients.java @@ -0,0 +1,89 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class HiddenAncients extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("enchantment spell"); + + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + } + + public HiddenAncients(UUID ownerId) { + super(ownerId, 260, "Hidden Ancients", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "USG"; + + // When an opponent casts an enchantment spell, if Hidden Ancients is an enchantment, Hidden Ancients becomes a 5/5 Treefolk creature. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolk(), "", Duration.WhileOnBattlefield, true), + filter, false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature.")); + } + + public HiddenAncients(final HiddenAncients card) { + super(card); + } + + @Override + public HiddenAncients copy() { + return new HiddenAncients(this); + } +} + +class HiddenAncientsTreefolk extends Token { + + public HiddenAncientsTreefolk() { + super("Treefolk", "a 5/5 Treefolk creature"); + cardType.add(CardType.CREATURE); + subtype.add("Treefolk"); + power = new MageInt(5); + toughness = new MageInt(5); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/HiddenGuerrillas.java b/Mage.Sets/src/mage/sets/urzassaga/HiddenGuerrillas.java new file mode 100644 index 00000000000..b17c0756bde --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/HiddenGuerrillas.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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterArtifactSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class HiddenGuerrillas extends CardImpl { + + public HiddenGuerrillas(UUID ownerId) { + super(ownerId, 261, "Hidden Guerrillas", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "USG"; + + // When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true), + new FilterArtifactSpell(), false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample.")); + } + + public HiddenGuerrillas(final HiddenGuerrillas card) { + super(card); + } + + @Override + public HiddenGuerrillas copy() { + return new HiddenGuerrillas(this); + } +} + +class HiddenGuerrillasSoldier extends Token { + + public HiddenGuerrillasSoldier() { + super("Soldier", "a 5/3 Soldier creature with trample"); + cardType.add(CardType.CREATURE); + subtype.add("Soldier"); + power = new MageInt(5); + toughness = new MageInt(3); + this.addAbility(TrampleAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/HiddenSpider.java b/Mage.Sets/src/mage/sets/urzassaga/HiddenSpider.java new file mode 100644 index 00000000000..06338dcf649 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/HiddenSpider.java @@ -0,0 +1,92 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class HiddenSpider extends CardImpl { + + private static final FilterCreatureSpell filter = new FilterCreatureSpell("creature spell with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public HiddenSpider(UUID ownerId) { + super(ownerId, 264, "Hidden Spider", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "USG"; + + // When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true), + filter, false); + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + "When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach.")); + } + + public HiddenSpider(final HiddenSpider card) { + super(card); + } + + @Override + public HiddenSpider copy() { + return new HiddenSpider(this); + } +} + +class HiddenSpiderToken extends Token { + + public HiddenSpiderToken() { + super("Spider", "a 3/5 Spider creature with reach"); + cardType.add(CardType.CREATURE); + subtype.add("Spider"); + power = new MageInt(3); + toughness = new MageInt(5); + this.addAbility(ReachAbility.getInstance()); + } +} From 8366ce3b8d5bf18ef08712a5020c735d3cb0c9d8 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 25 Jun 2015 10:44:48 +0300 Subject: [PATCH 2/5] Use BeginningOfUpkeepTriggeredAbility instead of OnEventTriggeredAbility for Harbinger of Night and Ivory Tower --- Mage.Sets/src/mage/sets/antiquities/IvoryTower.java | 7 +++---- Mage.Sets/src/mage/sets/mirage/HarbingerOfNight.java | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java b/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java index 6f4d25c427f..4fb67af9f23 100644 --- a/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java +++ b/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java @@ -29,14 +29,14 @@ package mage.sets.antiquities; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.TargetController; import mage.game.Game; -import mage.game.events.GameEvent.EventType; import mage.players.Player; /** @@ -50,8 +50,7 @@ public class IvoryTower extends CardImpl { super(ownerId, 18, "Ivory Tower", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); this.expansionSetCode = "ATQ"; - this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", - new IvoryTowerEffect(), false)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new IvoryTowerEffect(), TargetController.YOU, false)); } public IvoryTower(final IvoryTower card) { diff --git a/Mage.Sets/src/mage/sets/mirage/HarbingerOfNight.java b/Mage.Sets/src/mage/sets/mirage/HarbingerOfNight.java index fc31ace1c0c..6c6a717650c 100644 --- a/Mage.Sets/src/mage/sets/mirage/HarbingerOfNight.java +++ b/Mage.Sets/src/mage/sets/mirage/HarbingerOfNight.java @@ -29,14 +29,14 @@ package mage.sets.mirage; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; -import mage.game.events.GameEvent.EventType; /** * @@ -53,8 +53,8 @@ public class HarbingerOfNight extends CardImpl { this.toughness = new MageInt(3); // At the beginning of your upkeep, put a -1/-1 counter on each creature. - this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", - new AddCountersAllEffect(CounterType.M1M1.createInstance(), new FilterCreaturePermanent()), false)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAllEffect(CounterType.M1M1.createInstance(), new FilterCreaturePermanent()), + TargetController.YOU, false)); } public HarbingerOfNight(final HarbingerOfNight card) { From 01d724ff3bd8e4704a22e9b373ba3b3c75576b72 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 25 Jun 2015 10:45:49 +0300 Subject: [PATCH 3/5] Fix yet another copy-paste error --- Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java b/Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java index cbd4c0bb594..69bf74d4ce9 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java +++ b/Mage.Sets/src/mage/sets/urzassaga/OpalArchangel.java @@ -75,7 +75,7 @@ public class OpalArchangel extends CardImpl { class OpalArchangelToken extends Token { public OpalArchangelToken() { - super("Angel", "a 3/3 Angel creature with flying and vigilance"); + super("Angel", "a 5/5 Angel creature with flying and vigilance"); cardType.add(CardType.CREATURE); subtype.add("Angel"); power = new MageInt(5); From 2ccf80942e13de233c3e124d3dc2cea0a3d73dc9 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 25 Jun 2015 11:59:37 +0300 Subject: [PATCH 4/5] Implement cards: Death Match, Gerrard's Wisdom, Ghitu Fire-Eater, Pyromancy, and Scavenger Folk --- .../mage/sets/fifthedition/ScavengerFolk.java | 73 +++++++++++ .../sets/masterseditioniv/ScavengerFolk.java | 53 ++++++++ .../src/mage/sets/onslaught/DeathMatch.java | 119 ++++++++++++++++++ .../sets/seventhedition/GerrardsWisdom.java | 55 ++++++++ .../sets/seventhedition/GhituFireEater.java | 74 +++++++++++ .../sets/seventhedition/ScavengerFolk.java | 55 ++++++++ .../mage/sets/starter1999/GerrardsWisdom.java | 81 ++++++++++++ .../src/mage/sets/thedark/ScavengerFolk.java | 53 ++++++++ .../mage/sets/urzaslegacy/GhituFireEater.java | 53 ++++++++ .../src/mage/sets/urzaslegacy/Pyromancy.java | 69 ++++++++++ .../sets/weatherlight/GerrardsWisdom.java | 55 ++++++++ 11 files changed, 740 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fifthedition/ScavengerFolk.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/ScavengerFolk.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/DeathMatch.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/GerrardsWisdom.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/GhituFireEater.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/ScavengerFolk.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.java create mode 100644 Mage.Sets/src/mage/sets/thedark/ScavengerFolk.java create mode 100644 Mage.Sets/src/mage/sets/urzaslegacy/GhituFireEater.java create mode 100644 Mage.Sets/src/mage/sets/urzaslegacy/Pyromancy.java create mode 100644 Mage.Sets/src/mage/sets/weatherlight/GerrardsWisdom.java diff --git a/Mage.Sets/src/mage/sets/fifthedition/ScavengerFolk.java b/Mage.Sets/src/mage/sets/fifthedition/ScavengerFolk.java new file mode 100644 index 00000000000..3f3a9d6111b --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/ScavengerFolk.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthedition; + +import java.util.UUID; +import mage.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.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author LoneFox + + */ +public class ScavengerFolk extends CardImpl { + + public ScavengerFolk(UUID ownerId) { + super(ownerId, 185, "Scavenger Folk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "5ED"; + this.subtype.add("Human"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {G}, {T}, Sacrifice Scavenger Folk: Destroy target artifact. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}")); ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetArtifactPermanent()); + this.addAbility(ability); + } + + public ScavengerFolk(final ScavengerFolk card) { + super(card); + } + + @Override + public ScavengerFolk copy() { + return new ScavengerFolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/ScavengerFolk.java b/Mage.Sets/src/mage/sets/masterseditioniv/ScavengerFolk.java new file mode 100644 index 00000000000..a7c40482e52 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/ScavengerFolk.java @@ -0,0 +1,53 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.masterseditioniv; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class ScavengerFolk extends mage.sets.fifthedition.ScavengerFolk { + + public ScavengerFolk(UUID ownerId) { + super(ownerId); + this.cardNumber = 166; + this.expansionSetCode = "ME4"; + } + + public ScavengerFolk(final ScavengerFolk card) { + super(card); + } + + @Override + public ScavengerFolk copy() { + return new ScavengerFolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/DeathMatch.java b/Mage.Sets/src/mage/sets/onslaught/DeathMatch.java new file mode 100644 index 00000000000..1709fc24685 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/DeathMatch.java @@ -0,0 +1,119 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FirstTargetPointer; + +/** + * + * @author LoneFox + + */ +public class DeathMatch extends CardImpl { + + private final UUID originalId; + + public DeathMatch(UUID ownerId) { + super(ownerId, 136, "Death Match", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + this.expansionSetCode = "ONS"; + + // Whenever a creature enters the battlefield, that creature's controller may have target creature of his or her choice get -3/-3 until end of turn. + // NOTE: The ability being optional is implemented in the subclass to give the choice to correct player. + Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new DeathMatchEffect(), + new FilterCreaturePermanent(), false, SetTargetPointer.PLAYER, ""); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + originalId = ability.getOriginalId(); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if(ability.getOriginalId().equals(originalId)) { + UUID controllerId = ability.getEffects().get(0).getTargetPointer().getFirst(game, ability); + if(controllerId != null) { + ability.getTargets().get(0).setTargetController(controllerId); + ability.getEffects().get(0).setTargetPointer(new FirstTargetPointer()); + } + } + } + + public DeathMatch(final DeathMatch card) { + super(card); + this.originalId = card.originalId; + } + + @Override + public DeathMatch copy() { + return new DeathMatch(this); + } +} + +class DeathMatchEffect extends OneShotEffect { + + public DeathMatchEffect() { + super(Outcome.UnboostCreature); + staticText="that creature's controller may have target creature of his or her choice get -3/-3 until end of turn."; + } + + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getTargets().get(0).getTargetController()); + if(player != null) { + if(player.chooseUse(outcome, "Give targeted creature -3/-3 ?", game)) { + game.addEffect(new BoostTargetEffect(-3, -3, Duration.EndOfTurn), source); + } + return true; + } + return false; + } + + public DeathMatchEffect(final DeathMatchEffect effect) { + super(effect); + } + + public DeathMatchEffect copy() { + return new DeathMatchEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/GerrardsWisdom.java b/Mage.Sets/src/mage/sets/seventhedition/GerrardsWisdom.java new file mode 100644 index 00000000000..0c8bdfea483 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/GerrardsWisdom.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.seventhedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class GerrardsWisdom extends mage.sets.starter1999.GerrardsWisdom { + + public GerrardsWisdom(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "7ED"; + this.rarity = Rarity.UNCOMMON; + } + + public GerrardsWisdom(final GerrardsWisdom card) { + super(card); + } + + @Override + public GerrardsWisdom copy() { + return new GerrardsWisdom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/GhituFireEater.java b/Mage.Sets/src/mage/sets/seventhedition/GhituFireEater.java new file mode 100644 index 00000000000..b761826972f --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/GhituFireEater.java @@ -0,0 +1,74 @@ +/* + * 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.seventhedition; + +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.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + + */ +public class GhituFireEater extends CardImpl { + + public GhituFireEater(UUID ownerId) { + super(ownerId, 184, "Ghitu Fire-Eater", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "7ED"; + this.subtype.add("Human"); + this.subtype.add("Nomad"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}, Sacrifice Ghitu Fire-Eater: Ghitu Fire-Eater deals damage equal to its power to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public GhituFireEater(final GhituFireEater card) { + super(card); + } + + @Override + public GhituFireEater copy() { + return new GhituFireEater(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/ScavengerFolk.java b/Mage.Sets/src/mage/sets/seventhedition/ScavengerFolk.java new file mode 100644 index 00000000000..5a98edbd608 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/ScavengerFolk.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.seventhedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class ScavengerFolk extends mage.sets.fifthedition.ScavengerFolk { + + public ScavengerFolk(UUID ownerId) { + super(ownerId); + this.cardNumber = 267; + this.expansionSetCode = "7ED"; + this.rarity = Rarity.UNCOMMON; + } + + public ScavengerFolk(final ScavengerFolk card) { + super(card); + } + + @Override + public ScavengerFolk copy() { + return new ScavengerFolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.java b/Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.java new file mode 100644 index 00000000000..49ee41b9192 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/GerrardsWisdom.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.starter1999; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; + +/** + * + * @author LoneFox + + */ +public class GerrardsWisdom extends CardImpl { + + public GerrardsWisdom(UUID ownerId) { + super(ownerId, 18, "Gerrard's Wisdom", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); + this.expansionSetCode = "S99"; + + // You gain 2 life for each card in your hand. + this.getSpellAbility().addEffect(new GainLifeEffect(new TwiceCardsInControllerHandCount())); + } + + public GerrardsWisdom(final GerrardsWisdom card) { + super(card); + } + + @Override + public GerrardsWisdom copy() { + return new GerrardsWisdom(this); + } +} + +class TwiceCardsInControllerHandCount extends CardsInControllerHandCount { + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + return 2 * super.calculate(game, sourceAbility, effect); + } + + @Override + public DynamicValue copy() { + return new TwiceCardsInControllerHandCount(); + } + + @Override + public String toString() { + return "2"; + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/ScavengerFolk.java b/Mage.Sets/src/mage/sets/thedark/ScavengerFolk.java new file mode 100644 index 00000000000..db6e5e0870b --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/ScavengerFolk.java @@ -0,0 +1,53 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.thedark; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class ScavengerFolk extends mage.sets.fifthedition.ScavengerFolk { + + public ScavengerFolk(UUID ownerId) { + super(ownerId); + this.cardNumber = 50; + this.expansionSetCode = "DRK"; + } + + public ScavengerFolk(final ScavengerFolk card) { + super(card); + } + + @Override + public ScavengerFolk copy() { + return new ScavengerFolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/GhituFireEater.java b/Mage.Sets/src/mage/sets/urzaslegacy/GhituFireEater.java new file mode 100644 index 00000000000..b87c52977a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzaslegacy/GhituFireEater.java @@ -0,0 +1,53 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.urzaslegacy; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class GhituFireEater extends mage.sets.seventhedition.GhituFireEater { + + public GhituFireEater(UUID ownerId) { + super(ownerId); + this.cardNumber = 76; + this.expansionSetCode = "ULG"; + } + + public GhituFireEater(final GhituFireEater card) { + super(card); + } + + @Override + public GhituFireEater copy() { + return new GhituFireEater(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/Pyromancy.java b/Mage.Sets/src/mage/sets/urzaslegacy/Pyromancy.java new file mode 100644 index 00000000000..006163f3a94 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzaslegacy/Pyromancy.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.urzaslegacy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.DiscardCostCardConvertedMana; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + + */ +public class Pyromancy extends CardImpl { + + public Pyromancy(UUID ownerId) { + super(ownerId, 88, "Pyromancy", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); + this.expansionSetCode = "ULG"; + + // {3}, Discard a card at random: Pyromancy deals damage to target creature or player equal to the converted mana cost of the discarded card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new DiscardCostCardConvertedMana()), new ManaCostsImpl("{3}")); + ability.addTarget(new TargetCreatureOrPlayer()); + ability.addCost(new DiscardCardCost(true)); + this.addAbility(ability); + } + + public Pyromancy(final Pyromancy card) { + super(card); + } + + @Override + public Pyromancy copy() { + return new Pyromancy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/GerrardsWisdom.java b/Mage.Sets/src/mage/sets/weatherlight/GerrardsWisdom.java new file mode 100644 index 00000000000..f08497d4358 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/GerrardsWisdom.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.weatherlight; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class GerrardsWisdom extends mage.sets.starter1999.GerrardsWisdom { + + public GerrardsWisdom(UUID ownerId) { + super(ownerId); + this.cardNumber = 131; + this.expansionSetCode = "WTH"; + this.rarity = Rarity.UNCOMMON; + } + + public GerrardsWisdom(final GerrardsWisdom card) { + super(card); + } + + @Override + public GerrardsWisdom copy() { + return new GerrardsWisdom(this); + } +} From 9ca40cf38ddf36ce600fb0ce75a9fea165962d2c Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 25 Jun 2015 20:42:02 +0300 Subject: [PATCH 5/5] Implement card: Story Circle --- .../mage/sets/eighthedition/StoryCircle.java | 55 +++++++++++ .../sets/mercadianmasques/StoryCircle.java | 98 +++++++++++++++++++ .../mage/sets/ninthedition/StoryCircle.java | 55 +++++++++++ .../mage/sets/tenthedition/StoryCircle.java | 55 +++++++++++ ...NextDamageFromChosenSourceToYouEffect.java | 14 +-- 5 files changed, 270 insertions(+), 7 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/eighthedition/StoryCircle.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/StoryCircle.java create mode 100644 Mage.Sets/src/mage/sets/ninthedition/StoryCircle.java create mode 100644 Mage.Sets/src/mage/sets/tenthedition/StoryCircle.java diff --git a/Mage.Sets/src/mage/sets/eighthedition/StoryCircle.java b/Mage.Sets/src/mage/sets/eighthedition/StoryCircle.java new file mode 100644 index 00000000000..6331bbeded8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eighthedition/StoryCircle.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eighthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class StoryCircle extends mage.sets.mercadianmasques.StoryCircle { + + public StoryCircle(UUID ownerId) { + super(ownerId); + this.cardNumber = 50; + this.expansionSetCode = "8ED"; + this.rarity = Rarity.RARE; + } + + public StoryCircle(final StoryCircle card) { + super(card); + } + + @Override + public StoryCircle copy() { + return new StoryCircle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/StoryCircle.java b/Mage.Sets/src/mage/sets/mercadianmasques/StoryCircle.java new file mode 100644 index 00000000000..7d0c8149b5b --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/StoryCircle.java @@ -0,0 +1,98 @@ +/* + * 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.mercadianmasques; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ChooseColorEffect; +import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToYouEffect; +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.filter.FilterObject; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; + +/** + * + * @author LoneFox + + */ +public class StoryCircle extends CardImpl { + + public StoryCircle(UUID ownerId) { + super(ownerId, 51, "Story Circle", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.expansionSetCode = "MMQ"; + + // As Story Circle enters the battlefield, choose a color. + this.addAbility(new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral))); + // {W}: The next time a source of your choice of the chosen color would deal damage to you this turn, prevent that damage. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new StoryCircleEffect(), new ManaCostsImpl("{W}"))); + } + + public StoryCircle(final StoryCircle card) { + super(card); + } + + @Override + public StoryCircle copy() { + return new StoryCircle(this); + } +} + +class StoryCircleEffect extends PreventNextDamageFromChosenSourceToYouEffect { + + public StoryCircleEffect() { + super(Duration.EndOfTurn); + staticText = "The next time a source of your choice of the chosen color would deal damage to you this turn, prevent that damage."; + } + + @Override + public void init(Ability source, Game game) { + FilterObject filter = targetSource.getFilter(); + filter.add(new ColorPredicate((ObjectColor) game.getState().getValue(source.getSourceId() + "_color"))); + super.init(source, game); + } + + public StoryCircleEffect(StoryCircleEffect effect) { + super(effect); + } + + @Override + public StoryCircleEffect copy() { + return new StoryCircleEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/StoryCircle.java b/Mage.Sets/src/mage/sets/ninthedition/StoryCircle.java new file mode 100644 index 00000000000..7e68854b836 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/StoryCircle.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.ninthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class StoryCircle extends mage.sets.mercadianmasques.StoryCircle { + + public StoryCircle(UUID ownerId) { + super(ownerId); + this.cardNumber = 48; + this.expansionSetCode = "9ED"; + this.rarity = Rarity.RARE; + } + + public StoryCircle(final StoryCircle card) { + super(card); + } + + @Override + public StoryCircle copy() { + return new StoryCircle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenthedition/StoryCircle.java b/Mage.Sets/src/mage/sets/tenthedition/StoryCircle.java new file mode 100644 index 00000000000..eec832a8e97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenthedition/StoryCircle.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tenthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class StoryCircle extends mage.sets.mercadianmasques.StoryCircle { + + public StoryCircle(UUID ownerId) { + super(ownerId); + this.cardNumber = 49; + this.expansionSetCode = "10E"; + this.rarity = Rarity.RARE; + } + + public StoryCircle(final StoryCircle card) { + super(card); + } + + @Override + public StoryCircle copy() { + return new StoryCircle(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java b/Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java index cd0466a16ba..f33f75a9122 100644 --- a/Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java +++ b/Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java @@ -19,27 +19,27 @@ import mage.target.TargetSource; */ public class PreventNextDamageFromChosenSourceToYouEffect extends PreventionEffectImpl { - private final TargetSource targetSource; - + protected final TargetSource targetSource; + public PreventNextDamageFromChosenSourceToYouEffect(Duration duration) { this(duration, new FilterObject("source")); } - + public PreventNextDamageFromChosenSourceToYouEffect(Duration duration, FilterObject filter) { this(duration, filter, false); } - + public PreventNextDamageFromChosenSourceToYouEffect(Duration duration, FilterObject filter, boolean onlyCombat) { super(duration, Integer.MAX_VALUE, onlyCombat); this.targetSource = new TargetSource(filter); this.staticText = setText(); } - + public PreventNextDamageFromChosenSourceToYouEffect(final PreventNextDamageFromChosenSourceToYouEffect effect) { super(effect); this.targetSource = effect.targetSource.copy(); } - + @Override public PreventNextDamageFromChosenSourceToYouEffect copy() { return new PreventNextDamageFromChosenSourceToYouEffect(this); @@ -76,5 +76,5 @@ public class PreventNextDamageFromChosenSourceToYouEffect extends PreventionEffe sb.append(", prevent that damage"); return sb.toString(); } - + }