From 56fa09e3442fc4f5b6ed71fcf01b98dba8514975 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 3 Feb 2022 08:03:42 -0500 Subject: [PATCH] [NEO] Implemented Gravelighter --- Mage.Sets/src/mage/cards/g/Gravelighter.java | 52 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/Gravelighter.java diff --git a/Mage.Sets/src/mage/cards/g/Gravelighter.java b/Mage.Sets/src/mage/cards/g/Gravelighter.java new file mode 100644 index 0000000000..0a92e1c239 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/Gravelighter.java @@ -0,0 +1,52 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.MorbidCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.SacrificeAllEffect; +import mage.abilities.hint.common.MorbidHint; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.watchers.common.MorbidWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Gravelighter extends CardImpl { + + public Gravelighter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Gravelighter enters the battlefield, draw a card if a creature died this turn. Otherwise, each player sacrifices a creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect( + new DrawCardSourceControllerEffect(1), + new SacrificeAllEffect(1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT), + MorbidCondition.instance, "draw a card if a creature died this turn. " + + "Otherwise, each player sacrifices a creature" + )).addHint(MorbidHint.instance), new MorbidWatcher()); + } + + private Gravelighter(final Gravelighter card) { + super(card); + } + + @Override + public Gravelighter copy() { + return new Gravelighter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index aba356ed2b..5968bdd522 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -66,6 +66,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Go-Shintai of Ancient Wars", 144, Rarity.UNCOMMON, mage.cards.g.GoShintaiOfAncientWars.class)); cards.add(new SetCardInfo("Go-Shintai of Shared Purpose", 14, Rarity.UNCOMMON, mage.cards.g.GoShintaiOfSharedPurpose.class)); cards.add(new SetCardInfo("Goro-Goro, Disciple of Ryusei", 145, Rarity.RARE, mage.cards.g.GoroGoroDiscipleOfRyusei.class)); + cards.add(new SetCardInfo("Gravelighter", 98, Rarity.UNCOMMON, mage.cards.g.Gravelighter.class)); cards.add(new SetCardInfo("Greater Tanuki", 189, Rarity.COMMON, mage.cards.g.GreaterTanuki.class)); cards.add(new SetCardInfo("Guardians of Oboro", 56, Rarity.COMMON, mage.cards.g.GuardiansOfOboro.class)); cards.add(new SetCardInfo("Hand of Enlightenment", 11, Rarity.COMMON, mage.cards.h.HandOfEnlightenment.class));