magarena/release/Magarena/scripts/Sturdy_Hatchling.groovy

39 lines
1.6 KiB
Groovy

[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return (permanent.isFriend(cardOnStack) &&
cardOnStack.hasColor(MagicColor.Blue) &&
permanent.getCounters(MagicCounterType.MinusOne) > 0) ?
new MagicEvent(
permanent,
this,
"Remove a -1/-1 counter on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.MinusOne,-1,true));
}
},
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return (permanent.isFriend(cardOnStack) &&
cardOnStack.hasColor(MagicColor.Green) &&
permanent.getCounters(MagicCounterType.MinusOne) > 0) ?
new MagicEvent(
permanent,
this,
"Remove a -1/-1 counter on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.MinusOne,-1,true));
}
}
]