Menu

Submission for Fatal Attraction

98

Config

name=Fatal Attraction
image=http://mtgimage.com/card/fatal%20attraction.jpg
value=2.500
rarity=C
type=Enchantment
subtype=Aura
cost={2}{R}
timing=aura
enchant=destroy,neg creature
requires_groovy_code
oracle=Enchant creature. When Fatal Attraction enters the battlefield, it deals 2 damage to enchanted creature. At the beginning of your upkeep, Fatal Attraction deals 4 damage to enchanted creature.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPayedCost payedCost) {
            final MagicPermanent enchantedCreature = permanent.getEnchantedPermanent();
            return enchantedCreature.isValid() ?
                new MagicEvent(
                    permanent,
                    enchantedCreature,
                    this,
                    "SN deals 2 damage to RN"
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicDealDamageAction(event.getPermanent(),event.getRefPermanent(),2));
        }
    },
    new MagicAtYourUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
            new MagicEvent(
                permanent,
                permanent.getEnchantedPermanent(),
                this,
                "SN deals 4 damage to RN."
            );
    }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicDealDamageAction(event.getPermanent(),event.getRefPermanent(),4));
        }
    }
]
Pushed