mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Merge branch 'fixTypeCount' into 'master'
Fix MostProminentCreatureType Count See merge request core-developers/forge!3921
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user