From 06733d51e0bfe53e1b6279c48c7ca794803ec2d6 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Wed, 4 Mar 2015 13:42:06 -0500 Subject: [PATCH 01/12] implemented Invasion:Explosive Growth --- .../mage/sets/invasion/ExplosiveGrowth.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java diff --git a/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java b/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java new file mode 100644 index 0000000000..80e1a92630 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.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.invasion; + +import java.util.UUID; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author anonymous + */ +public class ExplosiveGrowth extends CardImpl { + + public ExplosiveGrowth(UUID ownerId) { + super(ownerId, 187, "Explosive Growth", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "INV"; + + // Kicker {5} + this.addAbility(new KickerAbility("{5}")); + + // Target creature gets +2/+2 until end of turn. If Explosive Growth was kicked, that creature gets +5/+5 until end of turn instead. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(5, 5, Duration.EndOfTurn), + new BoostTargetEffect(2, 2, Duration.EndOfTurn), KickedCondition.getInstance(), + "Target creature gets +2/+2 until end of turn. If Explosive Growth was kicked, that creature gets +5/+5 until end of turn instead.")); + } + + public ExplosiveGrowth(final ExplosiveGrowth card) { + super(card); + } + + @Override + public ExplosiveGrowth copy() { + return new ExplosiveGrowth(this); + } +} \ No newline at end of file From a79795e00bb30e19ceb1439c2fb7622e45928dc7 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Wed, 4 Mar 2015 14:13:58 -0500 Subject: [PATCH 02/12] implemented Invasion:Crimson Acolyte --- .../mage/sets/invasion/CrimsonAcolyte.java | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java diff --git a/Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java b/Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java new file mode 100644 index 0000000000..5331c36f9c --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author anonymous + */ +public class CrimsonAcolyte extends CardImpl { + + private static final FilterCard protectionFilter = new FilterCard("Red"); + + static { + protectionFilter.add(new ColorPredicate(ObjectColor.RED)); + } + + public CrimsonAcolyte(UUID ownerId) { + super(ownerId, 11, "Crimson Acolyte", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "INV"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Protection from red + this.addAbility(new ProtectionAbility(protectionFilter)); + + // {W}: Target creature gains protection from red until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(new ProtectionAbility(protectionFilter), Duration.EndOfTurn), + new ManaCostsImpl("{W}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CrimsonAcolyte(final CrimsonAcolyte card) { + super(card); + } + + @Override + public CrimsonAcolyte copy() { + return new CrimsonAcolyte(this); + } +} From 4dd48c066133db6f8d6b7bb54ca460502b668c37 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Wed, 4 Mar 2015 14:48:21 -0500 Subject: [PATCH 03/12] implemented Invasion:Nightscape Master --- .../mage/sets/invasion/NightscapeMaster.java | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/NightscapeMaster.java diff --git a/Mage.Sets/src/mage/sets/invasion/NightscapeMaster.java b/Mage.Sets/src/mage/sets/invasion/NightscapeMaster.java new file mode 100644 index 0000000000..8a74693b66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/NightscapeMaster.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.invasion; + +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.DamageTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author anonymous + */ +public class NightscapeMaster extends CardImpl { + + public NightscapeMaster(UUID ownerId) { + super(ownerId, 113, "Nightscape Master", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Zombie"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {U}{U}, {tap}: Return target creature to its owner's hand. + Ability returnAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{U}{U}")); + returnAbility.addTarget(new TargetCreaturePermanent()); + returnAbility.addCost(new TapSourceCost()); + this.addAbility(returnAbility); + + // {R}{R}, {tap}: Nightscape Master deals 2 damage to target creature. + Ability damageAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}{R}")); + damageAbility.addTarget(new TargetCreaturePermanent()); + damageAbility.addCost(new TapSourceCost()); + this.addAbility(damageAbility); + } + + public NightscapeMaster(final NightscapeMaster card) { + super(card); + } + + @Override + public NightscapeMaster copy() { + return new NightscapeMaster(this); + } +} From fa6c26481cc06eebf227310a7d6e319730ab7995 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Wed, 4 Mar 2015 15:35:32 -0500 Subject: [PATCH 04/12] initial commit of Invasion:Scavenged Weaponry and Invasion:Trench Wurm --- .../mage/sets/invasion/ScavengedWeaponry.java | 80 +++++++++++++++++++ .../src/mage/sets/invasion/TrenchWurm.java | 69 ++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java create mode 100644 Mage.Sets/src/mage/sets/invasion/TrenchWurm.java diff --git a/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java b/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java new file mode 100644 index 0000000000..9b9c7fa96a --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.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.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +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 anonymous + */ +public class ScavengedWeaponry extends CardImpl { + + public ScavengedWeaponry(UUID ownerId) { + super(ownerId, 123, "Scavenged Weaponry", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.spellAbility.addTarget(auraTarget); + this.spellAbility.addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Scavenged Weaponry enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); + + // Enchanted creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); + } + + public ScavengedWeaponry(final ScavengedWeaponry card) { + super(card); + } + + @Override + public ScavengedWeaponry copy() { + return new ScavengedWeaponry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/TrenchWurm.java b/Mage.Sets/src/mage/sets/invasion/TrenchWurm.java new file mode 100644 index 0000000000..4b9742f930 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/TrenchWurm.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.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +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.TargetNonBasicLandPermanent; + +/** + * + * @author anonymous + */ +public class TrenchWurm extends CardImpl { + + public TrenchWurm(UUID ownerId) { + super(ownerId, 127, "Trench Wurm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Wurm"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}{R}, {tap}: Destroy target nonbasic land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{R}")); + ability.addTarget(new TargetNonBasicLandPermanent()); + this.addAbility(ability); + } + + public TrenchWurm(final TrenchWurm card) { + super(card); + } + + @Override + public TrenchWurm copy() { + return new TrenchWurm(this); + } +} From 4a1bd50dc10d285d356b5efe97c9e783c87de609 Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Wed, 4 Mar 2015 21:58:47 -0500 Subject: [PATCH 05/12] finished up Invasion cards Crimson Acolyte, Explosive Growth, Nightscape Master and Trench Wurm --- .../mage/sets/invasion/CrimsonAcolyte.java | 2 +- .../mage/sets/invasion/ExplosiveGrowth.java | 2 +- .../mage/sets/invasion/NightscapeMaster.java | 2 +- .../mage/sets/invasion/ScavengedWeaponry.java | 80 ------------------- .../src/mage/sets/invasion/TrenchWurm.java | 2 +- 5 files changed, 4 insertions(+), 84 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java diff --git a/Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java b/Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java index 5331c36f9c..c7e90f813e 100644 --- a/Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java +++ b/Mage.Sets/src/mage/sets/invasion/CrimsonAcolyte.java @@ -46,7 +46,7 @@ import mage.target.common.TargetCreaturePermanent; /** * - * @author anonymous + * @author michael.napoleon@gmail.com */ public class CrimsonAcolyte extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java b/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java index 80e1a92630..143dd2ea2e 100644 --- a/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java +++ b/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java @@ -40,7 +40,7 @@ import mage.target.common.TargetCreaturePermanent; /** * - * @author anonymous + * @author michael.napoleon@gmail.com */ public class ExplosiveGrowth extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/invasion/NightscapeMaster.java b/Mage.Sets/src/mage/sets/invasion/NightscapeMaster.java index 8a74693b66..a72d0903ff 100644 --- a/Mage.Sets/src/mage/sets/invasion/NightscapeMaster.java +++ b/Mage.Sets/src/mage/sets/invasion/NightscapeMaster.java @@ -43,7 +43,7 @@ import mage.target.common.TargetCreaturePermanent; /** * - * @author anonymous + * @author michael.napoleon@gmail.com */ public class NightscapeMaster extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java b/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java deleted file mode 100644 index 9b9c7fa96a..0000000000 --- a/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.invasion; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.continuous.BoostEnchantedEffect; -import mage.abilities.keyword.EnchantAbility; -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 anonymous - */ -public class ScavengedWeaponry extends CardImpl { - - public ScavengedWeaponry(UUID ownerId) { - super(ownerId, 123, "Scavenged Weaponry", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); - this.expansionSetCode = "INV"; - this.subtype.add("Aura"); - - // Enchant creature - TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.spellAbility.addTarget(auraTarget); - this.spellAbility.addEffect(new AttachEffect(Outcome.BoostCreature)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // When Scavenged Weaponry enters the battlefield, draw a card. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); - - // Enchanted creature gets +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); - } - - public ScavengedWeaponry(final ScavengedWeaponry card) { - super(card); - } - - @Override - public ScavengedWeaponry copy() { - return new ScavengedWeaponry(this); - } -} diff --git a/Mage.Sets/src/mage/sets/invasion/TrenchWurm.java b/Mage.Sets/src/mage/sets/invasion/TrenchWurm.java index 4b9742f930..f2c5914fb6 100644 --- a/Mage.Sets/src/mage/sets/invasion/TrenchWurm.java +++ b/Mage.Sets/src/mage/sets/invasion/TrenchWurm.java @@ -41,7 +41,7 @@ import mage.target.common.TargetNonBasicLandPermanent; /** * - * @author anonymous + * @author michael.napoleon@gmail.com */ public class TrenchWurm extends CardImpl { From d012d2929152de70a6cb2a4fa2274a9c1aa6b5ba Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Thu, 5 Mar 2015 15:22:08 -0500 Subject: [PATCH 06/12] implemented cards Invasion:Scavenged Weaponry, Invasion:Cinder Shade and Invasion:Llanowar Knight --- .../src/mage/sets/invasion/CinderShade.java | 76 ++++++++++++++++++ .../mage/sets/invasion/LlanowarKnight.java | 73 +++++++++++++++++ .../mage/sets/invasion/ScavengedWeaponry.java | 80 +++++++++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/CinderShade.java create mode 100644 Mage.Sets/src/mage/sets/invasion/LlanowarKnight.java create mode 100644 Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java diff --git a/Mage.Sets/src/mage/sets/invasion/CinderShade.java b/Mage.Sets/src/mage/sets/invasion/CinderShade.java new file mode 100644 index 0000000000..5d109a4956 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/CinderShade.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.invasion; + +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.DamageTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +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 michael.napoleon@gmail.com + */ +public class CinderShade extends CardImpl { + + public CinderShade(UUID ownerId) { + super(ownerId, 240, "Cinder Shade", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); + this.expansionSetCode = "INV"; + this.subtype.add("Shade"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {B}: Cinder Shade gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{B}"))); + + // {R}, Sacrifice Cinder Shade: Cinder Shade deals damage equal to its power to target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(this.power.getValue()), new ManaCostsImpl("{R}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CinderShade(final CinderShade card) { + super(card); + } + + @Override + public CinderShade copy() { + return new CinderShade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/LlanowarKnight.java b/Mage.Sets/src/mage/sets/invasion/LlanowarKnight.java new file mode 100644 index 0000000000..2f2c33b0c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/LlanowarKnight.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.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class LlanowarKnight extends CardImpl { + + private static final FilterCard protectionFilter = new FilterCard("Black"); + + static { + protectionFilter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public LlanowarKnight(UUID ownerId) { + super(ownerId, 254, "Llanowar Knight", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}{W}"); + this.expansionSetCode = "INV"; + this.subtype.add("Elf"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Protection from black + this.addAbility(new ProtectionAbility(protectionFilter)); + + } + + public LlanowarKnight(final LlanowarKnight card) { + super(card); + } + + @Override + public LlanowarKnight copy() { + return new LlanowarKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java b/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.java new file mode 100644 index 0000000000..ff9f028b69 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/ScavengedWeaponry.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.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +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 michael.napoleon@gmail.com + */ +public class ScavengedWeaponry extends CardImpl { + + public ScavengedWeaponry(UUID ownerId) { + super(ownerId, 123, "Scavenged Weaponry", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Scavenged Weaponry enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); + + // Enchanted creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); + } + + public ScavengedWeaponry(final ScavengedWeaponry card) { + super(card); + } + + @Override + public ScavengedWeaponry copy() { + return new ScavengedWeaponry(this); + } +} From d88cd29f172e23462651df83d650ad7666e1bd75 Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Thu, 5 Mar 2015 21:00:56 -0500 Subject: [PATCH 07/12] implemented Invasion:Angelic Shield --- .../src/mage/sets/invasion/AngelicShield.java | 53 ++++++++++++++ .../mage/sets/venservskoth/AngelicShield.java | 72 +++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/AngelicShield.java create mode 100644 Mage.Sets/src/mage/sets/venservskoth/AngelicShield.java diff --git a/Mage.Sets/src/mage/sets/invasion/AngelicShield.java b/Mage.Sets/src/mage/sets/invasion/AngelicShield.java new file mode 100644 index 0000000000..22c18b7a32 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/AngelicShield.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.invasion; + +import java.util.UUID; + +/** + * + * @author michael.napoleon@gmail.com + + */ +public class AngelicShield extends mage.sets.venservskoth.AngelicShield { + + public AngelicShield(UUID ownerId) { + super(ownerId); + this.cardNumber = 228; + this.expansionSetCode = "INV"; + } + + public AngelicShield(final AngelicShield card) { + super(card); + } + + @Override + public AngelicShield copy() { + return new AngelicShield(this); + } +} diff --git a/Mage.Sets/src/mage/sets/venservskoth/AngelicShield.java b/Mage.Sets/src/mage/sets/venservskoth/AngelicShield.java new file mode 100644 index 0000000000..6591cc3dd1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/venservskoth/AngelicShield.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.venservskoth; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +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 michael.napoleon@gmail.com + + */ +public class AngelicShield extends CardImpl { + + public AngelicShield(UUID ownerId) { + super(ownerId, 27, "Angelic Shield", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}{U}"); + this.expansionSetCode = "DDI"; + + // Creatures you control get +0/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield))); + + // Sacrifice Angelic Shield: Return target creature to its owner's hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public AngelicShield(final AngelicShield card) { + super(card); + } + + @Override + public AngelicShield copy() { + return new AngelicShield(this); + } +} From 767c0de7fe771dc60506606b327078b90b5fd7bc Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Fri, 6 Mar 2015 10:29:25 -0500 Subject: [PATCH 08/12] Implemented Invasion:Backlash and fixed issue with Explosive Growth after class name change in other module --- .../src/mage/sets/invasion/Backlash.java | 97 +++++++++++++++++++ .../mage/sets/invasion/ExplosiveGrowth.java | 4 +- 2 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/invasion/Backlash.java diff --git a/Mage.Sets/src/mage/sets/invasion/Backlash.java b/Mage.Sets/src/mage/sets/invasion/Backlash.java new file mode 100644 index 0000000000..750bf8191f --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Backlash.java @@ -0,0 +1,97 @@ +/* + * 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.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author anonymous + */ +public class Backlash extends CardImpl { + + public Backlash(UUID ownerId) { + super(ownerId, 234, "Backlash", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{B}{R}"); + this.expansionSetCode = "INV"; + + // Tap target untapped creature. That creature deals damage equal to its power to its controller. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new BacklashEffect()); + } + + public Backlash(final Backlash card) { + super(card); + } + + @Override + public Backlash copy() { + return new Backlash(this); + } +} + +class BacklashEffect extends OneShotEffect { + + public BacklashEffect() { + super(Outcome.Detriment); + this.staticText = "Tap target untapped creature. That creature deals damage equal to its power to its controller."; + } + + public BacklashEffect(final BacklashEffect effect) { + super(effect); + } + + @Override + public BacklashEffect copy () { + return new BacklashEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + boolean applied = false; + Permanent targetCreature = game.getPermanent(targetPointer.getFirst(game, source)); + if (targetCreature != null) { + applied = targetCreature.tap(game); + Player controller = game.getPlayer(targetCreature.getControllerId()); + if (controller != null) { + controller.damage(targetCreature.getPower().getValue(), source.getSourceId(), game, false, true); + applied = true; + } + } + return applied; + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java b/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java index 143dd2ea2e..8862c23620 100644 --- a/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java +++ b/Mage.Sets/src/mage/sets/invasion/ExplosiveGrowth.java @@ -29,7 +29,7 @@ package mage.sets.invasion; import java.util.UUID; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -53,7 +53,7 @@ public class ExplosiveGrowth extends CardImpl { // Target creature gets +2/+2 until end of turn. If Explosive Growth was kicked, that creature gets +5/+5 until end of turn instead. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(5, 5, Duration.EndOfTurn), + this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(5, 5, Duration.EndOfTurn), new BoostTargetEffect(2, 2, Duration.EndOfTurn), KickedCondition.getInstance(), "Target creature gets +2/+2 until end of turn. If Explosive Growth was kicked, that creature gets +5/+5 until end of turn instead.")); } From a4327b4ddef89a4160b9900b1789704a0874dd8c Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Fri, 6 Mar 2015 10:58:30 -0500 Subject: [PATCH 09/12] implemented Invasion:Llanowar Cavalry and Invasion:Llanowar Elite --- .../src/mage/sets/invasion/Backlash.java | 2 +- .../mage/sets/invasion/LlanowarCavalry.java | 68 ++++++++++++++++ .../src/mage/sets/invasion/LlanowarElite.java | 79 +++++++++++++++++++ 3 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/sets/invasion/LlanowarCavalry.java create mode 100644 Mage.Sets/src/mage/sets/invasion/LlanowarElite.java diff --git a/Mage.Sets/src/mage/sets/invasion/Backlash.java b/Mage.Sets/src/mage/sets/invasion/Backlash.java index 750bf8191f..facde51c08 100644 --- a/Mage.Sets/src/mage/sets/invasion/Backlash.java +++ b/Mage.Sets/src/mage/sets/invasion/Backlash.java @@ -41,7 +41,7 @@ import mage.target.common.TargetCreaturePermanent; /** * - * @author anonymous + * @author michael.napoleon@gmail.com */ public class Backlash extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/invasion/LlanowarCavalry.java b/Mage.Sets/src/mage/sets/invasion/LlanowarCavalry.java new file mode 100644 index 0000000000..2cfbf23822 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/LlanowarCavalry.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.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class LlanowarCavalry extends CardImpl { + + public LlanowarCavalry(UUID ownerId) { + super(ownerId, 195, "Llanowar Cavalry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "INV"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // {W}: Llanowar Cavalry gains vigilance until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W}"))); + } + + public LlanowarCavalry(final LlanowarCavalry card) { + super(card); + } + + @Override + public LlanowarCavalry copy() { + return new LlanowarCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/LlanowarElite.java b/Mage.Sets/src/mage/sets/invasion/LlanowarElite.java new file mode 100644 index 0000000000..e400bcd307 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/LlanowarElite.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.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.KickerAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class LlanowarElite extends CardImpl { + + public LlanowarElite(UUID ownerId) { + super(ownerId, 196, "Llanowar Elite", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "INV"; + this.subtype.add("Elf"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Kicker {8} + this.addAbility(new KickerAbility("{8}")); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // If Llanowar Elite was kicked, it enters the battlefield with five +1/+1 counters on it. + Ability ability = new EntersBattlefieldAbility( + new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)), KickedCondition.getInstance(), ""), + "If Llanowar Elite was kicked, it enters the battlefield with five +1/+1 counters on it."); + this.addAbility(ability); + + } + + public LlanowarElite(final LlanowarElite card) { + super(card); + } + + @Override + public LlanowarElite copy() { + return new LlanowarElite(this); + } +} From 3669b3f82d08ea61c51dbf8bfdfea820b2955e95 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Fri, 6 Mar 2015 11:06:56 -0500 Subject: [PATCH 10/12] Implemented Invasion:Pincer Spider --- .../src/mage/sets/invasion/PincerSpider.java | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/PincerSpider.java diff --git a/Mage.Sets/src/mage/sets/invasion/PincerSpider.java b/Mage.Sets/src/mage/sets/invasion/PincerSpider.java new file mode 100644 index 0000000000..76102dbe94 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/PincerSpider.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.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.KickerAbility; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class PincerSpider extends CardImpl { + + public PincerSpider(UUID ownerId) { + super(ownerId, 201, "Pincer Spider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "INV"; + this.subtype.add("Spider"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Kicker {3} + this.addAbility(new KickerAbility("{3}")); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // If Pincer Spider was kicked, it enters the battlefield with a +1/+1 counter on it. + Ability ability = new EntersBattlefieldAbility( + new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), KickedCondition.getInstance(), ""), + "If Pincer Spider was kicked, it enters the battlefield with a +1/+1 counter on it."); + this.addAbility(ability); + + } + + public PincerSpider(final PincerSpider card) { + super(card); + } + + @Override + public PincerSpider copy() { + return new PincerSpider(this); + } +} From 00c1441001a9cc238d3cd0aaa2f0d8910c4b9db9 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Fri, 6 Mar 2015 14:33:18 -0500 Subject: [PATCH 11/12] implemented Invasion:Duskwalker --- .../src/mage/sets/invasion/Duskwalker.java | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/Duskwalker.java diff --git a/Mage.Sets/src/mage/sets/invasion/Duskwalker.java b/Mage.Sets/src/mage/sets/invasion/Duskwalker.java new file mode 100644 index 0000000000..85f0a2be39 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Duskwalker.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.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; + +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.KickedCondition;; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FearAbility; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class Duskwalker extends CardImpl { + + public Duskwalker(UUID ownerId) { + super(ownerId, 104, "Duskwalker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Human"); + this.subtype.add("Minion"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Kicker {3}{B} + this.addAbility(new KickerAbility("{3}{B}")); + + // If Duskwalker was kicked, it enters the battlefield with two +1/+1 counters on it and with fear. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2))), + KickedCondition.getInstance(),"If Duskwalker was kicked, it enters the battlefield with two +1/+1 counters on it and with fear."); + ability.addEffect(new GainAbilitySourceEffect(FearAbility.getInstance(), Duration.WhileOnBattlefield)); + this.addAbility(ability); + } + + public Duskwalker(final Duskwalker card) { + super(card); + } + + @Override + public Duskwalker copy() { + return new Duskwalker(this); + } +} + From f392e3b1257eeadd9e5828ced5f3d2ac2bf8d437 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Fri, 6 Mar 2015 15:00:52 -0500 Subject: [PATCH 12/12] implemented Invasion:Galinas Knight --- .../src/mage/sets/invasion/GalinasKnight.java | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/GalinasKnight.java diff --git a/Mage.Sets/src/mage/sets/invasion/GalinasKnight.java b/Mage.Sets/src/mage/sets/invasion/GalinasKnight.java new file mode 100644 index 0000000000..6f0a882934 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/GalinasKnight.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.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class GalinasKnight extends CardImpl { + + private static final FilterCard protectionFilter = new FilterCard("Red"); + + static { + protectionFilter.add(new ColorPredicate(ObjectColor.RED)); + } + + public GalinasKnight(UUID ownerId) { + super(ownerId, 248, "Galina's Knight", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}{U}"); + this.expansionSetCode = "INV"; + this.subtype.add("Merfolk"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Protection from red + this.addAbility(new ProtectionAbility(protectionFilter)); + } + + public GalinasKnight(final GalinasKnight card) { + super(card); + } + + @Override + public GalinasKnight copy() { + return new GalinasKnight(this); + } +}