simplified using MagicLandfallTrigger

master
melvin 2012-08-30 20:21:27 +08:00
parent a975eda996
commit a673e02c43
1 changed files with 5 additions and 7 deletions

View File

@ -9,15 +9,14 @@ import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicTargetChoice; import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent; import magic.model.event.MagicEvent;
import magic.model.target.MagicWeakenTargetPicker; import magic.model.target.MagicWeakenTargetPicker;
import magic.model.trigger.MagicWhenOtherComesIntoPlayTrigger; import magic.model.trigger.MagicLandfallTrigger;
public class Caustic_Crawler { public class Caustic_Crawler {
public static final MagicWhenOtherComesIntoPlayTrigger T = new MagicWhenOtherComesIntoPlayTrigger() { public static final MagicLandfallTrigger T = new MagicLandfallTrigger() {
@Override @Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent played) { public MagicEvent getEvent(final MagicPermanent permanent) {
final MagicPlayer player = permanent.getController(); final MagicPlayer player = permanent.getController();
return (player == played.getController() && played.isLand()) ? return new MagicEvent(
new MagicEvent(
permanent, permanent,
player, player,
new MagicMayChoice( new MagicMayChoice(
@ -26,8 +25,7 @@ public class Caustic_Crawler {
new MagicWeakenTargetPicker(1,1), new MagicWeakenTargetPicker(1,1),
MagicEvent.NO_DATA, MagicEvent.NO_DATA,
this, this,
player + " may$ have target creature$ get -1/-1 until end of turn."): player + " may$ have target creature$ get -1/-1 until end of turn.");
MagicEvent.NONE;
} }
@Override @Override