Menu

Submission for Kookus

86

Config

name=Kookus
image=http://magiccards.info/scans/en/vi/86.jpg
value=2.500
rarity=R
type=Creature
subtype=Djinn
cost={3}{R}{R}
pt=3/5
ability=Trample;\
{R}: SN gets +1/+0 until end of turn.
timing=main
requires_groovy_code
oracle=Trample. At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, Kookus deals 3 damage to you and attacks this turn if able. {R}: Kookus gets +1/+0 until end of turn.

Script

def KEEPER_OF_KOOKUS = new MagicPermanentFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
        return target.isCreature() && target.getName().equals("Keeper of Kookus");
    } 
};

[
    new MagicAtYourUpkeepTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
            return upkeepPlayer.controlsPermanent(KEEPER_OF_KOOKUS) == false ?
                new MagicEvent(
                    permanent,
                    this,
                    "SN deals 3 damage to PN and attacks this turn if able."
            ):
            MagicEvent.NONE;
        }

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