* Harsh Mercy - Fixed useless continue statement.

This commit is contained in:
LevelX2 2015-08-31 07:55:59 +02:00
parent 56df1e463d
commit fbb02760aa

View file

@ -94,6 +94,7 @@ class HarshMercyEffect extends OneShotEffect {
MageObject sourceObject = game.getObject(source.getSourceId()); MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) { if (controller != null && sourceObject != null) {
Set<String> chosenTypes = new HashSet<>(); Set<String> chosenTypes = new HashSet<>();
PlayerIteration:
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId); Player player = game.getPlayer(playerId);
Choice typeChoice = new ChoiceImpl(true); Choice typeChoice = new ChoiceImpl(true);
@ -101,7 +102,7 @@ class HarshMercyEffect extends OneShotEffect {
typeChoice.setChoices(CardRepository.instance.getCreatureTypes()); typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
while (!player.choose(Outcome.DestroyPermanent, typeChoice, game)) { while (!player.choose(Outcome.DestroyPermanent, typeChoice, game)) {
if (!player.canRespond()) { if (!player.canRespond()) {
continue; continue PlayerIteration;
} }
} }
String chosenType = typeChoice.getChoice(); String chosenType = typeChoice.getChoice();
@ -116,8 +117,7 @@ class HarshMercyEffect extends OneShotEffect {
filter.add(Predicates.not(new SubtypePredicate(type))); filter.add(Predicates.not(new SubtypePredicate(type)));
} }
return new DestroyAllEffect(filter, true).apply(game, source);
return (new DestroyAllEffect(filter, true)).apply(game, source);
} }
return false; return false;
} }