24 lines
912 B
Groovy
24 lines
912 B
Groovy
[
|
|
new MagicWhenBlocksTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocker) {
|
|
final MagicPermanent blocked = permanent.getBlockedCreature();
|
|
return (permanent == blocker && blocked.isValid()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
blocked,
|
|
this,
|
|
"Return RN to its owner's hand at end of combat."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(
|
|
final MagicGame game,
|
|
final MagicEvent event) {
|
|
final MagicPermanent creature = event.getRefPermanent();
|
|
game.doAction(new MagicChangeStateAction(creature,MagicPermanentState.ReturnToHandOfOwnerAtEndOfCombat,true));
|
|
}
|
|
}
|
|
]
|