From 998b737ab58c02d801bdc8d10d08c104c5404d13 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 13 Nov 2025 09:35:04 -0500 Subject: [PATCH] [TLA] Implement Earth Kingdom General --- .../src/mage/cards/e/EarthKingdomGeneral.java | 56 +++++++++++++++++++ .../src/mage/sets/AvatarTheLastAirbender.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/EarthKingdomGeneral.java diff --git a/Mage.Sets/src/mage/cards/e/EarthKingdomGeneral.java b/Mage.Sets/src/mage/cards/e/EarthKingdomGeneral.java new file mode 100644 index 00000000000..c497d0e1b5b --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EarthKingdomGeneral.java @@ -0,0 +1,56 @@ +package mage.cards.e; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.PutCounterOnPermanentTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.EffectKeyValue; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.keyword.EarthbendTargetEffect; +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.target.common.TargetControlledLandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class EarthKingdomGeneral extends CardImpl { + + private static final DynamicValue xValue = new EffectKeyValue("countersAdded", "that many"); + + public EarthKingdomGeneral(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When this creature enters, earthbend 2. + Ability ability = new EntersBattlefieldTriggeredAbility(new EarthbendTargetEffect(2)); + ability.addTarget(new TargetControlledLandPermanent()); + this.addAbility(ability); + + // Whenever you put one or more +1/+1 counters on a creature, you may gain that much life. Do this only once each turn. + this.addAbility(new PutCounterOnPermanentTriggeredAbility( + new GainLifeEffect(xValue), CounterType.P1P1, StaticFilters.FILTER_PERMANENT_CREATURE + ).setDoOnlyOnceEachTurn(true)); + } + + private EarthKingdomGeneral(final EarthKingdomGeneral card) { + super(card); + } + + @Override + public EarthKingdomGeneral copy() { + return new EarthKingdomGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java index e3b69172c2f..6028fbe651d 100644 --- a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java +++ b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java @@ -116,6 +116,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet { cards.add(new SetCardInfo("Dragonfly Swarm", 215, Rarity.UNCOMMON, mage.cards.d.DragonflySwarm.class)); cards.add(new SetCardInfo("Earth King's Lieutenant", 217, Rarity.RARE, mage.cards.e.EarthKingsLieutenant.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Earth King's Lieutenant", 380, Rarity.RARE, mage.cards.e.EarthKingsLieutenant.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Earth Kingdom General", 173, Rarity.UNCOMMON, mage.cards.e.EarthKingdomGeneral.class)); cards.add(new SetCardInfo("Earth Kingdom Jailer", 16, Rarity.UNCOMMON, mage.cards.e.EarthKingdomJailer.class)); cards.add(new SetCardInfo("Earth Kingdom Protectors", 17, Rarity.UNCOMMON, mage.cards.e.EarthKingdomProtectors.class)); cards.add(new SetCardInfo("Earth Kingdom Soldier", 216, Rarity.COMMON, mage.cards.e.EarthKingdomSoldier.class));