From 59357b8da13e9291328f12fda5d4035373e44fa2 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Mon, 26 Oct 2015 18:12:37 +0200 Subject: [PATCH 1/8] Implement cards: Charging Slateback, Krosan Groundshaker, Snarling Undorak, and Spurred Wolverine --- .../sets/onslaught/ChargingSlateback.java | 66 ++++++++++++++ .../sets/onslaught/KrosanGroundshaker.java | 79 +++++++++++++++++ .../mage/sets/onslaught/SnarlingUndorak.java | 81 ++++++++++++++++++ .../mage/sets/onslaught/SpurredWolverine.java | 85 +++++++++++++++++++ 4 files changed, 311 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/onslaught/ChargingSlateback.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/KrosanGroundshaker.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/SnarlingUndorak.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/SpurredWolverine.java diff --git a/Mage.Sets/src/mage/sets/onslaught/ChargingSlateback.java b/Mage.Sets/src/mage/sets/onslaught/ChargingSlateback.java new file mode 100644 index 0000000000..85e7d4663c --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ChargingSlateback.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ChargingSlateback extends CardImpl { + + public ChargingSlateback(UUID ownerId) { + super(ownerId, 194, "Charging Slateback", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Charging Slateback can't block. + this.addAbility(new CantBlockAbility()); + // Morph {4}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{R}"))); + } + + public ChargingSlateback(final ChargingSlateback card) { + super(card); + } + + @Override + public ChargingSlateback copy() { + return new ChargingSlateback(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/KrosanGroundshaker.java b/Mage.Sets/src/mage/sets/onslaught/KrosanGroundshaker.java new file mode 100644 index 0000000000..e33d105a91 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/KrosanGroundshaker.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.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.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +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 KrosanGroundshaker extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature"); + + static { + filter.add(new SubtypePredicate("Beast")); + } + + public KrosanGroundshaker(UUID ownerId) { + super(ownerId, 271, "Krosan Groundshaker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // {G}: Target Beast creature gains trample until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public KrosanGroundshaker(final KrosanGroundshaker card) { + super(card); + } + + @Override + public KrosanGroundshaker copy() { + return new KrosanGroundshaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SnarlingUndorak.java b/Mage.Sets/src/mage/sets/onslaught/SnarlingUndorak.java new file mode 100644 index 0000000000..b7f2be02a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SnarlingUndorak.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.continuous.BoostTargetEffect; +import mage.abilities.keyword.MorphAbility; +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 SnarlingUndorak extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature"); + + static { + filter.add(new SubtypePredicate("Beast")); + } + + public SnarlingUndorak(UUID ownerId) { + super(ownerId, 283, "Snarling Undorak", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}{G}: Target Beast creature gets +1/+1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{2}{G}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + // Morph {1}{G}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{G}{G}"))); + } + + public SnarlingUndorak(final SnarlingUndorak card) { + super(card); + } + + @Override + public SnarlingUndorak copy() { + return new SnarlingUndorak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SpurredWolverine.java b/Mage.Sets/src/mage/sets/onslaught/SpurredWolverine.java new file mode 100644 index 0000000000..10ad8ce064 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SpurredWolverine.java @@ -0,0 +1,85 @@ +/* + * 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.common.TapTargetCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpurredWolverine extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Beasts you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Beast")); + } + + public SpurredWolverine(UUID ownerId) { + super(ownerId, 237, "Spurred Wolverine", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Wolverine"); + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Tap two untapped Beasts you control: Target creature gains first strike until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect( + FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SpurredWolverine(final SpurredWolverine card) { + super(card); + } + + @Override + public SpurredWolverine copy() { + return new SpurredWolverine(this); + } +} From 2a0c48e1699dc4d580906cd8a97d39bec48f026c Mon Sep 17 00:00:00 2001 From: LoneFox Date: Mon, 26 Oct 2015 18:55:25 +0200 Subject: [PATCH 2/8] Implement cards: Aven Brigadier, Catapult Squad, Dive Bomber, and Grassland Crusader --- .../mage/sets/onslaught/AvenBrigadier.java | 81 ++++++++++++++++++ .../mage/sets/onslaught/CatapultSquad.java | 83 +++++++++++++++++++ .../src/mage/sets/onslaught/DiveBomber.java | 76 +++++++++++++++++ .../sets/onslaught/GrasslandCrusader.java | 81 ++++++++++++++++++ 4 files changed, 321 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/onslaught/AvenBrigadier.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/CatapultSquad.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/DiveBomber.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/GrasslandCrusader.java diff --git a/Mage.Sets/src/mage/sets/onslaught/AvenBrigadier.java b/Mage.Sets/src/mage/sets/onslaught/AvenBrigadier.java new file mode 100644 index 0000000000..8c3e703291 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AvenBrigadier.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.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +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; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class AvenBrigadier extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Bird creatures"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Soldier creatures"); + + static { + filter1.add(new SubtypePredicate("Bird")); + filter2.add(new SubtypePredicate("Soldier")); + } + + public AvenBrigadier(UUID ownerId) { + super(ownerId, 7, "Aven Brigadier", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Other Bird creatures get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter1, true))); + // Other Soldier creatures get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter2, true))); + } + + public AvenBrigadier(final AvenBrigadier card) { + super(card); + } + + @Override + public AvenBrigadier copy() { + return new AvenBrigadier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/CatapultSquad.java b/Mage.Sets/src/mage/sets/onslaught/CatapultSquad.java new file mode 100644 index 0000000000..b2d8615011 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/CatapultSquad.java @@ -0,0 +1,83 @@ +/* + * 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.common.TapTargetCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class CatapultSquad extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Soldiers you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Soldier")); + } + + public CatapultSquad(UUID ownerId) { + super(ownerId, 11, "Catapult Squad", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Tap two untapped Soldiers you control: Catapult Squad deals 2 damage to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addTarget(new TargetCreaturePermanent(new FilterAttackingOrBlockingCreature())); + this.addAbility(ability); + } + + public CatapultSquad(final CatapultSquad card) { + super(card); + } + + @Override + public CatapultSquad copy() { + return new CatapultSquad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/DiveBomber.java b/Mage.Sets/src/mage/sets/onslaught/DiveBomber.java new file mode 100644 index 0000000000..48a017e5c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/DiveBomber.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DiveBomber extends CardImpl { + + public DiveBomber(UUID ownerId) { + super(ownerId, 26, "Dive Bomber", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {tap}, Sacrifice Dive Bomber: Dive Bomber deals 2 damage to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent(new FilterAttackingOrBlockingCreature())); + this.addAbility(ability); + } + + public DiveBomber(final DiveBomber card) { + super(card); + } + + @Override + public DiveBomber copy() { + return new DiveBomber(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/GrasslandCrusader.java b/Mage.Sets/src/mage/sets/onslaught/GrasslandCrusader.java new file mode 100644 index 0000000000..e7d0cebe0a --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/GrasslandCrusader.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.common.TapSourceCost; +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.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GrasslandCrusader extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf or Soldier creature"); + + static { + filter.add(Predicates.or(new SubtypePredicate("Elf"), new SubtypePredicate("Soldier"))); + } + + public GrasslandCrusader(UUID ownerId) { + super(ownerId, 32, "Grassland Crusader", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // {tap}: Target Elf or Soldier creature gets +2/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public GrasslandCrusader(final GrasslandCrusader card) { + super(card); + } + + @Override + public GrasslandCrusader copy() { + return new GrasslandCrusader(this); + } +} From f041f22f1104e4eb3313f2ac1b1ed8e5799bfa34 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 27 Oct 2015 10:54:19 +0200 Subject: [PATCH 3/8] Implement the Courier cycle from Onslaught --- .../mage/sets/onslaught/EvergloveCourier.java | 91 ++++++++++++++++++ .../sets/onslaught/FlamestickCourier.java | 91 ++++++++++++++++++ .../sets/onslaught/FrightshroudCourier.java | 91 ++++++++++++++++++ .../mage/sets/onslaught/GhosthelmCourier.java | 92 +++++++++++++++++++ .../sets/onslaught/PearlspearCourier.java | 92 +++++++++++++++++++ 5 files changed, 457 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/onslaught/EvergloveCourier.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/FlamestickCourier.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/FrightshroudCourier.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/GhosthelmCourier.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/PearlspearCourier.java diff --git a/Mage.Sets/src/mage/sets/onslaught/EvergloveCourier.java b/Mage.Sets/src/mage/sets/onslaught/EvergloveCourier.java new file mode 100644 index 0000000000..3ecfc22b81 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/EvergloveCourier.java @@ -0,0 +1,91 @@ +/* + * 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.common.SkipUntapOptionalAbility; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +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 EvergloveCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf creature"); + + static { + filter.add(new SubtypePredicate("Elf")); + } + + public EvergloveCourier(UUID ownerId) { + super(ownerId, 262, "Everglove Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Elf"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Everglove Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{G}, {tap}: Target Elf creature gets +2/+2 and has trample for as long as Everglove Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Elf creature gets +2/+2"), new ManaCostsImpl("{2}{G}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has trample for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public EvergloveCourier(final EvergloveCourier card) { + super(card); + } + + @Override + public EvergloveCourier copy() { + return new EvergloveCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/FlamestickCourier.java b/Mage.Sets/src/mage/sets/onslaught/FlamestickCourier.java new file mode 100644 index 0000000000..33ca61ca66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/FlamestickCourier.java @@ -0,0 +1,91 @@ +/* + * 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.common.SkipUntapOptionalAbility; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +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 FlamestickCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + + public FlamestickCourier(UUID ownerId) { + super(ownerId, 203, "Flamestick Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Goblin"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Flamestick Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{R}, {tap}: Target Goblin creature gets +2/+2 and has haste for as long as Flamestick Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Goblin creature gets +2/+2"), new ManaCostsImpl("{2}{R}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has haste for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public FlamestickCourier(final FlamestickCourier card) { + super(card); + } + + @Override + public FlamestickCourier copy() { + return new FlamestickCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/FrightshroudCourier.java b/Mage.Sets/src/mage/sets/onslaught/FrightshroudCourier.java new file mode 100644 index 0000000000..71a3e443cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/FrightshroudCourier.java @@ -0,0 +1,91 @@ +/* + * 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.common.SkipUntapOptionalAbility; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FearAbility; +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 FrightshroudCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie creature"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public FrightshroudCourier(UUID ownerId) { + super(ownerId, 149, "Frightshroud Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Frightshroud Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{B}, {tap}: Target Zombie creature gets +2/+2 and has fear for as long as Frightshroud Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Zombie creature gets +2/+2"), new ManaCostsImpl("{2}{B}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(FearAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has fear for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public FrightshroudCourier(final FrightshroudCourier card) { + super(card); + } + + @Override + public FrightshroudCourier copy() { + return new FrightshroudCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/GhosthelmCourier.java b/Mage.Sets/src/mage/sets/onslaught/GhosthelmCourier.java new file mode 100644 index 0000000000..415aab1d5c --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/GhosthelmCourier.java @@ -0,0 +1,92 @@ +/* + * 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.common.SkipUntapOptionalAbility; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ShroudAbility; +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 GhosthelmCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wizard creature"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public GhosthelmCourier(UUID ownerId) { + super(ownerId, 85, "Ghosthelm Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Ghosthelm Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{U}, {tap}: Target Wizard creature gets +2/+2 and has shroud for as long as Ghosthelm Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Wizard creature gets +2/+2"), new ManaCostsImpl("{2}{U}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(ShroudAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has shroud for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public GhosthelmCourier(final GhosthelmCourier card) { + super(card); + } + + @Override + public GhosthelmCourier copy() { + return new GhosthelmCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/PearlspearCourier.java b/Mage.Sets/src/mage/sets/onslaught/PearlspearCourier.java new file mode 100644 index 0000000000..337976c425 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/PearlspearCourier.java @@ -0,0 +1,92 @@ +/* + * 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.common.SkipUntapOptionalAbility; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +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 PearlspearCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature"); + + static { + filter.add(new SubtypePredicate("Soldier")); + } + + public PearlspearCourier(UUID ownerId) { + super(ownerId, 48, "Pearlspear Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Pearlspear Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{W}, {tap}: Target Soldier creature gets +2/+2 and has vigilance for as long as Pearlspear Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Soldier creature gets +2/+2"), new ManaCostsImpl("{2}{W}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has vigilance for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public PearlspearCourier(final PearlspearCourier card) { + super(card); + } + + @Override + public PearlspearCourier copy() { + return new PearlspearCourier(this); + } +} From 6e160d78a117d2b5075c7276fe831ae76d01f51f Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 27 Oct 2015 11:18:40 +0200 Subject: [PATCH 4/8] Implement cards: Gravel Slinger, Improvised Armor, Pinpoint Avalanche, and Stag Beetle --- .../mage/sets/onslaught/GravelSlinger.java | 75 ++++++++++++++++++ .../mage/sets/onslaught/ImprovisedArmor.java | 78 +++++++++++++++++++ .../sets/onslaught/PinpointAvalanche.java | 60 ++++++++++++++ .../src/mage/sets/onslaught/StagBeetle.java | 75 ++++++++++++++++++ 4 files changed, 288 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/onslaught/GravelSlinger.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/ImprovisedArmor.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/PinpointAvalanche.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/StagBeetle.java diff --git a/Mage.Sets/src/mage/sets/onslaught/GravelSlinger.java b/Mage.Sets/src/mage/sets/onslaught/GravelSlinger.java new file mode 100644 index 0000000000..23b3b50eeb --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/GravelSlinger.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.onslaught; + +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.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GravelSlinger extends CardImpl { + + public GravelSlinger(UUID ownerId) { + super(ownerId, 33, "Gravel Slinger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {tap}: Gravel Slinger deals 1 damage to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(new FilterAttackingOrBlockingCreature())); + this.addAbility(ability); + // Morph {1}{W} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{W}"))); + } + + public GravelSlinger(final GravelSlinger card) { + super(card); + } + + @Override + public GravelSlinger copy() { + return new GravelSlinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ImprovisedArmor.java b/Mage.Sets/src/mage/sets/onslaught/ImprovisedArmor.java new file mode 100644 index 0000000000..f186ac5f08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ImprovisedArmor.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.onslaught; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.abilities.keyword.EnchantAbility; +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.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ImprovisedArmor extends CardImpl { + + public ImprovisedArmor(UUID ownerId) { + super(ownerId, 40, "Improvised Armor", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature gets +2/+5. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 5, Duration.WhileOnBattlefield))); + // Cycling {3} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{3}"))); + } + + public ImprovisedArmor(final ImprovisedArmor card) { + super(card); + } + + @Override + public ImprovisedArmor copy() { + return new ImprovisedArmor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/PinpointAvalanche.java b/Mage.Sets/src/mage/sets/onslaught/PinpointAvalanche.java new file mode 100644 index 0000000000..e92467ae50 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/PinpointAvalanche.java @@ -0,0 +1,60 @@ +/* + * 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.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class PinpointAvalanche extends CardImpl { + + public PinpointAvalanche(UUID ownerId) { + super(ownerId, 221, "Pinpoint Avalanche", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{R}{R}"); + this.expansionSetCode = "ONS"; + + // Pinpoint Avalanche deals 4 damage to target creature. The damage can't be prevented. + this.getSpellAbility().addEffect(new DamageTargetEffect(4, false)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public PinpointAvalanche(final PinpointAvalanche card) { + super(card); + } + + @Override + public PinpointAvalanche copy() { + return new PinpointAvalanche(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/StagBeetle.java b/Mage.Sets/src/mage/sets/onslaught/StagBeetle.java new file mode 100644 index 0000000000..665e8a1dbb --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/StagBeetle.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LoneFox + */ +public class StagBeetle extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creatures"); + + static { + filter.add(new AnotherPredicate()); + } + + public StagBeetle(UUID ownerId) { + super(ownerId, 285, "Stag Beetle", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Insect"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Stag Beetle enters the battlefield with X +1/+1 counters on it, where X is the number of other creatures on the battlefield. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), + new PermanentsOnBattlefieldCount(filter), false), + "with X +1/+1 counters on it, where X is the number of other creatures on the battlefield")); + } + + public StagBeetle(final StagBeetle card) { + super(card); + } + + @Override + public StagBeetle copy() { + return new StagBeetle(this); + } +} From c2f21a85b9f255ea48bab2e470b582e672597175 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 27 Oct 2015 11:38:26 +0200 Subject: [PATCH 5/8] Fix Heedless One and Reckless One to include non-creature permanents of appropriate subtype to their p/t count --- Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java | 4 ++-- Mage.Sets/src/mage/sets/onslaught/RecklessOne.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java b/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java index 6fd87e1ddd..d275b1ca5f 100644 --- a/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java +++ b/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class HeedlessOne extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elves on the battlefield"); + private static final FilterPermanent filter = new FilterPermanent("Elves on the battlefield"); static { filter.add(new SubtypePredicate("Elf")); diff --git a/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java b/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java index c79f35586e..a6808042b8 100644 --- a/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java +++ b/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class RecklessOne extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblins on the battlefield"); + private static final FilterPermanent filter = new FilterPermanent("Goblins on the battlefield"); static { filter.add(new SubtypePredicate("Goblin")); From ad8074a65075fe4b1cbc7cd855a3daed27f3da7b Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 27 Oct 2015 12:08:50 +0200 Subject: [PATCH 6/8] Implement cards: Aphetto Grifter, Aven Fateshaper, Information Dealer, and Nameless One --- .../mage/sets/onslaught/AphettoGrifter.java | 83 +++++++++++++++++++ .../mage/sets/onslaught/AvenFateshaper.java | 72 ++++++++++++++++ .../sets/onslaught/InformationDealer.java | 78 +++++++++++++++++ .../src/mage/sets/onslaught/NamelessOne.java | 79 ++++++++++++++++++ 4 files changed, 312 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/onslaught/AphettoGrifter.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/AvenFateshaper.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/InformationDealer.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/NamelessOne.java diff --git a/Mage.Sets/src/mage/sets/onslaught/AphettoGrifter.java b/Mage.Sets/src/mage/sets/onslaught/AphettoGrifter.java new file mode 100644 index 0000000000..8c5ffc0495 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AphettoGrifter.java @@ -0,0 +1,83 @@ +/* + * 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.common.TapTargetCost; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class AphettoGrifter extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Wizards you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Wizard")); + } + + public AphettoGrifter(UUID ownerId) { + super(ownerId, 65, "Aphetto Grifter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Tap two untapped Wizards you control: Tap target permanent. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public AphettoGrifter(final AphettoGrifter card) { + super(card); + } + + @Override + public AphettoGrifter copy() { + return new AphettoGrifter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/AvenFateshaper.java b/Mage.Sets/src/mage/sets/onslaught/AvenFateshaper.java new file mode 100644 index 0000000000..38118afeca --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AvenFateshaper.java @@ -0,0 +1,72 @@ +/* + * 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.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class AvenFateshaper extends CardImpl { + + public AvenFateshaper(UUID ownerId) { + super(ownerId, 69, "Aven Fateshaper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Wizard"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Aven Fateshaper enters the battlefield, look at the top four cards of your library, then put them back in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4))); + // {4}{U}: Look at the top four cards of your library, then put them back in any order. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(4), new ManaCostsImpl("{4}{U}"))); + } + + public AvenFateshaper(final AvenFateshaper card) { + super(card); + } + + @Override + public AvenFateshaper copy() { + return new AvenFateshaper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/InformationDealer.java b/Mage.Sets/src/mage/sets/onslaught/InformationDealer.java new file mode 100644 index 0000000000..e9cb8b80e3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/InformationDealer.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookLibraryControllerEffect; +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; + +/** + * + * @author LoneFox + */ +public class InformationDealer extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Wizards on the battlefield"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public InformationDealer(UUID ownerId) { + super(ownerId, 88, "Information Dealer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Look at the top X cards of your library, where X is the number of Wizards on the battlefield, then put them back in any order. + Effect effect = new LookLibraryControllerEffect(new PermanentsOnBattlefieldCount(filter)); + effect.setText("Look at the top X cards of your library, where X is the number of Wizards on the battlefield, then put them back in any order."); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost())); + } + + public InformationDealer(final InformationDealer card) { + super(card); + } + + @Override + public InformationDealer copy() { + return new InformationDealer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/NamelessOne.java b/Mage.Sets/src/mage/sets/onslaught/NamelessOne.java new file mode 100644 index 0000000000..76e6b6cc06 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/NamelessOne.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class NamelessOne extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Wizards on the battlefield"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public NamelessOne(UUID ownerId) { + super(ownerId, 100, "Nameless One", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Wizard"); + this.subtype.add("Avatar"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Nameless One's power and toughness are each equal to the number of Wizards on the battlefield. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); + // Morph {2}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}"))); + } + + public NamelessOne(final NamelessOne card) { + super(card); + } + + @Override + public NamelessOne copy() { + return new NamelessOne(this); + } +} From 3562047beb24a79fe4d0674453eff1c8f213684a Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 27 Oct 2015 13:26:18 +0200 Subject: [PATCH 7/8] Fix some cards that care about subtypes to include non-creature cards of the subtype --- .../mage/sets/onslaught/BrightstoneRitual.java | 10 +++++++++- .../src/mage/sets/onslaught/CabalArchon.java | 17 ++++++++++------- .../src/mage/sets/onslaught/FeedingFrenzy.java | 16 ++++++++++++---- .../mage/sets/onslaught/RiptideLaboratory.java | 13 +++++++------ .../mage/sets/onslaught/VoiceOfTheWoods.java | 10 +++++----- .../src/mage/sets/onslaught/Wellwisher.java | 4 ++-- .../src/mage/sets/onslaught/WirewoodHerald.java | 4 ++-- .../src/mage/sets/onslaught/WirewoodLodge.java | 13 +++++++------ .../src/mage/sets/onslaught/WirewoodSavage.java | 4 ++-- 9 files changed, 56 insertions(+), 35 deletions(-) diff --git a/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java b/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java index 896507e5b5..5ed1e6e408 100644 --- a/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java +++ b/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java @@ -34,7 +34,9 @@ import mage.abilities.effects.common.DynamicManaEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; /** * @@ -42,12 +44,18 @@ import mage.filter.common.FilterCreaturePermanent; */ public class BrightstoneRitual extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("Goblin on the battlefield"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + public BrightstoneRitual(UUID ownerId) { super(ownerId, 191, "Brightstone Ritual", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); this.expansionSetCode = "ONS"; // Add {R} to your mana pool for each Goblin on the battlefield. - this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("Goblin","Goblin on the battlefield")))); + this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(filter))); } public BrightstoneRitual(final BrightstoneRitual card) { diff --git a/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java b/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java index e67cd3fa84..9f666a50fe 100644 --- a/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java +++ b/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java @@ -33,25 +33,26 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPlayer; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; /** * * @author fireshoes */ public class CabalArchon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Cleric"); - + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Cleric"); + static { filter.add(new SubtypePredicate("Cleric")); } @@ -66,8 +67,10 @@ public class CabalArchon extends CardImpl { // {B}, Sacrifice a Cleric: Target player loses 2 life and you gain 2 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{B}")); - ability.addEffect(new GainLifeEffect(2)); - ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))); + Effect effect = new GainLifeEffect(2); + effect.setText("and you gain 2 life"); + ability.addEffect(effect); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java b/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java index ff57cf267b..55d168c309 100644 --- a/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java +++ b/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java @@ -28,20 +28,20 @@ package mage.sets.onslaught; import java.util.UUID; - import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CountersCount; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; +import mage.abilities.effects.Effect; 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.counters.CounterType; +import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; -import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; @@ -51,13 +51,21 @@ import mage.target.common.TargetCreaturePermanent; */ public class FeedingFrenzy extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + public FeedingFrenzy(UUID ownerId) { super(ownerId, 147, "Feeding Frenzy", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); this.expansionSetCode = "ONS"; // Target creature gets -X/-X until end of turn, where X is the number of Zombies on the battlefield. - DynamicValue x = new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("Zombie", "Zombie on the battlefield"), -1); - this.getSpellAbility().addEffect(new BoostTargetEffect(x, x, Duration.EndOfTurn)); + DynamicValue x = new PermanentsOnBattlefieldCount(filter, -1); + Effect effect = new BoostTargetEffect(x, x, Duration.EndOfTurn); + effect.setText("Target creature gets -X/-X until end of turn, where X is the number of Zombies on the battlefield"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java b/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java index 06b74c0ec8..808150e100 100644 --- a/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java +++ b/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java @@ -38,17 +38,18 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; /** * * @author emerald000 */ public class RiptideLaboratory extends CardImpl { - - private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Wizard"); + + private final static FilterControlledPermanent filter = new FilterControlledPermanent("Wizard you control"); + static { filter.add(new SubtypePredicate("Wizard")); } @@ -59,11 +60,11 @@ public class RiptideLaboratory extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); - + // {1}{U}, {tap}: Return target Wizard you control to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{U}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetControlledCreaturePermanent(filter)); + ability.addTarget(new TargetControlledPermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java b/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java index b10c2dfa80..5395bdf833 100644 --- a/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java +++ b/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java @@ -38,12 +38,12 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.game.permanent.token.Token; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; /** * @@ -51,7 +51,7 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public class VoiceOfTheWoods extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Elves you control"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Elves you control"); static { filter.add(Predicates.not(new TappedPredicate())); @@ -69,7 +69,7 @@ public class VoiceOfTheWoods extends CardImpl { // Tap five untapped Elves you control: Put a 7/7 green Elemental creature token with trample onto the battlefield. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new VoiceOfTheWoodsElementalToken()), - new TapTargetCost(new TargetControlledCreaturePermanent(5,5, filter, false))); + new TapTargetCost(new TargetControlledPermanent(5,5, filter, false))); this.addAbility(ability); } @@ -97,4 +97,4 @@ class VoiceOfTheWoodsElementalToken extends Token { addAbility(TrampleAbility.getInstance()); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java b/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java index 43851a1fd7..eb80dcfae3 100644 --- a/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java +++ b/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class Wellwisher extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf on the battlefield"); + private static final FilterPermanent filter = new FilterPermanent("Elf on the battlefield"); static { filter.add(new SubtypePredicate("Elf")); diff --git a/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java b/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java index 209057bb5e..1db7010397 100644 --- a/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java +++ b/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.filter.common.FilterCreatureCard; +import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; @@ -44,7 +44,7 @@ import mage.target.common.TargetCardInLibrary; */ public class WirewoodHerald extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("Elf card"); + private static final FilterCard filter = new FilterCard("Elf card"); static { filter.add(new SubtypePredicate("Elf")); diff --git a/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java b/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java index be1dc8700a..594d11f12b 100644 --- a/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java +++ b/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java @@ -38,9 +38,9 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreaturePermanent; +import mage.target.TargetPermanent; /** * @@ -48,7 +48,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class WirewoodLodge extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf"); + private static final FilterPermanent filter = new FilterPermanent("Elf"); + static { filter.add(new SubtypePredicate("Elf")); } @@ -56,14 +57,14 @@ public class WirewoodLodge extends CardImpl { public WirewoodLodge(UUID ownerId) { super(ownerId, 329, "Wirewood Lodge", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "ONS"; - + // {T}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); - + // {G}, {T}: Untap target Elf. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{G}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java b/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java index e6935282b5..1f91cb2fb1 100644 --- a/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java +++ b/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -44,7 +44,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class WirewoodSavage extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a Beast"); + private static final FilterPermanent filter = new FilterPermanent("a Beast"); static { filter.add(new SubtypePredicate("Beast")); From 08ea70e359d6d380ac5b2cabcd8afb64b3cb05c3 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 27 Oct 2015 13:26:53 +0200 Subject: [PATCH 8/8] Text fixes --- Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java | 2 +- Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java | 6 +++--- Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java | 2 +- Mage.Sets/src/mage/sets/onslaught/Standardize.java | 6 ++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java b/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java index 93c3829937..e05a2c5ec5 100644 --- a/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java +++ b/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java @@ -44,7 +44,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class CabalSlaver extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("Goblin"); + private static final FilterPermanent filter = new FilterPermanent("a Goblin"); static { filter.add(new SubtypePredicate("Goblin")); diff --git a/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java b/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java index 9d27c1aa72..e6fe04dc55 100644 --- a/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java +++ b/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java @@ -48,8 +48,8 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class GoblinTaskmaster extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin"); + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature"); static { filter.add(new SubtypePredicate("Goblin")); @@ -66,7 +66,7 @@ public class GoblinTaskmaster extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); - + // Morph {R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{R}"))); } diff --git a/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java b/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java index eaccc8185c..ab893d6654 100644 --- a/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java +++ b/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java @@ -49,7 +49,7 @@ import mage.target.common.TargetControlledPermanent; */ public class SeasideHaven extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Bird"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Bird"); static{ filter.add(new SubtypePredicate("Bird")); diff --git a/Mage.Sets/src/mage/sets/onslaught/Standardize.java b/Mage.Sets/src/mage/sets/onslaught/Standardize.java index c2c6f8624d..07ffd01387 100644 --- a/Mage.Sets/src/mage/sets/onslaught/Standardize.java +++ b/Mage.Sets/src/mage/sets/onslaught/Standardize.java @@ -29,7 +29,6 @@ package mage.sets.onslaught; import java.util.Set; import java.util.UUID; - import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; @@ -58,7 +57,6 @@ public class Standardize extends CardImpl { this.expansionSetCode = "ONS"; // Choose a creature type other than Wall. Each creature becomes that type until end of turn. - this.getSpellAbility().addEffect(new StandardizeEffect()); } @@ -78,7 +76,7 @@ class StandardizeEffect extends OneShotEffect { public StandardizeEffect() { super(Outcome.BoostCreature); - staticText = "choose a creature type other than wall, each creature's type becomes that type until end of turn"; + staticText = "choose a creature type other than Wall. Each creature becomes that type until end of turn"; } @@ -93,7 +91,7 @@ class StandardizeEffect extends OneShotEffect { String chosenType = ""; if (player != null && permanent != null) { Choice typeChoice = new ChoiceImpl(true); - typeChoice.setMessage("Choose creature type other than Wall"); + typeChoice.setMessage("Choose a creature type other than Wall"); Set types = CardRepository.instance.getCreatureTypes(); types.remove("Wall"); typeChoice.setChoices(types);