magarena/release/Magarena/scripts/Amphibious_Kavu.groovy

60 lines
2.0 KiB
Groovy
Raw Normal View History

2013-05-29 22:57:38 -07:00
[
new MagicWhenBecomesBlockedTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
if (permanent != attacker) {
return MagicEvent.NONE;
}
final MagicPermanentList plist = permanent.getBlockingCreatures();
boolean pump = false;
for (final MagicPermanent blocker : plist) {
if (blocker.hasColor(MagicColor.Blue) ||
blocker.hasColor(MagicColor.Black)) {
pump = true;
}
}
return (pump) ?
new MagicEvent(
permanent,
this,
"SN gets +3/+3 until end of turn."
):
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2013-04-12 19:32:25 -07:00
@Override
2013-05-29 22:57:38 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
3,
3
));
}
2013-05-29 22:57:38 -07:00
},
new MagicWhenBlocksTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocker) {
final MagicPermanent blocked = permanent.getBlockedCreature();
return (permanent == blocker &&
blocked.isValid() &&
(blocked.hasColor(MagicColor.Blue) ||
blocked.hasColor(MagicColor.Black))) ?
new MagicEvent(
permanent,
this,
2013-05-29 22:57:38 -07:00
"SN gets +3/+3 until end of turn."
):
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-05-29 22:57:38 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
3,
3
));
}
2013-05-29 22:57:38 -07:00
}
]