Implemented Spit Flame

This commit is contained in:
Evan Kranzler 2018-06-20 22:29:52 -04:00
parent 56b3eb496f
commit 770dabb3a9
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,51 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author TheElk801
*/
public final class SpitFlame extends CardImpl {
private static final FilterPermanent filter
= new FilterPermanent(SubType.DRAGON, "a Dragon");
public SpitFlame(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
// Spit Flame deals 4 damage to target creature.
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Whenever a Dragon enters the battlefield under your control, you may pay {R}. If you do, return Spit Flame from your graveyard to your hand.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
Zone.GRAVEYARD,
new DoIfCostPaid(
new ReturnSourceFromGraveyardToHandEffect(),
new ManaCostsImpl("{R}")
), filter, false
));
}
public SpitFlame(final SpitFlame card) {
super(card);
}
@Override
public SpitFlame copy() {
return new SpitFlame(this);
}
}

View file

@ -206,6 +206,7 @@ public final class CoreSet2019 extends ExpansionSet {
cards.add(new SetCardInfo("Snapping Drake", 75, Rarity.COMMON, mage.cards.s.SnappingDrake.class));
cards.add(new SetCardInfo("Sovereign's Bite", 120, Rarity.COMMON, mage.cards.s.SovereignsBite.class));
cards.add(new SetCardInfo("Sparktongue Dragon", 159, Rarity.COMMON, mage.cards.s.SparktongueDragon.class));
cards.add(new SetCardInfo("Spit Flame", 160, Rarity.RARE, mage.cards.s.SpitFlame.class));
cards.add(new SetCardInfo("Star-Crowned Stag", 38, Rarity.COMMON, mage.cards.s.StarCrownedStag.class));
cards.add(new SetCardInfo("Stitcher's Supplier", 121, Rarity.UNCOMMON, mage.cards.s.StitchersSupplier.class));
cards.add(new SetCardInfo("Strangling Spores", 122, Rarity.COMMON, mage.cards.s.StranglingSpores.class));