magarena/release/Magarena/scripts/Riverfall_Mimic.groovy

34 lines
1.2 KiB
Groovy
Raw Normal View History

2013-07-28 23:22:27 -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);
}
};
[
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.Blue)) ?
new MagicEvent(
permanent,
this,
"SN becomes 3/3 until end of turn and can't be blocked this turn."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicAddStaticAction(
2013-07-28 23:29:56 -07:00
event.getPermanent(), PT
2013-07-28 23:22:27 -07:00
));
game.doAction(new MagicGainAbilityAction(
2013-07-28 23:29:56 -07:00
event.getPermanent(),
2013-07-28 23:22:27 -07:00
MagicAbility.Unblockable
));
}
}
]