From 40b659f523e6bc881e52b4d4876a55ba309d5a4e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 1 Jul 2021 18:43:53 -0400 Subject: [PATCH] [AFR] Implemented Varis, Silverymoon Ranger --- .../mage/cards/v/VarisSilverymoonRanger.java | 69 +++++++++++++++++++ .../sets/AdventuresInTheForgottenRealms.java | 1 + 2 files changed, 70 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/VarisSilverymoonRanger.java diff --git a/Mage.Sets/src/mage/cards/v/VarisSilverymoonRanger.java b/Mage.Sets/src/mage/cards/v/VarisSilverymoonRanger.java new file mode 100644 index 0000000000..9b1e8bfe42 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VarisSilverymoonRanger.java @@ -0,0 +1,69 @@ +package mage.cards.v; + +import mage.MageInt; +import mage.abilities.common.CompletedDungeonTriggeredAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.keyword.VentureIntoTheDungeonEffect; +import mage.abilities.keyword.ReachAbility; +import mage.abilities.keyword.WardAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.WolfToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class VarisSilverymoonRanger extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a creature or planeswalker spell"); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.PLANESWALKER.getPredicate() + )); + } + + public VarisSilverymoonRanger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.RANGER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // Ward {1} + this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}"))); + + // Whenever you cast a creature or planeswalker spell, venture into the dungeon. This ability triggers only once each turn. + this.addAbility(new SpellCastControllerTriggeredAbility( + new VentureIntoTheDungeonEffect(), filter, false + ).setTriggersOnce(true)); + + // Whenever you complete a dungeon, create a 2/2 green Wolf creature token. + this.addAbility(new CompletedDungeonTriggeredAbility(new CreateTokenEffect(new WolfToken()))); + } + + private VarisSilverymoonRanger(final VarisSilverymoonRanger card) { + super(card); + } + + @Override + public VarisSilverymoonRanger copy() { + return new VarisSilverymoonRanger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index a571540325..cdfafe2e14 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -98,6 +98,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet { cards.add(new SetCardInfo("Tasha's Hideous Laughter", 78, Rarity.RARE, mage.cards.t.TashasHideousLaughter.class)); cards.add(new SetCardInfo("Tiamat", 235, Rarity.MYTHIC, mage.cards.t.Tiamat.class)); cards.add(new SetCardInfo("Trelasarra Moon Dancer", 236, Rarity.UNCOMMON, mage.cards.t.TrelasarraMoonDancer.class)); + cards.add(new SetCardInfo("Varis, Silverymoon Ranger", 209, Rarity.RARE, mage.cards.v.VarisSilverymoonRanger.class)); cards.add(new SetCardInfo("Vorpal Sword", 124, Rarity.RARE, mage.cards.v.VorpalSword.class)); cards.add(new SetCardInfo("Werewolf Pack Leader", 211, Rarity.RARE, mage.cards.w.WerewolfPackLeader.class)); cards.add(new SetCardInfo("You Come to a River", 83, Rarity.COMMON, mage.cards.y.YouComeToARiver.class));