convert from java code to groovy code

master
melvin 2013-05-26 10:30:44 +08:00
parent 1b5fb467e1
commit 59fe559e0c
2 changed files with 8 additions and 21 deletions

View File

@ -1,17 +1,5 @@
package magic.card;
import magic.model.MagicDamage;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPermanentState;
import magic.model.action.MagicChangeStateAction;
import magic.model.action.MagicDealDamageAction;
import magic.model.choice.MagicMayChoice;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenBecomesBlockedTrigger;
public class Rhox {
public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() {
[
new MagicWhenBecomesBlockedTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
@ -23,14 +11,13 @@ public class Rhox {
new MagicMayChoice(),
this,
"PN may$ have SN deal its combat damage " +
"to defending player as though it weren't blocked."):
"to defending player as though it weren't blocked."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
final MagicPermanent permanent = event.getPermanent();
final MagicDamage damage = MagicDamage.Combat(
@ -46,5 +33,5 @@ public class Rhox {
));
}
}
};
}
}
]

View File

@ -9,4 +9,4 @@ cost={4}{G}{G}
pt=5/5
timing=main
ability=regenerate {2}{G}
requires_card_code
requires_groovy_code