[ZNR] Implemented Spikefield Hazard / Spikefield Cave

This commit is contained in:
Evan Kranzler 2020-09-06 15:34:17 -04:00
parent 1341d0bc98
commit 23fd5a0ca5
3 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,37 @@
package mage.cards.s;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SpikefieldCave extends CardImpl {
public SpikefieldCave(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.modalDFC = true;
this.nightCard = true;
// Spikefield Cave enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R}.
this.addAbility(new RedManaAbility());
}
private SpikefieldCave(final SpikefieldCave card) {
super(card);
}
@Override
public SpikefieldCave copy() {
return new SpikefieldCave(this);
}
}

View file

@ -0,0 +1,39 @@
package mage.cards.s;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SpikefieldHazard extends CardImpl {
public SpikefieldHazard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
this.modalDFC = true;
this.secondSideCardClazz = mage.cards.s.SpikefieldCave.class;
// Spikefield Hazard deals 1 damage to any target. If a permanent dealt damage this way would die this turn, exile it instead.
this.getSpellAbility().addEffect(new DamageTargetEffect(1));
this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)
.setText("If a permanent dealt damage this way would die this turn, exile it instead."));
this.getSpellAbility().addTarget(new TargetAnyTarget());
}
private SpikefieldHazard(final SpikefieldHazard card) {
super(card);
}
@Override
public SpikefieldHazard copy() {
return new SpikefieldHazard(this);
}
}

View file

@ -217,6 +217,8 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Song-Mad Ruins", 165, Rarity.UNCOMMON, mage.cards.s.SongMadRuins.class));
cards.add(new SetCardInfo("Song-Mad Treachery", 165, Rarity.UNCOMMON, mage.cards.s.SongMadTreachery.class));
cards.add(new SetCardInfo("Spare Supplies", 254, Rarity.COMMON, mage.cards.s.SpareSupplies.class));
cards.add(new SetCardInfo("Spikefield Cave", 166, Rarity.UNCOMMON, mage.cards.s.SpikefieldCave.class));
cards.add(new SetCardInfo("Spikefield Hazard", 166, Rarity.UNCOMMON, mage.cards.s.SpikefieldHazard.class));
cards.add(new SetCardInfo("Spitfire Lagac", 167, Rarity.COMMON, mage.cards.s.SpitfireLagac.class));
cards.add(new SetCardInfo("Spoils of Adventure", 237, Rarity.UNCOMMON, mage.cards.s.SpoilsOfAdventure.class));
cards.add(new SetCardInfo("Subtle Strike", 128, Rarity.COMMON, mage.cards.s.SubtleStrike.class));