Fix formatting oddness for foes with no weakness
This commit is contained in:
parent
f733ebb66d
commit
82ff5f86f4
1 changed files with 5 additions and 0 deletions
5
main.py
5
main.py
|
@ -60,6 +60,11 @@ class Parser: # noqa: PLR0904
|
||||||
weak_text = "WEAK: "
|
weak_text = "WEAK: "
|
||||||
info["nullifies"] = null_text.split(": ")[1].split(", ")
|
info["nullifies"] = null_text.split(": ")[1].split(", ")
|
||||||
info["weak"] = weak_text.split(": ")[1].split(", ")
|
info["weak"] = weak_text.split(": ")[1].split(", ")
|
||||||
|
|
||||||
|
# Due to split oddness we can populate a blank string into weakness
|
||||||
|
# Delete it if we did.
|
||||||
|
if info["weak"] == [""]:
|
||||||
|
del info["weak"]
|
||||||
# Specials are name=>desc as k:v
|
# Specials are name=>desc as k:v
|
||||||
# I *think* you can only have one special...
|
# I *think* you can only have one special...
|
||||||
elif line.startswith("SPECIAL"):
|
elif line.startswith("SPECIAL"):
|
||||||
|
|
Loading…
Add table
Reference in a new issue