summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2019-01-03 23:00:25 -0400
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2019-01-03 23:00:25 -0400
commite9900e02e8c092b9b1d5ee90e8471d3bda0aa1ad (patch)
tree46afea28092f9622a3eee894f8f533a4edb90a1b
parentc401a7072591969ddf924047d1a531d4bd1e5a05 (diff)
More affix support
-rw-r--r--data/affix-detals.txt21
-rw-r--r--data/timed-affix-detals.txt6
-rw-r--r--src/AffixLister.java14
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>%% <MCLM> <DT> damage taken/monster within <RNG> meters (Up to <MAXC>)
+PERCENT DAMAGE BONUS BY MONSTER COUNT
+<1RM>%% <MCLM> <DT> damage/monster within <RNG> meters (Up to <MAXC>)
+
DRAW HEALTH
<1RM>%% <MCLM> HP/<PUL>s/monster within <RNG> meters (Up to <MAXC>)
@@ -279,3 +282,21 @@ INTERRUPT
PERCENT BLOCK CHANCE BASE
<RLM|1|Base Block Chance>
+
+PERCENT DEFENSE
+<RLM|0|Vitality>
+
+FAME GAIN BONUS
+<RLM|1|Fame Gain>
+
+PERCENT DAMAGE REFLECTED
+<RLMD|1|Damage Reflected>
+
+INTERRUPT CHANCE
+<RLM|1|chance to Interrupt Enemies>
+
+DAMAGE CHANCE
+<RST>%% <RLMD|1|Damage>
+
+PERCENT MANA COST BONUS
+<RLM|1|Mana Cost of Skills>
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
<RLMD|1|Armor> for <DUR> seconds
+
+PERCENT ARMOR BONUS
+<RLMD|1|Damage Taken> for <DUR> seconds
+
+PERCENT BLOCK CHANCE BASE
+<RLM|1|Base Block Chance> for <DUR> 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<String, String> 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 <DUR> seconds";
+ } else {
+ fmt = detMap.get(type);
+ }
// Expand aliases first.
@@ -770,6 +776,7 @@ public class AffixLister {
}
for (Entry<String, List<String>> 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]);
}
}