Small fix for ExileFromHand Input

This commit is contained in:
Sol
2011-08-25 00:15:57 +00:00
parent 631821a038
commit 6132594038
2 changed files with 8 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ public class CostExile extends CostPartWithList {
//Exile<Num/Type{/TypeDescription}>
//ExileFromHand<Num/Type{/TypeDescription}>
//ExileFromGraveyard<Num/Type{/TypeDescription}>
//ExileFromLibrary<Num/Type{/TypeDescription}>
//ExileFromTop<Num/Type{/TypeDescription}> (of library)
private String from = Constant.Zone.Battlefield;

View File

@@ -469,8 +469,11 @@ public class Cost_Input {
if (nLeft > 1) {
msg.append("s");
}
typeList = AllZoneUtil.getPlayerCardsInPlay(sa.getSourceCard().getController());
if (part.getFrom().equals(Constant.Zone.Hand)){
msg.append(" from your Hand");
}
typeList = AllZoneUtil.getCardsInZone(part.getFrom(), sa.getActivatingPlayer());
typeList = typeList.getValidCards(type.split(";"), sa.getActivatingPlayer(), sa.getSourceCard());
AllZone.getDisplay().showMessage(msg.toString());
ButtonUtil.enableOnlyCancel();
@@ -515,10 +518,11 @@ public class Cost_Input {
public static Input exileFrom(final SpellAbility sa, final CostExile part, final String type, final Cost_Payment payment, final int nNeeded) {
Input target = new Input() {
private static final long serialVersionUID = 734256837615635021L;
CardList typeList;
@Override
public void showMessage() {
CardList typeList = AllZoneUtil.getCardsInZone(part.getFrom(), sa.getActivatingPlayer());
typeList = AllZoneUtil.getCardsInZone(part.getFrom(), sa.getActivatingPlayer());
typeList = typeList.getValidCards(type.split(";"), sa.getActivatingPlayer(), sa.getSourceCard());
for (int i = 0; i < nNeeded; i++) {