mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
[EOE] Implement Cut Propulsion
This commit is contained in:
parent
42a042fe4b
commit
5e7fc54fc9
2 changed files with 66 additions and 0 deletions
65
Mage.Sets/src/mage/cards/c/CutPropulsion.java
Normal file
65
Mage.Sets/src/mage/cards/c/CutPropulsion.java
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
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.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CutPropulsion extends CardImpl {
|
||||
|
||||
public CutPropulsion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
|
||||
|
||||
// Target creature deals damage to itself equal to its power. If that creature has flying, it deals twice that much damage to itself instead.
|
||||
this.getSpellAbility().addEffect(new CutPropulsionEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private CutPropulsion(final CutPropulsion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CutPropulsion copy() {
|
||||
return new CutPropulsion(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CutPropulsionEffect extends OneShotEffect {
|
||||
|
||||
CutPropulsionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target creature deals damage to itself equal to its power. " +
|
||||
"If that creature has flying, it deals twice that much damage to itself instead";
|
||||
}
|
||||
|
||||
private CutPropulsionEffect(final CutPropulsionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CutPropulsionEffect copy() {
|
||||
return new CutPropulsionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
int damage = (permanent.getAbilities(game).containsClass(FlyingAbility.class) ? 2 : 1) * permanent.getPower().getValue();
|
||||
return damage > 0 && permanent.damage(damage, permanent.getId(), source, game) > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -66,6 +66,7 @@ public final class EdgeOfEternities extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cosmogrand Zenith", 304, Rarity.MYTHIC, mage.cards.c.CosmograndZenith.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Cosmogrand Zenith", 9, Rarity.MYTHIC, mage.cards.c.CosmograndZenith.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Cryogen Relic", 52, Rarity.COMMON, mage.cards.c.CryogenRelic.class));
|
||||
cards.add(new SetCardInfo("Cut Propulsion", 130, Rarity.UNCOMMON, mage.cards.c.CutPropulsion.class));
|
||||
cards.add(new SetCardInfo("Dauntless Scrapbot", 237, Rarity.UNCOMMON, mage.cards.d.DauntlessScrapbot.class));
|
||||
cards.add(new SetCardInfo("Dawnsire, Sunstar Dreadnought", 238, Rarity.MYTHIC, mage.cards.d.DawnsireSunstarDreadnought.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Dawnsire, Sunstar Dreadnought", 351, Rarity.MYTHIC, mage.cards.d.DawnsireSunstarDreadnought.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue