magarena/release/Magarena/scripts/Skullclamp.groovy

21 lines
672 B
Groovy

[
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent died) {
return (permanent.getEquippedCreature()==died)?
new MagicEvent(
permanent,
this,
"PN draws two cards."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
game.doAction(new MagicDrawAction(event.getPlayer(),2));
}
}
]