From 6c45ec6004aebde72d7a8080a4ef2217a5dab83d Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 14 Nov 2025 15:30:39 -0500 Subject: [PATCH] [TLE] Implement Chong and Lily, Nomads --- .../src/mage/cards/c/ChongAndLilyNomads.java | 107 ++++++++++++++++++ .../sets/AvatarTheLastAirbenderEternal.java | 2 + 2 files changed, 109 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ChongAndLilyNomads.java diff --git a/Mage.Sets/src/mage/cards/c/ChongAndLilyNomads.java b/Mage.Sets/src/mage/cards/c/ChongAndLilyNomads.java new file mode 100644 index 00000000000..817564189f5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChongAndLilyNomads.java @@ -0,0 +1,107 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.AttacksWithCreaturesTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +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.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.game.Game; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ChongAndLilyNomads extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.BARD, "Bards you control"); + + public ChongAndLilyNomads(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARD); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever one or more Bards you control attack, choose one -- + // * Put a lore counter on each of any number of target Sagas you control. + Ability ability = new AttacksWithCreaturesTriggeredAbility( + new AddCountersTargetEffect(CounterType.LORE.createInstance()), 1, filter + ); + ability.addTarget(new TargetPermanent(0, Integer.MAX_VALUE, ChongAndLilyNomadsValue.getFilter())); + + // * Creatures you control get +1/+0 until end of turn for each lore counter among Sagas you control. + ability.addMode(new Mode(new BoostControlledEffect( + ChongAndLilyNomadsValue.instance, StaticValue.get(0), Duration.WhileOnBattlefield + ))); + this.addAbility(ability.addHint(ChongAndLilyNomadsValue.getHint())); + } + + private ChongAndLilyNomads(final ChongAndLilyNomads card) { + super(card); + } + + @Override + public ChongAndLilyNomads copy() { + return new ChongAndLilyNomads(this); + } +} + +enum ChongAndLilyNomadsValue implements DynamicValue { + instance; + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SAGA, "Sagas you control"); + + public static FilterPermanent getFilter() { + return filter; + } + + private static final Hint hint = new ValueHint("Lore counters among Sagas you control", instance); + + public static Hint getHint() { + return hint; + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + return game + .getBattlefield() + .getActivePermanents(filter, sourceAbility.getControllerId(), sourceAbility, game) + .stream() + .mapToInt(permanent -> permanent.getCounters(game).getCount(CounterType.LORE)) + .sum(); + } + + @Override + public ChongAndLilyNomadsValue copy() { + return this; + } + + @Override + public String getMessage() { + return "lore counter among Sagas you control"; + } + + @Override + public String toString() { + return "1"; + } +} diff --git a/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java b/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java index 872207d94ea..7c9fc5fab01 100644 --- a/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java +++ b/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java @@ -72,6 +72,8 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet { cards.add(new SetCardInfo("Cathartic Reunion", 164, Rarity.COMMON, mage.cards.c.CatharticReunion.class)); cards.add(new SetCardInfo("Chakra Meditation", 179, Rarity.RARE, mage.cards.c.ChakraMeditation.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Chakra Meditation", 91, Rarity.RARE, mage.cards.c.ChakraMeditation.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Chong and Lily, Nomads", 113, Rarity.RARE, mage.cards.c.ChongAndLilyNomads.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Chong and Lily, Nomads", 192, Rarity.RARE, mage.cards.c.ChongAndLilyNomads.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Cityscape Leveler", 53, Rarity.MYTHIC, mage.cards.c.CityscapeLeveler.class)); cards.add(new SetCardInfo("Clone Legion", 12, Rarity.MYTHIC, mage.cards.c.CloneLegion.class)); cards.add(new SetCardInfo("Clone", 11, Rarity.MYTHIC, mage.cards.c.Clone.class));