Skip to content

Commit

Permalink
[MH3] Implement Flare of Cultivation
Browse files Browse the repository at this point in the history
  • Loading branch information
theelk801 committed Feb 24, 2024
1 parent a28d3b9 commit 2f4ceb4
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Mage.Sets/src/mage/cards/f/FlareOfCultivation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package mage.cards.f;

import mage.ObjectColor;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.search.SearchLibraryPutOneOntoBattlefieldTappedRestInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.target.common.TargetCardInLibrary;

import java.util.UUID;

/**
* @author TheElk801
*/
public final class FlareOfCultivation extends CardImpl {

private static final FilterPermanent filter = new FilterControlledCreaturePermanent("nontoken green creature");

static {
filter.add(TokenPredicate.FALSE);
filter.add(new ColorPredicate(ObjectColor.GREEN));
}

public FlareOfCultivation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}{G}");

// You may sacrifice a nontoken green creature rather than pay this spell's mana cost.
this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(filter)).setRuleAtTheTop(true));

// Search your library for up to two basic land cards, reveal those cards, put one onto the battlefield tapped and the other into your hand, then shuffle.
this.getSpellAbility().addEffect(new SearchLibraryPutOneOntoBattlefieldTappedRestInHandEffect(
new TargetCardInLibrary(0, 2, StaticFilters.FILTER_CARD_BASIC_LANDS)
));
}

private FlareOfCultivation(final FlareOfCultivation card) {
super(card);
}

@Override
public FlareOfCultivation copy() {
return new FlareOfCultivation(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/ModernHorizons3.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ private ModernHorizons3() {
this.hasBoosters = false; // temporary

cards.add(new SetCardInfo("Bloodstained Mire", 216, Rarity.RARE, mage.cards.b.BloodstainedMire.class));
cards.add(new SetCardInfo("Flare of Cultivation", 154, Rarity.RARE, mage.cards.f.FlareOfCultivation.class));
cards.add(new SetCardInfo("Flooded Strand", 220, Rarity.RARE, mage.cards.f.FloodedStrand.class));
cards.add(new SetCardInfo("Forest", 308, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 305, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
Expand Down

0 comments on commit 2f4ceb4

Please sign in to comment.