From ad207c63db6a15adf8c9ddcfaa2a464ea0f90a6c Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 22 Apr 2023 19:31:25 -0400 Subject: [PATCH] [LTC] Implement Radagast, Wizard of Wilds --- .../mage/cards/r/RadagastWizardOfWilds.java | 78 +++++++++++++++++++ .../sets/TalesOfMiddleEarthCommander.java | 1 + 2 files changed, 79 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RadagastWizardOfWilds.java diff --git a/Mage.Sets/src/mage/cards/r/RadagastWizardOfWilds.java b/Mage.Sets/src/mage/cards/r/RadagastWizardOfWilds.java new file mode 100644 index 00000000000..3d0772cea91 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RadagastWizardOfWilds.java @@ -0,0 +1,78 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.WardAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.FilterSpell; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.game.permanent.token.BeastToken; +import mage.game.permanent.token.SwanSongBirdToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RadagastWizardOfWilds extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent("Beasts and Birds"); + private static final FilterSpell filter2 = new FilterSpell("a spell with mana value 5 or greater"); + + static { + filter.add(Predicates.or( + SubType.BEAST.getPredicate(), + SubType.BIRD.getPredicate() + )); + filter2.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 4)); + } + + public RadagastWizardOfWilds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.AVATAR); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Ward {1} + this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}"))); + + // Beasts and Birds you control have ward {1}. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + new WardAbility(new GenericManaCost(1), false), Duration.WhileOnBattlefield, filter + ))); + + // Whenever you cast a spell with mana value 5 or greater, choose one -- + // * Create a 3/3 green Beast creature token. + Ability ability = new SpellCastControllerTriggeredAbility( + new CreateTokenEffect(new BeastToken()), filter2, false + ); + + // * Create a 2/2 blue Bird creature token with flying. + ability.addMode(new Mode(new CreateTokenEffect(new SwanSongBirdToken()))); + this.addAbility(ability); + } + + private RadagastWizardOfWilds(final RadagastWizardOfWilds card) { + super(card); + } + + @Override + public RadagastWizardOfWilds copy() { + return new RadagastWizardOfWilds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java b/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java index a498c9564f5..dcb7f7214b2 100644 --- a/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java +++ b/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java @@ -17,6 +17,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet { this.hasBasicLands = false; cards.add(new SetCardInfo("Ensnaring Bridge", 350, Rarity.MYTHIC, mage.cards.e.EnsnaringBridge.class)); + cards.add(new SetCardInfo("Radagast, Wizard of Wilds", 66, Rarity.RARE, mage.cards.r.RadagastWizardOfWilds.class)); cards.add(new SetCardInfo("Sam, Loyal Attendant", 7, Rarity.MYTHIC, mage.cards.s.SamLoyalAttendant.class)); cards.add(new SetCardInfo("Sol Ring", 284, Rarity.UNCOMMON, mage.cards.s.SolRing.class)); cards.add(new SetCardInfo("The Great Henge", 348, Rarity.MYTHIC, mage.cards.t.TheGreatHenge.class));