From 597d1323fafb05ab0280b7d7637bb1ce77e9acd9 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 20 Aug 2015 21:10:03 +0300 Subject: [PATCH] Implement cards: Corpulent Corpse, Viashino Bladescout, Wurmcalling, and Yavimaya Dryad --- .../mage/sets/archenemy/YavimayaDryad.java | 75 +++++++++++++ .../mage/sets/timespiral/CorpulentCorpse.java | 66 +++++++++++ .../sets/timespiral/ViashinoBladescout.java | 73 ++++++++++++ .../src/mage/sets/timespiral/Wurmcalling.java | 104 ++++++++++++++++++ .../mage/sets/timespiral/YavimayaDryad.java | 52 +++++++++ 5 files changed, 370 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/archenemy/YavimayaDryad.java create mode 100644 Mage.Sets/src/mage/sets/timespiral/CorpulentCorpse.java create mode 100644 Mage.Sets/src/mage/sets/timespiral/ViashinoBladescout.java create mode 100644 Mage.Sets/src/mage/sets/timespiral/Wurmcalling.java create mode 100644 Mage.Sets/src/mage/sets/timespiral/YavimayaDryad.java diff --git a/Mage.Sets/src/mage/sets/archenemy/YavimayaDryad.java b/Mage.Sets/src/mage/sets/archenemy/YavimayaDryad.java new file mode 100644 index 00000000000..c83ae5e7b38 --- /dev/null +++ b/Mage.Sets/src/mage/sets/archenemy/YavimayaDryad.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.archenemy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LoneFox + */ +public class YavimayaDryad extends CardImpl { + + private static final FilterLandCard filter = new FilterLandCard("a Forest card"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public YavimayaDryad(UUID ownerId) { + super(ownerId, 75, "Yavimaya Dryad", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "ARC"; + this.subtype.add("Dryad"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Forestwalk + this.addAbility(new ForestwalkAbility()); + // When Yavimaya Dryad enters the battlefield, you may search your library for a Forest card and put it onto the battlefield tapped under target player's control. If you do, shuffle your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), true)); + } + + public YavimayaDryad(final YavimayaDryad card) { + super(card); + } + + @Override + public YavimayaDryad copy() { + return new YavimayaDryad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/CorpulentCorpse.java b/Mage.Sets/src/mage/sets/timespiral/CorpulentCorpse.java new file mode 100644 index 00000000000..52190d73722 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/CorpulentCorpse.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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.FearAbility; +import mage.abilities.keyword.SuspendAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CorpulentCorpse extends CardImpl { + + public CorpulentCorpse(UUID ownerId) { + super(ownerId, 98, "Corpulent Corpse", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Zombie"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Fear + this.addAbility(FearAbility.getInstance()); + // Suspend 5-{B} + this.addAbility(new SuspendAbility(5, new ManaCostsImpl("{B}"), this)); + } + + public CorpulentCorpse(final CorpulentCorpse card) { + super(card); + } + + @Override + public CorpulentCorpse copy() { + return new CorpulentCorpse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/ViashinoBladescout.java b/Mage.Sets/src/mage/sets/timespiral/ViashinoBladescout.java new file mode 100644 index 00000000000..0bc7db02d78 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/ViashinoBladescout.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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ViashinoBladescout extends CardImpl { + + public ViashinoBladescout(UUID ownerId) { + super(ownerId, 185, "Viashino Bladescout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Viashino"); + this.subtype.add("Scout"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // When Viashino Bladescout enters the battlefield, target creature gains first strike until end of turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ViashinoBladescout(final ViashinoBladescout card) { + super(card); + } + + @Override + public ViashinoBladescout copy() { + return new ViashinoBladescout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/Wurmcalling.java b/Mage.Sets/src/mage/sets/timespiral/Wurmcalling.java new file mode 100644 index 00000000000..fac4952c75b --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/Wurmcalling.java @@ -0,0 +1,104 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class Wurmcalling extends CardImpl { + + public Wurmcalling(UUID ownerId) { + super(ownerId, 234, "Wurmcalling", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{G}"); + this.expansionSetCode = "TSP"; + + // Buyback {2}{G} + this.addAbility(new BuybackAbility("{2}{G}")); + // Put an X/X green Wurm creature token onto the battlefield. + this.getSpellAbility().addEffect(new WurmcallingEffect()); + } + + public Wurmcalling(final Wurmcalling card) { + super(card); + } + + @Override + public Wurmcalling copy() { + return new Wurmcalling(this); + } +} + +class WurmcallingEffect extends OneShotEffect { + + public WurmcallingEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "Put an X/X green Wurm creature token onto the battlefield"; + } + + public WurmcallingEffect(WurmcallingEffect ability) { + super(ability); + } + + @Override + public boolean apply(Game game, Ability source) { + int count = source.getManaCostsToPay().getX(); + WurmToken token = new WurmToken(); + token.getPower().initValue(count); + token.getToughness().initValue(count); + token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); + return true; + } + + @Override + public WurmcallingEffect copy() { + return new WurmcallingEffect(this); + } +} + +class WurmToken extends Token { + public WurmToken() { + super("Wurm", "X/X green Wurm creature token"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Wurm"); + power = new MageInt(0); + toughness = new MageInt(0); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/YavimayaDryad.java b/Mage.Sets/src/mage/sets/timespiral/YavimayaDryad.java new file mode 100644 index 00000000000..e066abdbceb --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/YavimayaDryad.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.timespiral; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class YavimayaDryad extends mage.sets.archenemy.YavimayaDryad { + + public YavimayaDryad(UUID ownerId) { + super(ownerId); + this.cardNumber = 235; + this.expansionSetCode = "TSP"; + } + + public YavimayaDryad(final YavimayaDryad card) { + super(card); + } + + @Override + public YavimayaDryad copy() { + return new YavimayaDryad(this); + } +}