Implemented Sparkhunter Masticore

This commit is contained in:
Evan Kranzler 2020-06-06 16:15:35 -04:00
parent 65c10a9cf4
commit 2c4ffeb5ab
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,65 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterObject;
import mage.target.common.TargetPlaneswalkerPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SparkhunterMasticore extends CardImpl {
private static final FilterObject filter = new FilterObject("planeswalkers");
static {
filter.add(CardType.PLANESWALKER.getPredicate());
}
public SparkhunterMasticore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
this.subtype.add(SubType.MASTICORE);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// As an additional cost to cast this spell, discard a card.
this.getSpellAbility().addCost(new DiscardCardCost());
// Protection from planeswalkers
this.addAbility(new ProtectionAbility(filter));
// {1}: Sparkhunter Masticore deals 1 damage to target planeswalker.
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(1), new GenericManaCost(1));
ability.addTarget(new TargetPlaneswalkerPermanent());
this.addAbility(ability);
// {3}: Sparkhunter Masticore gains indestructible until end of turn.
this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn
), new GenericManaCost(3)));
}
private SparkhunterMasticore(final SparkhunterMasticore card) {
super(card);
}
@Override
public SparkhunterMasticore copy() {
return new SparkhunterMasticore(this);
}
}

View file

@ -53,6 +53,7 @@ public final class CoreSet2021 extends ExpansionSet {
cards.add(new SetCardInfo("Runed Halo", 32, Rarity.RARE, mage.cards.r.RunedHalo.class));
cards.add(new SetCardInfo("Shipwreck Dowser", 71, Rarity.UNCOMMON, mage.cards.s.ShipwreckDowser.class));
cards.add(new SetCardInfo("Sigiled Contender", 323, Rarity.UNCOMMON, mage.cards.s.SigiledContender.class));
cards.add(new SetCardInfo("Sparkhunter Masticore", 240, Rarity.RARE, mage.cards.s.SparkhunterMasticore.class));
cards.add(new SetCardInfo("Spirit of Malevolence", 331, Rarity.COMMON, mage.cards.s.SpiritOfMalevolence.class));
cards.add(new SetCardInfo("Storm Caller", 335, Rarity.COMMON, mage.cards.s.StormCaller.class));
cards.add(new SetCardInfo("Teferi's Protege", 77, Rarity.COMMON, mage.cards.t.TeferisProtege.class));