From 05ac4a7da7d98ff91822470fdf39489ae05bba82 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 29 May 2022 18:53:07 -0400 Subject: [PATCH] [CLB] Implemented Candlekeep Sage --- .../src/mage/cards/c/CandlekeepSage.java | 45 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + 2 files changed, 46 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CandlekeepSage.java diff --git a/Mage.Sets/src/mage/cards/c/CandlekeepSage.java b/Mage.Sets/src/mage/cards/c/CandlekeepSage.java new file mode 100644 index 00000000000..6feeff35f22 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CandlekeepSage.java @@ -0,0 +1,45 @@ +package mage.cards.c; + +import mage.abilities.common.EntersBattlefieldOrLeavesSourceTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CandlekeepSage extends CardImpl { + + public CandlekeepSage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.BACKGROUND); + + // Commander creatures you own have "When this creature enters or leaves the battlefield, draw a card." + this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( + new EntersBattlefieldOrLeavesSourceTriggeredAbility( + new DrawCardSourceControllerEffect(1), false + ).setTriggerPhrase("When this creature enters or leaves the battlefield, "), + Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER + ))); + } + + private CandlekeepSage(final CandlekeepSage card) { + super(card); + } + + @Override + public CandlekeepSage copy() { + return new CandlekeepSage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 53bd75dc035..7f9d083822e 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -65,6 +65,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Burnished Hart", 303, Rarity.UNCOMMON, mage.cards.b.BurnishedHart.class)); cards.add(new SetCardInfo("Cadira, Caller of the Small", 269, Rarity.UNCOMMON, mage.cards.c.CadiraCallerOfTheSmall.class)); cards.add(new SetCardInfo("Campfire", 304, Rarity.UNCOMMON, mage.cards.c.Campfire.class)); + cards.add(new SetCardInfo("Candlekeep Sage", 60, Rarity.COMMON, mage.cards.c.CandlekeepSage.class)); cards.add(new SetCardInfo("Cast Down", 119, Rarity.UNCOMMON, mage.cards.c.CastDown.class)); cards.add(new SetCardInfo("Charcoal Diamond", 305, Rarity.COMMON, mage.cards.c.CharcoalDiamond.class)); cards.add(new SetCardInfo("Circle of the Land Druid", 220, Rarity.COMMON, mage.cards.c.CircleOfTheLandDruid.class));