From 801830d307100715fd24ce321b5e025ba937e24f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 20 May 2022 09:29:31 -0400 Subject: [PATCH] [CLB] Implemented Criminal Past --- Mage.Sets/src/mage/cards/c/CriminalPast.java | 55 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CriminalPast.java diff --git a/Mage.Sets/src/mage/cards/c/CriminalPast.java b/Mage.Sets/src/mage/cards/c/CriminalPast.java new file mode 100644 index 0000000000..fc1a0c2b95 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CriminalPast.java @@ -0,0 +1,55 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.MenaceAbility; +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 CriminalPast extends CardImpl { + + private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURES); + + public CriminalPast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.BACKGROUND); + + // Commander creatures you own have menace and "This creature gets +X/+0, where X is the number of creature cards in your graveyard." + Ability ability = new SimpleStaticAbility(new GainAbilityAllEffect( + new MenaceAbility(false), Duration.WhileOnBattlefield, + StaticFilters.FILTER_CREATURES_OWNED_COMMANDER + )); + ability.addEffect(new GainAbilityAllEffect( + new SimpleStaticAbility(new BoostSourceEffect( + xValue, StaticValue.get(0), Duration.WhileOnBattlefield, false, "this creature" + )), Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER + ).setText("and \"This creature gets +X/+0, where X is the number of creature cards in your graveyard.\"")); + this.addAbility(ability); + } + + private CriminalPast(final CriminalPast card) { + super(card); + } + + @Override + public CriminalPast copy() { + return new CriminalPast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 02d751a7fa..a217808248 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -40,6 +40,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Charcoal Diamond", 305, Rarity.COMMON, mage.cards.c.CharcoalDiamond.class)); cards.add(new SetCardInfo("Cloakwood Hermit", 221, Rarity.UNCOMMON, mage.cards.c.CloakwoodHermit.class)); cards.add(new SetCardInfo("Command Tower", 351, Rarity.COMMON, mage.cards.c.CommandTower.class)); + cards.add(new SetCardInfo("Criminal Past", 122, Rarity.UNCOMMON, mage.cards.c.CriminalPast.class)); cards.add(new SetCardInfo("Cultist of the Absolute", 123, Rarity.RARE, mage.cards.c.CultistOfTheAbsolute.class)); cards.add(new SetCardInfo("Dread Linnorm", 225, Rarity.COMMON, mage.cards.d.DreadLinnorm.class)); cards.add(new SetCardInfo("Duke Ulder Ravengard", 272, Rarity.RARE, mage.cards.d.DukeUlderRavengard.class));