From e9900e02e8c092b9b1d5ee90e8471d3bda0aa1ad Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Thu, 3 Jan 2019 23:00:25 -0400 Subject: More affix support --- src/AffixLister.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/AffixLister.java') diff --git a/src/AffixLister.java b/src/AffixLister.java index d20ca9b7..ebd58468 100644 --- a/src/AffixLister.java +++ b/src/AffixLister.java @@ -272,8 +272,14 @@ public class AffixLister { Map detMap = hasDuration ? timeDetals : detals; - if (detMap.containsKey(type)) { - String fmt = detMap.get(type); + if (detMap.containsKey(type) || (hasDuration && !timeDetals.containsKey(type) && detals.containsKey(type))) { + String fmt; + if (hasDuration && !timeDetals.containsKey(type) && detals.containsKey(type)) { + System.err.printf("Improvised details for timed %s\n", type); + fmt = detals.get(type) + "for seconds"; + } else { + fmt = detMap.get(type); + } // Expand aliases first. @@ -770,6 +776,7 @@ public class AffixLister { } for (Entry> fGroup : fGroups.entrySet()) { + if (fGroup.getValue().size() == 0) continue; System.out.printf("\nFile Group '%s' starting\n", fGroup.getKey()); for (String fName : fGroup.getValue()) { try (FileReader fr = new FileReader(fName)) { @@ -995,6 +1002,9 @@ public class AffixLister { efct.maxCount = Double.parseDouble(splits[1]); } else if (ln.contains("PULSE_RATE")) { efct.pulse = Double.parseDouble(splits[1]); + } else if (ln.contains("CHANCE:")) { + // NOTE: Should really use its own field + efct.resist = Double.parseDouble(splits[1]); } } -- cgit v1.2.3