magarena/release/Magarena/scripts/Hamlet_Captain.groovy

47 lines
1.9 KiB
Groovy
Raw Normal View History

2013-05-30 01:07:05 -07:00
[
new MagicWhenAttacksTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent == creature) ?
new MagicEvent(
2013-05-30 01:07:05 -07:00
permanent,
this,
"Other Human creatures PN controls get +1/+1 until end of turn."
):
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-05-30 01:07:05 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
final Collection<MagicPermanent> targets =
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_HUMAN_YOU_CONTROL);
for (final MagicPermanent creature : targets) {
if (creature != event.getPermanent()) {
game.doAction(new MagicChangeTurnPTAction(creature,1,1));
}
}
}
2013-05-30 01:07:05 -07:00
},
new MagicWhenBlocksTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent == creature) ?
new MagicEvent(
2013-05-30 01:07:05 -07:00
permanent,
this,
"Other Human creatures PN controls get +1/+1 until end of turn."
):
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-05-30 01:07:05 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
final Collection<MagicPermanent> targets =
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_HUMAN_YOU_CONTROL);
for (final MagicPermanent creature : targets) {
if (creature != event.getPermanent()) {
game.doAction(new MagicChangeTurnPTAction(creature,1,1));
}
}
}
2013-05-30 01:07:05 -07:00
}
]