Cleanup CostRemoveCounter

This commit is contained in:
Bug Hunter
2021-01-28 07:20:34 +00:00
committed by Hans Mackowiak
parent c885b87f2e
commit 4db82a074b
2 changed files with 2 additions and 8 deletions

View File

@@ -176,13 +176,7 @@ public class CostRemoveCounter extends CostPart {
Card source = ability.getHostCard(); Card source = ability.getHostCard();
int removed = 0; int removed = 0;
final int toRemove; final int toRemove = decision.c;
if (getAmount().equals("All")) {
toRemove = source.getCounters(counter);
}
else {
toRemove = AbilityUtils.calculateAmount(source, getAmount(), ability);
}
// for this cost, the list should be only one // for this cost, the list should be only one
for (Card c : decision.cards) { for (Card c : decision.cards) {

View File

@@ -1042,7 +1042,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
int cntRemoved = 1; int cntRemoved = 1;
if (c != null) { if (c != null) {
cntRemoved = c.intValue(); cntRemoved = c.intValue();
} else if (!"XChoice".equals(sVarAmount)) { } else if (!"XChoice".equals(sVarAmount) && !amount.equals("All")) {
cntRemoved = AbilityUtils.calculateAmount(source, amount, ability); cntRemoved = AbilityUtils.calculateAmount(source, amount, ability);
} }