Menu

Submission for Barbarian Bully

79

Config

name=Barbarian Bully
image=http://magiccards.info/scans/en/ju/79.jpg
value=2.500
rarity=C
type=Creature
subtype=Human,Barbarian
cost={2}{R}
pt=2/2
timing=main
requires_groovy_code
oracle=Discard a card at random: Barbarian Bully gets +2/+2 until end of turn unless a player has Barbarian Bully deal 4 damage to him or her. Activate this ability only once each turn.

Script

def action = {
    final MagicGame game, final MagicEvent event ->
    if (event.isYes()) {
        game.doAction(new MagicDealDamageAction(event.getSource(),event.getPlayer(),4));
    } else {
        game.doAction(new MagicChangeTurnPTAction(event.getPermanent(),2,2));
    }
}

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Pump"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicDiscardEvent(source, 1),
                new MagicPlayAbilityEvent(source)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "SN gets +2/+2 until end of turn unless opponent has SN deal 4 damage to him or her."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.addEvent(new MagicEvent(
                event.getSource(),
                event.getPlayer().getOpponent(),
                new MagicMayChoice("have SN deal 4 damage to you?"),
                action,
                "PN may\$ have SN deal 4 damage to you. If you don't, SN gets +2/+2 until end of turn."
            ));
        }
    }
]
Pushed