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 --- data/affix-detals.txt | 21 +++++++++++++++++++++ data/timed-affix-detals.txt | 6 ++++++ src/AffixLister.java | 14 ++++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/data/affix-detals.txt b/data/affix-detals.txt index f76fa1f8..fdd8d7af 100644 --- a/data/affix-detals.txt +++ b/data/affix-detals.txt @@ -187,6 +187,9 @@ PERCENT CHARGE BAR DECAY RATE PERCENT DAMAGE TAKEN BY MONSTER COUNT <1RM>%%
damage taken/monster within meters (Up to ) +PERCENT DAMAGE BONUS BY MONSTER COUNT +<1RM>%%
damage/monster within meters (Up to ) + DRAW HEALTH <1RM>%% HP/s/monster within meters (Up to ) @@ -279,3 +282,21 @@ INTERRUPT PERCENT BLOCK CHANCE BASE + +PERCENT DEFENSE + + +FAME GAIN BONUS + + +PERCENT DAMAGE REFLECTED + + +INTERRUPT CHANCE + + +DAMAGE CHANCE +%% + +PERCENT MANA COST BONUS + diff --git a/data/timed-affix-detals.txt b/data/timed-affix-detals.txt index 2e614fef..dc41fcf6 100644 --- a/data/timed-affix-detals.txt +++ b/data/timed-affix-detals.txt @@ -63,3 +63,9 @@ ARMOR BONUS PERCENT ARMOR BONUS for seconds + +PERCENT ARMOR BONUS + for seconds + +PERCENT BLOCK CHANCE BASE + for seconds 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