magarena/release/Magarena/scripts/Lighthouse_Chronologist.groovy

31 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-19 01:09:21 -07:00
[
new MagicStatic(MagicLayer.SetPT) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
final int charges = permanent.getCounters(MagicCounterType.Charge);
if (charges >= 7) {
pt.set(3,5);
} else if (charges >= 4) {
pt.set(2,4);
}
2013-06-23 18:29:26 -07:00
}
2013-05-19 01:09:21 -07:00
},
new MagicAtEndOfTurnTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer eotPlayer) {
return (permanent.getCounters(MagicCounterType.Charge) >= 7 &&
permanent.isOpponent(eotPlayer)) ?
new MagicEvent(
permanent,
this,
"PN takes an extra turn after this one."
) :
MagicEvent.NONE;
2013-06-23 18:29:26 -07:00
}
2013-05-19 01:09:21 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeExtraTurnsAction(event.getPlayer(),1));
}
}
]