magarena/release/Magarena/scripts/Omnibian.groovy

47 lines
1.5 KiB
Groovy
Raw Normal View History

2013-05-29 22:43:05 -07:00
def PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
pt.set(3,3);
}
};
2013-06-23 18:29:26 -07:00
2013-05-29 22:43:05 -07:00
def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
@Override
public void modSubTypeFlags(final MagicPermanent permanent,final Set<MagicSubType> flags) {
flags.removeAll(MagicSubType.ALL_CREATURES);
flags.add(MagicSubType.Frog);
}
};
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Frog"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicTapEvent(source)];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_CREATURE,
new MagicBecomeTargetPicker(3,3,false),
this,
"Target creature\$ becomes a 3/3 Frog until end of turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
final MagicPermanent creature ->
game.doAction(new MagicBecomesCreatureAction(creature,PT,ST));
2013-05-29 22:46:19 -07:00
} as MagicPermanentAction);
2013-05-29 22:43:05 -07:00
}
}
]