Skip to content

Commit

Permalink
Implement Valley Floodcaller
Browse files Browse the repository at this point in the history
  • Loading branch information
jimga150 committed Aug 15, 2024
1 parent e976920 commit 5d65a00
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
79 changes: 79 additions & 0 deletions Mage.Sets/src/mage/cards/v/ValleyFloodcaller.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/Bloomburrow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5d65a00

Please sign in to comment.