* 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,14 +94,15 @@ 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<>();
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game) ) { PlayerIteration:
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);
typeChoice.setMessage("Choose a creature type"); typeChoice.setMessage("Choose a creature type");
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;
} }