magarena/release/Magarena/scripts/Backlash.groovy

25 lines
1.0 KiB
Groovy
Raw Normal View History

2013-05-18 22:40:32 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_UNTAPPED_CREATURE,
2013-06-22 01:49:43 -07:00
MagicTapTargetPicker.Tap,
2013-05-18 22:40:32 -07:00
this,
"Tap target untapped creature\$. That creature deals damage equal to its power to its controller."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicTapAction(creature,true));
final MagicDamage damage=new MagicDamage(creature,creature.getController(),creature.getPower());
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
]