mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Fixed variable remove counter costs to work also correctly if X=0 (e.g. Retribution of the Ancients and Willbreaker).
This commit is contained in:
parent
f6ec543b1b
commit
85f0cc6bb3
4 changed files with 84 additions and 10 deletions
|
|
@ -157,8 +157,7 @@ public abstract class VariableCostImpl implements Cost, VariableCost {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
xValue = controller.announceXCost(getMinValue(source, game), getMaxValue(source, game),
|
||||
new StringBuilder("Announce the number of ").append(actionText).toString(),
|
||||
game, source, this);
|
||||
"Announce the number of " + actionText, game, source, this);
|
||||
}
|
||||
return xValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,6 +84,9 @@ public class RemoveCounterCost extends CostImpl {
|
|||
int countersRemoved = 0;
|
||||
Player controller = game.getPlayer(controllerId);
|
||||
if (controller != null) {
|
||||
if (countersToRemove == 0) { // Can happen when used for X costs where X = 0;
|
||||
return paid = true;
|
||||
}
|
||||
target.clearChosen();
|
||||
if (target.choose(Outcome.UnboostCreature, controllerId, sourceId, game)) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue