25 lines
796 B
Groovy
25 lines
796 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 MagicAttachAction(
|
|
event.getPermanent(),
|
|
event.getRefPermanent()
|
|
));
|
|
}
|
|
}
|
|
]
|