From f50089f2c65e5d64e0f72fea3573ec9a73fdea1c Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 17 Dec 2015 12:30:00 +0200 Subject: [PATCH] Implement cards: Crowd Favorites, Daru Stinger, Swooping Talon, and Trap Digger --- .../src/mage/sets/legions/DaruStinger.java | 75 +++++++++++++++ .../src/mage/sets/legions/SwoopingTalon.java | 74 +++++++++++++++ .../mage/sets/onslaught/CrowdFavorites.java | 74 +++++++++++++++ .../src/mage/sets/scourge/TrapDigger.java | 94 +++++++++++++++++++ .../main/java/mage/counters/CounterType.java | 1 + 5 files changed, 318 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/legions/DaruStinger.java create mode 100644 Mage.Sets/src/mage/sets/legions/SwoopingTalon.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/CrowdFavorites.java create mode 100644 Mage.Sets/src/mage/sets/scourge/TrapDigger.java diff --git a/Mage.Sets/src/mage/sets/legions/DaruStinger.java b/Mage.Sets/src/mage/sets/legions/DaruStinger.java new file mode 100644 index 0000000000..323dbc9732 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/DaruStinger.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.AmplifyEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.AmplifyAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetAttackingOrBlockingCreature; + +/** + * + * @author LoneFox + */ +public class DaruStinger extends CardImpl { + + public DaruStinger(UUID ownerId) { + super(ownerId, 10, "Daru Stinger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Amplify 1 + this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1)); + // {tap}: Daru Stinger deals damage equal to the number of +1/+1 counters on it to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersCount(CounterType.P1P1)), new TapSourceCost()); + ability.addTarget(new TargetAttackingOrBlockingCreature()); + this.addAbility(ability); + } + + public DaruStinger(final DaruStinger card) { + super(card); + } + + @Override + public DaruStinger copy() { + return new DaruStinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/SwoopingTalon.java b/Mage.Sets/src/mage/sets/legions/SwoopingTalon.java new file mode 100644 index 0000000000..7af0b7b0d0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/SwoopingTalon.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProvokeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class SwoopingTalon extends CardImpl { + + public SwoopingTalon(UUID ownerId) { + super(ownerId, 23, "Swooping Talon", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {1}: Swooping Talon loses flying until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilitySourceEffect( + FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}"))); + // Provoke + this.addAbility(new ProvokeAbility()); + } + + public SwoopingTalon(final SwoopingTalon card) { + super(card); + } + + @Override + public SwoopingTalon copy() { + return new SwoopingTalon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/CrowdFavorites.java b/Mage.Sets/src/mage/sets/onslaught/CrowdFavorites.java new file mode 100644 index 0000000000..fba30d9ca5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/CrowdFavorites.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.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.TapTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +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 CrowdFavorites extends CardImpl { + + public CrowdFavorites(UUID ownerId) { + super(ownerId, 15, "Crowd Favorites", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {3}{W}: Tap target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{3}{W}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + // {3}{W}: Crowd Favorites gets +0/+5 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 5, Duration.EndOfTurn), new ManaCostsImpl("{3}{W}"))); + } + + public CrowdFavorites(final CrowdFavorites card) { + super(card); + } + + @Override + public CrowdFavorites copy() { + return new CrowdFavorites(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/TrapDigger.java b/Mage.Sets/src/mage/sets/scourge/TrapDigger.java new file mode 100644 index 0000000000..e204a16ef7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/TrapDigger.java @@ -0,0 +1,94 @@ +/* + * 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.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetAttackingCreature; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LoneFox + */ +public class TrapDigger extends CardImpl { + + private static final FilterControlledLandPermanent filter1 = new FilterControlledLandPermanent("a land with a trap counter on it"); + private static final FilterAttackingCreature filter2 = new FilterAttackingCreature("attacking creature without flying"); + + static { + filter1.add(new CounterPredicate(CounterType.TRAP)); + filter2.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public TrapDigger(UUID ownerId) { + super(ownerId, 24, "Trap Digger", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {2}{W}, {tap}: Put a trap counter on target land you control. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.TRAP.createInstance()), new ManaCostsImpl("{2}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent())); + this.addAbility(ability); + // Sacrifice a land with a trap counter on it: Trap Digger deals 3 damage to target attacking creature without flying. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new SacrificeTargetCost(new TargetControlledPermanent(filter1))); + ability.addTarget(new TargetAttackingCreature(1, 1, filter2, false)); + this.addAbility(ability); + } + + public TrapDigger(final TrapDigger card) { + super(card); + } + + @Override + public TrapDigger copy() { + return new TrapDigger(this); + } +} diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index afccad2b15..d4dcbdb8bd 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -104,6 +104,7 @@ public enum CounterType { TIDE("tide"), TIME("time"), TOWER("tower"), + TRAP("trap"), VELOCITY("velocity"), VERSE("verse"), VITALITY("vitality"),