Skip to content

Commit ef33b3b

Browse files
authored
Fix bug, goodbye headliner, update augment coords and comp editor, crown check are back
1 parent 3de13e6 commit ef33b3b

File tree

3 files changed

+12
-33
lines changed

3 files changed

+12
-33
lines changed

arena_functions.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,3 @@ def get_items() -> list:
145145
item_bench.append(valid_item(item))
146146
mk_functions.move_mouse(screen_coords.DEFAULT_LOC.get_coords())
147147
return item_bench
148-
149-
150-
def check_headliner() -> bool:
151-
"""Check if the last Champion in the store is a headliner"""
152-
result: int = 0
153-
for index, positions in enumerate(screen_coords.HEADLINER_POS):
154-
headliner: str = ocr.get_text(
155-
screenxy=positions.get_coords(),
156-
scale=3,
157-
psm=10,
158-
whitelist=ocr.ROUND_WHITELIST.replace("-", ""),
159-
)
160-
if headliner == "2":
161-
result += 2**index
162-
return result

comp_editor.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from tkinter import ttk, simpledialog
99
import json
1010
import os
11-
import re
1211
from comps import COMP
1312
from game_assets import FULL_ITEMS, CHAMPIONS
1413

@@ -295,8 +294,8 @@ def add_champion(self):
295294

296295
new_champion = {
297296
"board_position": board_position,
298-
"level": level,
299297
"items": items,
298+
"level": level,
300299
"final_comp": final_comp,
301300
}
302301

@@ -412,12 +411,7 @@ def save_changes(self):
412411
updated_file_content = (
413412
file_content[:comp_line_start]
414413
+ "COMP = "
415-
+ re.sub(
416-
r'"traits": \[.*?\],\n?',
417-
"",
418-
json.dumps(self.comp, indent=4),
419-
flags=re.DOTALL,
420-
)
414+
+ json.dumps(self.comp, indent=4)
421415
.replace("false", "False")
422416
.replace("true", "True")
423417
.replace(" ", " ")

comps.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,62 +12,62 @@
1212
COMP = {
1313
"Galio": {
1414
"board_position": 25,
15-
"level": 2,
1615
"items": ["BrambleVest", "DragonsClaw", "WarmogsArmor"],
16+
"level": 2,
1717
"final_comp": True
1818
},
1919
"Kaisa": {
2020
"board_position": 5,
21-
"level": 3,
2221
"items": ["InfinityEdge", "LastWhisper", "SpearofShojin"],
22+
"level": 3,
2323
"final_comp": True
2424
},
2525
"Sivir": {
2626
"board_position": 4,
27+
"items": ["SpearofShojin", "StatikkShiv"],
2728
"level": 2,
28-
"items": ["StatikkShiv"],
2929
"final_comp": True
3030
},
3131
"Aatrox": {
3232
"board_position": 27,
33-
"level": 2,
3433
"items": ["Evenshroud"],
34+
"level": 2,
3535
"final_comp": True
3636
},
3737
"Riven": {
3838
"board_position": 21,
39-
"level": 2,
4039
"items": ["ThiefsGloves"],
40+
"level": 2,
4141
"final_comp": True
4242
},
4343
"Teemo": {
4444
"board_position": 0,
45+
"items": ["BlueBuff", "RabadonsDeathcap"],
4546
"level": 2,
46-
"items": ["JeweledGauntlet", "SpearofShojin"],
4747
"final_comp": True
4848
},
4949
"Sylas": {
5050
"board_position": 23,
51-
"level": 2,
5251
"items": ["ThiefsGloves"],
52+
"level": 2,
5353
"final_comp": True
5454
},
5555
"Xayah": {
5656
"board_position": 6,
57-
"level": 2,
5857
"items": [],
58+
"level": 2,
5959
"final_comp": True
6060
},
6161
"Kobuko": {
6262
"board_position": 24,
63-
"level": 2,
6463
"items": [],
64+
"level": 2,
6565
"final_comp": False
6666
},
6767
"Zoe": {
6868
"board_position": 3,
69-
"level": 2,
7069
"items": [],
70+
"level": 2,
7171
"final_comp": False
7272
}
7373
}

0 commit comments

Comments
 (0)