HumanCostDecision: CostRemoveCounter: add confirmPayment for it, when removing from host, but ignore pw abilities

This commit is contained in:
Hanmac
2016-11-07 09:50:54 +00:00
parent 627121b1a3
commit a63c152038

View File

@@ -954,6 +954,20 @@ public class HumanCostDecision extends CostDecisionMakerBase {
}
else if (c == null && "XChoice".equals(sVarAmount)) {
cntRemoved = chooseXValue(maxCounters);
} else if (ability != null && !ability.getRestrictions().isPwAbility()) {
// ignore Planeswalker abilities for this
if (maxCounters < cntRemoved) {
return null;
}
final StringBuilder sb = new StringBuilder("Remove ");
sb.append(Lang.nounWithNumeral(amount, cost.counter.getName() + " counter"));
sb.append(" from ");
sb.append(source.getName());
sb.append("?");
if (!player.getController().confirmPayment(cost, sb.toString())) {
return null;
}
}
if (maxCounters < cntRemoved) {