mirror of
https://github.com/correl/mage.git
synced 2025-04-12 17:00:08 -09:00
[MH2] Implemented Unmarked Grave
This commit is contained in:
parent
0270220363
commit
35c17a08eb
2 changed files with 76 additions and 0 deletions
Mage.Sets/src/mage
75
Mage.Sets/src/mage/cards/u/UnmarkedGrave.java
Normal file
75
Mage.Sets/src/mage/cards/u/UnmarkedGrave.java
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
package mage.cards.u;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.SearchEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class UnmarkedGrave extends CardImpl {
|
||||||
|
|
||||||
|
public UnmarkedGrave(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
|
||||||
|
|
||||||
|
// Search your library for a nonlegendary card, put that card into your graveyard, then shuffle.
|
||||||
|
this.getSpellAbility().addEffect(new UnmarkedGraveEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
private UnmarkedGrave(final UnmarkedGrave card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UnmarkedGrave copy() {
|
||||||
|
return new UnmarkedGrave(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UnmarkedGraveEffect extends SearchEffect {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("nonlegendary card");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public UnmarkedGraveEffect() {
|
||||||
|
super(new TargetCardInLibrary(filter), Outcome.Neutral);
|
||||||
|
staticText = "search your library for a nonlegendary card, put that card into your graveyard, then shuffle";
|
||||||
|
}
|
||||||
|
|
||||||
|
public UnmarkedGraveEffect(final UnmarkedGraveEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UnmarkedGraveEffect copy() {
|
||||||
|
return new UnmarkedGraveEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (controller.searchLibrary(target, source, game)) {
|
||||||
|
controller.moveCards(game.getCard(target.getFirstTarget()), Zone.GRAVEYARD, source, game);
|
||||||
|
}
|
||||||
|
controller.shuffleLibrary(source, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -41,6 +41,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Sanctum Prelate", 491, Rarity.MYTHIC, mage.cards.s.SanctumPrelate.class));
|
cards.add(new SetCardInfo("Sanctum Prelate", 491, Rarity.MYTHIC, mage.cards.s.SanctumPrelate.class));
|
||||||
cards.add(new SetCardInfo("Scalding Tarn", 254, Rarity.RARE, mage.cards.s.ScaldingTarn.class));
|
cards.add(new SetCardInfo("Scalding Tarn", 254, Rarity.RARE, mage.cards.s.ScaldingTarn.class));
|
||||||
cards.add(new SetCardInfo("Timeless Dragon", 35, Rarity.RARE, mage.cards.t.TimelessDragon.class));
|
cards.add(new SetCardInfo("Timeless Dragon", 35, Rarity.RARE, mage.cards.t.TimelessDragon.class));
|
||||||
|
cards.add(new SetCardInfo("Unmarked Grave", 106, Rarity.RARE, mage.cards.u.UnmarkedGrave.class));
|
||||||
cards.add(new SetCardInfo("Urza's Saga", 259, Rarity.RARE, mage.cards.u.UrzasSaga.class));
|
cards.add(new SetCardInfo("Urza's Saga", 259, Rarity.RARE, mage.cards.u.UrzasSaga.class));
|
||||||
cards.add(new SetCardInfo("Verdant Catacombs", 260, Rarity.RARE, mage.cards.v.VerdantCatacombs.class));
|
cards.add(new SetCardInfo("Verdant Catacombs", 260, Rarity.RARE, mage.cards.v.VerdantCatacombs.class));
|
||||||
cards.add(new SetCardInfo("Yusri, Fortune's Flame", 218, Rarity.RARE, mage.cards.y.YusriFortunesFlame.class));
|
cards.add(new SetCardInfo("Yusri, Fortune's Flame", 218, Rarity.RARE, mage.cards.y.YusriFortunesFlame.class));
|
||||||
|
|
Loading…
Add table
Reference in a new issue