Implemented Detour

This commit is contained in:
Evan Kranzler 2018-09-14 13:56:29 -04:00
parent 4bfec3d0cf
commit b4701cc025
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,52 @@
package mage.cards.d;
import java.util.UUID;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
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;
/**
*
* @author TheElk801
*/
public final class Detour extends CardImpl {
private static final FilterCard filter
= new FilterCard("basic land cards and/or Gate cards");
static {
filter.add(Predicates.or(
Predicates.and(
new CardTypePredicate(CardType.LAND),
new SupertypePredicate(SuperType.BASIC)
), new SubtypePredicate(SubType.GATE)
));
}
public Detour(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Search your library for up to two basic lands and/or Gates and put them onto the battlefield tapped.
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(
new TargetCardInLibrary(0, 2, filter), true
));
}
public Detour(final Detour card) {
super(card);
}
@Override
public Detour copy() {
return new Detour(this);
}
}

View file

@ -49,6 +49,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
cards.add(new SetCardInfo("Darkblade Agent", 164, Rarity.COMMON, mage.cards.d.DarkbladeAgent.class));
cards.add(new SetCardInfo("Deadly Visit", 68, Rarity.COMMON, mage.cards.d.DeadlyVisit.class));
cards.add(new SetCardInfo("Deafening Clarion", 165, Rarity.RARE, mage.cards.d.DeafeningClarion.class));
cards.add(new SetCardInfo("Detour", 125, Rarity.UNCOMMON, mage.cards.d.Detour.class));
cards.add(new SetCardInfo("Dimir Guildgate", 245, Rarity.COMMON, mage.cards.d.DimirGuildgate.class));
cards.add(new SetCardInfo("Dimir Guildgate", 246, Rarity.COMMON, mage.cards.d.DimirGuildgate.class));
cards.add(new SetCardInfo("Dimir Informant", 36, Rarity.COMMON, mage.cards.d.DimirInformant.class));