From d048eca33d37799e394ab504aff77c7ec742e40b Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 25 Aug 2023 09:32:51 -0400 Subject: [PATCH] [WOE] Implement Gumdrop Poisoner --- .../src/mage/cards/g/GumdropPoisoner.java | 59 +++++++++++++++++++ Mage.Sets/src/mage/sets/WildsOfEldraine.java | 1 + 2 files changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GumdropPoisoner.java diff --git a/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java new file mode 100644 index 00000000000..e12310909b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java @@ -0,0 +1,59 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount; +import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.FoodToken; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.PlayerGainedLifeWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GumdropPoisoner extends AdventureCard { + + private static final DynamicValue xValue = new SignInversionDynamicValue(ControllerGainedLifeCount.instance); + + public GumdropPoisoner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.INSTANT}, "{2}{B}", "Tempt with Treats", "{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARLOCK); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // When Gumdrop Poisoner enters the battlefield, target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(xValue, xValue) + .setText("target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher()); + + // Tempt with Treats + // Create a Food token. + this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken())); + } + + private GumdropPoisoner(final GumdropPoisoner card) { + super(card); + } + + @Override + public GumdropPoisoner copy() { + return new GumdropPoisoner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index 44ffe33ee3d..bd5f401e428 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -108,6 +108,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Grand Ball Guest", 134, Rarity.COMMON, mage.cards.g.GrandBallGuest.class)); cards.add(new SetCardInfo("Greta, Sweettooth Scourge", 205, Rarity.UNCOMMON, mage.cards.g.GretaSweettoothScourge.class)); cards.add(new SetCardInfo("Gruff Triplets", 172, Rarity.RARE, mage.cards.g.GruffTriplets.class)); + cards.add(new SetCardInfo("Gumdrop Poisoner", 93, Rarity.RARE, mage.cards.g.GumdropPoisoner.class)); cards.add(new SetCardInfo("Hamlet Glutton", 173, Rarity.COMMON, mage.cards.h.HamletGlutton.class)); cards.add(new SetCardInfo("Harried Spearguard", 135, Rarity.COMMON, mage.cards.h.HarriedSpearguard.class)); cards.add(new SetCardInfo("Hearth Elemental", 136, Rarity.UNCOMMON, mage.cards.h.HearthElemental.class));