[TDM] Implement Neriv, Heart of the Storm

This commit is contained in:
theelk801 2025-03-24 10:50:31 -04:00
parent 5de4ce9191
commit 5f9978a083
2 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,87 @@
package mage.cards.n;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.util.CardUtil;
import java.util.Optional;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NerivHeartOfTheStorm extends CardImpl {
public NerivHeartOfTheStorm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// If a creature you control that entered this turn would deal damage, it deals twice that much damage instead.
this.addAbility(new SimpleStaticAbility(new NerivHeartOfTheStormEffect()));
}
private NerivHeartOfTheStorm(final NerivHeartOfTheStorm card) {
super(card);
}
@Override
public NerivHeartOfTheStorm copy() {
return new NerivHeartOfTheStorm(this);
}
}
class NerivHeartOfTheStormEffect extends ReplacementEffectImpl {
NerivHeartOfTheStormEffect() {
super(Duration.WhileOnBattlefield, Outcome.Damage);
staticText = "if a creature you control that entered this turn would deal damage, it deals twice that much damage instead";
}
private NerivHeartOfTheStormEffect(final NerivHeartOfTheStormEffect effect) {
super(effect);
}
@Override
public NerivHeartOfTheStormEffect copy() {
return new NerivHeartOfTheStormEffect(this);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DAMAGE_PERMANENT ||
event.getType() == GameEvent.EventType.DAMAGE_PLAYER;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return Optional
.ofNullable(game.getPermanentOrLKIBattlefield(event.getSourceId()))
.map(permanent -> permanent.isCreature(game)
&& permanent.getTurnsOnBattlefield() == 0
&& permanent.isControlledBy(source.getControllerId()))
.orElse(false);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
return false;
}
}

View file

@ -75,6 +75,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
cards.add(new SetCardInfo("Mystic Monastery", 262, Rarity.UNCOMMON, mage.cards.m.MysticMonastery.class));
cards.add(new SetCardInfo("Narset's Rebuke", 114, Rarity.COMMON, mage.cards.n.NarsetsRebuke.class));
cards.add(new SetCardInfo("Narset, Jeskai Waymaster", 209, Rarity.RARE, mage.cards.n.NarsetJeskaiWaymaster.class));
cards.add(new SetCardInfo("Neriv, Heart of the Storm", 210, Rarity.MYTHIC, mage.cards.n.NerivHeartOfTheStorm.class));
cards.add(new SetCardInfo("Nomad Outpost", 263, Rarity.UNCOMMON, mage.cards.n.NomadOutpost.class));
cards.add(new SetCardInfo("Opulent Palace", 264, Rarity.UNCOMMON, mage.cards.o.OpulentPalace.class));
cards.add(new SetCardInfo("Plains", 277, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));