convert from java code to groovy code
parent
1f218900e7
commit
e331b13e6d
|
@ -1,24 +1,5 @@
|
||||||
package magic.card;
|
[
|
||||||
|
new MagicStatic(
|
||||||
import magic.model.MagicColor;
|
|
||||||
import magic.model.MagicDamage;
|
|
||||||
import magic.model.MagicGame;
|
|
||||||
import magic.model.MagicPermanent;
|
|
||||||
import magic.model.MagicPlayer;
|
|
||||||
import magic.model.MagicPowerToughness;
|
|
||||||
import magic.model.action.MagicChangeLifeAction;
|
|
||||||
import magic.model.action.MagicDealDamageAction;
|
|
||||||
import magic.model.action.MagicPlayerAction;
|
|
||||||
import magic.model.choice.MagicTargetChoice;
|
|
||||||
import magic.model.event.MagicEvent;
|
|
||||||
import magic.model.mstatic.MagicLayer;
|
|
||||||
import magic.model.mstatic.MagicStatic;
|
|
||||||
import magic.model.stack.MagicCardOnStack;
|
|
||||||
import magic.model.target.MagicTargetFilter;
|
|
||||||
import magic.model.trigger.MagicWhenOtherSpellIsCastTrigger;
|
|
||||||
|
|
||||||
public class Balefire_Liege {
|
|
||||||
public static final MagicStatic S1 = new MagicStatic(
|
|
||||||
MagicLayer.ModPT,
|
MagicLayer.ModPT,
|
||||||
MagicTargetFilter.TARGET_RED_CREATURE_YOU_CONTROL) {
|
MagicTargetFilter.TARGET_RED_CREATURE_YOU_CONTROL) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -29,8 +10,8 @@ public class Balefire_Liege {
|
||||||
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
|
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
|
||||||
return source != target;
|
return source != target;
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
public static final MagicStatic S2 = new MagicStatic(
|
new MagicStatic(
|
||||||
MagicLayer.ModPT,
|
MagicLayer.ModPT,
|
||||||
MagicTargetFilter.TARGET_WHITE_CREATURE_YOU_CONTROL) {
|
MagicTargetFilter.TARGET_WHITE_CREATURE_YOU_CONTROL) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,8 +22,8 @@ public class Balefire_Liege {
|
||||||
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
|
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
|
||||||
return source != target;
|
return source != target;
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
public static final MagicWhenOtherSpellIsCastTrigger T = new MagicWhenOtherSpellIsCastTrigger() {
|
new MagicWhenOtherSpellIsCastTrigger() {
|
||||||
@Override
|
@Override
|
||||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
||||||
return (permanent.isFriend(cardOnStack) &&
|
return (permanent.isFriend(cardOnStack) &&
|
||||||
|
@ -51,14 +32,12 @@ public class Balefire_Liege {
|
||||||
permanent,
|
permanent,
|
||||||
MagicTargetChoice.NEG_TARGET_PLAYER,
|
MagicTargetChoice.NEG_TARGET_PLAYER,
|
||||||
this,
|
this,
|
||||||
"SN deals 3 damage to target player$."
|
"SN deals 3 damage to target player\$."
|
||||||
):
|
):
|
||||||
MagicEvent.NONE;
|
MagicEvent.NONE;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void executeEvent(
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||||
final MagicGame game,
|
|
||||||
final MagicEvent event) {
|
|
||||||
event.processTargetPlayer(game,new MagicPlayerAction() {
|
event.processTargetPlayer(game,new MagicPlayerAction() {
|
||||||
public void doAction(final MagicPlayer player) {
|
public void doAction(final MagicPlayer player) {
|
||||||
final MagicDamage damage=new MagicDamage(event.getSource(),player,3);
|
final MagicDamage damage=new MagicDamage(event.getSource(),player,3);
|
||||||
|
@ -66,9 +45,8 @@ public class Balefire_Liege {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
new MagicWhenOtherSpellIsCastTrigger() {
|
||||||
public static final MagicWhenOtherSpellIsCastTrigger T2 = new MagicWhenOtherSpellIsCastTrigger() {
|
|
||||||
@Override
|
@Override
|
||||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
||||||
return (permanent.isFriend(cardOnStack) &&
|
return (permanent.isFriend(cardOnStack) &&
|
||||||
|
@ -81,10 +59,8 @@ public class Balefire_Liege {
|
||||||
MagicEvent.NONE;
|
MagicEvent.NONE;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void executeEvent(
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||||
final MagicGame game,
|
|
||||||
final MagicEvent event) {
|
|
||||||
game.doAction(new MagicChangeLifeAction(event.getPlayer(),3));
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),3));
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
]
|
|
@ -9,4 +9,4 @@ cost={2}{R/W}{R/W}{R/W}
|
||||||
pt=2/4
|
pt=2/4
|
||||||
static=player
|
static=player
|
||||||
timing=fmain
|
timing=fmain
|
||||||
requires_card_code
|
requires_groovy_code
|
||||||
|
|
Loading…
Reference in New Issue