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,14 +1980,13 @@ public class CardFactoryUtil {
|
|||||||
for (final Card c : list) {
|
for (final Card c : list) {
|
||||||
// Remove Duplicated types
|
// Remove Duplicated types
|
||||||
final Set<String> creatureTypes = c.getType().getCreatureTypes();
|
final Set<String> creatureTypes = c.getType().getCreatureTypes();
|
||||||
|
if (creatureTypes.contains(CardType.AllCreatureTypes)) {
|
||||||
|
allCreatureType++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for (String creatureType : creatureTypes) {
|
for (String creatureType : creatureTypes) {
|
||||||
if (creatureType.equals(CardType.AllCreatureTypes)) {
|
Integer count = map.get(creatureType);
|
||||||
allCreatureType++;
|
map.put(creatureType, count == null ? 1 : count + 1);
|
||||||
}
|
|
||||||
else {
|
|
||||||
Integer count = map.get(creatureType);
|
|
||||||
map.put(creatureType, count == null ? 1 : count + 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user