mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
* Harsh Mercy - Fixed useless continue statement.
This commit is contained in:
parent
56df1e463d
commit
fbb02760aa
1 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||||
|
@ -115,9 +116,8 @@ class HarshMercyEffect extends OneShotEffect {
|
||||||
for (String type : chosenTypes) {
|
for (String type : chosenTypes) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue