magarena/release/Magarena/scripts/Boros_Reckoner.groovy

30 lines
1.1 KiB
Groovy
Raw Normal View History

2013-02-16 17:21:51 -08:00
[
new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
final int amount = damage.getDealtAmount();
return (damage.getTarget() == permanent) ?
new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
new MagicDamageTargetPicker(amount),
amount,
this,
"SN deals " + amount + " damage to target creature or player\$."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
2013-02-16 17:21:51 -08:00
public void doAction(final MagicTarget target) {
final MagicDamage damage=new MagicDamage(event.getSource(),target,event.getRefInt());
2013-02-16 17:21:51 -08:00
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
]