convert from java code to groovy code
parent
da10672811
commit
b09b341ffd
|
@ -0,0 +1,22 @@
|
||||||
|
[
|
||||||
|
new MagicSpellCardEvent() {
|
||||||
|
@Override
|
||||||
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||||
|
return new MagicEvent(
|
||||||
|
cardOnStack,
|
||||||
|
MagicTargetChoice.NEG_TARGET_CREATURE,
|
||||||
|
new MagicWeakenTargetPicker(3,3),
|
||||||
|
this,
|
||||||
|
"Target creature\$ gets -3/-3 until end of turn."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||||
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||||
|
public void doAction(final MagicPermanent creature) {
|
||||||
|
game.doAction(new MagicChangeTurnPTAction(creature,-3,-3));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -7,4 +7,4 @@ rarity=C
|
||||||
type=Instant
|
type=Instant
|
||||||
cost={1}{B}
|
cost={1}{B}
|
||||||
timing=removal
|
timing=removal
|
||||||
requires_card_code
|
requires_groovy_code
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
package magic.card;
|
|
||||||
|
|
||||||
import magic.model.MagicGame;
|
|
||||||
import magic.model.MagicPayedCost;
|
|
||||||
import magic.model.MagicPermanent;
|
|
||||||
import magic.model.action.MagicChangeTurnPTAction;
|
|
||||||
import magic.model.action.MagicPermanentAction;
|
|
||||||
import magic.model.choice.MagicTargetChoice;
|
|
||||||
import magic.model.event.MagicEvent;
|
|
||||||
import magic.model.event.MagicSpellCardEvent;
|
|
||||||
import magic.model.stack.MagicCardOnStack;
|
|
||||||
import magic.model.target.MagicWeakenTargetPicker;
|
|
||||||
|
|
||||||
public class Last_Gasp {
|
|
||||||
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
|
|
||||||
@Override
|
|
||||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
||||||
return new MagicEvent(
|
|
||||||
cardOnStack,
|
|
||||||
MagicTargetChoice.NEG_TARGET_CREATURE,
|
|
||||||
new MagicWeakenTargetPicker(3,3),
|
|
||||||
this,
|
|
||||||
"Target creature$ gets -3/-3 until end of turn.");
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void executeEvent(
|
|
||||||
final MagicGame game,
|
|
||||||
final MagicEvent event) {
|
|
||||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
||||||
public void doAction(final MagicPermanent creature) {
|
|
||||||
game.doAction(new MagicChangeTurnPTAction(creature,-3,-3));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue