diff --git a/Mage.Sets/src/mage/cards/d/DemonicTutor.java b/Mage.Sets/src/mage/cards/d/DemonicTutor.java index d88597d4595..512e9d0f12e 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicTutor.java +++ b/Mage.Sets/src/mage/cards/d/DemonicTutor.java @@ -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}"); - + 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) { diff --git a/Mage.Sets/src/mage/cards/d/DigUp.java b/Mage.Sets/src/mage/cards/d/DigUp.java new file mode 100644 index 00000000000..e13037699a0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DigUp.java @@ -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); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index e9982f0cc30..5fd28451ab3 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -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)); diff --git a/Mage/src/main/java/mage/abilities/keyword/CleaveAbility.java b/Mage/src/main/java/mage/abilities/keyword/CleaveAbility.java new file mode 100644 index 00000000000..2bccbe68404 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/CleaveAbility.java @@ -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() + " (You may cast this spell for its cleave cost. If you do, remove the words in square brackets.)"; + } +} diff --git a/Utils/keywords.txt b/Utils/keywords.txt index f49a139f7b8..e284069feb9 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -11,6 +11,7 @@ Bushido|number| Buyback|manaString| Cascade|new| Changeling|new| +Cleave|card, manaString| Convoke|new| Crew|number| Cumulative upkeep|cost|