From 167d2579accda480f25d9b7fa730bd54dcbcf273 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 10 Apr 2021 10:19:59 -0400 Subject: [PATCH] [C21] Implemented Trudge Garden --- Mage.Sets/src/mage/cards/t/TrudgeGarden.java | 36 +++++++++++++++++++ .../src/mage/sets/Commander2021Edition.java | 1 + .../permanent/token/FungusBeastToken.java | 31 ++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TrudgeGarden.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/FungusBeastToken.java diff --git a/Mage.Sets/src/mage/cards/t/TrudgeGarden.java b/Mage.Sets/src/mage/cards/t/TrudgeGarden.java new file mode 100644 index 0000000000..236ab3ddb3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TrudgeGarden.java @@ -0,0 +1,36 @@ +package mage.cards.t; + +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.FungusBeastToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TrudgeGarden extends CardImpl { + + public TrudgeGarden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // Whenever you gain life, you may pay {2}. If you do, create a 4/4 green Fungus Beast creature token with trample. + this.addAbility(new GainLifeControllerTriggeredAbility(new DoIfCostPaid( + new CreateTokenEffect(new FungusBeastToken()), new GenericManaCost(2) + ), false)); + } + + private TrudgeGarden(final TrudgeGarden card) { + super(card); + } + + @Override + public TrudgeGarden copy() { + return new TrudgeGarden(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Commander2021Edition.java b/Mage.Sets/src/mage/sets/Commander2021Edition.java index 4b5287f737..11048b0e38 100644 --- a/Mage.Sets/src/mage/sets/Commander2021Edition.java +++ b/Mage.Sets/src/mage/sets/Commander2021Edition.java @@ -223,6 +223,7 @@ public final class Commander2021Edition extends ExpansionSet { cards.add(new SetCardInfo("Tranquil Thicket", 408, Rarity.COMMON, mage.cards.t.TranquilThicket.class)); cards.add(new SetCardInfo("Traumatic Visions", 132, Rarity.COMMON, mage.cards.t.TraumaticVisions.class)); cards.add(new SetCardInfo("Treasure Cruise", 133, Rarity.COMMON, mage.cards.t.TreasureCruise.class)); + cards.add(new SetCardInfo("Trudge Garden", 69, Rarity.RARE, mage.cards.t.TrudgeGarden.class)); cards.add(new SetCardInfo("Trygon Predator", 231, Rarity.UNCOMMON, mage.cards.t.TrygonPredator.class)); cards.add(new SetCardInfo("Unstable Obelisk", 272, Rarity.UNCOMMON, mage.cards.u.UnstableObelisk.class)); cards.add(new SetCardInfo("Utter End", 232, Rarity.RARE, mage.cards.u.UtterEnd.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/FungusBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/FungusBeastToken.java new file mode 100644 index 0000000000..822495d0af --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/FungusBeastToken.java @@ -0,0 +1,31 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class FungusBeastToken extends TokenImpl { + + public FungusBeastToken() { + super("Fungus Beast", "4/4 green Fungus Beast creature token with trample"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.FUNGUS); + subtype.add(SubType.BEAST); + power = new MageInt(4); + toughness = new MageInt(4); + addAbility(TrampleAbility.getInstance()); + } + + private FungusBeastToken(final FungusBeastToken token) { + super(token); + } + + public FungusBeastToken copy() { + return new FungusBeastToken(this); + } +}