magarena/release/Magarena/scripts/Crippling_Chill.groovy

30 lines
1.1 KiB
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_CREATURE,
MagicTapTargetPicker.Tap,
this,
"Tap target creature\$. " +
"It doesn't untap during its controller's next untap step. " +
"Draw a card."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicTapAction(creature,true));
game.doAction(MagicChangeStateAction.Set(
creature,
MagicPermanentState.DoesNotUntapDuringNext
));
game.doAction(new MagicDrawAction(event.getPlayer()));
}
});
}
}
]