From 5d65a0088d19a90af2e202090ec1523e2e5622d6 Mon Sep 17 00:00:00 2001 From: jimga150 Date: Thu, 15 Aug 2024 00:07:56 -0400 Subject: [PATCH] Implement Valley Floodcaller --- .../src/mage/cards/v/ValleyFloodcaller.java | 79 +++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + 2 files changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/ValleyFloodcaller.java diff --git a/Mage.Sets/src/mage/cards/v/ValleyFloodcaller.java b/Mage.Sets/src/mage/cards/v/ValleyFloodcaller.java new file mode 100644 index 000000000000..093df79bfed3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/ValleyFloodcaller.java @@ -0,0 +1,79 @@ +package mage.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterNoncreatureCard; +import mage.filter.predicate.Predicates; + +/** + * + * @author jimga150 + */ +public final class ValleyFloodcaller extends CardImpl { + + private static final FilterCard nonCreatureFilter = new FilterNoncreatureCard("noncreature spells"); + + private static final FilterCreaturePermanent creatureFilter = + new FilterCreaturePermanent("Birds, Frogs, Otters, and Rats"); + + static { + creatureFilter.add(TargetController.YOU.getControllerPredicate()); + creatureFilter.add(Predicates.or( + SubType.BIRD.getPredicate(), + SubType.FROG.getPredicate(), + SubType.OTTER.getPredicate(), + SubType.RAT.getPredicate() + )); + } + + public ValleyFloodcaller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.OTTER); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // You may cast noncreature spells as though they had flash. + this.addAbility(new SimpleStaticAbility( + new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, nonCreatureFilter) + )); + + // Whenever you cast a noncreature spell, Birds, Frogs, Otters, and Rats you control get +1/+1 until end of turn. + // Untap them. + Ability ability = new SpellCastControllerTriggeredAbility( + new BoostControlledEffect(1, 1, Duration.EndOfTurn, creatureFilter), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false + ); + ability.addEffect(new UntapAllControllerEffect(creatureFilter).setText("Untap them")); + this.addAbility(ability); + } + + private ValleyFloodcaller(final ValleyFloodcaller card) { + super(card); + } + + @Override + public ValleyFloodcaller copy() { + return new ValleyFloodcaller(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index d5529f240afc..9ccec2f78082 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -255,6 +255,7 @@ private Bloomburrow() { cards.add(new SetCardInfo("Treetop Sentries", 201, Rarity.COMMON, mage.cards.t.TreetopSentries.class)); cards.add(new SetCardInfo("Uncharted Haven", 261, Rarity.COMMON, mage.cards.u.UnchartedHaven.class)); cards.add(new SetCardInfo("Valley Flamecaller", 158, Rarity.RARE, mage.cards.v.ValleyFlamecaller.class)); + cards.add(new SetCardInfo("Valley Floodcaller", 79, Rarity.RARE, mage.cards.v.ValleyFloodcaller.class)); cards.add(new SetCardInfo("Valley Mightcaller", 202, Rarity.RARE, mage.cards.v.ValleyMightcaller.class)); cards.add(new SetCardInfo("Valley Rally", 159, Rarity.UNCOMMON, mage.cards.v.ValleyRally.class)); cards.add(new SetCardInfo("Valley Rotcaller", 119, Rarity.RARE, mage.cards.v.ValleyRotcaller.class));