mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Fix message for choose target dialog for distributing +1/+1 counters (#9202)
This commit is contained in:
parent
69f9331d87
commit
5e7f145e3d
2 changed files with 9 additions and 4 deletions
|
|
@ -832,6 +832,10 @@ public class HumanPlayer extends PlayerImpl {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (source == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
UUID abilityControllerId = playerId;
|
||||
if (target.getAbilityController() != null) {
|
||||
abilityControllerId = target.getAbilityController();
|
||||
|
|
@ -876,8 +880,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
prepareForResponse(game);
|
||||
if (!isExecutingMacro()) {
|
||||
// target amount uses for damage only, if you see another use case then message must be changed here and on getMultiAmount call
|
||||
String message = String.format("Select targets to distribute %d damage (selected %d)", amountTotal, target.getTargets().size());
|
||||
game.fireSelectTargetEvent(playerId, new MessageToClient(message, getRelatedObjectName(source, game)), possibleTargets, required, options);
|
||||
game.fireSelectTargetEvent(playerId, new MessageToClient(target.getMessage(), getRelatedObjectName(source, game)), possibleTargets, required, options);
|
||||
}
|
||||
waitForResponse(game);
|
||||
|
||||
|
|
@ -923,8 +926,9 @@ public class HumanPlayer extends PlayerImpl {
|
|||
}
|
||||
}
|
||||
|
||||
MultiAmountType multiAmountType = source.toString().contains("counters") ? MultiAmountType.P1P1 : MultiAmountType.DAMAGE;
|
||||
// ask and assign new amount
|
||||
List<Integer> targetValues = getMultiAmount(outcome, targetNames, 1, amountTotal, MultiAmountType.DAMAGE, game);
|
||||
List<Integer> targetValues = getMultiAmount(outcome, targetNames, 1, amountTotal, multiAmountType, game);
|
||||
for (int i = 0; i < targetValues.size(); i++) {
|
||||
int newAmount = targetValues.get(i);
|
||||
UUID targetId = targets.get(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue