From af79f02ac0804ec5fad57f34c3d54eb6e78be8e2 Mon Sep 17 00:00:00 2001 From: Lazar Date: Sat, 8 Jul 2017 02:52:30 +0200 Subject: [PATCH] Apocalypsedemon (#3597) * ammit eternal impl + tested * apocalpyse demon impl + test * branch mess up * cleanup * added effect text * removed existing cards --- .../src/mage/cards/a/ApocalypseDemon.java | 54 +++++++++++++++++++ .../src/mage/sets/HourOfDevastation.java | 1 + 2 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/ApocalypseDemon.java diff --git a/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java b/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java new file mode 100644 index 00000000000..b68ac32e58e --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java @@ -0,0 +1,54 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.TapSourceUnlessPaysEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledPermanent; + +public class ApocalypseDemon extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("nother creature"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(new AnotherPredicate()); + } + + public ApocalypseDemon(UUID ownerId, CardSetInfo cardSetInfo) { + super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + subtype.add("Demon"); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Apocalypse Demon’s power and toughness are each equal to the number of cards in your graveyard. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInControllerGraveyardCount(), Duration.EndOfGame))); + + // At the beginning of your upkeep, tap Apocalypse Demon unless you sacrifice another creature. + TapSourceUnlessPaysEffect tapEffect = new TapSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + tapEffect.setText("At the beginning of your upkeep, tap Apocalypse Demon unless you sacrifice another creature."); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(tapEffect, TargetController.YOU, false)); + } + + public ApocalypseDemon(final ApocalypseDemon apocalypseDemon) { + super(apocalypseDemon); + } + + public ApocalypseDemon copy() { + return new ApocalypseDemon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/HourOfDevastation.java b/Mage.Sets/src/mage/sets/HourOfDevastation.java index 2c233b54e65..f891cbbc67f 100644 --- a/Mage.Sets/src/mage/sets/HourOfDevastation.java +++ b/Mage.Sets/src/mage/sets/HourOfDevastation.java @@ -76,6 +76,7 @@ public class HourOfDevastation extends ExpansionSet { cards.add(new SetCardInfo("Ammit Eternal", 57, Rarity.RARE, mage.cards.a.AmmitEternal.class)); cards.add(new SetCardInfo("Angel of Condemnation", 3, Rarity.RARE, mage.cards.a.AngelOfCondemnation.class)); cards.add(new SetCardInfo("Angel of the God-Pharaoh", 4, Rarity.UNCOMMON, mage.cards.a.AngelOfTheGodPharaoh.class)); + cards.add(new SetCardInfo("Apocalypse Demon", 58, Rarity.RARE, mage.cards.a.ApocalypseDemon.class)); cards.add(new SetCardInfo("Appeal // Authority", 152, Rarity.UNCOMMON, mage.cards.a.AppealAuthority.class)); cards.add(new SetCardInfo("Aven of Enduring Hope", 5, Rarity.COMMON, mage.cards.a.AvenOfEnduringHope.class)); cards.add(new SetCardInfo("Aven Reedstalker", 30, Rarity.COMMON, mage.cards.a.AvenReedstalker.class));