Fix bug with min/max damage parsing
This commit is contained in:
@@ -24,8 +24,12 @@ special_stats = {
|
||||
"poisonmindam": {"template": "dmg-pois"},
|
||||
"poisonmaxdam": None,
|
||||
"poisonlength": None,
|
||||
"mindamage": {"template": "dmg-norm"},
|
||||
"maxdamage": None,
|
||||
"mindamage": {"template": "dmg-min"},
|
||||
"maxdamage": {"template": "dmg-max"},
|
||||
"secondary_mindamage": {"template": "dmg-min"},
|
||||
"secondary_maxdamage": {"template": "dmg-max"},
|
||||
"item_throw_mindamage": {"template": "dmg-min"},
|
||||
"item_throw_maxdamage": {"template": "dmg-max"},
|
||||
"item_maxdamage_percent": {"template": "dmg%"}, # max before min for this stat
|
||||
"item_mindamage_percent": None,
|
||||
"item_addclassskills": {
|
||||
@@ -39,8 +43,8 @@ special_stats = {
|
||||
# instead of relying on the debug tooltips of properties.txt, since the game does not
|
||||
# actually use those, but rather they are present for the excel developers.
|
||||
properties_patches = {
|
||||
"dmg-min": {"stat1": "secondary_mindamage"},
|
||||
"dmg-max": {"stat1": "secondary_maxdamage"},
|
||||
"dmg-min": {"stat1": "VARIABLE"},
|
||||
"dmg-max": {"stat1": "VARIABLE"},
|
||||
"dmg%": {"stat1": "item_maxdamage_percent", "stat2": "item_mindamage_percent"},
|
||||
}
|
||||
|
||||
@@ -97,10 +101,12 @@ for stat in itemstatcost:
|
||||
obj = {
|
||||
"text": prop["tooltip"],
|
||||
"save_bits": [],
|
||||
"save_add": itemstatcost[prop["stats"][0]]["save_add"],
|
||||
"save_param_bits": itemstatcost[prop["stats"][0]]["save_param_bits"],
|
||||
"save_add": itemstatcost[stat]["save_add"],
|
||||
"save_param_bits": itemstatcost[stat]["save_param_bits"],
|
||||
}
|
||||
for prop_stat in prop["stats"]:
|
||||
if prop_stat == "VARIABLE":
|
||||
prop_stat = stat
|
||||
if itemstatcost[prop_stat]["save_add"] != obj["save_add"]:
|
||||
print(
|
||||
f"Unexpected divergence in save_add for stats in prop {special_stats[stat]}"
|
||||
|
||||
Reference in New Issue
Block a user