magarena/release/Magarena/scripts/Sheoldred__Whispering_One.g...

53 lines
1.9 KiB
Groovy
Raw Normal View History

2013-05-30 05:31:53 -07:00
[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
MagicTargetChoice.TARGET_CREATURE_CARD_FROM_GRAVEYARD,
MagicGraveyardTargetPicker.PutOntoBattlefield,
2013-05-30 05:31:53 -07:00
this,
"Return target creature card\$ from your graveyard to the battlefield."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard card) {
game.doAction(new MagicReanimateAction(
card,
2013-07-10 05:01:39 -07:00
event.getPlayer()
));
2013-05-30 05:31:53 -07:00
}
});
}
},
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
2013-06-23 18:29:26 -07:00
return permanent.isOpponent(upkeepPlayer) ?
2013-05-30 05:31:53 -07:00
new MagicEvent(
permanent,
upkeepPlayer,
this,
"PN sacrifices a creature."
):
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2013-05-30 05:31:53 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer opponent=event.getPlayer();
if (opponent.controlsPermanent(MagicType.Creature)) {
2013-05-30 05:31:53 -07:00
game.addEvent(new MagicSacrificePermanentEvent(
event.getSource(),
opponent,
MagicTargetChoice.SACRIFICE_CREATURE
));
}
}
}
]