simplify groovy script

master
melvin 2013-10-14 11:00:56 +08:00
parent 1f9889682a
commit c229c81d7c
1 changed files with 7 additions and 9 deletions

View File

@ -5,20 +5,18 @@
return new MagicEvent(
cardOnStack,
this,
"PN gains 10 life. Then if you have more life" +
" than an opponent, put a 5/5 white Giant Warrior creature token onto the battlefield."
"PN gains 10 life. Then if you have more life than an opponent, " +
"put a 5/5 white Giant Warrior creature token onto the battlefield."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
game.doAction(new MagicChangeLifeAction(player,10));
final boolean more = player.getLife() > player.getOpponent().getLife();
if (more) {
game.doAction(new MagicPlayTokensAction(
if (player.getLife() > player.getOpponent().getLife()) {
game.doAction(new MagicPlayTokenAction(
player,
TokenCardDefinitions.get("Giant5"),
1
));
}
}