- Little fix for two canPay functions..

This commit is contained in:
Sloth
2012-09-25 21:10:38 +00:00
parent bfbbdca845
commit 94ab8448dc
2 changed files with 7 additions and 0 deletions

View File

@@ -123,6 +123,9 @@ public class CostDiscard extends CostPartWithList {
final Card c = activator.getLastDrawnCard();
return handList.contains(c);
} else {
if (ability.isSpell()) {
handList.remove(source);// can't pay for itself
}
if (!type.equals("Random")) {
handList = handList.getValidCards(type.split(";"), activator, source);
}

View File

@@ -71,11 +71,15 @@ public class CostReveal extends CostPartWithList {
} else if (this.getType().equals("Hand")) {
return true;
} else {
if (ability.isSpell()) {
handList.remove(source); // can't pay for itself
}
handList = handList.getValidCards(type.split(";"), activator, source);
if ((amount != null) && (amount > handList.size())) {
// not enough cards in hand to pay
return false;
}
System.out.println("revealcost - " + amount + type + handList);
}
return true;