diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 7b84686e186..d7c3be3c6de 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -540,7 +540,7 @@ public class HumanPlayer extends PlayerImpl { required = false; } - UUID responseId = target.tryToAutoChoose(abilityControllerId, source, game); + UUID responseId = required ? target.tryToAutoChoose(abilityControllerId, source, game) : null; // responseId is null if a choice couldn't be automatically made if (responseId == null) { @@ -640,7 +640,7 @@ public class HumanPlayer extends PlayerImpl { required = false; } - UUID responseId = target.tryToAutoChoose(abilityControllerId, source, game); + UUID responseId = required ? target.tryToAutoChoose(abilityControllerId, source, game) : null; // responseId is null if a choice couldn't be automatically made if (responseId == null) { @@ -738,7 +738,8 @@ public class HumanPlayer extends PlayerImpl { required = false; } - UUID responseId = target.tryToAutoChoose(abilityControllerId, source, game, possibleTargets); + UUID responseId = required ? target.tryToAutoChoose(abilityControllerId, source, game, possibleTargets) + : null; if (responseId == null) { Map options = getOptions(target, null); @@ -819,7 +820,8 @@ public class HumanPlayer extends PlayerImpl { required = false; } - UUID responseId = target.tryToAutoChoose(abilityControllerId, source, game, possibleTargets); + UUID responseId = required ? target.tryToAutoChoose(abilityControllerId, source, game, possibleTargets) + : null; if (responseId == null) { List chosenTargets = target.getTargets(); @@ -894,7 +896,7 @@ public class HumanPlayer extends PlayerImpl { required = false; } - UUID responseId = target.tryToAutoChoose(abilityControllerId, source, game); + UUID responseId = required ? target.tryToAutoChoose(abilityControllerId, source, game) : null; // responseId is null if a choice couldn't be automatically made if (responseId == null) { diff --git a/Mage/src/main/java/mage/target/TargetImpl.java b/Mage/src/main/java/mage/target/TargetImpl.java index 3d7ddf7f4b7..6d343f62607 100644 --- a/Mage/src/main/java/mage/target/TargetImpl.java +++ b/Mage/src/main/java/mage/target/TargetImpl.java @@ -350,7 +350,7 @@ public abstract class TargetImpl implements Target { } } else { // Try to autochoosen - UUID autoChosenId = tryToAutoChoose(playerId, source, game); + UUID autoChosenId = required ? tryToAutoChoose(playerId, source, game) : null; if (autoChosenId != null) { addTarget(autoChosenId, source, game); } else if (!targetController.chooseTarget(outcome, this, source, game)) { // If couldn't autochoose ask player