Menu

Submission for Flaring Pain

89

Config

name=Flaring Pain
url=http://magiccards.info/ju/en/89.html
image=http://magiccards.info/scans/en/ju/89.jpg
value=3.011
rarity=C
type=Instant
cost={1}{R}
timing=removal
ability=Flashback {R}
requires_groovy_code

Script

def cantBePrevented = new MagicIfDamageWouldBeDealtTrigger() {
    @Override
    public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
        damage.setUnpreventable();
        return MagicEvent.NONE;
    }
}

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.NEG_TARGET_PLAYER,
                this,
                "Damage can't be prevented this turn. "
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game, {
                final MagicPlayer player ->
                game.doAction(new MagicAddTurnTriggerAction(cantBePrevented));
            });
        }
    }
]
Pushed