magarena/release/Magarena/scripts/Ronin_Warclub.groovy

25 lines
805 B
Groovy

[
new MagicWhenOtherComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return (otherPermanent.isCreature() &&
otherPermanent.isFriend(permanent)) ?
new MagicEvent(
permanent,
otherPermanent,
this,
"Attach SN to RN."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicAttachEquipmentAction(
event.getPermanent(),
event.getRefPermanent()
));
}
}
]