magarena/release/Magarena/scripts/Blood_Seeker.groovy

28 lines
1.0 KiB
Groovy
Raw Normal View History

2013-05-18 00:16:04 -07:00
[
new MagicWhenOtherComesIntoPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return (otherPermanent.isCreature() &&
otherPermanent.isEnemy(permanent)) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.OPPONENT_LOSE_LIFE,
1,
MagicSimpleMayChoice.DEFAULT_YES
),
2013-05-18 00:16:04 -07:00
otherPermanent.getController(),
2013-04-12 19:32:25 -07:00
this,
2013-06-15 07:27:32 -07:00
"PN may\$ have RN lose 1 life."
):
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-06-15 06:13:32 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
if (event.isYes()) {
2013-05-18 00:16:04 -07:00
game.doAction(new MagicChangeLifeAction(event.getRefPlayer(),-1));
2013-04-12 19:32:25 -07:00
}
2013-06-23 18:29:26 -07:00
}
2013-05-18 00:16:04 -07:00
}
]