simplify using MagicWhenDiesTrigger

master
melvin 2012-09-02 10:10:23 +08:00
parent 6ddef00bde
commit ac079a66d6
1 changed files with 9 additions and 10 deletions

View File

@ -7,19 +7,18 @@ import magic.model.MagicPlayer;
import magic.model.action.MagicChangeLifeAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicGraveyardTriggerData;
import magic.model.trigger.MagicWhenPutIntoGraveyardTrigger;
import magic.model.trigger.MagicWhenDiesTrigger;
public class Kokusho__the_Evening_Star {
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
public static final MagicWhenDiesTrigger T = new MagicWhenDiesTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
return (MagicLocationType.Play==triggerData.fromLocation) ?
new MagicEvent(
permanent,
permanent.getController(),
this,
"Your opponent loses 5 life. You gain 5 life."):
MagicEvent.NONE;
public MagicEvent getEvent(final MagicPermanent permanent) {
return new MagicEvent(
permanent,
permanent.getController(),
this,
"Your opponent loses 5 life. You gain 5 life."
);
}
@Override
public void executeEvent(