mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Avoid removing source card from lists
This commit is contained in:
@@ -121,9 +121,6 @@ public class CostDiscard extends CostPartWithList {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (source.isInZone(ZoneType.Hand)) {
|
||||
handList.remove(source); //source can't pay for itself
|
||||
}
|
||||
if (type.equals("Hand")) {
|
||||
// this will always work
|
||||
}
|
||||
@@ -178,10 +175,6 @@ public class CostDiscard extends CostPartWithList {
|
||||
return handList.contains(source) && executePayment(ability, source);
|
||||
}
|
||||
|
||||
if (source.isInZone(ZoneType.Hand)) {
|
||||
handList.remove(source); //ensure source can't be discarded to pay its own additional cost
|
||||
}
|
||||
|
||||
if (discardType.equals("Hand")) {
|
||||
return executePayment(ability, handList);
|
||||
}
|
||||
|
||||
@@ -183,9 +183,6 @@ public class CostExile extends CostPartWithList {
|
||||
return list.contains(source);
|
||||
}
|
||||
|
||||
if (source.isInZone(this.from)) {
|
||||
list.remove(source); //source can't pay for itself
|
||||
}
|
||||
list = CardLists.getValidCards(list, type.split(";"), activator, source);
|
||||
|
||||
final Integer amount = this.convertAmount();
|
||||
@@ -248,10 +245,6 @@ public class CostExile extends CostPartWithList {
|
||||
return source.getZone() == activator.getZone(from) && GuiDialog.confirm(source, source.getName() + " - Exile?") && executePayment(ability, source);
|
||||
}
|
||||
|
||||
if (source.isInZone(this.from)) {
|
||||
list.remove(source); //ensure source can't be exiled to pay its own additional cost
|
||||
}
|
||||
|
||||
if (type.equals("All")) {
|
||||
for (final Card card : list) {
|
||||
executePayment(ability, card);
|
||||
|
||||
Reference in New Issue
Block a user