added getConditions to MagicExileCardEvent

master
melvin 2013-06-15 11:27:08 +08:00
parent b6ac5f5226
commit 0b06e912ee
1 changed files with 10 additions and 0 deletions

View File

@ -9,9 +9,13 @@ import magic.model.action.MagicCardAction;
import magic.model.action.MagicMoveCardAction;
import magic.model.action.MagicRemoveCardAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicConditionFactory;
public class MagicExileCardEvent extends MagicEvent {
final MagicCondition[] conds;
public MagicExileCardEvent(final MagicSource source, final MagicTargetChoice targetChoice) {
this(source, source.getController(), targetChoice);
}
@ -27,6 +31,7 @@ public class MagicExileCardEvent extends MagicEvent {
EVENT_ACTION,
"Choose " + targetChoice.getTargetDescription() + "$."
);
conds = new MagicCondition[]{MagicConditionFactory.HasOptions(targetChoice)};
}
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@ -47,4 +52,9 @@ public class MagicExileCardEvent extends MagicEvent {
});
}
};
@Override
public MagicCondition[] getConditions() {
return conds;
}
}