From 049bd002f1b13a384eb450750d3536a575373399 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 25 Nov 2015 10:04:13 +0200 Subject: [PATCH 1/7] Implement cards: Giant Caterpillar, Leonin Battlemage, Transluminant, and Woolly Razorback --- .../mage/sets/coldsnap/WoollyRazorback.java | 88 +++++++++++++++++++ .../mage/sets/darksteel/LeoninBattlemage.java | 75 ++++++++++++++++ .../mercadianmasques/GiantCaterpillar.java | 88 +++++++++++++++++++ .../src/mage/sets/ravnica/Transluminant.java | 75 ++++++++++++++++ .../mage/sets/visions/GiantCaterpillar.java | 52 +++++++++++ 5 files changed, 378 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/coldsnap/WoollyRazorback.java create mode 100644 Mage.Sets/src/mage/sets/darksteel/LeoninBattlemage.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/GiantCaterpillar.java create mode 100644 Mage.Sets/src/mage/sets/ravnica/Transluminant.java create mode 100644 Mage.Sets/src/mage/sets/visions/GiantCaterpillar.java diff --git a/Mage.Sets/src/mage/sets/coldsnap/WoollyRazorback.java b/Mage.Sets/src/mage/sets/coldsnap/WoollyRazorback.java new file mode 100644 index 00000000000..9183bf81de9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/WoollyRazorback.java @@ -0,0 +1,88 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceHasCounterCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalReplacementEffect; +import mage.abilities.effects.common.PreventCombatDamageBySourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class WoollyRazorback extends CardImpl { + + public WoollyRazorback(UUID ownerId) { + super(ownerId, 25, "Woolly Razorback", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Boar"); + this.subtype.add("Beast"); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // Woolly Razorback enters the battlefield with three ice counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.ICE.createInstance(3)), + "with three ice counters on it")); + // As long as Woolly Razorback has an ice counter on it, prevent all combat damage it would deal and it has defender. + ConditionalReplacementEffect effect = new ConditionalReplacementEffect(new PreventCombatDamageBySourceEffect(Duration.WhileOnBattlefield), + new SourceHasCounterCondition(CounterType.ICE)); + effect.setText("as long as {this} has an ice counter on it, prevent all combat damage it would deal"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalReplacementEffect(effect)); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance()), + new SourceHasCounterCondition(CounterType.ICE), "and it has defender")); + this.addAbility(ability); + // Whenever Woolly Razorback blocks, remove an ice counter from it. + this.addAbility(new BlocksTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ICE.createInstance()), false)); + } + + public WoollyRazorback(final WoollyRazorback card) { + super(card); + } + + @Override + public WoollyRazorback copy() { + return new WoollyRazorback(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darksteel/LeoninBattlemage.java b/Mage.Sets/src/mage/sets/darksteel/LeoninBattlemage.java new file mode 100644 index 00000000000..937eec54ee4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/LeoninBattlemage.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.darksteel; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class LeoninBattlemage extends CardImpl { + + public LeoninBattlemage(UUID ownerId) { + super(ownerId, 5, "Leonin Battlemage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "DST"; + this.subtype.add("Cat"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {tap}: Target creature gets +1/+1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + // Whenever you cast a spell, you may untap Leonin Battlemage. + this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), true)); + } + + public LeoninBattlemage(final LeoninBattlemage card) { + super(card); + } + + @Override + public LeoninBattlemage copy() { + return new LeoninBattlemage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/GiantCaterpillar.java b/Mage.Sets/src/mage/sets/mercadianmasques/GiantCaterpillar.java new file mode 100644 index 00000000000..2c6b07c61ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/GiantCaterpillar.java @@ -0,0 +1,88 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mercadianmasques; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class GiantCaterpillar extends CardImpl { + + public GiantCaterpillar(UUID ownerId) { + super(ownerId, 249, "Giant Caterpillar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Insect"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {G}, Sacrifice Giant Caterpillar: Put a 1/1 green Insect creature token with flying named Butterfly onto the battlefield at the beginning of the next end step. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new CreateTokenEffect(new ButterflyToken()))), + new ManaCostsImpl("{G}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public GiantCaterpillar(final GiantCaterpillar card) { + super(card); + } + + @Override + public GiantCaterpillar copy() { + return new GiantCaterpillar(this); + } +} + +class ButterflyToken extends Token { + + public ButterflyToken() { + super("Butterfly", "1/1 green Insect creature token with flying named Butterfly"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Insect"); + power = new MageInt(1); + toughness = new MageInt(1); + addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/Transluminant.java b/Mage.Sets/src/mage/sets/ravnica/Transluminant.java new file mode 100644 index 00000000000..cfdf4b4ac02 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/Transluminant.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.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.SpiritWhiteToken; + +/** + * + * @author LoneFox + */ +public class Transluminant extends CardImpl { + + public Transluminant(UUID ownerId) { + super(ownerId, 186, "Transluminant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Dryad"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {W}, Sacrifice Transluminant: Put a 1/1 white Spirit creature token with flying onto the battlefield at the beginning of the next end step. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken()))), + new ManaCostsImpl("{W}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public Transluminant(final Transluminant card) { + super(card); + } + + @Override + public Transluminant copy() { + return new Transluminant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/GiantCaterpillar.java b/Mage.Sets/src/mage/sets/visions/GiantCaterpillar.java new file mode 100644 index 00000000000..09ee570ba3d --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/GiantCaterpillar.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.visions; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class GiantCaterpillar extends mage.sets.mercadianmasques.GiantCaterpillar { + + public GiantCaterpillar(UUID ownerId) { + super(ownerId); + this.cardNumber = 58; + this.expansionSetCode = "VIS"; + } + + public GiantCaterpillar(final GiantCaterpillar card) { + super(card); + } + + @Override + public GiantCaterpillar copy() { + return new GiantCaterpillar(this); + } +} From b4eda50b5bfcf7c833c664183d51fc81596f3221 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 25 Nov 2015 10:46:53 +0200 Subject: [PATCH 2/7] Implement cards: Animate Land, Parasitic Bond, Sylvan Might, and Vivify --- .../src/mage/sets/nemesis/AnimateLand.java | 73 ++++++++++++++++++ .../src/mage/sets/odyssey/SylvanMight.java | 66 ++++++++++++++++ Mage.Sets/src/mage/sets/odyssey/Vivify.java | 76 +++++++++++++++++++ .../mage/sets/urzassaga/ParasiticBond.java | 76 +++++++++++++++++++ 4 files changed, 291 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/nemesis/AnimateLand.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/SylvanMight.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/Vivify.java create mode 100644 Mage.Sets/src/mage/sets/urzassaga/ParasiticBond.java diff --git a/Mage.Sets/src/mage/sets/nemesis/AnimateLand.java b/Mage.Sets/src/mage/sets/nemesis/AnimateLand.java new file mode 100644 index 00000000000..04a11385bea --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/AnimateLand.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.permanent.token.Token; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class AnimateLand extends CardImpl { + + public AnimateLand(UUID ownerId) { + super(ownerId, 101, "Animate Land", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "NMS"; + + // Until end of turn, target land becomes a 3/3 creature that's still a land. + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new AnimatedLand(), false, true, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + } + + public AnimateLand(final AnimateLand card) { + super(card); + } + + @Override + public AnimateLand copy() { + return new AnimateLand(this); + } +} + +class AnimatedLand extends Token { + + public AnimatedLand() { + super("", "3/3 creature"); + this.cardType.add(CardType.CREATURE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/SylvanMight.java b/Mage.Sets/src/mage/sets/odyssey/SylvanMight.java new file mode 100644 index 00000000000..5c999e567c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/SylvanMight.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.odyssey; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SylvanMight extends CardImpl { + + public SylvanMight(UUID ownerId) { + super(ownerId, 277, "Sylvan Might", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "ODY"; + + // Target creature gets +2/+2 and gains trample until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Flashback {2}{G}{G} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}{G}"), TimingRule.INSTANT)); + } + + public SylvanMight(final SylvanMight card) { + super(card); + } + + @Override + public SylvanMight copy() { + return new SylvanMight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Vivify.java b/Mage.Sets/src/mage/sets/odyssey/Vivify.java new file mode 100644 index 00000000000..1ace55114a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Vivify.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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.permanent.token.Token; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class Vivify extends CardImpl { + + public Vivify(UUID ownerId) { + super(ownerId, 281, "Vivify", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "ODY"; + + // Target land becomes a 3/3 creature until end of turn. It's still a land. + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new AnimatedLand(), false, true, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Vivify(final Vivify card) { + super(card); + } + + @Override + public Vivify copy() { + return new Vivify(this); + } +} + +class AnimatedLand extends Token { + + public AnimatedLand() { + super("", "3/3 creature"); + this.cardType.add(CardType.CREATURE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/ParasiticBond.java b/Mage.Sets/src/mage/sets/urzassaga/ParasiticBond.java new file mode 100644 index 00000000000..f92ea066e29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/ParasiticBond.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.urzassaga; + +import java.util.UUID; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ParasiticBond extends CardImpl { + + public ParasiticBond(UUID ownerId) { + super(ownerId, 145, "Parasitic Bond", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // At the beginning of the upkeep of enchanted creature's controller, Parasitic Bond deals 2 damage to that player. + Effect effect = new DamageTargetEffect(2); + effect.setText("{this} deals 2 damage to that player"); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, + TargetController.CONTROLLER_ATTACHED_TO, false, true)); + } + + public ParasiticBond(final ParasiticBond card) { + super(card); + } + + @Override + public ParasiticBond copy() { + return new ParasiticBond(this); + } +} From e3f2d645858772220e9dc11339260f7c6cf2bcaa Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 26 Nov 2015 11:45:04 +0200 Subject: [PATCH 3/7] Implement cards: Deja Vu, Pursuit of Knowledge, Shifting Wall, and Touch of Brilliance --- Mage.Sets/src/mage/sets/portal/DejaVu.java | 68 ++++++++++ .../mage/sets/portal/TouchOfBrilliance.java | 52 ++++++++ .../src/mage/sets/portalsecondage/DejaVu.java | 52 ++++++++ .../portalsecondage/TouchOfBrilliance.java | 58 +++++++++ .../sets/starter1999/TouchOfBrilliance.java | 52 ++++++++ .../sets/stronghold/PursuitOfKnowledge.java | 123 ++++++++++++++++++ .../mage/sets/stronghold/ShiftingWall.java | 67 ++++++++++ 7 files changed, 472 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/portal/DejaVu.java create mode 100644 Mage.Sets/src/mage/sets/portal/TouchOfBrilliance.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/DejaVu.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/TouchOfBrilliance.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/TouchOfBrilliance.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/PursuitOfKnowledge.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/ShiftingWall.java diff --git a/Mage.Sets/src/mage/sets/portal/DejaVu.java b/Mage.Sets/src/mage/sets/portal/DejaVu.java new file mode 100644 index 00000000000..bac41715fb9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/DejaVu.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LoneFox + */ +public class DejaVu extends CardImpl { + + public static final FilterCard filter = new FilterCard("sorcery card from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.SORCERY)); + } + + public DejaVu(UUID ownerId) { + super(ownerId, 53, "Deja Vu", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "POR"; + + // Return target sorcery card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + } + + public DejaVu(final DejaVu card) { + super(card); + } + + @Override + public DejaVu copy() { + return new DejaVu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/TouchOfBrilliance.java b/Mage.Sets/src/mage/sets/portal/TouchOfBrilliance.java new file mode 100644 index 00000000000..9ae563b566c --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/TouchOfBrilliance.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.portal; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class TouchOfBrilliance extends mage.sets.portalsecondage.TouchOfBrilliance { + + public TouchOfBrilliance(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "POR"; + } + + public TouchOfBrilliance(final TouchOfBrilliance card) { + super(card); + } + + @Override + public TouchOfBrilliance copy() { + return new TouchOfBrilliance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/DejaVu.java b/Mage.Sets/src/mage/sets/portalsecondage/DejaVu.java new file mode 100644 index 00000000000..86e3c48c098 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/DejaVu.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.portalsecondage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class DejaVu extends mage.sets.portal.DejaVu { + + public DejaVu(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "PO2"; + } + + public DejaVu(final DejaVu card) { + super(card); + } + + @Override + public DejaVu copy() { + return new DejaVu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/TouchOfBrilliance.java b/Mage.Sets/src/mage/sets/portalsecondage/TouchOfBrilliance.java new file mode 100644 index 00000000000..cfe638a689b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/TouchOfBrilliance.java @@ -0,0 +1,58 @@ +/* + * 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.portalsecondage; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class TouchOfBrilliance extends CardImpl { + + public TouchOfBrilliance(UUID ownerId) { + super(ownerId, 58, "Touch of Brilliance", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{U}"); + this.expansionSetCode = "PO2"; + + // Draw two cards. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + } + + public TouchOfBrilliance(final TouchOfBrilliance card) { + super(card); + } + + @Override + public TouchOfBrilliance copy() { + return new TouchOfBrilliance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/TouchOfBrilliance.java b/Mage.Sets/src/mage/sets/starter1999/TouchOfBrilliance.java new file mode 100644 index 00000000000..03234776a57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/TouchOfBrilliance.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.starter1999; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class TouchOfBrilliance extends mage.sets.portalsecondage.TouchOfBrilliance { + + public TouchOfBrilliance(UUID ownerId) { + super(ownerId); + this.cardNumber = 57; + this.expansionSetCode = "S99"; + } + + public TouchOfBrilliance(final TouchOfBrilliance card) { + super(card); + } + + @Override + public TouchOfBrilliance copy() { + return new TouchOfBrilliance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/PursuitOfKnowledge.java b/Mage.Sets/src/mage/sets/stronghold/PursuitOfKnowledge.java new file mode 100644 index 00000000000..4a8c05ed398 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/PursuitOfKnowledge.java @@ -0,0 +1,123 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author LoneFox + */ +public class PursuitOfKnowledge extends CardImpl { + + public PursuitOfKnowledge(UUID ownerId) { + super(ownerId, 110, "Pursuit of Knowledge", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + this.expansionSetCode = "STH"; + + // If you would draw a card, you may put a study counter on Pursuit of Knowledge instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PursuitOfKnowledgeEffect())); + // Remove three study counters from Pursuit of Knowledge, Sacrifice Pursuit of Knowledge: Draw seven cards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(7), + new RemoveCountersSourceCost(CounterType.STUDY.createInstance(3))); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public PursuitOfKnowledge(final PursuitOfKnowledge card) { + super(card); + } + + @Override + public PursuitOfKnowledge copy() { + return new PursuitOfKnowledge(this); + } +} + +class PursuitOfKnowledgeEffect extends ReplacementEffectImpl { + + public PursuitOfKnowledgeEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "If you would draw a card, you may put a study counter on {this} instead"; + } + + public PursuitOfKnowledgeEffect(final PursuitOfKnowledgeEffect effect) { + super(effect); + } + + @Override + public PursuitOfKnowledgeEffect copy() { + return new PursuitOfKnowledgeEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DRAW_CARD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return event.getPlayerId().equals(source.getControllerId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(event.getPlayerId()); + if(controller != null) { + if(controller.chooseUse(Outcome.Benefit, "Add a study counter instead of drawing a card?", source, game)) { + new AddCountersSourceEffect(CounterType.STUDY.createInstance()).apply(game, source); + return true; + } + } + return false; + } +} + diff --git a/Mage.Sets/src/mage/sets/stronghold/ShiftingWall.java b/Mage.Sets/src/mage/sets/stronghold/ShiftingWall.java new file mode 100644 index 00000000000..ec925d98134 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/ShiftingWall.java @@ -0,0 +1,67 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class ShiftingWall extends CardImpl { + + public ShiftingWall(UUID ownerId) { + super(ownerId, 134, "Shifting Wall", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{X}"); + this.expansionSetCode = "STH"; + this.subtype.add("Wall"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Shifting Wall enters the battlefield with X +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); + } + + public ShiftingWall(final ShiftingWall card) { + super(card); + } + + @Override + public ShiftingWall copy() { + return new ShiftingWall(this); + } +} From 3f98fe69c8520e57a153d2698a83407d67adfaba Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 26 Nov 2015 12:01:03 +0200 Subject: [PATCH 4/7] Use LookAtTargetPlayerHandEffect instead of RevealHandTargetEffect for Wanderguard Sentry --- .../src/mage/sets/ninthedition/WanderguardSentry.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java b/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java index e0e33069cdf..798ecb02a0c 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java +++ b/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java @@ -31,11 +31,11 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.RevealHandTargetEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.constants.TargetController; import mage.target.common.TargetOpponent; /** @@ -53,7 +53,9 @@ public class WanderguardSentry extends CardImpl { this.toughness = new MageInt(3); // When Wanderguard Sentry enters the battlefield, look at target opponent's hand. - Ability ability = new EntersBattlefieldTriggeredAbility(new RevealHandTargetEffect(TargetController.OPPONENT)); + Effect effect = new LookAtTargetPlayerHandEffect(); + effect.setText("look at target opponent's hand"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } From 33731ce90caad7e5d5367a3a6c856741870b2ffa Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 26 Nov 2015 12:11:34 +0200 Subject: [PATCH 5/7] Fix Sadistic Glee, Soul Tithe, and Tormentor's Trident. These cards were incorrectly granting an ability to the creature they are attached to. --- .../avacynrestored/TormentorsTrident.java | 22 +++++--- .../mage/sets/returntoravnica/SoulTithe.java | 52 ++++++++++--------- .../src/mage/sets/tempest/SadisticGlee.java | 11 ++-- 3 files changed, 45 insertions(+), 40 deletions(-) diff --git a/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java b/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java index 6978d7118c5..ce92e18fccf 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java @@ -27,16 +27,21 @@ */ package mage.sets.avacynrestored; -import mage.constants.*; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.AttacksIfAbleAttachedEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; - -import java.util.UUID; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; /** * @@ -51,8 +56,11 @@ public class TormentorsTrident extends CardImpl { this.subtype.add("Equipment"); // Equipped creature gets +3/+0 and attacks each turn if able. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new AttacksEachTurnStaticAbility(), AttachmentType.EQUIPMENT))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0)); + Effect effect = new AttacksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT); + effect.setText("and attacks each turn if able"); + ability.addEffect(effect); + this.addAbility(ability); // Equip {3} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); diff --git a/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java b/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java index 753401fbf69..3c20ab8aee8 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java @@ -30,13 +30,6 @@ package mage.sets.returntoravnica; import java.util.UUID; import mage.MageObject; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.TargetController; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -47,6 +40,13 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -76,9 +76,7 @@ public class SoulTithe extends CardImpl { // At the beginning of the upkeep of enchanted permanent's controller, // that player sacrifices it unless he or she pays {X}, // where X is its converted mana cost. - Ability gainedAbility = new BeginningOfUpkeepTriggeredAbility(new SoulTitheSacrificeSourceUnlessPaysEffect(), TargetController.YOU, false); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, rule))); - + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SoulTitheEffect(), TargetController.CONTROLLER_ATTACHED_TO, false)); } public SoulTithe (final SoulTithe card) { @@ -91,38 +89,42 @@ public class SoulTithe extends CardImpl { } } -class SoulTitheSacrificeSourceUnlessPaysEffect extends OneShotEffect { +class SoulTitheEffect extends OneShotEffect { - public SoulTitheSacrificeSourceUnlessPaysEffect() { + public SoulTitheEffect() { super(Outcome.Sacrifice); staticText = "that player sacrifices it unless he or she pays {X}, where X is its converted mana cost"; } - public SoulTitheSacrificeSourceUnlessPaysEffect(final SoulTitheSacrificeSourceUnlessPaysEffect effect) { + public SoulTitheEffect(final SoulTitheEffect effect) { super(effect); } @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(source.getSourceId()); - MageObject sourceObject = source.getSourceObject(game); - if (player != null && permanent != null && sourceObject != null) { - int cmc = permanent.getManaCost().convertedManaCost(); - if (player.chooseUse(Outcome.Benefit, "Pay {" + cmc + "} for " + permanent.getName() + "? (otherwise you sacrifice it)", source, game)) { - Cost cost = new GenericManaCost(cmc); - if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { + Permanent aura = game.getPermanent(source.getSourceId()); + if(aura != null) { + Permanent permanent = game.getPermanent(aura.getAttachedTo()); + if(permanent != null) { + Player player = game.getPlayer(permanent.getControllerId()); + if(player != null) { + int cmc = permanent.getManaCost().convertedManaCost(); + if (player.chooseUse(Outcome.Benefit, "Pay {" + cmc + "} for " + permanent.getName() + "? (otherwise you sacrifice it)", source, game)) { + Cost cost = new GenericManaCost(cmc); + if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) { + return true; + } + } + permanent.sacrifice(source.getSourceId(), game); return true; } } - permanent.sacrifice(source.getSourceId(), game); - return true; } return false; } @Override - public SoulTitheSacrificeSourceUnlessPaysEffect copy() { - return new SoulTitheSacrificeSourceUnlessPaysEffect(this); + public SoulTitheEffect copy() { + return new SoulTitheEffect(this); } } diff --git a/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java b/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java index 48386fc4bf3..85d1496ca5c 100644 --- a/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java +++ b/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java @@ -30,13 +30,10 @@ package mage.sets.tempest; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DiesCreatureTriggeredAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; -import mage.constants.AttachmentType; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; @@ -61,11 +58,9 @@ public class SadisticGlee extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Whenever a creature dies, put a +1/+1 counter on enchanted creature. - Effect effect = new GainAbilityAttachedEffect(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), AttachmentType.AURA); - ability.addEffect(effect); - effect.setText("Whenever a creature dies, put a +1/+1 counter on enchanted creature."); + this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersAttachedEffect( + CounterType.P1P1.createInstance(), "enchanted creature"), false)); } public SadisticGlee(final SadisticGlee card) { From 60579bfc79f5597d23dfba9be7501669b330e0be Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 26 Nov 2015 12:51:57 +0200 Subject: [PATCH 6/7] Implement cards: Battlewise Aven, Icatian Lieutenant, Silkenfist Fighter, and Silkenfist Order --- .../sets/fallenempires/IcatianLieutenant.java | 79 ++++++++++++++++++ .../mage/sets/judgment/BattlewiseAven.java | 81 +++++++++++++++++++ .../mastersedition/IcatianLieutenant.java | 54 +++++++++++++ .../mage/sets/nemesis/SilkenfistFighter.java | 67 +++++++++++++++ .../mage/sets/nemesis/SilkenfistOrder.java | 67 +++++++++++++++ 5 files changed, 348 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fallenempires/IcatianLieutenant.java create mode 100644 Mage.Sets/src/mage/sets/judgment/BattlewiseAven.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/IcatianLieutenant.java create mode 100644 Mage.Sets/src/mage/sets/nemesis/SilkenfistFighter.java create mode 100644 Mage.Sets/src/mage/sets/nemesis/SilkenfistOrder.java diff --git a/Mage.Sets/src/mage/sets/fallenempires/IcatianLieutenant.java b/Mage.Sets/src/mage/sets/fallenempires/IcatianLieutenant.java new file mode 100644 index 00000000000..edb92cc6d97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/IcatianLieutenant.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.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +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.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class IcatianLieutenant extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature"); + + static { + filter.add(new SubtypePredicate("Soldier")); + } + + public IcatianLieutenant(UUID ownerId) { + super(ownerId, 151, "Icatian Lieutenant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{W}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {1}{W}: Target Soldier creature gets +1/+0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public IcatianLieutenant(final IcatianLieutenant card) { + super(card); + } + + @Override + public IcatianLieutenant copy() { + return new IcatianLieutenant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/BattlewiseAven.java b/Mage.Sets/src/mage/sets/judgment/BattlewiseAven.java new file mode 100644 index 00000000000..c446713b153 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/BattlewiseAven.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class BattlewiseAven extends CardImpl { + + public BattlewiseAven(UUID ownerId) { + super(ownerId, 4, "Battlewise Aven", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Threshold - As long as seven or more cards are in your graveyard, Battlewise Aven gets +1/+1 and has first strike. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), + "As long as seven or more cards are in your graveyard, {this} gets +1/+1")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), + new CardsInControllerGraveCondition(7), "and has first strike")); + ability.setAbilityWord(AbilityWord.THRESHOLD); + this.addAbility(ability); + } + + public BattlewiseAven(final BattlewiseAven card) { + super(card); + } + + @Override + public BattlewiseAven copy() { + return new BattlewiseAven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/IcatianLieutenant.java b/Mage.Sets/src/mage/sets/mastersedition/IcatianLieutenant.java new file mode 100644 index 00000000000..474452b7b3b --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/IcatianLieutenant.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mastersedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class IcatianLieutenant extends mage.sets.fallenempires.IcatianLieutenant { + + public IcatianLieutenant(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "MED"; + this.rarity = Rarity.COMMON; + } + + public IcatianLieutenant(final IcatianLieutenant card) { + super(card); + } + + @Override + public IcatianLieutenant copy() { + return new IcatianLieutenant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/SilkenfistFighter.java b/Mage.Sets/src/mage/sets/nemesis/SilkenfistFighter.java new file mode 100644 index 00000000000..8ac25b84cc3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/SilkenfistFighter.java @@ -0,0 +1,67 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SilkenfistFighter extends CardImpl { + + public SilkenfistFighter(UUID ownerId) { + super(ownerId, 19, "Silkenfist Fighter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Whenever Silkenfist Fighter becomes blocked, untap it. + Effect effect = new UntapSourceEffect(); + effect.setText("untap it"); + this.addAbility(new BecomesBlockedTriggeredAbility(effect, false)); + } + + public SilkenfistFighter(final SilkenfistFighter card) { + super(card); + } + + @Override + public SilkenfistFighter copy() { + return new SilkenfistFighter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/SilkenfistOrder.java b/Mage.Sets/src/mage/sets/nemesis/SilkenfistOrder.java new file mode 100644 index 00000000000..23ecd99ace7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/SilkenfistOrder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SilkenfistOrder extends CardImpl { + + public SilkenfistOrder(UUID ownerId) { + super(ownerId, 20, "Silkenfist Order", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Whenever Silkenfist Order becomes blocked, untap it. + Effect effect = new UntapSourceEffect(); + effect.setText("untap it"); + this.addAbility(new BecomesBlockedTriggeredAbility(effect, false)); + } + + public SilkenfistOrder(final SilkenfistOrder card) { + super(card); + } + + @Override + public SilkenfistOrder copy() { + return new SilkenfistOrder(this); + } +} From 05e77898fd50cb96a2860ab4022c3ef9316a8505 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 26 Nov 2015 14:44:15 +0200 Subject: [PATCH 7/7] Implement cards: Boneknitter, Embalmed Brawler, Putrid Raptor, and Zombie Brute --- .../mage/sets/legions/EmbalmedBrawler.java | 69 ++++++++++++++++ .../src/mage/sets/legions/ZombieBrute.java | 66 +++++++++++++++ .../src/mage/sets/onslaught/Boneknitter.java | 81 +++++++++++++++++++ .../src/mage/sets/scourge/PutridRaptor.java | 74 +++++++++++++++++ 4 files changed, 290 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/legions/EmbalmedBrawler.java create mode 100644 Mage.Sets/src/mage/sets/legions/ZombieBrute.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/Boneknitter.java create mode 100644 Mage.Sets/src/mage/sets/scourge/PutridRaptor.java diff --git a/Mage.Sets/src/mage/sets/legions/EmbalmedBrawler.java b/Mage.Sets/src/mage/sets/legions/EmbalmedBrawler.java new file mode 100644 index 00000000000..4038cfe0b18 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/EmbalmedBrawler.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.AmplifyEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.AmplifyAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class EmbalmedBrawler extends CardImpl { + + public EmbalmedBrawler(UUID ownerId) { + super(ownerId, 69, "Embalmed Brawler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Amplify 1 + this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1)); + // Whenever Embalmed Brawler attacks or blocks, you lose 1 life for each +1/+1 counter on it. + this.addAbility(new AttacksOrBlocksTriggeredAbility(new LoseLifeSourceControllerEffect(new CountersCount(CounterType.P1P1)), false)); + } + + public EmbalmedBrawler(final EmbalmedBrawler card) { + super(card); + } + + @Override + public EmbalmedBrawler copy() { + return new EmbalmedBrawler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/ZombieBrute.java b/Mage.Sets/src/mage/sets/legions/ZombieBrute.java new file mode 100644 index 00000000000..c550b504244 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/ZombieBrute.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.AmplifyEffect; +import mage.abilities.keyword.AmplifyAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ZombieBrute extends CardImpl { + + public ZombieBrute(UUID ownerId) { + super(ownerId, 87, "Zombie Brute", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{B}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Zombie"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Amplify 1 + this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1)); + // Trample + this.addAbility(TrampleAbility.getInstance()); + } + + public ZombieBrute(final ZombieBrute card) { + super(card); + } + + @Override + public ZombieBrute copy() { + return new ZombieBrute(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Boneknitter.java b/Mage.Sets/src/mage/sets/onslaught/Boneknitter.java new file mode 100644 index 00000000000..eacced8d3ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/Boneknitter.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateTargetEffect; +import mage.abilities.keyword.MorphAbility; +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; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class Boneknitter extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Zombie"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public Boneknitter(UUID ownerId) { + super(ownerId, 128, "Boneknitter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{B}: Regenerate target Zombie. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{1}{B}")); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + // Morph {2}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{B}"))); + } + + public Boneknitter(final Boneknitter card) { + super(card); + } + + @Override + public Boneknitter copy() { + return new Boneknitter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/PutridRaptor.java b/Mage.Sets/src/mage/sets/scourge/PutridRaptor.java new file mode 100644 index 00000000000..1efb8f7687e --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/PutridRaptor.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class PutridRaptor extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Zombie card"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public PutridRaptor(UUID ownerId) { + super(ownerId, 71, "Putrid Raptor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Zombie"); + this.subtype.add("Lizard"); + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Morph-Discard a Zombie card. + this.addAbility(new MorphAbility(this, new DiscardCardCost(filter))); + } + + public PutridRaptor(final PutridRaptor card) { + super(card); + } + + @Override + public PutridRaptor copy() { + return new PutridRaptor(this); + } +}