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; [
new MagicWhenBecomesBlockedTrigger() {
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() {
@Override @Override
public MagicEvent executeTrigger( public MagicEvent executeTrigger(
final MagicGame game, final MagicGame game,
@ -23,14 +11,13 @@ public class Rhox {
new MagicMayChoice(), new MagicMayChoice(),
this, this,
"PN may$ have SN deal its combat damage " + "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; MagicEvent.NONE;
} }
@Override @Override
public void executeEvent( public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicGame game,
final MagicEvent event) {
if (event.isYes()) { if (event.isYes()) {
final MagicPermanent permanent = event.getPermanent(); final MagicPermanent permanent = event.getPermanent();
final MagicDamage damage = MagicDamage.Combat( 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 pt=5/5
timing=main timing=main
ability=regenerate {2}{G} ability=regenerate {2}{G}
requires_card_code requires_groovy_code