Implemented Open the Gates

This commit is contained in:
Evan Kranzler 2019-01-11 19:11:57 -05:00
parent 5a11f1bb0c
commit dec7f03820
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.o;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class OpenTheGates extends CardImpl {
private static final FilterCard filter = new FilterCard("basic land card or a Gate card");
static {
filter.add(Predicates.or(
Predicates.and(
new SupertypePredicate(SuperType.BASIC),
new CardTypePredicate(CardType.LAND)
), new SubtypePredicate(SubType.GATE)
));
}
public OpenTheGates(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
// Search your library for a basic land card or a Gate card, reveal it, put it into your hand, then shuffled your library.
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true));
}
private OpenTheGates(final OpenTheGates card) {
super(card);
}
@Override
public OpenTheGates copy() {
return new OpenTheGates(this);
}
}

View file

@ -176,6 +176,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
cards.add(new SetCardInfo("Mountain", 263, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Nikya of the Old Ways", 193, Rarity.RARE, mage.cards.n.NikyaOfTheOldWays.class));
cards.add(new SetCardInfo("Noxious Groodion", 78, Rarity.COMMON, mage.cards.n.NoxiousGroodion.class));
cards.add(new SetCardInfo("Open the Gates", 133, Rarity.COMMON, mage.cards.o.OpenTheGates.class));
cards.add(new SetCardInfo("Orzhov Enforcer", 79, Rarity.UNCOMMON, mage.cards.o.OrzhovEnforcer.class));
cards.add(new SetCardInfo("Orzhov Guildgate", 252, Rarity.COMMON, mage.cards.o.OrzhovGuildgate.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Orzhov Guildgate", 253, Rarity.COMMON, mage.cards.o.OrzhovGuildgate.class, NON_FULL_USE_VARIOUS));