Merge branch 'fixTypeCount' into 'master'

Fix MostProminentCreatureType Count

See merge request core-developers/forge!3921
This commit is contained in:
Hans Mackowiak
2021-02-19 17:46:01 +00:00

View File

@@ -1980,16 +1980,15 @@ public class CardFactoryUtil {
for (final Card c : list) {
// Remove Duplicated types
final Set<String> creatureTypes = c.getType().getCreatureTypes();
for (String creatureType : creatureTypes) {
if (creatureType.equals(CardType.AllCreatureTypes)) {
if (creatureTypes.contains(CardType.AllCreatureTypes)) {
allCreatureType++;
continue;
}
else {
for (String creatureType : creatureTypes) {
Integer count = map.get(creatureType);
map.put(creatureType, count == null ? 1 : count + 1);
}
}
}
int max = 0;
for (final Entry<String, Integer> entry : map.entrySet()) {