magarena/release/Magarena/scripts/Deathforge_Shaman.groovy

33 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-18 22:57:45 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
2013-06-23 18:29:26 -07:00
final MagicPayedCost payedCost) {
2013-06-19 07:23:35 -07:00
return payedCost.isKicked() ?
2013-04-12 19:32:25 -07:00
new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_PLAYER,
2013-06-19 07:23:35 -07:00
payedCost.getKicker(),
2013-04-12 19:32:25 -07:00
this,
2013-06-15 07:27:32 -07:00
"SN deals damage to target player\$ equal to twice the number of times it was kicked."
):
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-05-18 22:57:45 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
final MagicDamage damage = new MagicDamage(
event.getSource(),
player,
2013-06-19 07:23:35 -07:00
event.getRefInt() * 2
2013-04-12 19:32:25 -07:00
);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
2013-05-18 22:57:45 -07:00
}
]