magarena/release/Magarena/scripts/Spiritmonger.groovy

34 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-28 01:29:03 -07:00
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Pump,1),
2013-05-28 01:29:03 -07:00
"Color"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{G}"),
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicColorChoice.RED_WHITE_BLUE_INSTANCE,
this,
"SN becomes the color\$ of your choice until end of turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent permanent=event.getPermanent();
2013-06-23 18:29:26 -07:00
game.doAction(new MagicAddStaticAction(permanent,
2013-05-28 01:29:03 -07:00
new MagicStatic(MagicLayer.SwitchPT,MagicStatic.UntilEOT) {
@Override
2013-05-28 01:42:50 -07:00
public int getColorFlags(final MagicPermanent perm, final int flags) {
2013-05-28 01:29:03 -07:00
return event.getChosenColor().getMask();
2013-06-23 18:29:26 -07:00
}
2013-05-28 01:29:03 -07:00
}));
}
}
]