Menu

Submission for Shipwreck Singer

206

Config

name=Shipwreck Singer
image=http://mtgimage.com/card/shipwreck%20singer.jpg
value=2.500
rarity=U
type=Creature
subtype=Siren
cost={U}{B}
pt=1/2
ability=Flying;\
{1}{B}, {T}: Attacking creatures get -1/-1 until end of turn.
timing=main
requires_groovy_code
oracle=Flying. {1}{U}: Target creature an opponent controls attacks this turn if able. {1}{B}, {T}: Attacking creatures get -1/-1 until end of turn.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.MustAttack),
        "Attacks"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                    new MagicPayManaCostEvent(source,"{1}{U}")
                ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_CREATURE_YOUR_OPPONENT_CONTROLS,
                MagicMustAttackTargetPicker.create(),
                this,
                "Target creature\$ an opponent controls attacks this turn if able."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicGainAbilityAction(it,MagicAbility.AttacksEachTurnIfAble));
            });
        }
    }
]
Pushed