Big enemizer updates

Fix sheets
Health + damage rando
Logical kill rooms
This commit is contained in:
aerinon
2023-03-30 16:12:46 -06:00
parent d85a63ece1
commit a0b781521f
22 changed files with 2224 additions and 947 deletions

View File

@@ -8,6 +8,11 @@ from collections import defaultdict
from math import factorial
import fileinput
import urllib.request
import urllib.parse
import yaml
from pathlib import Path
def int16_as_bytes(value):
value = value & 0xFFFF
@@ -710,6 +715,15 @@ def find_and_replace():
print(data_line.replace(two, hex(number)))
def load_yaml(path_list):
path = os.path.join(*path_list)
if os.path.exists(Path(path)):
with open(path, "r", encoding="utf-8") as f:
return yaml.load(f, Loader=yaml.SafeLoader)
elif urllib.parse.urlparse(path).scheme in ['http', 'https']:
return yaml.load(urllib.request.urlopen(path), Loader=yaml.FullLoader)
if __name__ == '__main__':
# make_new_base2current()
# read_entrance_data(old_rom=sys.argv[1])