From 9172a9eba893d5ecad3ccdf5a1b607c4855ca364 Mon Sep 17 00:00:00 2001 From: Grath <1895280+Grath@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:23:10 -0500 Subject: [PATCH] [DRC] Implement On Wings of Gold. --- Mage.Sets/src/mage/cards/o/OnWingsOfGold.java | 60 +++++++++++++++++++ .../src/mage/sets/AetherdriftCommander.java | 1 + .../permanent/token/ZombieWhiteToken.java | 29 +++++++++ 3 files changed, 90 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/o/OnWingsOfGold.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/ZombieWhiteToken.java diff --git a/Mage.Sets/src/mage/cards/o/OnWingsOfGold.java b/Mage.Sets/src/mage/cards/o/OnWingsOfGold.java new file mode 100644 index 00000000000..65a5bf945fe --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OnWingsOfGold.java @@ -0,0 +1,60 @@ +package mage.cards.o; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.CardsLeaveGraveyardTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.ZombieWhiteToken; + +/** + * + * @author Grath + */ +public final class OnWingsOfGold extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control that are Zombies and/or tokens"); + + static { + filter.add(Predicates.or(SubType.ZOMBIE.getPredicate(), TokenPredicate.TRUE)); + } + + public OnWingsOfGold(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // Creatures you control that are Zombies and/or tokens get +1/+1 and have flying. + Ability ability = new SimpleStaticAbility(new BoostControlledEffect( + 1, 1, Duration.WhileOnBattlefield, filter, false + ).setText("Creatures you control that are Zombies and/or tokens get +1/+1")); + ability.addEffect(new GainAbilityControlledEffect( + FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter + ).setText("and have flying")); + this.addAbility(ability); + + // Whenever one or more cards leave your graveyard, create a 1/1 white Zombie creature token. + this.addAbility(new CardsLeaveGraveyardTriggeredAbility( + new CreateTokenEffect(new ZombieWhiteToken(), 1, false, false) + )); + } + + private OnWingsOfGold(final OnWingsOfGold card) { + super(card); + } + + @Override + public OnWingsOfGold copy() { + return new OnWingsOfGold(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AetherdriftCommander.java b/Mage.Sets/src/mage/sets/AetherdriftCommander.java index f91c3448a4e..ca48f7c3730 100644 --- a/Mage.Sets/src/mage/sets/AetherdriftCommander.java +++ b/Mage.Sets/src/mage/sets/AetherdriftCommander.java @@ -68,6 +68,7 @@ public final class AetherdriftCommander extends ExpansionSet { cards.add(new SetCardInfo("Lightning Runner", 103, Rarity.MYTHIC, mage.cards.l.LightningRunner.class)); cards.add(new SetCardInfo("Loyal Apprentice", 104, Rarity.UNCOMMON, mage.cards.l.LoyalApprentice.class)); cards.add(new SetCardInfo("Midnight Clock", 79, Rarity.RARE, mage.cards.m.MidnightClock.class)); + cards.add(new SetCardInfo("On Wings of Gold", 5, Rarity.RARE, mage.cards.o.OnWingsOfGold.class)); cards.add(new SetCardInfo("One with the Machine", 80, Rarity.RARE, mage.cards.o.OneWithTheMachine.class)); cards.add(new SetCardInfo("Ornithopter of Paradise", 133, Rarity.COMMON, mage.cards.o.OrnithopterOfParadise.class)); cards.add(new SetCardInfo("Overflowing Basin", 165, Rarity.RARE, mage.cards.o.OverflowingBasin.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieWhiteToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieWhiteToken.java new file mode 100644 index 00000000000..deab89d17a0 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieWhiteToken.java @@ -0,0 +1,29 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author BetaSteward_at_googlemail.com + */ +public final class ZombieWhiteToken extends TokenImpl { + + public ZombieWhiteToken() { + super("Zombie Token", "1/1 white Zombie creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.ZOMBIE); + power = new MageInt(1); + toughness = new MageInt(1); + } + + private ZombieWhiteToken(final ZombieWhiteToken token) { + super(token); + } + + @Override + public ZombieWhiteToken copy() { + return new ZombieWhiteToken(this); + } +}