58 lines
2.1 KiB
Groovy
58 lines
2.1 KiB
Groovy
[
|
|
new MagicSpellCardEvent() {
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
MagicTargetChoice.TARGET_CREATURE_YOU_DONT_CONTROL,
|
|
new MagicTapTargetPicker(true,false),
|
|
this,
|
|
"Target creature\$ you don't control gets -4/-0 until end of turn."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(
|
|
final MagicGame game,
|
|
final MagicEvent event,
|
|
final Object[] choiceResults) {
|
|
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
game.doAction(new MagicChangeTurnPTAction(creature, -4, 0));
|
|
}
|
|
});
|
|
}
|
|
},
|
|
new MagicCardActivation(
|
|
[
|
|
MagicConditionFactory.ManaCost("{2}{U}")
|
|
],
|
|
new MagicActivationHints(MagicTiming.Removal,true),
|
|
"Overload"
|
|
) {
|
|
public MagicEvent[] getCostEvent(final MagicCard source) {
|
|
return [
|
|
new MagicPayManaCostEvent(source, source.getController(), MagicManaCost.create("{2}{U}"))
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
this,
|
|
"Each creature you don't control gets -4/-0 until end of turn."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(
|
|
final MagicGame game,
|
|
final MagicEvent event,
|
|
final Object[] choiceResults) {
|
|
final Collection<MagicPermanent> targets=
|
|
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOUR_OPPONENT_CONTROLS);
|
|
for (final MagicPermanent creature : targets) {
|
|
game.doAction(new MagicChangeTurnPTAction(creature, -4, 0));
|
|
}
|
|
}
|
|
}
|
|
]
|