From 105b8ea6facd93f79ed7cb70b9ecf9414b04cb73 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Thu, 17 Sep 2015 23:32:35 -0500 Subject: [PATCH] [BFZ] Implemented Wasteland Strangler, Gruesome Slaughter, Angelic Captain, Drana Liberator of Malakir, Ugin's Insight --- .../sets/battleforzendikar/AkoumHellkite.java | 1 + .../battleforzendikar/AngelicCaptain.java | 81 ++++++++++++ .../DranaLiberatorOfMalakir.java | 83 ++++++++++++ .../battleforzendikar/GruesomeSlaughter.java | 79 +++++++++++ .../sets/battleforzendikar/UginsInsight.java | 102 ++++++++++++++ .../battleforzendikar/WastelandStrangler.java | 125 ++++++++++++++++++ 6 files changed, 471 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java index 8bafa7e7456..b1987a95f8f 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java @@ -78,6 +78,7 @@ public class AkoumHellkite extends CardImpl { return new AkoumHellkite(this); } } + class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl { private static final String text = "Landfall - Whenever a land enters the battlefield under your control, {this} deals 1 damage to target creature or player. " diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java new file mode 100644 index 00000000000..f984cb8a502 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author fireshoes + */ +public class AngelicCaptain extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Ally"); + + static { + filter.add(new SubtypePredicate("Ally")); + filter.add(new AnotherPredicate()); + } + + public AngelicCaptain(UUID ownerId) { + super(ownerId, 208, "Angelic Captain", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Angel"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Angelic Captain attacks, it gets +1/+1 until end of turn for each other attacking Ally. + PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, value, Duration.EndOfTurn, true), false)); + } + + public AngelicCaptain(final AngelicCaptain card) { + super(card); + } + + @Override + public AngelicCaptain copy() { + return new AngelicCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java b/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java new file mode 100644 index 00000000000..e6076d394af --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class DranaLiberatorOfMalakir extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("each attacking creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DranaLiberatorOfMalakir(UUID ownerId) { + super(ownerId, 109, "Drana, Liberator of Malakir", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "BFZ"; + this.supertype.add("Legendary"); + this.subtype.add("Vampire"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Whenever Drana, Liberator of Malakir deals combat damage to player, put a +1/+1 counter on each attacking creature you control. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false)); + } + + public DranaLiberatorOfMalakir(final DranaLiberatorOfMalakir card) { + super(card); + } + + @Override + public DranaLiberatorOfMalakir copy() { + return new DranaLiberatorOfMalakir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java b/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java new file mode 100644 index 00000000000..189f4108e21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +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.ColorlessPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class GruesomeSlaughter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("colorless creatures you control"); + + static { + filter.add(new ColorlessPredicate()); + } + + public GruesomeSlaughter(UUID ownerId) { + super(ownerId, 9, "Gruesome Slaughter", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{6}"); + this.expansionSetCode = "BFZ"; + + // Until end of turn, colorless creatures you control gain "{T}: This creature deals damage equal to its power to target creature." + Effect effect = new DamageTargetEffect(new SourcePermanentPowerCount()); + effect.setText("{this} deals damage equal to its power to target creature."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn, filter)); + } + + public GruesomeSlaughter(final GruesomeSlaughter card) { + super(card); + } + + @Override + public GruesomeSlaughter copy() { + return new GruesomeSlaughter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java new file mode 100644 index 00000000000..7b1b6ded224 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java @@ -0,0 +1,102 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class UginsInsight extends CardImpl { + + public UginsInsight(UUID ownerId) { + super(ownerId, 87, "Ugin's Insight", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}{U}"); + this.expansionSetCode = "BFZ"; + + // Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards. + this.getSpellAbility().addEffect(new UginsInsightEffect()); + } + + public UginsInsight(final UginsInsight card) { + super(card); + } + + @Override + public UginsInsight copy() { + return new UginsInsight(this); + } +} + +class UginsInsightEffect extends OneShotEffect { + + public UginsInsightEffect() { + super(Outcome.DrawCard); + this.staticText = "Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards"; + } + + public UginsInsightEffect(final UginsInsightEffect effect) { + super(effect); + } + + @Override + public UginsInsightEffect copy() { + return new UginsInsightEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int highCMC = 0; + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { + if (permanent.getSpellAbility() != null) { + int cmc = permanent.getSpellAbility().getManaCosts().convertedManaCost(); + if (cmc > highCMC) { + highCMC = cmc; + } + } + } + if (highCMC > 0) { + controller.scry(highCMC, source, game); + } + controller.drawCards(3, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java b/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java new file mode 100644 index 00000000000..0b98f9db22e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java @@ -0,0 +1,125 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInExile; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class WastelandStrangler extends CardImpl { + + public WastelandStrangler(UUID ownerId) { + super(ownerId, 102, "Wasteland Strangler", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Wasteland Strangler enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, target creature gets -3/-3 until end of turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new WastelandStranglerEffect(), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public WastelandStrangler(final WastelandStrangler card) { + super(card); + } + + @Override + public WastelandStrangler copy() { + return new WastelandStrangler(this); + } +} + +class WastelandStranglerEffect extends OneShotEffect { + + private final static FilterCard filter = new FilterCard("card an opponent owns from exile"); + + static { + filter.add(new OwnerPredicate(TargetController.OPPONENT)); + } + + public WastelandStranglerEffect() { + super(Outcome.Discard); + this.staticText = "you may put a card an opponent owns from exile into that player's graveyard. If you do, target creature gets -3/-3 until end of turn."; + } + + public WastelandStranglerEffect(final WastelandStranglerEffect effect) { + super(effect); + } + + @Override + public WastelandStranglerEffect copy() { + return new WastelandStranglerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Target target = new TargetCardInExile(1, 1, filter, null); + if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { + if (controller.chooseTarget(outcome, target, source, game)) { + Cards cardsToGraveyard = new CardsImpl(target.getTargets()); + controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game); + game.addEffect(new BoostTargetEffect(-3, -3, Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } +}