magarena/release/Magarena/scripts/Requiem_Angel.groovy

28 lines
1021 B
Groovy
Raw Normal View History

2013-05-18 04:43:01 -07:00
[
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPermanent otherPermanent) {
return (permanent != otherPermanent &&
otherPermanent.isFriend(permanent) &&
otherPermanent.isCreature() &&
!otherPermanent.hasSubType(MagicSubType.Spirit)) ?
new MagicEvent(
permanent,
this,
"PN puts a 1/1 white Spirit creature " +
"token with flying onto the battlefield."):
MagicEvent.NONE;
}
@Override
2013-05-18 04:43:01 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
game.doAction(new MagicPlayTokenAction(
2013-05-18 04:43:01 -07:00
event.getPlayer(),
TokenCardDefinitions.get("Spirit2")
));
2013-04-12 19:32:25 -07:00
}
2013-05-18 04:43:01 -07:00
}
]