convert from java code to groovy code
parent
f3ff2ee4db
commit
74e6db2856
|
@ -0,0 +1,19 @@
|
|||
[
|
||||
new MagicWhenComesIntoPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(
|
||||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicPlayer player) {
|
||||
if (permanent.isKicked()) {
|
||||
game.doAction(new MagicChangeCountersAction(
|
||||
permanent,
|
||||
MagicCounterType.PlusOne,
|
||||
2,
|
||||
true));
|
||||
game.doAction(new MagicSetAbilityAction(permanent,MagicAbility.Fear,MagicStatic.Forever));
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
}
|
||||
]
|
|
@ -9,4 +9,4 @@ cost={B}
|
|||
pt=1/1
|
||||
timing=main
|
||||
ability=kicker {3}{B} it enters the battlefield with two +1/+1 counters on it and with fear
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicAbility;
|
||||
import magic.model.MagicCounterType;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicChangeCountersAction;
|
||||
import magic.model.action.MagicSetAbilityAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.mstatic.MagicStatic;
|
||||
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
|
||||
|
||||
public class Duskwalker {
|
||||
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(
|
||||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicPlayer player) {
|
||||
if (permanent.isKicked()) {
|
||||
game.doAction(new MagicChangeCountersAction(
|
||||
permanent,
|
||||
MagicCounterType.PlusOne,
|
||||
2,
|
||||
true));
|
||||
game.doAction(new MagicSetAbilityAction(permanent,MagicAbility.Fear,MagicStatic.Forever));
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue