fixed miss chosen targets clear in cost implementations (#10566)

This commit is contained in:
Oleg Agafonov 2023-07-05 23:10:20 +04:00
parent 9cd6c6f269
commit 476fd27f65
6 changed files with 4 additions and 9 deletions

View file

@ -62,6 +62,7 @@ public abstract class CostImpl implements Cost {
@Override
public void clearPaid() {
paid = false;
targets.clearChosen();
}
@Override

View file

@ -127,7 +127,7 @@ public class OrCost implements Cost {
@Override
public void clearPaid() {
selectedCost = null;
costs.stream().forEach(Cost::clearPaid);
costs.forEach(Cost::clearPaid);
}
@Override

View file

@ -89,6 +89,7 @@ public abstract class VariableCostImpl implements Cost, VariableCost {
@Override
public void clearPaid() {
paid = false;
targets.clearChosen();
amountPaid = 0;
}

View file

@ -66,7 +66,6 @@ public class DiscardTargetCost extends CostImpl {
public void clearPaid() {
super.clearPaid();
this.cards.clear();
this.targets.clearChosen();
}
@Override

View file

@ -85,9 +85,9 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost {
@Override
public void clearPaid() {
super.clearPaid();
payment.clear();
usedManaToPay.clear();
super.clearPaid();
}
@Override