From d2d4823f7f1a00e619a1cad80f6d02c05b61ee73 Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Sun, 1 Mar 2015 19:42:33 -0500 Subject: [PATCH 01/10] initial commit of Firescreamer, Marauding Knight and Serpentine Kavu for Invasion set --- .../src/mage/sets/invasion/Firescreamer.java | 66 ++++++++++++++++ .../mage/sets/invasion/MaraudingKnight.java | 78 +++++++++++++++++++ .../mage/sets/invasion/SerpentineKavu.java | 60 ++++++++++++++ 3 files changed, 204 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/Firescreamer.java create mode 100644 Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java create mode 100644 Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java diff --git a/Mage.Sets/src/mage/sets/invasion/Firescreamer.java b/Mage.Sets/src/mage/sets/invasion/Firescreamer.java new file mode 100644 index 0000000000..98c387416a --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Firescreamer.java @@ -0,0 +1,66 @@ +/* + * 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.ReturnToHandSourceEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class Firescreamer extends CardImpl { + + public Firescreamer(UUID ownerId) { + super(ownerId, 106, "Firescreamer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Kavu"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {R}: Firescreamer gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(+1, 0), new ManaCostsImpl("{R}"))); + } + + public Firescreamer(final Firescreamer card) { + super(card); + } + + @Override + public Firescreamer copy() { + return new Firescreamer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java new file mode 100644 index 0000000000..47dca3e0cd --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java @@ -0,0 +1,78 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.common.FilterLandPermanent; + +/** + * + * @author michael.napoleon@gmail.com + */ +public class MaraudingKnight extends CardImpl { + + private static final FilterCard filterWhite = new FilterCard("White"); + private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains you control"); + + public MaraudingKnight(UUID ownerId) { + super(ownerId, 110, "Marauding Knight", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Zombie"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Protection from white + this.addAbility(new ProtectionAbility(filterWhite)); + + // Marauding Knight gets +1/+1 for each Plains your opponents control. + PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterPlains, 1); + SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); + ability.addEffect(new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)); + this.addAbility(ability); + } + + public MaraudingKnight(final MaraudingKnight card) { + super(card); + } + + @Override + public MaraudingKnight copy() { + return new MaraudingKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java b/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java new file mode 100644 index 0000000000..a27842cf65 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java @@ -0,0 +1,60 @@ +/* + * 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.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author anonymous + */ +public class SerpentineKavu extends CardImpl { + + public SerpentineKavu(UUID ownerId) { + super(ownerId, 211, "Serpentine Kavu", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "INV"; + this.subtype.add("Kavu"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {R}: Serpentine Kavu gains haste until end of turn. + } + + public SerpentineKavu(final SerpentineKavu card) { + super(card); + } + + @Override + public SerpentineKavu copy() { + return new SerpentineKavu(this); + } +} From 4436acd05f8d2a41789d96962797b02c073142f0 Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Sun, 1 Mar 2015 21:10:50 -0500 Subject: [PATCH 02/10] changes to Firescreamer and Serpentine Kavu --- Mage.Sets/src/mage/sets/invasion/Firescreamer.java | 4 +++- Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/invasion/Firescreamer.java b/Mage.Sets/src/mage/sets/invasion/Firescreamer.java index 98c387416a..b4dead2a56 100644 --- a/Mage.Sets/src/mage/sets/invasion/Firescreamer.java +++ b/Mage.Sets/src/mage/sets/invasion/Firescreamer.java @@ -33,8 +33,10 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; +import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; @@ -52,7 +54,7 @@ public class Firescreamer extends CardImpl { this.toughness = new MageInt(2); // {R}: Firescreamer gets +1/+0 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(+1, 0), new ManaCostsImpl("{R}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); } public Firescreamer(final Firescreamer card) { diff --git a/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java b/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java index a27842cf65..e56c119c8a 100644 --- a/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java +++ b/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java @@ -29,9 +29,15 @@ 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.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.constants.CardType; +import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.Zone; /** * @@ -47,6 +53,7 @@ public class SerpentineKavu extends CardImpl { this.toughness = new MageInt(4); // {R}: Serpentine Kavu gains haste until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"))); } public SerpentineKavu(final SerpentineKavu card) { From b2afd4de29657357df27e28abd351ccb1003504e Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Mon, 2 Mar 2015 10:06:58 -0500 Subject: [PATCH 03/10] finished Marauding Knight and Crusasing Knight --- .../mage/sets/invasion/CrusadingKnight.java | 80 +++++++++++++++++++ .../mage/sets/invasion/MaraudingKnight.java | 7 +- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java diff --git a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java new file mode 100644 index 0000000000..f8bb05a5d0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.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.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author anonymous + */ +public class CrusadingKnight extends CardImpl { + + private static final FilterCard filterBlack = new FilterCard("Black"); + private static final FilterLandPermanent filterSwamps = new FilterLandPermanent("Swamps your opponent controls"); + static { + filterSwamps.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public CrusadingKnight(UUID ownerId) { + super(ownerId, 12, "Crusading Knight", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "INV"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Protection from black + this.addAbility(new ProtectionAbility(filterBlack)); + + // Crusading Knight gets +1/+1 for each Swamp your opponents control. + PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterSwamps, 1); + SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); + this.addAbility(ability); + } + + public CrusadingKnight(final CrusadingKnight card) { + super(card); + } + + @Override + public CrusadingKnight copy() { + return new CrusadingKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java index 47dca3e0cd..a295fc041c 100644 --- a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; /** * @@ -47,7 +48,10 @@ import mage.filter.common.FilterLandPermanent; public class MaraudingKnight extends CardImpl { private static final FilterCard filterWhite = new FilterCard("White"); - private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains you control"); + private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains your opponent controls"); + static { + filterPlains.add(new ControllerPredicate(TargetController.OPPONENT)); + } public MaraudingKnight(UUID ownerId) { super(ownerId, 110, "Marauding Knight", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); @@ -63,7 +67,6 @@ public class MaraudingKnight extends CardImpl { // Marauding Knight gets +1/+1 for each Plains your opponents control. PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterPlains, 1); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); - ability.addEffect(new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)); this.addAbility(ability); } From 146aeac461c93b52a87d3b8af5067f4f29cab60f Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Mon, 2 Mar 2015 10:09:16 -0500 Subject: [PATCH 04/10] removed unused imports --- Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java | 1 - Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java index f8bb05a5d0..c30a860df7 100644 --- a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java @@ -32,7 +32,6 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continious.BoostEnchantedEffect; -import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; diff --git a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java index a295fc041c..19e8a2d0a2 100644 --- a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java @@ -32,8 +32,6 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continious.BoostEnchantedEffect; -import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; -import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; From 43c02dd6c4cf7f35273a6771d1227b686a47a66e Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Mon, 2 Mar 2015 10:21:42 -0500 Subject: [PATCH 05/10] implemented Stun --- Mage.Sets/src/mage/sets/invasion/Stun.java | 52 ++++++++++++++++ Mage.Sets/src/mage/sets/tempest/Stun.java | 69 ++++++++++++++++++++++ Mage.Sets/src/mage/sets/tenth/Stun.java | 52 ++++++++++++++++ 3 files changed, 173 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/Stun.java create mode 100644 Mage.Sets/src/mage/sets/tempest/Stun.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Stun.java diff --git a/Mage.Sets/src/mage/sets/invasion/Stun.java b/Mage.Sets/src/mage/sets/invasion/Stun.java new file mode 100644 index 0000000000..3430f5fac0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Stun.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.invasion; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class Stun extends mage.sets.tempest.Stun { + + public Stun(UUID ownerId) { + super(ownerId); + this.cardNumber = 172; + this.expansionSetCode = "INV"; + } + + public Stun(final Stun card) { + super(card); + } + + @Override + public Stun copy() { + return new Stun(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/Stun.java b/Mage.Sets/src/mage/sets/tempest/Stun.java new file mode 100644 index 0000000000..9275be39a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/Stun.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.tempest; + +import java.util.UUID; + +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +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 Stun extends CardImpl { + + public Stun(UUID ownerId) { + super(ownerId, 207, "Stun", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "TMP"; + + // Target creature can't block this turn. + Effect effect = new CantBlockTargetEffect(Duration.EndOfTurn); + effect.setText("Target creature can't block this turn."); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Stun(final Stun card) { + super(card); + } + + @Override + public Stun copy() { + return new Stun(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/Stun.java b/Mage.Sets/src/mage/sets/tenth/Stun.java new file mode 100644 index 0000000000..0d5be43e29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Stun.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tenth; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class Stun extends mage.sets.tempest.Stun { + + public Stun(UUID ownerId) { + super(ownerId); + this.cardNumber = 240; + this.expansionSetCode = "10E"; + } + + public Stun(final Stun card) { + super(card); + } + + @Override + public Stun copy() { + return new Stun(this); + } +} From a3003c9f876fa7ae339009441ddf9a2dfbc2e941 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Mon, 2 Mar 2015 10:46:51 -0500 Subject: [PATCH 06/10] implemented Capashen Unicorn --- .../mage/sets/invasion/CapashenUnicorn.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java diff --git a/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java b/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java new file mode 100644 index 0000000000..acf6d799e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java @@ -0,0 +1,82 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.invasion; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +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.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author anonymous + */ +public class CapashenUnicorn extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment"); + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); + } + + public CapashenUnicorn(UUID ownerId) { + super(ownerId, 10, "Capashen Unicorn", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "INV"; + this.subtype.add("Unicorn"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {1}{W}, {tap}, Sacrifice Capashen Unicorn: Destroy target artifact or enchantment. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl<>("{W}{1}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public CapashenUnicorn(final CapashenUnicorn card) { + super(card); + } + + @Override + public CapashenUnicorn copy() { + return new CapashenUnicorn(this); + } +} From 801103bbdac9ba6da972f402eff8e8aa4255b1dc Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Mon, 2 Mar 2015 21:51:32 -0500 Subject: [PATCH 07/10] fixed imports after package name changes --- Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java | 2 +- Mage.Sets/src/mage/sets/invasion/Firescreamer.java | 4 +--- Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java | 2 +- Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java index c30a860df7..87c101ce4d 100644 --- a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; diff --git a/Mage.Sets/src/mage/sets/invasion/Firescreamer.java b/Mage.Sets/src/mage/sets/invasion/Firescreamer.java index b4dead2a56..bd13a4e7d9 100644 --- a/Mage.Sets/src/mage/sets/invasion/Firescreamer.java +++ b/Mage.Sets/src/mage/sets/invasion/Firescreamer.java @@ -31,9 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ReturnToHandSourceEffect; -import mage.abilities.effects.common.continious.BoostEnchantedEffect; -import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; diff --git a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java index 19e8a2d0a2..1f09d0f9bc 100644 --- a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; diff --git a/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java b/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java index e56c119c8a..76eadbbe54 100644 --- a/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java +++ b/Mage.Sets/src/mage/sets/invasion/SerpentineKavu.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.constants.CardType; From 4d6dce82bc948bac95f8be19689798e4548eec11 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Tue, 3 Mar 2015 13:32:11 -0500 Subject: [PATCH 08/10] finished implementing Capashen Unicorn, Crusading Knight, Marauding Knight and Stun --- Mage.Client/test.dck | 37 +++++++++++++++++++ .../mage/sets/invasion/CapashenUnicorn.java | 6 +-- .../mage/sets/invasion/CrusadingKnight.java | 7 +++- .../mage/sets/invasion/MaraudingKnight.java | 6 ++- Mage.Sets/src/mage/sets/tempest/Stun.java | 5 ++- 5 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 Mage.Client/test.dck diff --git a/Mage.Client/test.dck b/Mage.Client/test.dck new file mode 100644 index 0000000000..3640ae4769 --- /dev/null +++ b/Mage.Client/test.dck @@ -0,0 +1,37 @@ +NAME:Boros Battalion +1 [GTC:200] Sunhome Guildmage +1 [GTC:102] Mugging +2 [GTC:227] Boros Keyrune +1 [GTC:163] Firemane Avenger +1 [GTC:1] Aerial Maneuver +1 [GTC:90] Firefist Striker +2 [M13:122] Canyon Minotaur +1 [GTC:86] Bomber Corps +1 [GTC:239] Boros Guildgate +1 [GTC:99] Mark for Death +3 [RTR:266] Mountain +3 [RTR:265] Mountain +2 [GTC:197] Skyknight Legionnaire +1 [GTC:8] Court Street Denizen +2 [RTR:269] Mountain +2 [RTR:268] Mountain +2 [RTR:267] Mountain +1 [GTC:89] Ember Beast +2 [GTC:211] Arrows of Justice +1 [GTC:23] Righteous Charge +1 [GTC:24] Shielded Passage +2 [M13:40] Warclamp Mastiff +1 [GTC:184] Ordruun Veteran +3 [RTR:250] Plains +2 [GTC:111] Warmind Infantry +3 [RTR:251] Plains +1 [GTC:226] Armored Transport +1 [GTC:165] Foundry Champion +2 [GTC:164] Fortress Cyclops +3 [GTC:208] Wojek Halberdiers +2 [GTC:9] Daring Skyjek +1 [GTC:85] Act of Treason +2 [RTR:253] Plains +1 [GTC:7] Boros Elite +2 [RTR:252] Plains +2 [RTR:254] Plains diff --git a/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java b/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java index acf6d799e1..0234a0e83d 100644 --- a/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java +++ b/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java @@ -31,7 +31,6 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -53,7 +52,8 @@ public class CapashenUnicorn extends CardImpl { private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment"); static { - filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.ENCHANTMENT))); } public CapashenUnicorn(UUID ownerId) { @@ -64,7 +64,7 @@ public class CapashenUnicorn extends CardImpl { this.toughness = new MageInt(2); // {1}{W}, {tap}, Sacrifice Capashen Unicorn: Destroy target artifact or enchantment. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl<>("{W}{1}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java index 87c101ce4d..7feb0ef233 100644 --- a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java @@ -32,11 +32,13 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; /** @@ -46,8 +48,9 @@ import mage.filter.predicate.permanent.ControllerPredicate; public class CrusadingKnight extends CardImpl { private static final FilterCard filterBlack = new FilterCard("Black"); - private static final FilterLandPermanent filterSwamps = new FilterLandPermanent("Swamps your opponent controls"); + private static final FilterLandPermanent filterSwamps = new FilterLandPermanent("Swamp your opponent controls"); static { + filterSwamps.add(new SubtypePredicate("Swamp")); filterSwamps.add(new ControllerPredicate(TargetController.OPPONENT)); } @@ -64,7 +67,7 @@ public class CrusadingKnight extends CardImpl { // Crusading Knight gets +1/+1 for each Swamp your opponents control. PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterSwamps, 1); - SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); + SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java index 1f09d0f9bc..df93347d43 100644 --- a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java @@ -29,14 +29,17 @@ package mage.sets.invasion; import java.util.UUID; import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; /** @@ -48,6 +51,7 @@ public class MaraudingKnight extends CardImpl { private static final FilterCard filterWhite = new FilterCard("White"); private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains your opponent controls"); static { + filterPlains.add(new SubtypePredicate("Plains")); filterPlains.add(new ControllerPredicate(TargetController.OPPONENT)); } @@ -64,7 +68,7 @@ public class MaraudingKnight extends CardImpl { // Marauding Knight gets +1/+1 for each Plains your opponents control. PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterPlains, 1); - SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); + SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/tempest/Stun.java b/Mage.Sets/src/mage/sets/tempest/Stun.java index 9275be39a8..82cc6f5cb7 100644 --- a/Mage.Sets/src/mage/sets/tempest/Stun.java +++ b/Mage.Sets/src/mage/sets/tempest/Stun.java @@ -28,6 +28,7 @@ package mage.sets.tempest; import java.util.UUID; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -53,9 +54,9 @@ public class Stun extends CardImpl { effect.setText("Target creature can't block this turn."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - + // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } public Stun(final Stun card) { From bec92c65750badcd6568be361eb3b8f48503f204 Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Tue, 3 Mar 2015 13:36:50 -0500 Subject: [PATCH 09/10] Delete test.dck added to repo by mistake. removing --- Mage.Client/test.dck | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 Mage.Client/test.dck diff --git a/Mage.Client/test.dck b/Mage.Client/test.dck deleted file mode 100644 index 3640ae4769..0000000000 --- a/Mage.Client/test.dck +++ /dev/null @@ -1,37 +0,0 @@ -NAME:Boros Battalion -1 [GTC:200] Sunhome Guildmage -1 [GTC:102] Mugging -2 [GTC:227] Boros Keyrune -1 [GTC:163] Firemane Avenger -1 [GTC:1] Aerial Maneuver -1 [GTC:90] Firefist Striker -2 [M13:122] Canyon Minotaur -1 [GTC:86] Bomber Corps -1 [GTC:239] Boros Guildgate -1 [GTC:99] Mark for Death -3 [RTR:266] Mountain -3 [RTR:265] Mountain -2 [GTC:197] Skyknight Legionnaire -1 [GTC:8] Court Street Denizen -2 [RTR:269] Mountain -2 [RTR:268] Mountain -2 [RTR:267] Mountain -1 [GTC:89] Ember Beast -2 [GTC:211] Arrows of Justice -1 [GTC:23] Righteous Charge -1 [GTC:24] Shielded Passage -2 [M13:40] Warclamp Mastiff -1 [GTC:184] Ordruun Veteran -3 [RTR:250] Plains -2 [GTC:111] Warmind Infantry -3 [RTR:251] Plains -1 [GTC:226] Armored Transport -1 [GTC:165] Foundry Champion -2 [GTC:164] Fortress Cyclops -3 [GTC:208] Wojek Halberdiers -2 [GTC:9] Daring Skyjek -1 [GTC:85] Act of Treason -2 [RTR:253] Plains -1 [GTC:7] Boros Elite -2 [RTR:252] Plains -2 [RTR:254] Plains From 089e37aac684c03a47cfc373638e61548ad0e984 Mon Sep 17 00:00:00 2001 From: Michael Napoleon Date: Tue, 3 Mar 2015 18:28:11 -0500 Subject: [PATCH 10/10] fixed color filters on Crusading Knight and Marauding Knight --- .../src/mage/sets/invasion/CrusadingKnight.java | 16 +++++++++------- .../src/mage/sets/invasion/MaraudingKnight.java | 17 +++++++++-------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java index 7feb0ef233..bdfb73f795 100644 --- a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java @@ -29,15 +29,16 @@ package mage.sets.invasion; import java.util.UUID; import mage.MageInt; +import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; @@ -47,11 +48,12 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class CrusadingKnight extends CardImpl { - private static final FilterCard filterBlack = new FilterCard("Black"); - private static final FilterLandPermanent filterSwamps = new FilterLandPermanent("Swamp your opponent controls"); + private static final FilterCard protectionFilter = new FilterCard("Black"); + private static final FilterLandPermanent swampFilter = new FilterLandPermanent("Swamp your opponent controls"); static { - filterSwamps.add(new SubtypePredicate("Swamp")); - filterSwamps.add(new ControllerPredicate(TargetController.OPPONENT)); + protectionFilter.add(new ColorPredicate(ObjectColor.BLACK)); + swampFilter.add(new SubtypePredicate("Swamp")); + swampFilter.add(new ControllerPredicate(TargetController.OPPONENT)); } public CrusadingKnight(UUID ownerId) { @@ -63,10 +65,10 @@ public class CrusadingKnight extends CardImpl { this.toughness = new MageInt(2); // Protection from black - this.addAbility(new ProtectionAbility(filterBlack)); + this.addAbility(new ProtectionAbility(protectionFilter)); // Crusading Knight gets +1/+1 for each Swamp your opponents control. - PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterSwamps, 1); + PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(swampFilter, 1); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java index df93347d43..fc20c7ffbf 100644 --- a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java @@ -29,16 +29,16 @@ package mage.sets.invasion; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; +import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; @@ -48,11 +48,12 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class MaraudingKnight extends CardImpl { - private static final FilterCard filterWhite = new FilterCard("White"); - private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains your opponent controls"); + private static final FilterCard protectionFilter = new FilterCard("White"); + private static final FilterLandPermanent plainsFilter = new FilterLandPermanent("Plains your opponent controls"); static { - filterPlains.add(new SubtypePredicate("Plains")); - filterPlains.add(new ControllerPredicate(TargetController.OPPONENT)); + protectionFilter.add(new ColorPredicate(ObjectColor.WHITE)); + plainsFilter.add(new SubtypePredicate("Plains")); + plainsFilter.add(new ControllerPredicate(TargetController.OPPONENT)); } public MaraudingKnight(UUID ownerId) { @@ -64,10 +65,10 @@ public class MaraudingKnight extends CardImpl { this.toughness = new MageInt(2); // Protection from white - this.addAbility(new ProtectionAbility(filterWhite)); + this.addAbility(new ProtectionAbility(protectionFilter)); // Marauding Knight gets +1/+1 for each Plains your opponents control. - PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterPlains, 1); + PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(plainsFilter, 1); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield)); this.addAbility(ability); }