2013-10-23 06:12:34 -07:00
|
|
|
def Trigger = {
|
|
|
|
final MagicColor color ->
|
|
|
|
return new MagicWhenOtherSpellIsCastTrigger() {
|
2013-10-21 18:55:55 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
|
|
return (permanent.isFriend(cardOnStack) &&
|
2013-10-23 06:12:34 -07:00
|
|
|
cardOnStack.hasColor(color) &&
|
2013-10-21 18:55:55 -07:00
|
|
|
permanent.getCounters(MagicCounterType.MinusOne) > 0) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
this,
|
2013-10-23 06:22:45 -07:00
|
|
|
"Remove a -1/-1 counter from SN."
|
2013-10-21 18:55:55 -07:00
|
|
|
):
|
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.MinusOne,-1,true));
|
|
|
|
}
|
2013-10-23 06:12:34 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
[
|
|
|
|
Trigger(MagicColor.Black),
|
|
|
|
Trigger(MagicColor.Green)
|
2013-10-21 18:55:55 -07:00
|
|
|
]
|