mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +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();
|
final Card c = activator.getLastDrawnCard();
|
||||||
return handList.contains(c);
|
return handList.contains(c);
|
||||||
} else {
|
} else {
|
||||||
|
if (ability.isSpell()) {
|
||||||
|
handList.remove(source);// can't pay for itself
|
||||||
|
}
|
||||||
if (!type.equals("Random")) {
|
if (!type.equals("Random")) {
|
||||||
handList = handList.getValidCards(type.split(";"), activator, source);
|
handList = handList.getValidCards(type.split(";"), activator, source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,11 +71,15 @@ public class CostReveal extends CostPartWithList {
|
|||||||
} else if (this.getType().equals("Hand")) {
|
} else if (this.getType().equals("Hand")) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
if (ability.isSpell()) {
|
||||||
|
handList.remove(source); // can't pay for itself
|
||||||
|
}
|
||||||
handList = handList.getValidCards(type.split(";"), activator, source);
|
handList = handList.getValidCards(type.split(";"), activator, source);
|
||||||
if ((amount != null) && (amount > handList.size())) {
|
if ((amount != null) && (amount > handList.size())) {
|
||||||
// not enough cards in hand to pay
|
// not enough cards in hand to pay
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
System.out.println("revealcost - " + amount + type + handList);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user