2013-04-12 19:58:51 -07:00
|
|
|
[
|
|
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(
|
|
|
|
final MagicGame game,
|
|
|
|
final MagicPermanent permanent,
|
2013-06-19 07:23:35 -07:00
|
|
|
final MagicPayedCost payedCost) {
|
2013-04-12 19:58:51 -07:00
|
|
|
return new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
this,
|
|
|
|
"PN gains 2 life for each other creature he or she controls."
|
|
|
|
);
|
|
|
|
}
|
2013-06-23 18:29:26 -07:00
|
|
|
|
2013-04-12 19:58:51 -07:00
|
|
|
@Override
|
2013-06-15 03:20:38 -07:00
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2013-04-12 19:58:51 -07:00
|
|
|
final MagicPlayer player = event.getPlayer();
|
|
|
|
final int x = player.controlsPermanent(event.getPermanent()) ? 1 : 0;
|
2013-07-14 04:50:06 -07:00
|
|
|
final int amount = player.getNrOfPermanents(MagicType.Creature) - x;
|
2013-04-12 19:58:51 -07:00
|
|
|
if (amount > 0) {
|
|
|
|
game.doAction(new MagicChangeLifeAction(player,amount * 2));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|