convert from java code to groovy code
parent
61b73dece1
commit
a816c5b84e
|
@ -0,0 +1,23 @@
|
|||
[
|
||||
new MagicWhenAttacksTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
return (permanent == creature) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
player.getOpponent(),
|
||||
this,
|
||||
"PN puts the top ten cards of his or her library into his or her graveyard."
|
||||
):
|
||||
MagicEvent.NONE;
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicMillLibraryAction(event.getPlayer(),10));
|
||||
}
|
||||
}
|
||||
]
|
|
@ -8,4 +8,4 @@ subtype=Leviathan,Horror
|
|||
cost={3}{U}{B}
|
||||
pt=3/7
|
||||
timing=smain
|
||||
requires_card_code
|
||||
requires_groovy_code
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicMillLibraryAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.trigger.MagicWhenAttacksTrigger;
|
||||
|
||||
|
||||
public class Nemesis_of_Reason {
|
||||
public static final MagicWhenAttacksTrigger T = new MagicWhenAttacksTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
return (permanent == creature) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
this,
|
||||
player.getOpponent() + " puts the top ten cards " +
|
||||
"of his or her library into his or her graveyard."):
|
||||
MagicEvent.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicMillLibraryAction(event.getPlayer().getOpponent(),10));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue