Add Enhanced, +Min/Max Damage exceptions to contrib/stats.py
Fixes https://gitlab.com/omicron-oss/d2warehouse/-/issues/1
This commit is contained in:
@@ -58,12 +58,15 @@ class Stat:
|
||||
text: str | None = None
|
||||
|
||||
def print(self, indent=5):
|
||||
print(" " * indent, str(self))
|
||||
|
||||
def __str__(self):
|
||||
subst_text = self.text
|
||||
for val in self.values:
|
||||
subst_text = subst_text.replace("#", str(val), 1)
|
||||
if self.parameter:
|
||||
subst_text = re.sub(r"\[[^\]]*\]", str(self.parameter), subst_text, 1)
|
||||
print(" " * indent, subst_text)
|
||||
return subst_text
|
||||
|
||||
|
||||
def txtbits(bits: bitarray) -> str:
|
||||
|
||||
Reference in New Issue
Block a user