From 1af25bd3a407e65222e922bd260d4ee66ab2eb6a Mon Sep 17 00:00:00 2001 From: jeffwadsworth <> Date: Wed, 28 Nov 2012 15:37:58 -0600 Subject: [PATCH] - Added Vastwood Animist, Terastodon, Tomb Hex, Summit Apes. --- .../mage/sets/magic2010/AwakenerDruid.java | 2 +- .../sets/mirrodin/LifesparkSpellbomb.java | 2 +- .../src/mage/sets/worldwake/SummitApes.java | 78 ++++++++++++ .../src/mage/sets/worldwake/Terastodon.java | 118 ++++++++++++++++++ .../src/mage/sets/worldwake/TombHex.java | 68 ++++++++++ .../mage/sets/worldwake/VastwoodAnimist.java | 104 +++++++++++++++ .../BecomesCreatureTargetEffect.java | 6 +- 7 files changed, 373 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/worldwake/SummitApes.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/Terastodon.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/TombHex.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java diff --git a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java index 6e65ab9afcb..c748afe5769 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java +++ b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java @@ -81,7 +81,7 @@ public class AwakenerDruid extends CardImpl { class AwakenerDruidToken extends Token { public AwakenerDruidToken() { - super("", "4/5 green Treefolk creature"); + super("", "4/5 green Treefolk creature as long as {this} is on the battlefield"); cardType.add(CardType.CREATURE); subtype.add("Treefolk"); color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java b/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java index d03b5b3df75..fbc0cf877b0 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java +++ b/Mage.Sets/src/mage/sets/mirrodin/LifesparkSpellbomb.java @@ -77,7 +77,7 @@ public class LifesparkSpellbomb extends CardImpl { class LifesparkSpellbombToken extends Token { public LifesparkSpellbombToken() { - super("", "3/3"); + super("", "3/3 creature"); this.cardType.add(CardType.CREATURE); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/worldwake/SummitApes.java b/Mage.Sets/src/mage/sets/worldwake/SummitApes.java new file mode 100644 index 00000000000..7d2bbf6891d --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/SummitApes.java @@ -0,0 +1,78 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.worldwake; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.ControlsPermanentCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.CantBeBlockedByOneEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author jeffwadsworth + */ +public class SummitApes extends CardImpl { + + private static final String rule = "As long as you control a Mountain, {this} can't be blocked except by two or more creatures"; + private static final FilterLandPermanent filter = new FilterLandPermanent("a Mountain"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public SummitApes(UUID ownerId) { + super(ownerId, 114, "Summit Apes", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Ape"); + + this.color.setGreen(true); + this.power = new MageInt(5); + this.toughness = new MageInt(2); + + // As long as you control a Mountain, Summit Apes can't be blocked except by two or more creatures. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, + new ConditionalContinousEffect(new CantBeBlockedByOneEffect(2), new ControlsPermanentCondition(filter), rule))); + } + + public SummitApes(final SummitApes card) { + super(card); + } + + @Override + public SummitApes copy() { + return new SummitApes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/Terastodon.java b/Mage.Sets/src/mage/sets/worldwake/Terastodon.java new file mode 100644 index 00000000000..d0f41812c48 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/Terastodon.java @@ -0,0 +1,118 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.ElephantToken; +import mage.players.Player; +import mage.target.TargetPermanent; + +/** + * + * @author jeffwadsworth + */ +public class Terastodon extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("noncreature permanent"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public Terastodon(UUID ownerId) { + super(ownerId, 115, "Terastodon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Elephant"); + + this.color.setGreen(true); + this.power = new MageInt(9); + this.toughness = new MageInt(9); + + // When Terastodon enters the battlefield, you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new TerastodonEffect(), true); + ability.addTarget(new TargetPermanent(0, 3, filter, true)); + this.addAbility(ability); + } + + public Terastodon(final Terastodon card) { + super(card); + } + + @Override + public Terastodon copy() { + return new Terastodon(this); + } +} + +class TerastodonEffect extends OneShotEffect { + + public TerastodonEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield"; + } + + public TerastodonEffect(final TerastodonEffect effect) { + super(effect); + } + + @Override + public TerastodonEffect copy() { + return new TerastodonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID targetID : this.targetPointer.getTargets(game, source)) { + Permanent permanent = game.getPermanent(targetID); + if (permanent != null) { + if (permanent.destroy(source.getId(), game, false)) { + if (game.getState().getZone(permanent.getId()) == Zone.GRAVEYARD) { + Player controller = game.getPlayer(permanent.getControllerId()); + ElephantToken elephantToken = new ElephantToken(); + elephantToken.putOntoBattlefield(1, game, source.getSourceId(), controller.getId()); + } + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/TombHex.java b/Mage.Sets/src/mage/sets/worldwake/TombHex.java new file mode 100644 index 00000000000..a9756fee91a --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/TombHex.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.worldwake; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.condition.common.LandfallCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.LandfallWatcher; + +/** + * + * @author jeffwadsworth + */ +public class TombHex extends CardImpl { + + public TombHex(UUID ownerId) { + super(ownerId, 69, "Tomb Hex", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "WWK"; + + this.color.setBlack(true); + + // Target creature gets -2/-2 until end of turn. + // Landfall - If you had a land enter the battlefield under your control this turn, that creature gets -4/-4 until end of turn instead. + this.addWatcher(new LandfallWatcher()); + this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(-4, -4, Constants.Duration.EndOfTurn), new BoostTargetEffect(-2, -2, Constants.Duration.EndOfTurn), LandfallCondition.getInstance(), "Target creature gets -2/-2 until end of turn. Landfall - If you had a land enter the battlefield under your control this turn, that creature gets -4/-4 until end of turn instead")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public TombHex(final TombHex card) { + super(card); + } + + @Override + public TombHex copy() { + return new TombHex(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java b/Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java new file mode 100644 index 00000000000..faf5b183900 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.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.worldwake; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.Token; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author jeffwadsworth + */ +public class VastwoodAnimist extends CardImpl { + + private final static FilterControlledPermanent filter = new FilterControlledLandPermanent(); + + public VastwoodAnimist(UUID ownerId) { + super(ownerId, 116, "Vastwood Animist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Elf"); + this.subtype.add("Shaman"); + this.subtype.add("Ally"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new ElementalLandToken(), "land", Constants.Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetControlledPermanent(filter)); + this.addAbility(ability); + } + + public VastwoodAnimist(final VastwoodAnimist card) { + super(card); + } + + @Override + public VastwoodAnimist copy() { + return new VastwoodAnimist(this); + } +} + +class ElementalLandToken extends Token { + + final static FilterControlledPermanent filterAllies = new FilterControlledPermanent("allies you control"); + + static { + filterAllies.add(new SubtypePredicate("Ally")); + } + + ElementalLandToken() { + super("", "X/X Elemental creature, where X is the number of Allies you control"); + cardType.add(CardType.CREATURE); + subtype.add("Elemental"); + power = new MageInt(0); + toughness = new MageInt(0); + DynamicValue controlledAllies = new PermanentsOnBattlefieldCount(filterAllies); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(controlledAllies, controlledAllies, Duration.WhileOnBattlefield))); + } +} diff --git a/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java b/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java index d8e567c9bd8..09b3fe9963e 100644 --- a/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/BecomesCreatureTargetEffect.java @@ -133,10 +133,10 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl 0) - sb.append(" that's still a ").append(type); + sb.append(". It's still a ").append(type); return sb.toString(); }