From 32bbcc6b5323ab8e20d6b66ebec5e9ad910ea9c2 Mon Sep 17 00:00:00 2001 From: jmharmon <37360760+jmharmon@users.noreply.github.com> Date: Sun, 14 Apr 2019 14:03:23 -0700 Subject: [PATCH] Implement Kyscu Drake --- Mage.Sets/src/mage/cards/k/KyscuDrake.java | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KyscuDrake.java diff --git a/Mage.Sets/src/mage/cards/k/KyscuDrake.java b/Mage.Sets/src/mage/cards/k/KyscuDrake.java new file mode 100644 index 0000000000..709edbfb9a --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KyscuDrake.java @@ -0,0 +1,67 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author jmharmon + */ + +public final class KyscuDrake extends CardImpl { + + private static final FilterCard filter = new FilterCard("card named Viashivan Dragon"); + private static final FilterControlledCreaturePermanent filterSpitting = new FilterControlledCreaturePermanent("creature named Spitting Drake"); + static { + filter.add(new NamePredicate("Viashivan Dragon")); + filterSpitting.add(new NamePredicate("Spitting Drake")); + } + + public KyscuDrake(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.DRAKE); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {G}: Kyscu Drake gets +0/+1 until end of turn. Activate this ability only once each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 1, Duration.EndOfTurn), new ManaCostsImpl("{G}"))); + + // Sacrifice Kyscu Drake and a creature named Spitting Drake: Search your library for a card named Viashivan Dragon and put that card onto the battlefield. Then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, new FilterCard(filter)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target,true,true, Outcome.PutCardInPlay), new SacrificeSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterSpitting, false))); + this.addAbility(ability); + + } + + public KyscuDrake(final KyscuDrake card) { + super(card); + } + + @Override + public KyscuDrake copy() { + return new KyscuDrake(this); + } +}