Menu

Submission for Charmed Griffin

7

Config

name=Charmed Griffin
image=http://magiccards.info/scans/en/mm/7.jpg
value=2.500
rarity=U
type=Creature
subtype=Griffin
cost={3}{W}
pt=3/3
ability=Flying
timing=main
requires_groovy_code
oracle=Flying. When Charmed Griffin enters the battlefield, each other player may put an artifact or enchantment card onto the battlefield from his or her hand.

Script

def ARTIFACT_OR_ENCHANTMENT_FROM_HAND = new MagicCardFilterImpl() {
    public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
        return target.hasType(MagicType.Artifact) || target.hasType(MagicType.Enchantment);
    }
    public boolean acceptType(final MagicTargetType targetType) {
        return targetType == MagicTargetType.Hand;
    }
};
 
def AN_ARTIFACT_OR_ENCHANTMENT_FROM_HAND = new MagicTargetChoice(
    ARTIFACT_OR_ENCHANTMENT_FROM_HAND,  
    MagicTargetHint.None,
    "an artifact or enchantment card from your hand"
);

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                permanent.getOpponent(),
                this,
                "PN may put an artifact or enchantment card onto the battlefield from his or her hand."
            );
        }
        
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.addEvent(new MagicPutOntoBattlefieldEvent(
                event,
                new MagicMayChoice(AN_ARTIFACT_OR_ENCHANTMENT_FROM_HAND)
            ));
        }
    }
]
Pushed