import json
from pprint import pprint

# Generates the base addresses for every hero to use in `generate_cheat_list.py` in case you ever
# need to update the list

# `hero_names.json` can be generated by running `generate_hero_name_addresses.py`, loading it into Game Conqueror
# and then saving the cheat list as `hero_names.json`.

with open('hero_names.json') as json_file:
    data = json.load(json_file)
    cheats = [[a[5], a[3], a[4]] for a in data['cheat_list'] if "Name" in a[2]]
    offsets = []
    for c in cheats:
        offsets.append([c[0], int(c[1]), c[2]])

    pprint(offsets)
