magarena/release/Magarena/scripts/Akoum_Battlesinger.groovy

32 lines
1.3 KiB
Groovy
Raw Normal View History

2013-05-25 20:20:03 -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.isFriend(permanent) &&
otherPermanent.hasSubType(MagicSubType.Ally)) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.PUMP,
1,
MagicSimpleMayChoice.DEFAULT_YES),
this,
2013-05-25 20:20:03 -07:00
"PN may\$ have Ally creatures he or " +
2013-04-12 19:32:25 -07:00
"she controls get +1/+0 until end of turn."
) :
MagicEvent.NONE;
}
@Override
2013-05-25 20:20:03 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
if (event.isYes()) {
final Collection<MagicPermanent> targets =
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_ALLY_YOU_CONTROL);
for (final MagicPermanent creature : targets) {
game.doAction(new MagicChangeTurnPTAction(creature,1,0));
}
}
}
2013-05-25 20:20:03 -07:00
}
]