diff --git a/arena_functions.py b/arena_functions.py index 8d9bb73..914fe3b 100644 --- a/arena_functions.py +++ b/arena_functions.py @@ -145,18 +145,3 @@ def get_items() -> list: item_bench.append(valid_item(item)) mk_functions.move_mouse(screen_coords.DEFAULT_LOC.get_coords()) return item_bench - - -def check_headliner() -> bool: - """Check if the last Champion in the store is a headliner""" - result: int = 0 - for index, positions in enumerate(screen_coords.HEADLINER_POS): - headliner: str = ocr.get_text( - screenxy=positions.get_coords(), - scale=3, - psm=10, - whitelist=ocr.ROUND_WHITELIST.replace("-", ""), - ) - if headliner == "2": - result += 2**index - return result diff --git a/comp_editor.py b/comp_editor.py index c6ac5ab..6ce3ff1 100644 --- a/comp_editor.py +++ b/comp_editor.py @@ -8,7 +8,6 @@ from tkinter import ttk, simpledialog import json import os -import re from comps import COMP from game_assets import FULL_ITEMS, CHAMPIONS @@ -295,8 +294,8 @@ def add_champion(self): new_champion = { "board_position": board_position, - "level": level, "items": items, + "level": level, "final_comp": final_comp, } @@ -412,12 +411,7 @@ def save_changes(self): updated_file_content = ( file_content[:comp_line_start] + "COMP = " - + re.sub( - r'"traits": \[.*?\],\n?', - "", - json.dumps(self.comp, indent=4), - flags=re.DOTALL, - ) + + json.dumps(self.comp, indent=4) .replace("false", "False") .replace("true", "True") .replace(" ", " ") diff --git a/comps.py b/comps.py index 186b88f..8471e15 100644 --- a/comps.py +++ b/comps.py @@ -12,62 +12,62 @@ COMP = { "Galio": { "board_position": 25, - "level": 2, "items": ["BrambleVest", "DragonsClaw", "WarmogsArmor"], + "level": 2, "final_comp": True }, "Kaisa": { "board_position": 5, - "level": 3, "items": ["InfinityEdge", "LastWhisper", "SpearofShojin"], + "level": 3, "final_comp": True }, "Sivir": { "board_position": 4, + "items": ["SpearofShojin", "StatikkShiv"], "level": 2, - "items": ["StatikkShiv"], "final_comp": True }, "Aatrox": { "board_position": 27, - "level": 2, "items": ["Evenshroud"], + "level": 2, "final_comp": True }, "Riven": { "board_position": 21, - "level": 2, "items": ["ThiefsGloves"], + "level": 2, "final_comp": True }, "Teemo": { "board_position": 0, + "items": ["BlueBuff", "RabadonsDeathcap"], "level": 2, - "items": ["JeweledGauntlet", "SpearofShojin"], "final_comp": True }, "Sylas": { "board_position": 23, - "level": 2, "items": ["ThiefsGloves"], + "level": 2, "final_comp": True }, "Xayah": { "board_position": 6, - "level": 2, "items": [], + "level": 2, "final_comp": True }, "Kobuko": { "board_position": 24, - "level": 2, "items": [], + "level": 2, "final_comp": False }, "Zoe": { "board_position": 3, - "level": 2, "items": [], + "level": 2, "final_comp": False } }