27 lines
930 B
Groovy
27 lines
930 B
Groovy
def Trigger = {
|
|
final MagicColor color ->
|
|
return new MagicWhenOtherSpellIsCastTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
return (permanent.isFriend(cardOnStack) &&
|
|
cardOnStack.hasColor(color) &&
|
|
permanent.getCounters(MagicCounterType.MinusOne) > 0) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
this,
|
|
"Remove a -1/-1 counter from SN."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.MinusOne,-1,true));
|
|
}
|
|
};
|
|
}
|
|
|
|
[
|
|
Trigger(MagicColor.Red),
|
|
Trigger(MagicColor.White)
|
|
]
|