Implemented Zenith Flare

This commit is contained in:
Evan Kranzler 2020-04-08 22:09:07 -04:00
parent c2c14c16c9
commit 6b03ffbf3d
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.z;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ZenithFlare extends CardImpl {
private static final FilterCard filter = new FilterCard();
static {
filter.add(new AbilityPredicate(CyclingAbility.class));
}
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(filter);
public ZenithFlare(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{W}");
// Zenith Flare deals X damage to any target and you gain X life, where X is the number of cards with a cycling ability in your graveyard.
this.getSpellAbility().addEffect(new DamageTargetEffect(xValue)
.setText("{this} deals X damage to any target"));
this.getSpellAbility().addEffect(new GainLifeEffect(xValue)
.setText("and you gain X life, where X is the number of cards with a cycling ability in your graveyard"));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
private ZenithFlare(final ZenithFlare card) {
super(card);
}
@Override
public ZenithFlare copy() {
return new ZenithFlare(this);
}
}

View file

@ -162,6 +162,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
cards.add(new SetCardInfo("Wingfold Pteron", 71, Rarity.COMMON, mage.cards.w.WingfoldPteron.class));
cards.add(new SetCardInfo("Zagoth Crystal", 242, Rarity.UNCOMMON, mage.cards.z.ZagothCrystal.class));
cards.add(new SetCardInfo("Zagoth Mamba", 106, Rarity.UNCOMMON, mage.cards.z.ZagothMamba.class));
cards.add(new SetCardInfo("Zenith Flare", 217, Rarity.UNCOMMON, mage.cards.z.ZenithFlare.class));
cards.removeIf(setCardInfo -> mutateNames.contains(setCardInfo.getName())); // remove when mutate is implemented
}