magarena/release/Magarena/scripts/Skullclamp.groovy

19 lines
619 B
Groovy

[
new MagicWhenOtherDiesTrigger() {
@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));
}
}
]