magarena/release/Magarena/scripts/Skullclamp.groovy

22 lines
718 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,
final Object[] choiceResults) {
game.doAction(new MagicDrawAction(event.getPlayer(),2));
}
}
]