From 74397dbaed5ad97d174b92c64cecd675b67d75b7 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 15 Jul 2015 08:04:36 +0300 Subject: [PATCH 01/10] Fix PermanentsTargetOpponentControlsCount --- .../common/PermanentsTargetOpponentControlsCount.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java index f1f7ef9b874..20ac6b22b9a 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java +++ b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java @@ -26,7 +26,7 @@ public class PermanentsTargetOpponentControlsCount implements DynamicValue { } public PermanentsTargetOpponentControlsCount(FilterPermanent filter, Integer multiplier) { - this.filter = filter; + this.filter = filter.copy(); this.multiplier = multiplier; } From 650ba2cba7f4e6a77be48ad7eb3db541ef09af90 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 15 Jul 2015 08:04:58 +0300 Subject: [PATCH 02/10] Implement cards: Aurora Griffin, Escape Routes, Honorable Scout, and Phyrexian Bloodstock --- .../mage/sets/planeshift/AuroraGriffin.java | 75 +++++++++++++++++ .../mage/sets/planeshift/EscapeRoutes.java | 78 ++++++++++++++++++ .../mage/sets/planeshift/HonorableScout.java | 80 +++++++++++++++++++ .../sets/planeshift/PhyrexianBloodstock.java | 76 ++++++++++++++++++ 4 files changed, 309 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planeshift/AuroraGriffin.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/EscapeRoutes.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/HonorableScout.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/PhyrexianBloodstock.java diff --git a/Mage.Sets/src/mage/sets/planeshift/AuroraGriffin.java b/Mage.Sets/src/mage/sets/planeshift/AuroraGriffin.java new file mode 100644 index 00000000000..251546109d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/AuroraGriffin.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planeshift; + +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.BecomesColorTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class AuroraGriffin extends CardImpl { + + public AuroraGriffin(UUID ownerId) { + super(ownerId, 2, "Aurora Griffin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Griffin"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {W}: Target permanent becomes white until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorTargetEffect(ObjectColor.WHITE, + Duration.EndOfTurn), new ManaCostsImpl("{W}")); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public AuroraGriffin(final AuroraGriffin card) { + super(card); + } + + @Override + public AuroraGriffin copy() { + return new AuroraGriffin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/EscapeRoutes.java b/Mage.Sets/src/mage/sets/planeshift/EscapeRoutes.java new file mode 100644 index 00000000000..e39db8fd8e7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/EscapeRoutes.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.planeshift; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class EscapeRoutes extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white or black creature you control"); + + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.WHITE), new ColorPredicate(ObjectColor.BLACK))); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public EscapeRoutes(UUID ownerId) { + super(ownerId, 25, "Escape Routes", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "PLS"; + + // {2}{U}: Return target white or black creature you control to its owner's hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{2}{U}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public EscapeRoutes(final EscapeRoutes card) { + super(card); + } + + @Override + public EscapeRoutes copy() { + return new EscapeRoutes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/HonorableScout.java b/Mage.Sets/src/mage/sets/planeshift/HonorableScout.java new file mode 100644 index 00000000000..97d924c4c29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/HonorableScout.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.planeshift; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class HonorableScout extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black and/or red creature"); + + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.RED))); + } + + public HonorableScout(UUID ownerId) { + super(ownerId, 8, "Honorable Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Scout"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Honorable Scout enters the battlefield, you gain 2 life for each black and/or red creature target opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(new PermanentsTargetOpponentControlsCount(filter, 2))); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public HonorableScout(final HonorableScout card) { + super(card); + } + + @Override + public HonorableScout copy() { + return new HonorableScout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/PhyrexianBloodstock.java b/Mage.Sets/src/mage/sets/planeshift/PhyrexianBloodstock.java new file mode 100644 index 00000000000..71027519ae0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/PhyrexianBloodstock.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.planeshift; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class PhyrexianBloodstock extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public PhyrexianBloodstock(UUID ownerId) { + super(ownerId, 50, "Phyrexian Bloodstock", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Zombie"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Phyrexian Bloodstock leaves the battlefield, destroy target white creature. It can't be regenerated. + Ability ability = new LeavesBattlefieldTriggeredAbility(new DestroyTargetEffect(true), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public PhyrexianBloodstock(final PhyrexianBloodstock card) { + super(card); + } + + @Override + public PhyrexianBloodstock copy() { + return new PhyrexianBloodstock(this); + } +} From a53f9a3735a32dec7e547c5d0f6362f2fecaf7c8 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 15 Jul 2015 11:02:55 +0300 Subject: [PATCH 03/10] Implement cards: Exotic Disease, Mire Kavu, Pygmy Kavu, and Quirion Explorer --- .../mage/sets/planeshift/ExoticDisease.java | 69 +++++++++++++++++ .../src/mage/sets/planeshift/MireKavu.java | 72 ++++++++++++++++++ .../src/mage/sets/planeshift/PygmyKavu.java | 76 +++++++++++++++++++ .../mage/sets/planeshift/QuirionExplorer.java | 64 ++++++++++++++++ 4 files changed, 281 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planeshift/ExoticDisease.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/MireKavu.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/PygmyKavu.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java diff --git a/Mage.Sets/src/mage/sets/planeshift/ExoticDisease.java b/Mage.Sets/src/mage/sets/planeshift/ExoticDisease.java new file mode 100644 index 00000000000..3b453b32b4d --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/ExoticDisease.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.planeshift; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.DomainValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author LoneFox + */ +public class ExoticDisease extends CardImpl { + + public ExoticDisease(UUID ownerId) { + super(ownerId, 43, "Exotic Disease", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{B}"); + this.expansionSetCode = "PLS"; + + // Domain - Target player loses X life and you gain X life, where X is the number of basic land types among lands you control. + DomainValue dv = new DomainValue(); + Effect effect = new LoseLifeTargetEffect(dv); + effect.setText("Domain - Target player loses X life"); + this.getSpellAbility().addEffect(effect); + effect = new GainLifeEffect(dv); + effect.setText("and you gain X life, where X is the number of basic land types among lands you control"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public ExoticDisease(final ExoticDisease card) { + super(card); + } + + @Override + public ExoticDisease copy() { + return new ExoticDisease(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/MireKavu.java b/Mage.Sets/src/mage/sets/planeshift/MireKavu.java new file mode 100644 index 00000000000..4833b72e1f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/MireKavu.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.planeshift; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class MireKavu extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Swamp"); + + static { + filter.add(new SubtypePredicate("Swamp")); + } + + public MireKavu(UUID ownerId) { + super(ownerId, 67, "Mire Kavu", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Kavu"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Mire Kavu gets +1/+1 as long as you control a Swamp. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filter, 1, 1))); + } + + public MireKavu(final MireKavu card) { + super(card); + } + + @Override + public MireKavu copy() { + return new MireKavu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/PygmyKavu.java b/Mage.Sets/src/mage/sets/planeshift/PygmyKavu.java new file mode 100644 index 00000000000..4cba0900000 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/PygmyKavu.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.planeshift; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LoneFox + */ +public class PygmyKavu extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creature your opponents control"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public PygmyKavu(UUID ownerId) { + super(ownerId, 88, "Pygmy Kavu", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Kavu"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // When Pygmy Kavu enters the battlefield, draw a card for each black creature your opponents control. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)))); + } + + public PygmyKavu(final PygmyKavu card) { + super(card); + } + + @Override + public PygmyKavu copy() { + return new PygmyKavu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java b/Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java new file mode 100644 index 00000000000..bccab7725ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/QuirionExplorer.java @@ -0,0 +1,64 @@ +/* + * 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.planeshift; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class QuirionExplorer extends CardImpl { + + public QuirionExplorer(UUID ownerId) { + super(ownerId, 90, "Quirion Explorer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Elf"); + this.subtype.add("Druid"); + this.subtype.add("Scout"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. + this.addAbility(new AnyColorOpponentLandsProduceManaAbility()); + } + + public QuirionExplorer(final QuirionExplorer card) { + super(card); + } + + @Override + public QuirionExplorer copy() { + return new QuirionExplorer(this); + } +} From 0a5c152db24711e3f382d7334c9a1fa6e91362a4 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 16 Jul 2015 08:57:14 +0300 Subject: [PATCH 04/10] Implement cards: Death Bomb, Ertai's Trickery, Shriek of Death, and Skyshroud Blessing --- .../src/mage/sets/planeshift/DeathBomb.java | 76 ++++++++++++++++ .../mage/sets/planeshift/ErtaisTrickery.java | 91 +++++++++++++++++++ .../mage/sets/planeshift/ShriekOfDread.java | 62 +++++++++++++ .../sets/planeshift/SkyshroudBlessing.java | 65 +++++++++++++ 4 files changed, 294 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planeshift/DeathBomb.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/ErtaisTrickery.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/ShriekOfDread.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/SkyshroudBlessing.java diff --git a/Mage.Sets/src/mage/sets/planeshift/DeathBomb.java b/Mage.Sets/src/mage/sets/planeshift/DeathBomb.java new file mode 100644 index 00000000000..8266d993c30 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/DeathBomb.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.planeshift; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.LoseLifeTargetControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DeathBomb extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public DeathBomb(UUID ownerId) { + super(ownerId, 41, "Death Bomb", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{B}"); + this.expansionSetCode = "PLS"; + + // As an additional cost to cast Death Bomb, sacrifice a creature. + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("a creature"), true))); + // Destroy target nonblack creature. It can't be regenerated. Its controller loses 2 life. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(2)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public DeathBomb(final DeathBomb card) { + super(card); + } + + @Override + public DeathBomb copy() { + return new DeathBomb(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/ErtaisTrickery.java b/Mage.Sets/src/mage/sets/planeshift/ErtaisTrickery.java new file mode 100644 index 00000000000..7018891526b --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/ErtaisTrickery.java @@ -0,0 +1,91 @@ +/* + * 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.planeshift; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.target.TargetSpell; + +/** + * + * @author LoneFox + */ +public class ErtaisTrickery extends CardImpl { + + public ErtaisTrickery(UUID ownerId) { + super(ownerId, 24, "Ertai's Trickery", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "PLS"; + + // Counter target spell if it was kicked. + this.getSpellAbility().addEffect(new ErtaisTrickeryEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public ErtaisTrickery(final ErtaisTrickery card) { + super(card); + } + + @Override + public ErtaisTrickery copy() { + return new ErtaisTrickery(this); + } +} + +class ErtaisTrickeryEffect extends CounterTargetEffect { + + public ErtaisTrickeryEffect() { + super(); + staticText = "Counter target spell if it was kicked."; + } + + public ErtaisTrickeryEffect(final CounterTargetEffect effect) { + super(effect); + } + + @Override + public ErtaisTrickeryEffect copy() { + return new ErtaisTrickeryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell targetSpell = game.getStack().getSpell(source.getFirstTarget()); + if(targetSpell != null && KickedCondition.getInstance().apply(game, targetSpell.getSpellAbility())) { + return super.apply(game, source); + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/planeshift/ShriekOfDread.java b/Mage.Sets/src/mage/sets/planeshift/ShriekOfDread.java new file mode 100644 index 00000000000..769e10d3d32 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/ShriekOfDread.java @@ -0,0 +1,62 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planeshift; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FearAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ShriekOfDread extends CardImpl { + + public ShriekOfDread(UUID ownerId) { + super(ownerId, 53, "Shriek of Dread", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "PLS"; + + // Target creature gains fear until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ShriekOfDread(final ShriekOfDread card) { + super(card); + } + + @Override + public ShriekOfDread copy() { + return new ShriekOfDread(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/SkyshroudBlessing.java b/Mage.Sets/src/mage/sets/planeshift/SkyshroudBlessing.java new file mode 100644 index 00000000000..decb8652a7b --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/SkyshroudBlessing.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planeshift; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterLandPermanent; + +/** + * + * @author LoneFox + */ +public class SkyshroudBlessing extends CardImpl { + + public SkyshroudBlessing(UUID ownerId) { + super(ownerId, 92, "Skyshroud Blessing", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "PLS"; + + // Lands gain shroud until end of turn. + this.getSpellAbility().addEffect(new GainAbilityAllEffect(ShroudAbility.getInstance(), + Duration.EndOfTurn, new FilterLandPermanent("all lands"))); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public SkyshroudBlessing(final SkyshroudBlessing card) { + super(card); + } + + @Override + public SkyshroudBlessing copy() { + return new SkyshroudBlessing(this); + } +} From 3149cd810fa0cc253d79d8b4ffa9e50961dac9dd Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 16 Jul 2015 09:30:02 +0300 Subject: [PATCH 05/10] Implement cards: Kavu Recluse, Reef Shaman, Sea Snidd, and Slimy Kavu --- .../src/mage/sets/apocalypse/ReefShaman.java | 72 +++++++++++++++++++ .../src/mage/sets/invasion/SlimyKavu.java | 70 ++++++++++++++++++ .../src/mage/sets/planeshift/KavuRecluse.java | 70 ++++++++++++++++++ .../src/mage/sets/planeshift/SeaSnidd.java | 71 ++++++++++++++++++ 4 files changed, 283 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/apocalypse/ReefShaman.java create mode 100644 Mage.Sets/src/mage/sets/invasion/SlimyKavu.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/KavuRecluse.java create mode 100644 Mage.Sets/src/mage/sets/planeshift/SeaSnidd.java diff --git a/Mage.Sets/src/mage/sets/apocalypse/ReefShaman.java b/Mage.Sets/src/mage/sets/apocalypse/ReefShaman.java new file mode 100644 index 00000000000..a66ce005308 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/ReefShaman.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.apocalypse; + +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.continuous.BecomesBasicLandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class ReefShaman extends CardImpl { + + public ReefShaman(UUID ownerId) { + super(ownerId, 29, "Reef Shaman", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "APC"; + this.subtype.add("Merfolk"); + this.subtype.add("Shaman"); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // {T}: Target land becomes the basic land type of your choice until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public ReefShaman(final ReefShaman card) { + super(card); + } + + @Override + public ReefShaman copy() { + return new ReefShaman(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/SlimyKavu.java b/Mage.Sets/src/mage/sets/invasion/SlimyKavu.java new file mode 100644 index 00000000000..2f32f766387 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/SlimyKavu.java @@ -0,0 +1,70 @@ +/* + * 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.effects.common.continuous.BecomesBasicLandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class SlimyKavu extends CardImpl { + + public SlimyKavu(UUID ownerId) { + super(ownerId, 170, "Slimy Kavu", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "INV"; + this.subtype.add("Kavu"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Target land becomes a Swamp until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Swamp"), new TapSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public SlimyKavu(final SlimyKavu card) { + super(card); + } + + @Override + public SlimyKavu copy() { + return new SlimyKavu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/KavuRecluse.java b/Mage.Sets/src/mage/sets/planeshift/KavuRecluse.java new file mode 100644 index 00000000000..b90364edac5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/KavuRecluse.java @@ -0,0 +1,70 @@ +/* + * 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.planeshift; + +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.effects.common.continuous.BecomesBasicLandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class KavuRecluse extends CardImpl { + + public KavuRecluse(UUID ownerId) { + super(ownerId, 64, "Kavu Recluse", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Kavu"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Target land becomes a Forest until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Forest"), new TapSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public KavuRecluse(final KavuRecluse card) { + super(card); + } + + @Override + public KavuRecluse copy() { + return new KavuRecluse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/SeaSnidd.java b/Mage.Sets/src/mage/sets/planeshift/SeaSnidd.java new file mode 100644 index 00000000000..f6eb16aabcc --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/SeaSnidd.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planeshift; + +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.continuous.BecomesBasicLandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class SeaSnidd extends CardImpl { + + public SeaSnidd(UUID ownerId) { + super(ownerId, 31, "Sea Snidd", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {T}: Target land becomes the basic land type of your choice until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public SeaSnidd(final SeaSnidd card) { + super(card); + } + + @Override + public SeaSnidd copy() { + return new SeaSnidd(this); + } +} From 30ae59cc18fa96d5f46cb7096b9c4bbc83849743 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 16 Jul 2015 21:09:46 +0300 Subject: [PATCH 06/10] Implement cards: Metathran Transport, Pyre Zombie, Wandering Stream, and Wings of Hope --- .../sets/invasion/MetathranTransport.java | 87 +++++++++++++++++++ .../src/mage/sets/invasion/PyreZombie.java | 79 +++++++++++++++++ .../mage/sets/invasion/WanderingStream.java | 63 ++++++++++++++ .../src/mage/sets/invasion/WingsOfHope.java | 82 +++++++++++++++++ 4 files changed, 311 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/invasion/MetathranTransport.java create mode 100644 Mage.Sets/src/mage/sets/invasion/PyreZombie.java create mode 100644 Mage.Sets/src/mage/sets/invasion/WanderingStream.java create mode 100644 Mage.Sets/src/mage/sets/invasion/WingsOfHope.java diff --git a/Mage.Sets/src/mage/sets/invasion/MetathranTransport.java b/Mage.Sets/src/mage/sets/invasion/MetathranTransport.java new file mode 100644 index 00000000000..e650e7f25aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/MetathranTransport.java @@ -0,0 +1,87 @@ +/* + * 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.common.SimpleEvasionAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class MetathranTransport extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public MetathranTransport(UUID ownerId) { + super(ownerId, 62, "Metathran Transport", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "INV"; + this.subtype.add("Metathran"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Metathran Transport can't be blocked by blue creatures. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + // {U}: Target creature becomes blue until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorTargetEffect(ObjectColor.BLUE, + Duration.EndOfTurn), new ManaCostsImpl("{U}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public MetathranTransport(final MetathranTransport card) { + super(card); + } + + @Override + public MetathranTransport copy() { + return new MetathranTransport(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/PyreZombie.java b/Mage.Sets/src/mage/sets/invasion/PyreZombie.java new file mode 100644 index 00000000000..b9a1ace8379 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/PyreZombie.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.BeginningOfUpkeepTriggeredAbility; +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.DoIfCostPaid; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class PyreZombie extends CardImpl { + + public PyreZombie(UUID ownerId) { + super(ownerId, 261, "Pyre Zombie", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); + this.expansionSetCode = "INV"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, if Pyre Zombie is in your graveyard, you may pay {1}{B}{B}. If you do, return Pyre Zombie to your hand. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, + new DoIfCostPaid(new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{B}{B}")), + TargetController.YOU, false)); + // {1}{R}{R}, Sacrifice Pyre Zombie: Pyre Zombie deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}{R}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public PyreZombie(final PyreZombie card) { + super(card); + } + + @Override + public PyreZombie copy() { + return new PyreZombie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/WanderingStream.java b/Mage.Sets/src/mage/sets/invasion/WanderingStream.java new file mode 100644 index 00000000000..e2808415610 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/WanderingStream.java @@ -0,0 +1,63 @@ +/* + * 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.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.DomainValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WanderingStream extends CardImpl { + + public WanderingStream(UUID ownerId) { + super(ownerId, 224, "Wandering Stream", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "INV"; + + // Domain - You gain 2 life for each basic land type among lands you control. + Effect effect = new GainLifeEffect(new MultipliedValue(new DomainValue(), 2)); + effect.setText("Domain - You gain 2 life for each basic land type among lands you control"); + this.getSpellAbility().addEffect(effect); + } + + public WanderingStream(final WanderingStream card) { + super(card); + } + + @Override + public WanderingStream copy() { + return new WanderingStream(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/WingsOfHope.java b/Mage.Sets/src/mage/sets/invasion/WingsOfHope.java new file mode 100644 index 00000000000..5475eba52ef --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/WingsOfHope.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.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class WingsOfHope extends CardImpl { + + public WingsOfHope(UUID ownerId) { + super(ownerId, 289, "Wings of Hope", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}{U}"); + 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); + // Enchanted creature gets +1/+3 and has flying. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 3, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has flying"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public WingsOfHope(final WingsOfHope card) { + super(card); + } + + @Override + public WingsOfHope copy() { + return new WingsOfHope(this); + } +} From 540f1f2eacb5edcdcbb16d98f80969eb34e8e81a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 16 Jul 2015 22:21:18 +0200 Subject: [PATCH 07/10] * Touch of Moonglove - Fixed that the dealayed trigger only worked for one creature instead of for all damaged creatures. --- .../sets/magicorigins/TouchOfMoonglove.java | 3 +- .../triggers/dies/TouchOfMoongloveTest.java | 83 +++++++++++++++++++ 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TouchOfMoongloveTest.java diff --git a/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java b/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java index b5faf222d09..07c52503d96 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java +++ b/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java @@ -69,7 +69,6 @@ public class TouchOfMoonglove extends CardImpl { DeathtouchAbility.getInstance(), Duration.EndOfTurn, "and gains deathtouch until end of turn")); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); // Whenever a creature dealt damage by that creature this turn dies, its controller loses 2 life. - // this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(null)); this.getSpellAbility().addEffect(new TouchOfMoongloveAddTriggerEffect()); } @@ -119,7 +118,7 @@ class TouchOfMoongloveDelayedTriggeredAbility extends DelayedTriggeredAbility { private final MageObjectReference creatureToCheck; public TouchOfMoongloveDelayedTriggeredAbility(MageObjectReference creatureToCheck) { - super(new DamageTargetEffect(2), Duration.EndOfTurn); + super(new DamageTargetEffect(2), Duration.EndOfTurn, false); this.creatureToCheck = creatureToCheck; } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TouchOfMoongloveTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TouchOfMoongloveTest.java new file mode 100644 index 00000000000..432d69d6c9b --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/TouchOfMoongloveTest.java @@ -0,0 +1,83 @@ +/* + * 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 org.mage.test.cards.triggers.dies; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class TouchOfMoongloveTest extends CardTestPlayerBase { + + /** + * I blocked my opponent's Pharika's Disciple with a Cleric of the Forward + * Order and Guardian Automaton. He cast Touch of Moonglove on his Pharika's + * Disciple and both of my creatures were killed, but I only lost 2 life + * instead of 4.(and gained 3 from Guardian Automaton dying). + * + */ + @Test + public void testDiesAndControllerDamage() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + // When Cleric of the Forward Order enters the battlefield, you gain 2 life for each creature you control named Cleric of the Forward Order. + addCard(Zone.HAND, playerA, "Cleric of the Forward Order", 1); + // When Guardian Automaton dies, you gain 3 life. + addCard(Zone.BATTLEFIELD, playerA, "Guardian Automaton", 1); // 3/3 + + addCard(Zone.BATTLEFIELD, playerB, "Swamp", 1); + // Target creature you control gets +1/+0 and gains deathtouch until end of turn. + // Whenever a creature dealt damage by that creature this turn dies, its controller loses 2 life. + addCard(Zone.HAND, playerB, "Touch of Moonglove"); // {B} + addCard(Zone.BATTLEFIELD, playerB, "Pharika's Disciple", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cleric of the Forward Order"); + attack(2, playerB, "Pharika's Disciple"); + block(2, playerA, "Cleric of the Forward Order", "Pharika's Disciple"); + block(2, playerA, "Guardian Automaton", "Pharika's Disciple"); + + castSpell(2, PhaseStep.DECLARE_BLOCKERS, playerB, "Touch of Moonglove", "Pharika's Disciple"); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerB, "Touch of Moonglove", 1); + assertGraveyardCount(playerA, "Cleric of the Forward Order", 1); + assertGraveyardCount(playerB, "Pharika's Disciple", 1); + + assertGraveyardCount(playerA, "Guardian Automaton", 1); + + assertLife(playerA, 21); // +2 by Cleric + 2x -2 by Touch +3 by Guardian Automation + assertLife(playerB, 20); + + } + +} From e209114a2634cb89e2387e7965f77c26a4d24951 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 16 Jul 2015 23:15:11 +0200 Subject: [PATCH 08/10] * KickerAbility - Fixed that KickerCondition did not work coorectly for kicker cards with multiple kicker options. --- .../cards/abilities/keywords/KickerTest.java | 35 +++++++++++++++++++ .../mage/abilities/keyword/KickerAbility.java | 13 +++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java index 2e7f90fdfa0..d669602b0bd 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java @@ -328,4 +328,39 @@ public class KickerTest extends CardTestPlayerBase { } + /** + * Check that kicker condition does also work for kicker cards with multiple + * kicker options + * + */ + @Test + public void testKickerCondition() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 3); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); + + // Kicker {1}{G} and/or {2}{U} + // When {this} enters the battlefield, if it was kicked with its {1}{G} kicker, destroy target creature with flying. + // When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, draw two cards. + addCard(Zone.HAND, playerA, "Sunscape Battlemage", 1); // 2/2 {2}{W} + + addCard(Zone.BATTLEFIELD, playerB, "Birds of Paradise", 1); + addCard(Zone.BATTLEFIELD, playerB, "Island", 1); + // Counter target spell if it was kicked. + addCard(Zone.HAND, playerB, "Ertai's Trickery", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sunscape Battlemage"); + addTarget(playerA, "Birds of Paradise"); + setChoice(playerA, "Yes"); // {1}{G} destroy target creature with flying + setChoice(playerA, "Yes"); // {2}{U} draw two cards + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Ertai's Trickery", "Sunscape Battlemage"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerB, "Birds of Paradise", 1); + assertGraveyardCount(playerB, "Ertai's Trickery", 1); + assertGraveyardCount(playerA, "Sunscape Battlemage", 1); + + } } diff --git a/Mage/src/mage/abilities/keyword/KickerAbility.java b/Mage/src/mage/abilities/keyword/KickerAbility.java index 48d33e124b9..bab41782814 100644 --- a/Mage/src/mage/abilities/keyword/KickerAbility.java +++ b/Mage/src/mage/abilities/keyword/KickerAbility.java @@ -158,8 +158,17 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo public boolean isKicked(Game game, Ability source, String costText) { String key = getActivationKey(source, costText, game); - if (activations.containsKey(key)) { - return activations.get(key) > 0; + if (kickerCosts.size() > 1) { + for (String activationKey : activations.keySet()) { + if (activationKey.startsWith(key) && activations.get(activationKey) > 0) { + return true; + } + } + } else { + if (activations.containsKey(key)) { + return activations.get(key) > 0; + + } } return false; } From 6804ba1f2fb0288f41d59699711b3fe3cf6429dd Mon Sep 17 00:00:00 2001 From: emerald000 Date: Fri, 17 Jul 2015 00:04:32 -0400 Subject: [PATCH 09/10] Magic Origins Update Bulletin changes. --- .../mage/sets/alliances/SoldeviExcavations.java | 12 +++++------- .../mage/sets/darksteel/DarksteelPendant.java | 6 +++--- .../mage/sets/gatecrash/BiomassMutation.java | 7 +++---- Mage.Sets/src/mage/sets/invasion/Opt.java | 7 +++---- .../src/mage/sets/magic2014/DarkProphecy.java | 11 ++++++++--- .../mage/sets/modernmasters/TestOfFaith.java | 6 ++---- .../sets/saviorsofkamigawa/ShapeStealer.java | 6 +++--- .../sets/scarsofmirrodin/MoriokReplica.java | 17 ++++++++++++----- .../mage/abilities/keyword/BushidoAbility.java | 2 +- .../abilities/keyword/ChangelingAbility.java | 4 ++-- .../mage/abilities/keyword/ProvokeAbility.java | 2 +- Utils/mtg-cards-data.txt | 4 ++-- 12 files changed, 45 insertions(+), 39 deletions(-) diff --git a/Mage.Sets/src/mage/sets/alliances/SoldeviExcavations.java b/Mage.Sets/src/mage/sets/alliances/SoldeviExcavations.java index cbf814751bb..a4705db82e3 100644 --- a/Mage.Sets/src/mage/sets/alliances/SoldeviExcavations.java +++ b/Mage.Sets/src/mage/sets/alliances/SoldeviExcavations.java @@ -30,14 +30,13 @@ package mage.sets.alliances; import java.util.UUID; import mage.Mana; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.EnterBattlefieldPayCostOrPutGraveyardEffect; -import mage.abilities.effects.common.LookLibraryMayPutToBottomEffect; +import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; @@ -70,13 +69,12 @@ public class SoldeviExcavations extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.ALL, new EnterBattlefieldPayCostOrPutGraveyardEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter))))); // {tap}: Add {1}{U} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 1,0 ), new TapSourceCost())); - // {1}, {tap}: Look at the top card of your library. You may put that card on the bottom of your library. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryMayPutToBottomEffect(), new GenericManaCost(1)); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 1, 0), new TapSourceCost())); + + // {1}, {tap}: Scry 1. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); - - } public SoldeviExcavations(final SoldeviExcavations card) { diff --git a/Mage.Sets/src/mage/sets/darksteel/DarksteelPendant.java b/Mage.Sets/src/mage/sets/darksteel/DarksteelPendant.java index c6bb0a5889c..f3e93931423 100644 --- a/Mage.Sets/src/mage/sets/darksteel/DarksteelPendant.java +++ b/Mage.Sets/src/mage/sets/darksteel/DarksteelPendant.java @@ -32,7 +32,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.LookLibraryMayPutToBottomEffect; +import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.constants.CardType; @@ -51,8 +51,8 @@ public class DarksteelPendant extends CardImpl { // Darksteel Pendant is indestructible. this.addAbility(IndestructibleAbility.getInstance()); - // {1}, {tap}: Look at the top card of your library. You may put that card on the bottom of your library. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryMayPutToBottomEffect(), new GenericManaCost(1)); + // {1}, {tap}: Scry 1. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/gatecrash/BiomassMutation.java b/Mage.Sets/src/mage/sets/gatecrash/BiomassMutation.java index 434c10e426b..051d2268d04 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/BiomassMutation.java +++ b/Mage.Sets/src/mage/sets/gatecrash/BiomassMutation.java @@ -28,14 +28,13 @@ package mage.sets.gatecrash; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.continuous.SetPowerToughnessAllEffect; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Rarity; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -49,7 +48,7 @@ public class BiomassMutation extends CardImpl { this.expansionSetCode = "GTC"; - // Creatures you control become X/X until end of turn. + // Creatures you control have base power and toughness X/X until end of turn. DynamicValue variableMana = new ManacostVariableValue(); this.getSpellAbility().addEffect(new SetPowerToughnessAllEffect(variableMana, variableMana, Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you control"), true)); } diff --git a/Mage.Sets/src/mage/sets/invasion/Opt.java b/Mage.Sets/src/mage/sets/invasion/Opt.java index 00a8fe58780..132c5a085a8 100644 --- a/Mage.Sets/src/mage/sets/invasion/Opt.java +++ b/Mage.Sets/src/mage/sets/invasion/Opt.java @@ -29,7 +29,7 @@ package mage.sets.invasion; import java.util.UUID; import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.LookLibraryMayPutToBottomEffect; +import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; @@ -44,9 +44,8 @@ public class Opt extends CardImpl { super(ownerId, 64, "Opt", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); this.expansionSetCode = "INV"; - - // Look at the top card of your library. You may put that card on the bottom of your library. - this.getSpellAbility().addEffect(new LookLibraryMayPutToBottomEffect()); + // Scry 1. + this.getSpellAbility().addEffect(new ScryEffect(1)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/sets/magic2014/DarkProphecy.java b/Mage.Sets/src/mage/sets/magic2014/DarkProphecy.java index 416208588f3..fcd3c1e9aa5 100644 --- a/Mage.Sets/src/mage/sets/magic2014/DarkProphecy.java +++ b/Mage.Sets/src/mage/sets/magic2014/DarkProphecy.java @@ -30,6 +30,7 @@ package mage.sets.magic2014; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; @@ -55,9 +56,13 @@ public class DarkProphecy extends CardImpl { this.expansionSetCode = "M14"; - // Whenever a creature you control dies, you draw a card and lose 1 life. - Ability ability = new DiesCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1), false, filter); - ability.addEffect(new LoseLifeSourceControllerEffect(1)); + // Whenever a creature you control dies, you draw a card and you lose 1 life. + Effect effect = new DrawCardSourceControllerEffect(1); + effect.setText("you draw a card"); + Ability ability = new DiesCreatureTriggeredAbility(effect, false, filter); + effect = new LoseLifeSourceControllerEffect(1); + effect.setText("and you lose 1 life"); + ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/modernmasters/TestOfFaith.java b/Mage.Sets/src/mage/sets/modernmasters/TestOfFaith.java index 4baaf12bab9..40a9ea2a357 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/TestOfFaith.java +++ b/Mage.Sets/src/mage/sets/modernmasters/TestOfFaith.java @@ -50,11 +50,9 @@ public class TestOfFaith extends CardImpl { super(ownerId, 33, "Test of Faith", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); this.expansionSetCode = "MMA"; - - // Prevent the next 3 damage that would be dealt to target creature this turn, and put a +1/+1 counter on that creature for each 1 damage prevented this way. + // Prevent the next 3 damage that would be dealt to target creature this turn. For each 1 damage prevented this way, put a +1/+1 counter on that creature. this.getSpellAbility().addEffect(new TestOfFaithPreventDamageTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - } public TestOfFaith(final TestOfFaith card) { @@ -73,7 +71,7 @@ class TestOfFaithPreventDamageTargetEffect extends PreventionEffectImpl { public TestOfFaithPreventDamageTargetEffect(Duration duration) { super(duration); - staticText = "Prevent the next 3 damage that would be dealt to target creature this turn, and put a +1/+1 counter on that creature for each 1 damage prevented this way"; + staticText = "Prevent the next 3 damage that would be dealt to target creature this turn. For each 1 damage prevented this way, put a +1/+1 counter on that creature"; } public TestOfFaithPreventDamageTargetEffect(final TestOfFaithPreventDamageTargetEffect effect) { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java index f0384b087dd..51cddc6978c 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java @@ -56,13 +56,13 @@ public class ShapeStealer extends CardImpl { this.subtype.add("Spirit"); this.power = new MageInt(1); this.toughness = new MageInt(1); - // This ability triggers once for each creature blocked by or blocking Shape Stealer. // If multiple creatures block it, Shape Stealer's power and toughness will change for // each one in succession. The first trigger put on the stack will be the last to resolve, // so that will set Shape Stealer's final power and toughness. - // Whenever Shape Stealer blocks or becomes blocked by a creature, change Shape Stealer's power and toughness to that creature's power and toughness until end of turn. + + // Whenever Shape Stealer blocks or becomes blocked by a creature, change Shape Stealer's base power and toughness to that creature's power and toughness until end of turn. this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(new ShapeStealerEffect(), false)); } @@ -80,7 +80,7 @@ class ShapeStealerEffect extends OneShotEffect { public ShapeStealerEffect() { super(Outcome.Detriment); - this.staticText = "change {this}'s power and toughness to that creature's power and toughness until end of turn"; + this.staticText = "change {this}'s base power and toughness to that creature's power and toughness until end of turn"; } public ShapeStealerEffect(final ShapeStealerEffect effect) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoriokReplica.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoriokReplica.java index d8919a383a6..2c94a0706da 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoriokReplica.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoriokReplica.java @@ -29,17 +29,18 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; 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.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; /** * @@ -53,9 +54,15 @@ public class MoriokReplica extends CardImpl { this.subtype.add("Warrior"); this.power = new MageInt(2); this.toughness = new MageInt(2); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(2), new ManaCostsImpl("{1}{B}")); + + // {1}{B}, Sacrifice Moriok Replica: You draw two cards and you lose 2 life. + Effect effect = new DrawCardSourceControllerEffect(2); + effect.setText("You draw two cards"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}")); + effect = new LoseLifeSourceControllerEffect(2); + effect.setText("and you lose 2 life"); ability.addCost(new SacrificeSourceCost()); - ability.addEffect(new LoseLifeSourceControllerEffect(2)); + ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage/src/mage/abilities/keyword/BushidoAbility.java b/Mage/src/mage/abilities/keyword/BushidoAbility.java index 30b239ece1a..3d51c036986 100644 --- a/Mage/src/mage/abilities/keyword/BushidoAbility.java +++ b/Mage/src/mage/abilities/keyword/BushidoAbility.java @@ -55,7 +55,7 @@ public class BushidoAbility extends BlocksOrBecomesBlockedTriggeredAbility { } static String getReminder(String xValue) { - return " (When this blocks or becomes blocked, it gets +" + xValue+ "/+" + xValue + " until end of turn.)"; + return " (Whenever this creature blocks or becomes blocked, it gets +" + xValue+ "/+" + xValue + " until end of turn.)"; } public BushidoAbility(final BushidoAbility ability) { diff --git a/Mage/src/mage/abilities/keyword/ChangelingAbility.java b/Mage/src/mage/abilities/keyword/ChangelingAbility.java index f36020d1bf6..94fb1debb65 100644 --- a/Mage/src/mage/abilities/keyword/ChangelingAbility.java +++ b/Mage/src/mage/abilities/keyword/ChangelingAbility.java @@ -29,9 +29,9 @@ package mage.abilities.keyword; import java.io.ObjectStreamException; -import mage.constants.Zone; import mage.abilities.MageSingleton; import mage.abilities.StaticAbility; +import mage.constants.Zone; /** @@ -61,7 +61,7 @@ public class ChangelingAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Changeling (This card is every creature type at all times.)"; + return "Changeling (This card is every creature type.)"; } @Override diff --git a/Mage/src/mage/abilities/keyword/ProvokeAbility.java b/Mage/src/mage/abilities/keyword/ProvokeAbility.java index 595d85a4a49..94b4c53f65d 100644 --- a/Mage/src/mage/abilities/keyword/ProvokeAbility.java +++ b/Mage/src/mage/abilities/keyword/ProvokeAbility.java @@ -55,7 +55,7 @@ import mage.target.common.TargetCreaturePermanent; public class ProvokeAbility extends AttacksTriggeredAbility { public ProvokeAbility() { - super(new UntapTargetEffect(), true, "Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.)"); + super(new UntapTargetEffect(), true, "Provoke (Whenever this attacks, you may have target creature defending player controls untap and block it if able.)"); this.addEffect(new ProvokeRequirementEffect()); } diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index c0b550a7c16..66cd2ae3041 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -12513,7 +12513,7 @@ Override|Mirrodin|45|C|{2}{U}|Instant|||Counter target spell unless its controll Psychic Membrane|Mirrodin|46|U|{2}{U}|Creature - Wall|0|3|Defender (This creature can't attack.)$Whenever Psychic Membrane blocks, you may draw a card.| Quicksilver Elemental|Mirrodin|47|R|{3}{U}{U}|Creature - Elemental|3|4|{U}: Quicksilver Elemental gains all activated abilities of target creature until end of turn. (If any of the abilities use that creature's name, use this creature's name instead.)$You may spend blue mana as though it were mana of any color to pay the activation costs of Quicksilver Elemental's abilities.| Regress|Mirrodin|48|C|{2}{U}|Instant|||Return target permanent to its owner's hand.| -Shared Fate|Mirrodin|49|R|{4}{U}|Enchantment|||If a player would draw a card, that player exiles the top card of an opponent's library face down instead.$Each player may look at and play cards he or she exiled with Shared Fate.| +Shared Fate|Mirrodin|49|R|{4}{U}|Enchantment|||If a player would draw a card, that player exiles the top card of one of his or her opponents' libraries face down instead.$Each player may look at and play cards he or she exiled with Shared Fate.| Auriok Transfixer|Mirrodin|5|C|{W}|Creature - Human Scout|1|1|{W}, {tap}: Tap target artifact.| Slith Strider|Mirrodin|50|U|{1}{U}{U}|Creature - Slith|1|1|Whenever Slith Strider becomes blocked, draw a card.$Whenever Slith Strider deals combat damage to a player, put a +1/+1 counter on it.| Somber Hoverguard|Mirrodin|51|C|{5}{U}|Creature - Drone|3|2|Affinity for artifacts (This spell costs {1} less to cast for each artifact you control.)$Flying| @@ -15733,7 +15733,7 @@ Zephyr Spirit|Ravnica: City of Guilds|76|C|{5}{U}|Creature - Spirit|0|6|When Zep Blood Funnel|Ravnica: City of Guilds|77|R|{1}{B}|Enchantment|||Noncreature spells you cast cost {2} less to cast.$Whenever you cast a noncreature spell, counter that spell unless you sacrifice a creature.| Brainspoil|Ravnica: City of Guilds|78|C|{3}{B}{B}|Sorcery|||Destroy target creature that isn't enchanted. It can't be regenerated.$Transmute {1}{B}{B} ({1}{B}{B}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.)| Carrion Howler|Ravnica: City of Guilds|79|U|{3}{B}|Creature - Zombie Wolf|2|2|Pay 1 life: Carrion Howler gets +2/-1 until end of turn.| -Concerted Effort|Ravnica: City of Guilds|8|R|{2}{W}{W}|Enchantment|||At the beginning of each upkeep, all creatures you control gain flying until end of turn if a creature you control has flying. The same is true for fear, first strike, double strike, landwalk, protection, trample, and vigilance.| +Concerted Effort|Ravnica: City of Guilds|8|R|{2}{W}{W}|Enchantment|||At the beginning of each upkeep, creatures you control gain flying until end of turn if a creature you control has flying. The same is true for fear, first strike, double strike, landwalk, protection, trample, and vigilance.| Clinging Darkness|Ravnica: City of Guilds|80|C|{1}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets -4/-1.| Dark Confidant|Ravnica: City of Guilds|81|R|{1}{B}|Creature - Human Wizard|2|1|At the beginning of your upkeep, reveal the top card of your library and put that card into your hand. You lose life equal to its converted mana cost.| Darkblast|Ravnica: City of Guilds|82|U|{B}|Instant|||Target creature gets -1/-1 until end of turn.$Dredge 3 (If you would draw a card, instead you may put exactly three cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.)| From 5ed37420b58c382ae70b62cfaa7b42cfd87ab10e Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 17 Jul 2015 08:08:50 +0200 Subject: [PATCH 10/10] [ORI] Fixed booster generation to include double faced creature/planeswalker cards. --- Mage.Sets/src/mage/sets/MagicOrigins.java | 1 + Mage/src/mage/cards/ExpansionSet.java | 72 ++++++++++++----------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/Mage.Sets/src/mage/sets/MagicOrigins.java b/Mage.Sets/src/mage/sets/MagicOrigins.java index d9d75e78dd0..63cfc6f55d5 100644 --- a/Mage.Sets/src/mage/sets/MagicOrigins.java +++ b/Mage.Sets/src/mage/sets/MagicOrigins.java @@ -51,6 +51,7 @@ public class MagicOrigins extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 8; + this.numBoosterDoubleFaced = -1; // use by rarity /* There are additional cards, numbered 273–288, that don't appear in Magic Origin booster packs. These are reprints from earlier sets that are present in some supplemental products, including sample decks and the Deck Builder's Toolkit. diff --git a/Mage/src/mage/cards/ExpansionSet.java b/Mage/src/mage/cards/ExpansionSet.java index 17aee8cbb9b..4c5b9249fcc 100644 --- a/Mage/src/mage/cards/ExpansionSet.java +++ b/Mage/src/mage/cards/ExpansionSet.java @@ -1,31 +1,30 @@ /* -* 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. -*/ - + * 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.cards; import java.io.Serializable; @@ -61,7 +60,7 @@ public abstract class ExpansionSet implements Serializable { protected int numBoosterCommon; protected int numBoosterUncommon; protected int numBoosterRare; - protected int numBoosterDoubleFaced; + protected int numBoosterDoubleFaced; // -1 = include normally 0 = exclude 1-n = include explicit protected int ratioBoosterMythic; protected String packageName; @@ -113,7 +112,7 @@ public abstract class ExpansionSet implements Serializable { } public List create15CardBooster() { - // Forces 15 card booster packs. + // Forces 15 card booster packs. // if the packs are too small, it adds commons to fill it out. // if the packs are too big, it removes the first cards. // since it adds lands then commons before uncommons @@ -137,13 +136,13 @@ public abstract class ExpansionSet implements Serializable { if (!hasBoosters) { return booster; } - + if (numBoosterLands > 0) { List basicLands = getCardsByRarity(Rarity.LAND); for (int i = 0; i < numBoosterLands; i++) { addToBooster(booster, basicLands); } - } + } List commons = getCardsByRarity(Rarity.COMMON); for (int i = 0; i < numBoosterCommon; i++) { addToBooster(booster, commons); @@ -237,7 +236,7 @@ public abstract class ExpansionSet implements Serializable { return booster; } - /* add double faced card for Innistrad booster + /* add double faced card for Innistrad booster * rarity near as the normal distribution */ private void addDoubleFace(List booster) { @@ -269,11 +268,11 @@ public abstract class ExpansionSet implements Serializable { } } } - + public boolean hasBoosters() { return hasBoosters; } - + public boolean hasBasicLands() { return hasBasicLands; } @@ -287,7 +286,10 @@ public abstract class ExpansionSet implements Serializable { } else { criteria.setCodes(this.code); } - criteria.rarities(rarity).doubleFaced(false); + criteria.rarities(rarity); + if (numBoosterDoubleFaced > -1) { + criteria.doubleFaced(false); + } if (maxCardNumberInBooster != Integer.MAX_VALUE) { criteria.maxCardNumber(maxCardNumberInBooster); }