mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Little fix for two canPay functions..
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user