magarena/release/Magarena/scripts/Dread_Statuary.groovy

46 lines
1.5 KiB
Groovy

def PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
pt.set(4,2);
}
};
def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
@Override
public void modSubTypeFlags(final MagicPermanent permanent,final Set<MagicSubType> flags) {
flags.add(MagicSubType.Golem);
}
@Override
public int getTypeFlags(final MagicPermanent permanent,final int flags) {
return flags |
MagicType.Artifact.getMask() |
MagicType.Creature.getMask();
}
};
[
new MagicPermanentActivation(
[MagicConditionFactory.ManaCost("{4}")],
new MagicActivationHints(MagicTiming.Animate),
"Animate"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostEvent(source,"{4}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Until end of turn, SN becomes a 4/2 Golem artifact creature. " +
"It's still a land."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicBecomesCreatureAction(event.getPermanent(),PT,ST));
}
}
]