foul-magics/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java
Lazar af79f02ac0 Apocalypsedemon (#3597)
* ammit eternal impl + tested

* apocalpyse demon impl + test

* branch mess up

* cleanup

* added effect text

* removed existing cards
2017-07-07 19:52:30 -05:00

54 lines
2.4 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 Demons 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);
}
}