From bb59030c09a7cb7d5672ebda717325980a7bb19f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 25 May 2022 08:03:04 -0400 Subject: [PATCH] [CLB] Implemented Ghost Lantern --- Mage.Sets/src/mage/cards/g/GhostLantern.java | 49 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + 2 files changed, 50 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GhostLantern.java diff --git a/Mage.Sets/src/mage/cards/g/GhostLantern.java b/Mage.Sets/src/mage/cards/g/GhostLantern.java new file mode 100644 index 00000000000..a45e741cb71 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GhostLantern.java @@ -0,0 +1,49 @@ +package mage.cards.g; + +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GhostLantern extends AdventureCard { + + public GhostLantern(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, new CardType[]{CardType.INSTANT}, "{B}", "Bind Spirit", "{1}{B}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Whenever a creature you control dies, put a +1/+1 counter on equipped creature. + this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersAttachedEffect( + CounterType.P1P1.createInstance(), "equipped creature" + ), false, StaticFilters.FILTER_CONTROLLED_A_CREATURE)); + + // Equip {1} + this.addAbility(new EquipAbility(1)); + + // Bind Spirit + // Return target creature card from your graveyard to your hand. + this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); + } + + private GhostLantern(final GhostLantern card) { + super(card); + } + + @Override + public GhostLantern copy() { + return new GhostLantern(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 865c8109e40..3f70f82ce8b 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -86,6 +86,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Gate Colossus", 315, Rarity.UNCOMMON, mage.cards.g.GateColossus.class)); cards.add(new SetCardInfo("Genasi Enforcers", 177, Rarity.COMMON, mage.cards.g.GenasiEnforcers.class)); cards.add(new SetCardInfo("Geode Golem", 316, Rarity.UNCOMMON, mage.cards.g.GeodeGolem.class)); + cards.add(new SetCardInfo("Ghost Lantern", 128, Rarity.UNCOMMON, mage.cards.g.GhostLantern.class)); cards.add(new SetCardInfo("Goggles of Night", 74, Rarity.COMMON, mage.cards.g.GogglesOfNight.class)); cards.add(new SetCardInfo("Gorion, Wise Mentor", 276, Rarity.RARE, mage.cards.g.GorionWiseMentor.class)); cards.add(new SetCardInfo("Gut, True Soul Zealot", 180, Rarity.UNCOMMON, mage.cards.g.GutTrueSoulZealot.class));