Implemented District Guide

This commit is contained in:
Evan Kranzler 2018-09-11 11:20:29 -04:00
parent 81ac7859c4
commit 08fb65f4d2
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
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 DistrictGuide extends CardImpl {
private static final FilterCard filter
= new FilterCard("basic land card or Gate card");
static {
filter.add(Predicates.or(
Predicates.and(
new CardTypePredicate(CardType.LAND),
new SupertypePredicate(SuperType.BASIC)
), new SubtypePredicate(SubType.GATE)
));
}
public DistrictGuide(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SCOUT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// When District Guide enters the battlefield, you may search your library for a basic land card or Gate card, reveal it, put it into your hand, then shuffle your library.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(filter), true, true
), true
));
}
public DistrictGuide(final DistrictGuide card) {
super(card);
}
@Override
public DistrictGuide copy() {
return new DistrictGuide(this);
}
}

View file

@ -39,6 +39,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
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));
cards.add(new SetCardInfo("Direct Current", 96, Rarity.COMMON, mage.cards.d.DirectCurrent.class));
cards.add(new SetCardInfo("District Guide", 128, Rarity.COMMON, mage.cards.d.DistrictGuide.class));
cards.add(new SetCardInfo("Dream Eater", 38, Rarity.MYTHIC, mage.cards.d.DreamEater.class));
cards.add(new SetCardInfo("Emmara, Soul of the Accord", 168, Rarity.RARE, mage.cards.e.EmmaraSoulOfTheAccord.class));
cards.add(new SetCardInfo("Find // Finality", 225, Rarity.RARE, mage.cards.f.FindFinality.class));