From 9777aefae2e61b5b19465623530c16354c8fb0e8 Mon Sep 17 00:00:00 2001 From: Quercitron Date: Sun, 12 Jan 2014 19:33:57 +0400 Subject: [PATCH] [6ED] Add 4 cards --- .../src/mage/sets/eighthedition/Tremor.java | 52 +++++++++++++ Mage.Sets/src/mage/sets/iceage/Vertigo.java | 74 +++++++++++++++++++ .../mage/sets/mercadianmasques/Tremor.java | 52 +++++++++++++ .../src/mage/sets/seventhedition/Tremor.java | 70 ++++++++++++++++++ .../mage/sets/sixthedition/DenseFoliage.java | 52 +++++++++++++ .../mage/sets/sixthedition/SpittingDrake.java | 52 +++++++++++++ .../src/mage/sets/sixthedition/Tremor.java | 52 +++++++++++++ .../src/mage/sets/sixthedition/Vertigo.java | 52 +++++++++++++ .../src/mage/sets/visions/SpittingDrake.java | 71 ++++++++++++++++++ Mage.Sets/src/mage/sets/visions/Tremor.java | 52 +++++++++++++ .../mage/sets/weatherlight/DenseFoliage.java | 66 +++++++++++++++++ .../canttarget/DenseFoliageTest.java | 49 ++++++++++++ 12 files changed, 694 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/eighthedition/Tremor.java create mode 100644 Mage.Sets/src/mage/sets/iceage/Vertigo.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/Tremor.java create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Tremor.java create mode 100644 Mage.Sets/src/mage/sets/sixthedition/DenseFoliage.java create mode 100644 Mage.Sets/src/mage/sets/sixthedition/SpittingDrake.java create mode 100644 Mage.Sets/src/mage/sets/sixthedition/Tremor.java create mode 100644 Mage.Sets/src/mage/sets/sixthedition/Vertigo.java create mode 100644 Mage.Sets/src/mage/sets/visions/SpittingDrake.java create mode 100644 Mage.Sets/src/mage/sets/visions/Tremor.java create mode 100644 Mage.Sets/src/mage/sets/weatherlight/DenseFoliage.java create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/replacement/canttarget/DenseFoliageTest.java diff --git a/Mage.Sets/src/mage/sets/eighthedition/Tremor.java b/Mage.Sets/src/mage/sets/eighthedition/Tremor.java new file mode 100644 index 00000000000..cb76aa41450 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eighthedition/Tremor.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.eighthedition; + +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class Tremor extends mage.sets.seventhedition.Tremor { + + public Tremor(UUID ownerId) { + super(ownerId); + this.cardNumber = 228; + this.expansionSetCode = "8ED"; + } + + public Tremor(final Tremor card) { + super(card); + } + + @Override + public Tremor copy() { + return new Tremor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Vertigo.java b/Mage.Sets/src/mage/sets/iceage/Vertigo.java new file mode 100644 index 00000000000..c0811169ee1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Vertigo.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.iceage; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continious.LoseAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Quercitron + */ +public class Vertigo extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public Vertigo(UUID ownerId) { + super(ownerId, 222, "Vertigo", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "ICE"; + + this.color.setRed(true); + + // Vertigo deals 2 damage to target creature with flying. That creature loses flying until end of turn. + this.getSpellAbility().addEffect(new DamageTargetEffect(2)); + this.getSpellAbility().addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public Vertigo(final Vertigo card) { + super(card); + } + + @Override + public Vertigo copy() { + return new Vertigo(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/Tremor.java b/Mage.Sets/src/mage/sets/mercadianmasques/Tremor.java new file mode 100644 index 00000000000..ce8ec427cc3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/Tremor.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.mercadianmasques; + +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class Tremor extends mage.sets.seventhedition.Tremor { + + public Tremor(UUID ownerId) { + super(ownerId); + this.cardNumber = 220; + this.expansionSetCode = "MMQ"; + } + + public Tremor(final Tremor card) { + super(card); + } + + @Override + public Tremor copy() { + return new Tremor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/Tremor.java b/Mage.Sets/src/mage/sets/seventhedition/Tremor.java new file mode 100644 index 00000000000..446dd1dad82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Tremor.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.seventhedition; + +import java.util.UUID; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author Quercitron + */ +public class Tremor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public Tremor(UUID ownerId) { + super(ownerId, 225, "Tremor", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{R}"); + this.expansionSetCode = "7ED"; + + this.color.setRed(true); + + // Tremor deals 1 damage to each creature without flying. + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter)); + } + + public Tremor(final Tremor card) { + super(card); + } + + @Override + public Tremor copy() { + return new Tremor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/sixthedition/DenseFoliage.java b/Mage.Sets/src/mage/sets/sixthedition/DenseFoliage.java new file mode 100644 index 00000000000..8081ae1a486 --- /dev/null +++ b/Mage.Sets/src/mage/sets/sixthedition/DenseFoliage.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.sixthedition; + +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class DenseFoliage extends mage.sets.weatherlight.DenseFoliage { + + public DenseFoliage(UUID ownerId) { + super(ownerId); + this.cardNumber = 221; + this.expansionSetCode = "6ED"; + } + + public DenseFoliage(final DenseFoliage card) { + super(card); + } + + @Override + public DenseFoliage copy() { + return new DenseFoliage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/sixthedition/SpittingDrake.java b/Mage.Sets/src/mage/sets/sixthedition/SpittingDrake.java new file mode 100644 index 00000000000..0db48f66c8a --- /dev/null +++ b/Mage.Sets/src/mage/sets/sixthedition/SpittingDrake.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.sixthedition; + +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class SpittingDrake extends mage.sets.visions.SpittingDrake { + + public SpittingDrake(UUID ownerId) { + super(ownerId); + this.cardNumber = 207; + this.expansionSetCode = "6ED"; + } + + public SpittingDrake(final SpittingDrake card) { + super(card); + } + + @Override + public SpittingDrake copy() { + return new SpittingDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/sixthedition/Tremor.java b/Mage.Sets/src/mage/sets/sixthedition/Tremor.java new file mode 100644 index 00000000000..d6b2a694c2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/sixthedition/Tremor.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.sixthedition; + +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class Tremor extends mage.sets.seventhedition.Tremor { + + public Tremor(UUID ownerId) { + super(ownerId); + this.cardNumber = 211; + this.expansionSetCode = "6ED"; + } + + public Tremor(final Tremor card) { + super(card); + } + + @Override + public Tremor copy() { + return new Tremor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/sixthedition/Vertigo.java b/Mage.Sets/src/mage/sets/sixthedition/Vertigo.java new file mode 100644 index 00000000000..6ea0d1ae6c4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/sixthedition/Vertigo.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.sixthedition; + +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class Vertigo extends mage.sets.iceage.Vertigo { + + public Vertigo(UUID ownerId) { + super(ownerId); + this.cardNumber = 212; + this.expansionSetCode = "6ED"; + } + + public Vertigo(final Vertigo card) { + super(card); + } + + @Override + public Vertigo copy() { + return new Vertigo(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/SpittingDrake.java b/Mage.Sets/src/mage/sets/visions/SpittingDrake.java new file mode 100644 index 00000000000..615a169fa3b --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/SpittingDrake.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.ActivateOncePerTurnActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author Quercitron + */ +public class SpittingDrake extends CardImpl { + + public SpittingDrake(UUID ownerId) { + super(ownerId, 95, "Spitting Drake", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Drake"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {R}: Spitting Drake gets +1/+0 until end of turn. Activate this ability only once each turn. + this.addAbility(new ActivateOncePerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public SpittingDrake(final SpittingDrake card) { + super(card); + } + + @Override + public SpittingDrake copy() { + return new SpittingDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/Tremor.java b/Mage.Sets/src/mage/sets/visions/Tremor.java new file mode 100644 index 00000000000..0c0501d76ae --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/Tremor.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 Quercitron + */ +public class Tremor extends mage.sets.seventhedition.Tremor { + + public Tremor(UUID ownerId) { + super(ownerId); + this.cardNumber = 99; + this.expansionSetCode = "VIS"; + } + + public Tremor(final Tremor card) { + super(card); + } + + @Override + public Tremor copy() { + return new Tremor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/DenseFoliage.java b/Mage.Sets/src/mage/sets/weatherlight/DenseFoliage.java new file mode 100644 index 00000000000..b0218811913 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/DenseFoliage.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.weatherlight; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CantTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author Quercitron + */ +public class DenseFoliage extends CardImpl { + + public DenseFoliage(UUID ownerId) { + super(ownerId, 66, "Dense Foliage", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "WTH"; + + this.color.setGreen(true); + + // Creatures can't be the targets of spells. + CantTargetEffect cantTargetEffect = new CantTargetEffect(new FilterCreaturePermanent("Creatures"), new FilterSpell(), Duration.WhileOnBattlefield); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, cantTargetEffect)); + } + + public DenseFoliage(final DenseFoliage card) { + super(card); + } + + @Override + public DenseFoliage copy() { + return new DenseFoliage(this); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/canttarget/DenseFoliageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/canttarget/DenseFoliageTest.java new file mode 100644 index 00000000000..9d7bd0ab72c --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/canttarget/DenseFoliageTest.java @@ -0,0 +1,49 @@ +package org.mage.test.cards.replacement.canttarget; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * DenseFoliage: Creatures can't be the targets of spells. + * + * @author Quercitron + */ +public class DenseFoliageTest extends CardTestPlayerBase { + + /** + * Test spell + */ + @Test + public void testSpellCantTarget() { + addCard(Zone.BATTLEFIELD, playerA, "Dense Foliage"); + addCard(Zone.HAND, playerA, "Lightning Bolt"); + addCard(Zone.BATTLEFIELD, playerA, "Mountain"); + + addCard(Zone.BATTLEFIELD, playerB, "Eager Cadet"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Eager Cadet"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + assertPermanentCount(playerB, "Eager Cadet", 1); + } + + /** + * Tests activated ability + */ + @Test + public void testAbilityCanTarget() { + addCard(Zone.BATTLEFIELD, playerA, "Dense Foliage"); + addCard(Zone.BATTLEFIELD, playerA, "Prodigal Sorcerer"); + + addCard(Zone.BATTLEFIELD, playerB, "Eager Cadet"); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:", "Eager Cadet"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + assertPermanentCount(playerB, "Eager Cadet", 0); + } +}