magarena/release/Magarena/scripts/Taste_of_Blood.groovy

26 lines
995 B
Groovy
Raw Normal View History

2013-05-18 19:51:36 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_PLAYER,
new MagicDamageTargetPicker(1),
this,
"SN deals 1 damage to target player\$ and " +
"PN gains 1 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
final MagicDamage damage = new MagicDamage(event.getSource(),player,1);
game.doAction(new MagicDealDamageAction(damage));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
}
});
}
}
]