* Game: fixed random sort order of choices in choose dialogs

This commit is contained in:
Oleg Agafonov 2023-03-21 03:11:55 +04:00
parent 6b05562336
commit a7480aeab1
40 changed files with 78 additions and 71 deletions

View file

@ -13,6 +13,7 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
/**
@ -69,7 +70,7 @@ public class RemoveCounterTargetEffect extends OneShotEffect {
String counterName = null;
if (permanent.getCounters(game).size() > 1) {
Choice choice = new ChoiceImpl(true);
Set<String> choices = new HashSet<>();
Set<String> choices = new LinkedHashSet<>();
for (Counter counterOnPermanent : permanent.getCounters(game).values()) {
if (permanent.getCounters(game).getCount(counterOnPermanent.getName()) > 0) {
choices.add(counterOnPermanent.getName());