Add stat Extra Blood for Gorefoot

This commit is contained in:
2023-10-26 00:02:40 +02:00
parent 5beb79607a
commit f8a628a65f
3 changed files with 47 additions and 15 deletions

View File

@@ -36,6 +36,7 @@ special_stats = {
"template": "ama",
"param_tooltips": ["ama", "pal", "nec", "sor", "bar", "dru", "ass"],
},
"item_extrablood": {"text": "Extra Blood"},
}
# Patching of missing data in properties.txt
@@ -98,21 +99,36 @@ for stat in itemstatcost:
continue
# special.template: properties.txt row
prop = properties[special["template"]]
obj = {
"text": prop["tooltip"],
"save_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]}"
)
obj["save_bits"].append(itemstatcost[prop_stat]["save_bits"])
if "template" in special:
prop = properties[special["template"]]
obj = {
"text": prop["tooltip"],
"save_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]}"
)
obj["save_bits"].append(itemstatcost[prop_stat]["save_bits"])
# else: use stat row + custom data
else:
obj = {
"text": "" if "text" not in special else special["text"],
"save_bits": [itemstatcost[stat]["save_bits"]]
if "save_bits" not in special
else special["save_bits"],
"save_add": itemstatcost[stat]["save_add"]
if "save_add" not in special
else special["save_add"],
"save_param_bits": itemstatcost[stat]["save_param_bits"]
if "save_param_bits" not in special
else special["save_param_bits"],
}
# special.param_tooltips: extra tooltips depending on param value
if "param_tooltips" in special: