magarena/release/Magarena/scripts/Necropede.groovy

28 lines
936 B
Groovy
Raw Normal View History

2013-05-25 20:21:49 -07:00
[
new MagicWhenDiesTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent getEvent(final MagicPermanent permanent) {
return new MagicEvent(
permanent,
new MagicMayChoice(
MagicTargetChoice.NEG_TARGET_CREATURE
),
new MagicWeakenTargetPicker(1,1),
this,
"PN may\$ put a -1/-1 counter on target creature\$."
);
2013-04-12 19:32:25 -07:00
}
2013-06-23 18:29:26 -07:00
2013-04-12 19:32:25 -07:00
@Override
2013-05-25 20:21:49 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicChangeCountersAction(creature,MagicCounterType.MinusOne,1,true));
}
});
}
}
2013-05-25 20:21:49 -07:00
}
]