summaryrefslogtreecommitdiff
path: root/src/main/java/tlIItools/AffixSet.java
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2020-12-31 21:04:27 -0400
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2020-12-31 21:04:27 -0400
commitfedb385feef3fb3e3419f4fc3c7d234fe8d5caec (patch)
treec7d92ef28eb0645bc2a49fd0ea0e2a94993fc8b1 /src/main/java/tlIItools/AffixSet.java
parent4c5e20a6e78f72a749c517c6fcc75c176155b7c5 (diff)
Work on affix groups more
Diffstat (limited to 'src/main/java/tlIItools/AffixSet.java')
-rw-r--r--src/main/java/tlIItools/AffixSet.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/tlIItools/AffixSet.java b/src/main/java/tlIItools/AffixSet.java
index 91c0dcd9..fa5c8d19 100644
--- a/src/main/java/tlIItools/AffixSet.java
+++ b/src/main/java/tlIItools/AffixSet.java
@@ -9,8 +9,7 @@ public class AffixSet {
private static class AffixComparator implements Comparator<Affix> {
@Override
public int compare(Affix a1, Affix a2) {
- if (a1.minLevel == a2.minLevel) return a1.maxLevel - a2.maxLevel;
- else return a1.minLevel - a2.minLevel;
+ return a1.spawnRange.compareTo(a2.spawnRange);
}
}
@@ -29,14 +28,14 @@ public class AffixSet {
ungroupedAffixes = new TreeSet<>(new AffixComparator());
}
-
+
/** Add an affix to this set.
*
* @param afx The affix to add. */
public void addAffixByContents(Affix afx) {
AffixGroup group = afx.toAffixGroup();
- String afxGroup = group.toString();
-
+ String afxGroup = group.toString();
+
if (afxGroup.equals("")) {
ungroupedAffixes.add(afx);
} else {