magarena/release/Magarena/scripts/Battlegate_Mimic.groovy

34 lines
1.2 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);
}
};
[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return (permanent.isFriend(cardOnStack) &&
cardOnStack.hasColor(MagicColor.Red) &&
cardOnStack.hasColor(MagicColor.White)) ?
new MagicEvent(
permanent,
this,
"SN becomes 4/2 and gains first strike until end of turn."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicAddStaticAction(
event.getPermanent(), PT
));
game.doAction(new MagicGainAbilityAction(
event.getPermanent(),
MagicAbility.FirstStrike
));
}
}
]