mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Implemented Secrets of the Mausoleum
This commit is contained in:
parent
8d3964b4c8
commit
54ec6f879d
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/s/SecretsOfTheMausoleum.java
Normal file
75
Mage.Sets/src/mage/cards/s/SecretsOfTheMausoleum.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SecretsOfTheMausoleum extends CardImpl {
|
||||
|
||||
public SecretsOfTheMausoleum(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// Undergrowth — Search your library for a black card with converted mana cost equal to or less than the number of creature cards in your graveyard, reveal it, put it into your hand, then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SecretsOfTheMausoleumEffect());
|
||||
}
|
||||
|
||||
public SecretsOfTheMausoleum(final SecretsOfTheMausoleum card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecretsOfTheMausoleum copy() {
|
||||
return new SecretsOfTheMausoleum(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SecretsOfTheMausoleumEffect extends OneShotEffect {
|
||||
|
||||
public SecretsOfTheMausoleumEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "<i>Undergrowth</i> — Search your library "
|
||||
+ "for a black card with converted mana cost less than "
|
||||
+ "or equal to the number of creature cards in your graveyard, "
|
||||
+ "reveal it, put it into your hand, then shuffle your library.";
|
||||
}
|
||||
|
||||
public SecretsOfTheMausoleumEffect(final SecretsOfTheMausoleumEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecretsOfTheMausoleumEffect copy() {
|
||||
return new SecretsOfTheMausoleumEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int critterCount = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||
FilterCard filter = new FilterCard("a black card with converted mana cost less than or equal to " + critterCount);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, critterCount + 1));
|
||||
return new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -87,6 +87,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rosemane Centaur", 197, Rarity.COMMON, mage.cards.r.RosemaneCentaur.class));
|
||||
cards.add(new SetCardInfo("Runaway Steam-Kin", 115, Rarity.RARE, mage.cards.r.RunawaySteamKin.class));
|
||||
cards.add(new SetCardInfo("Sacred Foundry", 254, Rarity.RARE, mage.cards.s.SacredFoundry.class));
|
||||
cards.add(new SetCardInfo("Secrets of the Mausoleum", 75, Rarity.RARE, mage.cards.s.SecretsOfTheMausoleum.class));
|
||||
cards.add(new SetCardInfo("Selesnya Guildgate", 255, Rarity.COMMON, mage.cards.s.SelesnyaGuildgate.class));
|
||||
cards.add(new SetCardInfo("Selesnya Guildgate", 256, Rarity.COMMON, mage.cards.s.SelesnyaGuildgate.class));
|
||||
cards.add(new SetCardInfo("Sinister Sabotage", 54, Rarity.UNCOMMON, mage.cards.s.SinisterSabotage.class));
|
||||
|
|
Loading…
Reference in a new issue