simplify groovy code
parent
a37d6ca061
commit
86808f3b33
|
@ -2,20 +2,20 @@
|
||||||
new MagicSpellCardEvent() {
|
new MagicSpellCardEvent() {
|
||||||
@Override
|
@Override
|
||||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||||
final int amount = payedCost.getX();
|
|
||||||
return new MagicEvent(
|
return new MagicEvent(
|
||||||
cardOnStack,
|
cardOnStack,
|
||||||
MagicTargetChoice.NEG_TARGET_CREATURE,
|
MagicTargetChoice.NEG_TARGET_CREATURE,
|
||||||
new MagicWeakenTargetPicker(amount,amount),
|
new MagicWeakenTargetPicker(amount,amount),
|
||||||
|
payedCost.getX(),
|
||||||
this,
|
this,
|
||||||
"Target creature\$ gets -" + amount + "/-" + amount + " until end of turn."
|
"Target creature\$ gets -RN/-RN until end of turn."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||||
public void doAction(final MagicPermanent creature) {
|
public void doAction(final MagicPermanent creature) {
|
||||||
final int X = event.getCardOnStack().getX();
|
final int X = event.getRefInt();
|
||||||
game.doAction(new MagicChangeTurnPTAction(creature,-X,-X));
|
game.doAction(new MagicChangeTurnPTAction(creature,-X,-X));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue