From a4a01990fd0e02d9571b68880f4bebfc156f0bcf Mon Sep 17 00:00:00 2001 From: Plopman Date: Fri, 29 Aug 2014 11:20:12 +0200 Subject: [PATCH] [5DN] Added all black cards (12 cards) --- .../sets/divinevsdemonic/CacklingImp.java | 74 ++++++++++ .../src/mage/sets/fifthdawn/CacklingImp.java | 52 +++++++ .../sets/fifthdawn/DesecrationElemental.java | 69 +++++++++ .../mage/sets/fifthdawn/DevourInShadow.java | 100 +++++++++++++ .../src/mage/sets/fifthdawn/EbonDrake.java | 68 +++++++++ .../mage/sets/fifthdawn/EndlessWhispers.java | 136 ++++++++++++++++++ .../mage/sets/fifthdawn/FillWithFright.java | 65 +++++++++ .../src/mage/sets/fifthdawn/Fleshgrafter.java | 70 +++++++++ .../src/mage/sets/fifthdawn/LoseHope.java | 66 +++++++++ .../src/mage/sets/fifthdawn/MoriokRigger.java | 74 ++++++++++ .../src/mage/sets/fifthdawn/NimGrotesque.java | 70 +++++++++ .../mage/sets/fifthdawn/ShatteredDreams.java | 69 +++++++++ .../mage/sets/fifthdawn/ViciousBetrayal.java | 98 +++++++++++++ 13 files changed, 1011 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/divinevsdemonic/CacklingImp.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/CacklingImp.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/DesecrationElemental.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/EbonDrake.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/EndlessWhispers.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/FillWithFright.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/Fleshgrafter.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/LoseHope.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/MoriokRigger.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/NimGrotesque.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/ShatteredDreams.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/ViciousBetrayal.java diff --git a/Mage.Sets/src/mage/sets/divinevsdemonic/CacklingImp.java b/Mage.Sets/src/mage/sets/divinevsdemonic/CacklingImp.java new file mode 100644 index 00000000000..1856cfb0e6e --- /dev/null +++ b/Mage.Sets/src/mage/sets/divinevsdemonic/CacklingImp.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.divinevsdemonic; + +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.LoseLifeTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPlayer; + +/** + * + * @author Plopman + */ +public class CacklingImp extends CardImpl { + + public CacklingImp(UUID ownerId) { + super(ownerId, 41, "Cackling Imp", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "DDC"; + this.subtype.add("Imp"); + + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {tap}: Target player loses 1 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public CacklingImp(final CacklingImp card) { + super(card); + } + + @Override + public CacklingImp copy() { + return new CacklingImp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/CacklingImp.java b/Mage.Sets/src/mage/sets/fifthdawn/CacklingImp.java new file mode 100644 index 00000000000..a61ec1d8d6e --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/CacklingImp.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthdawn; + +import java.util.UUID; + +/** + * + * @author Plopman + */ +public class CacklingImp extends mage.sets.divinevsdemonic.CacklingImp { + + public CacklingImp(UUID ownerId) { + super(ownerId); + this.cardNumber = 44; + this.expansionSetCode = "5DN"; + } + + public CacklingImp(final CacklingImp card) { + super(card); + } + + @Override + public CacklingImp copy() { + return new CacklingImp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/DesecrationElemental.java b/Mage.Sets/src/mage/sets/fifthdawn/DesecrationElemental.java new file mode 100644 index 00000000000..ab6a98aea92 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/DesecrationElemental.java @@ -0,0 +1,69 @@ +/* + * 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.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.common.SacrificeControllerEffect; +import mage.abilities.keyword.FearAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author Plopman + */ +public class DesecrationElemental extends CardImpl { + + public DesecrationElemental(UUID ownerId) { + super(ownerId, 45, "Desecration Elemental", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Elemental"); + + this.color.setBlack(true); + this.power = new MageInt(8); + this.toughness = new MageInt(8); + + // Fear + this.addAbility(FearAbility.getInstance()); + // Whenever a player casts a spell, sacrifice a creature. + this.addAbility(new SpellCastAllTriggeredAbility(new SacrificeControllerEffect(new FilterCreaturePermanent(), 1, ""), false)); + } + + public DesecrationElemental(final DesecrationElemental card) { + super(card); + } + + @Override + public DesecrationElemental copy() { + return new DesecrationElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java b/Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java new file mode 100644 index 00000000000..6f67fd0772c --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java @@ -0,0 +1,100 @@ +/* + * 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.fifthdawn; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +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; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Plopman + */ +public class DevourInShadow extends CardImpl { + + public DevourInShadow(UUID ownerId) { + super(ownerId, 46, "Devour in Shadow", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{B}{B}"); + this.expansionSetCode = "5DN"; + + this.color.setBlack(true); + + // Destroy target creature. It can't be regenerated. You lose life equal to that creature's toughness. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new DevourInShadowEffect()); + } + + public DevourInShadow(final DevourInShadow card) { + super(card); + } + + @Override + public DevourInShadow copy() { + return new DevourInShadow(this); + } + + +} + +class DevourInShadowEffect extends OneShotEffect { + + public DevourInShadowEffect() { + super(Outcome.Damage); + staticText = "You lose life equal to that creature's toughness"; + } + + public DevourInShadowEffect(final DevourInShadowEffect effect) { + super(effect); + } + + @Override + public DevourInShadowEffect copy() { + return new DevourInShadowEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent target = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); + if (player != null && target != null) { + player.loseLife(target.getToughness().getValue(), game); + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/fifthdawn/EbonDrake.java b/Mage.Sets/src/mage/sets/fifthdawn/EbonDrake.java new file mode 100644 index 00000000000..2fb13963c84 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/EbonDrake.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author Plopman + */ +public class EbonDrake extends CardImpl { + + public EbonDrake(UUID ownerId) { + super(ownerId, 48, "Ebon Drake", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Drake"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever a player casts a spell, you lose 1 life. + this.addAbility(new SpellCastAllTriggeredAbility(new LoseLifeSourceControllerEffect(1), false)); + } + + public EbonDrake(final EbonDrake card) { + super(card); + } + + @Override + public EbonDrake copy() { + return new EbonDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/EndlessWhispers.java b/Mage.Sets/src/mage/sets/fifthdawn/EndlessWhispers.java new file mode 100644 index 00000000000..0f4687aabec --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/EndlessWhispers.java @@ -0,0 +1,136 @@ +/* + * 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.fifthdawn; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.continious.GainAbilityAllEffect; +import mage.cards.Card; +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.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author Plopman + */ +public class EndlessWhispers extends CardImpl { + + public EndlessWhispers(UUID ownerId) { + super(ownerId, 49, "Endless Whispers", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}"); + this.expansionSetCode = "5DN"; + + this.color.setBlack(true); + + // Each creature has "When this creature dies, choose target opponent. That player puts this card from its owner's graveyard onto the battlefield under his or her control at the beginning of the next end step." + DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(new ReturnSourceToBattlefieldEffect()); + Effect effect = new CreateDelayedTriggeredAbilityEffect(delayedAbility, true); + effect.setText("choose target opponent. That player puts this card from its owner's graveyard onto the battlefield under his or her control at the beginning of the next end step"); + Ability gainAbility = new DiesTriggeredAbility(effect); + gainAbility.addTarget(new TargetOpponent()); + + effect = new GainAbilityAllEffect(gainAbility, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Each creature")); + effect.setText("Each creature has \"When this creature dies, choose target opponent. That player puts this card from its owner's graveyard onto the battlefield under his or her control at the beginning of the next end step.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + } + + public EndlessWhispers(final EndlessWhispers card) { + super(card); + } + + @Override + public EndlessWhispers copy() { + return new EndlessWhispers(this); + } +} + +class ReturnSourceToBattlefieldEffect extends OneShotEffect { + + + public ReturnSourceToBattlefieldEffect() { + this(false); + } + + public ReturnSourceToBattlefieldEffect(boolean tapped) { + super(Outcome.PutCreatureInPlay); + setText(); + } + public ReturnSourceToBattlefieldEffect(boolean tapped, boolean ownerControl) { + super(Outcome.PutCreatureInPlay); + setText(); + } + + public ReturnSourceToBattlefieldEffect(final ReturnSourceToBattlefieldEffect effect) { + super(effect); + } + + @Override + public ReturnSourceToBattlefieldEffect copy() { + return new ReturnSourceToBattlefieldEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (!game.getState().getZone(source.getSourceId()).equals(Zone.GRAVEYARD)) { + return false; + } + Card card = game.getCard(source.getSourceId()); + if (card == null) { + return false; + } + + Player player = game.getPlayer(source.getFirstTarget()); + + if (player == null) { + return false; + } + + return player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId(), false); + } + + private void setText() { + StringBuilder sb = new StringBuilder("That player puts this card from its owner's graveyard onto the battlefield under his or her control"); + + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/fifthdawn/FillWithFright.java b/Mage.Sets/src/mage/sets/fifthdawn/FillWithFright.java new file mode 100644 index 00000000000..7eb48a86b69 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/FillWithFright.java @@ -0,0 +1,65 @@ +/* + * 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.fifthdawn; + +import java.util.UUID; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author Plopman + */ +public class FillWithFright extends CardImpl { + + public FillWithFright(UUID ownerId) { + super(ownerId, 50, "Fill with Fright", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "5DN"; + + this.color.setBlack(true); + + // Target player discards two cards. + this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); + this.getSpellAbility().addTarget(new TargetPlayer()); + // Scry 2. + this.getSpellAbility().addEffect(new ScryEffect(2)); + } + + public FillWithFright(final FillWithFright card) { + super(card); + } + + @Override + public FillWithFright copy() { + return new FillWithFright(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/Fleshgrafter.java b/Mage.Sets/src/mage/sets/fifthdawn/Fleshgrafter.java new file mode 100644 index 00000000000..29d69dbda9f --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/Fleshgrafter.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactCard; + +/** + * + * @author Plopman + */ +public class Fleshgrafter extends CardImpl { + + public Fleshgrafter(UUID ownerId) { + super(ownerId, 51, "Fleshgrafter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Discard an artifact card: Fleshgrafter gets +2/+2 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new DiscardCardCost(new FilterArtifactCard("an artifact card")))); + } + + public Fleshgrafter(final Fleshgrafter card) { + super(card); + } + + @Override + public Fleshgrafter copy() { + return new Fleshgrafter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/LoseHope.java b/Mage.Sets/src/mage/sets/fifthdawn/LoseHope.java new file mode 100644 index 00000000000..6b92f3e2b8d --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/LoseHope.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.fifthdawn; + +import java.util.UUID; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Plopman + */ +public class LoseHope extends CardImpl { + + public LoseHope(UUID ownerId) { + super(ownerId, 52, "Lose Hope", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}"); + this.expansionSetCode = "5DN"; + + this.color.setBlack(true); + + // Target creature gets -1/-1 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(-1, -1, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Scry 2. + this.getSpellAbility().addEffect(new ScryEffect(2)); + } + + public LoseHope(final LoseHope card) { + super(card); + } + + @Override + public LoseHope copy() { + return new LoseHope(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/MoriokRigger.java b/Mage.Sets/src/mage/sets/fifthdawn/MoriokRigger.java new file mode 100644 index 00000000000..e504bf17ab2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/MoriokRigger.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ZoneChangeAllTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterArtifactPermanent; + +/** + * + * @author Plopman + */ +public class MoriokRigger extends CardImpl { + + public MoriokRigger(UUID ownerId) { + super(ownerId, 54, "Moriok Rigger", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.subtype.add("Rigger"); + + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever an artifact is put into a graveyard from the battlefield, you may put a +1/+1 counter on Moriok Rigger. + Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD, + new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new FilterArtifactPermanent(), + "Whenever an artifact is put into a graveyard from the battlefield, ", true); + this.addAbility(ability); + } + + public MoriokRigger(final MoriokRigger card) { + super(card); + } + + @Override + public MoriokRigger copy() { + return new MoriokRigger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/NimGrotesque.java b/Mage.Sets/src/mage/sets/fifthdawn/NimGrotesque.java new file mode 100644 index 00000000000..f8f38633da0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/NimGrotesque.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledArtifactPermanent; + +/** + * + * @author Plopman + */ +public class NimGrotesque extends CardImpl { + + public NimGrotesque(UUID ownerId) { + super(ownerId, 56, "Nim Grotesque", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{B}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Zombie"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(6); + + // Nim Grotesque gets +1/+0 for each artifact you control. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent()), new StaticValue(0), Duration.WhileOnBattlefield))); + } + + public NimGrotesque(final NimGrotesque card) { + super(card); + } + + @Override + public NimGrotesque copy() { + return new NimGrotesque(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/ShatteredDreams.java b/Mage.Sets/src/mage/sets/fifthdawn/ShatteredDreams.java new file mode 100644 index 00000000000..5874c7a6e7f --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/ShatteredDreams.java @@ -0,0 +1,69 @@ +/* + * 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.fifthdawn; + +import java.util.UUID; +import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author Plopman + */ +public class ShatteredDreams extends CardImpl { + + private static final FilterCard filter = new FilterCard("an artifact card from it"); + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } + + public ShatteredDreams(UUID ownerId) { + super(ownerId, 59, "Shattered Dreams", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "5DN"; + + this.color.setBlack(true); + + // Target opponent reveals his or her hand. You choose an artifact card from it. That player discards that card. + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(filter)); + } + + public ShatteredDreams(final ShatteredDreams card) { + super(card); + } + + @Override + public ShatteredDreams copy() { + return new ShatteredDreams(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/ViciousBetrayal.java b/Mage.Sets/src/mage/sets/fifthdawn/ViciousBetrayal.java new file mode 100644 index 00000000000..cb54ae038fe --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/ViciousBetrayal.java @@ -0,0 +1,98 @@ +/* + * 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.fifthdawn; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.VariableCost; +import mage.abilities.costs.common.SacrificeXTargetCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Plopman + */ +public class ViciousBetrayal extends CardImpl { + + public ViciousBetrayal(UUID ownerId) { + super(ownerId, 60, "Vicious Betrayal", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "5DN"; + + this.color.setBlack(true); + + // As an additional cost to cast Vicious Betrayal, sacrifice any number of creatures. + this.getSpellAbility().addCost(new SacrificeXTargetCost(new FilterControlledCreaturePermanent())); + // Target creature gets +2/+2 until end of turn for each creature sacrificed this way. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new BoostTargetEffect(new GetXValue(), new GetXValue(), Duration.EndOfTurn)); + } + + public ViciousBetrayal(final ViciousBetrayal card) { + super(card); + } + + @Override + public ViciousBetrayal copy() { + return new ViciousBetrayal(this); + } +} + +class GetXValue implements DynamicValue { + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int amount = 0; + for (VariableCost cost: sourceAbility.getCosts().getVariableCosts()) { + amount += cost.getAmount(); + } + return 2*amount; + } + + @Override + public GetXValue copy() { + return new GetXValue(); + } + + @Override + public String toString() { + return "2"; + } + + @Override + public String getMessage() { + return "creature sacrificed this way"; + } +}