magarena/release/Magarena/scripts/Reanimate.groovy

30 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-25 22:59:23 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.TARGET_CREATURE_CARD_FROM_ALL_GRAVEYARDS,
MagicGraveyardTargetPicker.ReturnToHand,
2013-05-25 22:59:23 -07:00
this,
2013-05-25 23:04:44 -07:00
"Put target creature card\$ from a graveyard onto the battlefield under your control. " +
2013-05-25 22:59:23 -07:00
"PN loses life equal to its converted mana cost."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard targetCard) {
final MagicPlayer player=event.getPlayer();
game.doAction(new MagicReanimateAction(
targetCard,
2013-07-10 05:01:39 -07:00
player
));
game.doAction(new MagicChangeLifeAction(player,-targetCard.getConvertedCost()));
2013-05-25 22:59:23 -07:00
}
});
}
}
]