From 5a0fe1266ad02204c3500aa99e24f4fa66cf7279 Mon Sep 17 00:00:00 2001 From: Merlingilb Date: Fri, 17 Feb 2023 23:36:34 +0100 Subject: [PATCH] [ONE] Implement Charforger (#9986) --- Mage.Sets/src/mage/cards/c/Charforger.java | 58 +++++++++++++++++++ .../src/mage/sets/PhyrexiaAllWillBeOne.java | 1 + .../main/java/mage/filter/StaticFilters.java | 2 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/c/Charforger.java diff --git a/Mage.Sets/src/mage/cards/c/Charforger.java b/Mage.Sets/src/mage/cards/c/Charforger.java new file mode 100644 index 0000000000..6de3ff13ad --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/Charforger.java @@ -0,0 +1,58 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCounterCost; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ExileTopXMayPlayUntilEndOfTurnEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.PhyrexianBeastToxicToken; +import mage.game.permanent.token.PhyrexianGoblinToken; + +import java.util.UUID; + +public class Charforger extends CardImpl { + public Charforger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); + this.addSubType(SubType.PHYREXIAN); + this.addSubType(SubType.BEAST); + this.power = new MageInt(2); + this. toughness = new MageInt(3); + + //When Charforger enters the battlefield, create a 1/1 red Phyrexian Goblin creature token. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new CreateTokenEffect(new PhyrexianGoblinToken()) + )); + + //Whenever another creature or artifact you control is put into a graveyard from the battlefield, put an oil counter on Charforger. + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility( + new AddCountersSourceEffect(CounterType.OIL.createInstance()), false, + StaticFilters.FILTER_CONTROLLED_ANOTHER_ARTIFACT_OR_CREATURE, false + )); + + //Remove three oil counters from Charforger: Exile the top card of your library. You may play that card this turn. + this.addAbility(new SimpleActivatedAbility(new ExileTopXMayPlayUntilEndOfTurnEffect(1) + .setText("Exile the top card of your library. You may play that card this turn"), + new RemoveCountersSourceCost(CounterType.OIL.createInstance(3)) + )); + } + + private Charforger(final Charforger card) { + super(card); + } + + @Override + public Charforger copy() { + return new Charforger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index ba92bac7af..ee2dc8226c 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -52,6 +52,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Cacophony Scamp", 124, Rarity.UNCOMMON, mage.cards.c.CacophonyScamp.class)); cards.add(new SetCardInfo("Cankerbloom", 161, Rarity.UNCOMMON, mage.cards.c.Cankerbloom.class)); cards.add(new SetCardInfo("Cephalopod Sentry", 198, Rarity.UNCOMMON, mage.cards.c.CephalopodSentry.class)); + cards.add(new SetCardInfo("Charforger", 199, Rarity.UNCOMMON, mage.cards.c.Charforger.class)); cards.add(new SetCardInfo("Chimney Rabble", 126, Rarity.COMMON, mage.cards.c.ChimneyRabble.class)); cards.add(new SetCardInfo("Chittering Skitterling", 87, Rarity.UNCOMMON, mage.cards.c.ChitteringSkitterling.class)); cards.add(new SetCardInfo("Chrome Prowler", 45, Rarity.COMMON, mage.cards.c.ChromeProwler.class)); diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 0c4a66681f..35668a0a75 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -407,7 +407,7 @@ public final class StaticFilters { FILTER_CONTROLLED_ARTIFACT_OR_OTHER_CREATURE.setLockedFilter(true); } - public static final FilterControlledPermanent FILTER_CONTROLLED_ANOTHER_ARTIFACT_OR_CREATURE = new FilterControlledPermanent("another creature or artifact"); + public static final FilterControlledPermanent FILTER_CONTROLLED_ANOTHER_ARTIFACT_OR_CREATURE = new FilterControlledPermanent("another creature or artifact you control"); static { FILTER_CONTROLLED_ANOTHER_ARTIFACT_OR_CREATURE.add(AnotherPredicate.instance);