Skip to content

Commit

Permalink
Fix bug, goodbye headliner, update augment coords and comp editor, cr…
Browse files Browse the repository at this point in the history
…own check are back
  • Loading branch information
anthony5301 authored Mar 22, 2024
1 parent 3de13e6 commit ef33b3b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 33 deletions.
15 changes: 0 additions & 15 deletions arena_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 2 additions & 8 deletions comp_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -295,8 +294,8 @@ def add_champion(self):

new_champion = {
"board_position": board_position,
"level": level,
"items": items,
"level": level,
"final_comp": final_comp,
}

Expand Down Expand Up @@ -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(" ", " ")
Expand Down
20 changes: 10 additions & 10 deletions comps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit ef33b3b

Please sign in to comment.