Implemented Portcullis Vine

This commit is contained in:
Evan Kranzler 2018-09-19 17:15:24 -04:00
parent 99bbc4e820
commit cd5b094271
2 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,64 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.constants.SubType;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.target.common.TargetControlledPermanent;
/**
*
* @author TheElk801
*/
public final class PortcullisVine extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledCreaturePermanent("a creature with defender");
static {
filter.add(new AbilityPredicate(DefenderAbility.class));
}
public PortcullisVine(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
this.subtype.add(SubType.PLANT);
this.subtype.add(SubType.WALL);
this.power = new MageInt(0);
this.toughness = new MageInt(3);
// Defender
this.addAbility(DefenderAbility.getInstance());
// {2}, {T}, Sacrifice a creature with defender: Draw a card.
Ability ability = new SimpleActivatedAbility(
new DrawCardSourceControllerEffect(1), new GenericManaCost(2)
);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(
new TargetControlledPermanent(filter)
));
this.addAbility(ability);
}
public PortcullisVine(final PortcullisVine card) {
super(card);
}
@Override
public PortcullisVine copy() {
return new PortcullisVine(this);
}
}

View file

@ -191,6 +191,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
cards.add(new SetCardInfo("Piston-Fist Cyclops", 217, Rarity.COMMON, mage.cards.p.PistonFistCyclops.class));
cards.add(new SetCardInfo("Pitiless Gorgon", 218, Rarity.COMMON, mage.cards.p.PitilessGorgon.class));
cards.add(new SetCardInfo("Plains", 260, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Portcullis Vine", 142, Rarity.COMMON, mage.cards.p.PortcullisVine.class));
cards.add(new SetCardInfo("Prey Upon", 143, Rarity.COMMON, mage.cards.p.PreyUpon.class));
cards.add(new SetCardInfo("Price of Fame", 83, Rarity.UNCOMMON, mage.cards.p.PriceOfFame.class));
cards.add(new SetCardInfo("Quasiduplicate", 51, Rarity.RARE, mage.cards.q.Quasiduplicate.class));