implement [EOE] Orbital Plunge

This commit is contained in:
Susucre 2025-07-18 18:05:33 +02:00
parent 02ac039e1f
commit 73689025e1
2 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,71 @@
package mage.cards.o;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.LanderToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class OrbitalPlunge extends CardImpl {
public OrbitalPlunge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
// Orbital Plunge deals 6 damage to target creature. If excess damage was dealt to a permanent this way, create a Lander token.
this.getSpellAbility().addEffect(new OrbitalPlungeEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private OrbitalPlunge(final OrbitalPlunge card) {
super(card);
}
@Override
public OrbitalPlunge copy() {
return new OrbitalPlunge(this);
}
}
// Inspired by Bottle-Cap Blast
class OrbitalPlungeEffect extends OneShotEffect {
OrbitalPlungeEffect() {
super(Outcome.Benefit);
staticText = "{this} deals 6 damage to target creature. " +
"If excess damage was dealt to a permanent this way, create a Lander token.";
}
private OrbitalPlungeEffect(final OrbitalPlungeEffect effect) {
super(effect);
}
@Override
public OrbitalPlungeEffect copy() {
return new OrbitalPlungeEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent == null) {
return false;
}
int lethal = permanent.getLethalDamage(source.getSourceId(), game);
permanent.damage(6, source.getSourceId(), source, game);
if (lethal < 6) {
new CreateTokenEffect(new LanderToken()).apply(game, source);
}
return true;
}
}

View file

@ -198,6 +198,7 @@ public final class EdgeOfEternities extends ExpansionSet {
cards.add(new SetCardInfo("Nova Hellkite", 148, Rarity.RARE, mage.cards.n.NovaHellkite.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Nova Hellkite", 309, Rarity.RARE, mage.cards.n.NovaHellkite.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Nutrient Block", 243, Rarity.COMMON, mage.cards.n.NutrientBlock.class));
cards.add(new SetCardInfo("Orbital Plunge", 149, Rarity.COMMON, mage.cards.o.OrbitalPlunge.class));
cards.add(new SetCardInfo("Oreplate Pangolin", 150, Rarity.COMMON, mage.cards.o.OreplatePangolin.class));
cards.add(new SetCardInfo("Ouroboroid", 201, Rarity.MYTHIC, mage.cards.o.Ouroboroid.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Ouroboroid", 345, Rarity.MYTHIC, mage.cards.o.Ouroboroid.class, NON_FULL_USE_VARIOUS));