2013-04-01 07:01:44 -07:00
|
|
|
[
|
|
|
|
new MagicWhenBlocksTrigger() {
|
2012-06-17 05:19:08 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
2012-09-21 21:11:03 -07:00
|
|
|
return (creature.isFriend(permanent) &&
|
2012-06-03 02:29:52 -07:00
|
|
|
creature.hasAbility(MagicAbility.Defender)) ?
|
2012-09-21 21:11:03 -07:00
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
new MagicSimpleMayChoice(
|
|
|
|
MagicSimpleMayChoice.GAIN_LIFE,
|
|
|
|
2,
|
2013-04-01 07:01:44 -07:00
|
|
|
MagicSimpleMayChoice.DEFAULT_YES
|
|
|
|
),
|
2012-09-21 21:11:03 -07:00
|
|
|
this,
|
2013-04-01 07:28:22 -07:00
|
|
|
"PN may\$ gain 2 life."
|
2012-09-21 21:11:03 -07:00
|
|
|
) :
|
|
|
|
MagicEvent.NONE;
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(
|
2011-08-13 02:36:19 -07:00
|
|
|
final MagicGame game,
|
2013-03-22 22:00:53 -07:00
|
|
|
final MagicEvent event) {
|
2013-03-22 19:26:50 -07:00
|
|
|
if (event.isYes()) {
|
2012-08-30 07:02:32 -07:00
|
|
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),2));
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
|
|
|
}
|
2013-04-01 07:01:44 -07:00
|
|
|
}
|
|
|
|
]
|