forked from External/mage
refactor: combined announceX methods in one, improved X message and selection for AI (part of #10330)
This commit is contained in:
parent
6af198836b
commit
66db821437
37 changed files with 90 additions and 158 deletions
|
|
@ -787,8 +787,8 @@ public abstract class AbilityImpl implements Ability {
|
|||
xValue = variableManaCost.getAmount();
|
||||
} else {
|
||||
// announce by player
|
||||
xValue = controller.announceXMana(variableManaCost.getMinX(), variableManaCost.getMaxX(),
|
||||
"Announce the value for " + variableManaCost.getText(), game, this);
|
||||
xValue = controller.announceX(variableManaCost.getMinX(), variableManaCost.getMaxX(),
|
||||
"Announce the value for " + variableManaCost.getText(), game, this, true);
|
||||
}
|
||||
|
||||
int amountMana = xValue * variableManaCost.getXInstancesCount();
|
||||
|
|
|
|||
|
|
@ -158,8 +158,8 @@ public abstract class VariableCostImpl implements Cost, VariableCost {
|
|||
if (controller != null
|
||||
&& (source instanceof ManaAbility
|
||||
|| stackObject != null)) {
|
||||
xValue = controller.announceXCost(getMinValue(source, game), getMaxValue(source, game),
|
||||
"Announce the number of " + actionText, game, source, this);
|
||||
xValue = controller.announceX(getMinValue(source, game), getMaxValue(source, game),
|
||||
"Announce the value for {X} (" + actionText + ")", game, source, false);
|
||||
}
|
||||
return xValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,8 +173,8 @@ class AssistEffect extends OneShotEffect {
|
|||
// AI can't assist other players, maybe for teammates only (but tests must work as normal)
|
||||
int amountToPay = 0;
|
||||
if (!targetPlayer.isComputer()) {
|
||||
amountToPay = targetPlayer.announceXMana(0, unpaid.getMana().getGeneric(),
|
||||
"How much mana to pay as assist for " + controller.getName() + "?", game, source);
|
||||
amountToPay = targetPlayer.announceX(0, unpaid.getMana().getGeneric(),
|
||||
"How much mana to pay as assist for " + controller.getName() + "?", game, source, true);
|
||||
}
|
||||
|
||||
if (amountToPay > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue