[VOW] Implemented Dig Up

This commit is contained in:
Evan Kranzler 2021-10-28 20:10:31 -04:00
parent 04646a5a62
commit d289348483
5 changed files with 86 additions and 9 deletions

View file

@ -1,27 +1,23 @@
package mage.cards.d;
import java.util.UUID;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetCardInLibrary;
/**
*
* @author KholdFuzion
import java.util.UUID;
/**
* @author KholdFuzion
*/
public final class DemonicTutor extends CardImpl {
public DemonicTutor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Search your library for a card and put that card into your hand. Then shuffle your library.
TargetCardInLibrary target = new TargetCardInLibrary();
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(target));
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary()));
}
private DemonicTutor(final DemonicTutor card) {

View file

@ -0,0 +1,38 @@
package mage.cards.d;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.keyword.CleaveAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DigUp extends CardImpl {
public DigUp(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
// Cleave {1}{B}{B}{G}
this.addAbility(new CleaveAbility(this, new SearchLibraryPutInHandEffect(new TargetCardInLibrary()), "{1}{B}{B}{G}"));
// Search your library for a [basic land] card, [reveal it,] put it into your hand, then shuffle.
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A), true
).setText("search your library for a [basic land] card, [reveal it,] put it into your hand, then shuffle"));
}
private DigUp(final DigUp card) {
super(card);
}
@Override
public DigUp copy() {
return new DigUp(this);
}
}

View file

@ -31,6 +31,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
this.ratioBoosterMythic = 8;
this.numBoosterDoubleFaced = 1;
cards.add(new SetCardInfo("Dig Up", 197, Rarity.RARE, mage.cards.d.DigUp.class));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));

View file

@ -0,0 +1,41 @@
package mage.abilities.keyword;
import mage.abilities.SpellAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.cards.Card;
import mage.constants.SpellAbilityType;
import mage.constants.TimingRule;
/**
* @author TheElk801
*/
public class CleaveAbility extends SpellAbility {
public CleaveAbility(Card card, Effect effect, String manaString) {
super(new ManaCostsImpl<>(manaString), card.getName() + " with cleave");
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
this.addEffect(effect);
this.setRuleAtTheTop(true);
this.timing = (card.isSorcery(null) ? TimingRule.SORCERY : TimingRule.INSTANT);
}
public CleaveAbility(final CleaveAbility ability) {
super(ability);
}
@Override
public CleaveAbility copy() {
return new CleaveAbility(this);
}
@Override
public String getRule(boolean all) {
return getRule();
}
@Override
public String getRule() {
return "Cleave " + getManaCostsToPay().getText() + " <i>(You may cast this spell for its cleave cost. If you do, remove the words in square brackets.)</i>";
}
}

View file

@ -11,6 +11,7 @@ Bushido|number|
Buyback|manaString|
Cascade|new|
Changeling|new|
Cleave|card, manaString|
Convoke|new|
Crew|number|
Cumulative upkeep|cost|