Skip to content

Commit bb62925

Browse files
authored
Update for set11 encounter add one round
1 parent a987f39 commit bb62925

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

game.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,27 +146,27 @@ def encounter_round_setup(self) -> None:
146146
game_assets.CAROUSEL_ROUND = {
147147
carousel_round
148148
for carousel_round in game_assets.CAROUSEL_ROUND
149-
if not carousel_round.startswith(self.round[0].split("-"))
149+
if not carousel_round.startswith(self.round[0].split("-")[0])
150150
}
151151
game_assets.PVE_ROUND = {
152152
pve_round
153153
for pve_round in game_assets.PVE_ROUND
154-
if not pve_round.startswith(self.round[0].split("-"))
154+
if not pve_round.startswith(self.round[0].split("-")[0])
155155
}
156156
game_assets.PVP_ROUND = {
157157
pvp_round
158158
for pvp_round in game_assets.PVP_ROUND
159-
if not pvp_round.startswith(self.round[0].split("-"))
159+
if not pvp_round.startswith(self.round[0].split("-")[0])
160160
}
161161
game_assets.ANVIL_ROUNDS = {
162162
anvil_round
163163
for anvil_round in game_assets.ANVIL_ROUNDS
164-
if not anvil_round.startswith(self.round[0].split("-"))
164+
if not anvil_round.startswith(self.round[0].split("-")[0])
165165
}
166166
game_assets.ITEM_PLACEMENT_ROUNDS = {
167167
item_placement_round
168168
for item_placement_round in game_assets.ITEM_PLACEMENT_ROUNDS
169-
if not item_placement_round.startswith(self.round[0].split("-"))
169+
if not item_placement_round.startswith(self.round[0].split("-")[0])
170170
}
171171
for index, round_msg in enumerate(game_functions.check_encounter_round()):
172172
if index == 0:

game_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def get_round() -> list[str, int]:
2525

2626
round_one = screen_capture.crop(screen_coords.ROUND_POS_ONE.get_coords())
2727
game_round: str = ocr.get_text_from_image(image=round_one, whitelist=ocr.ROUND_WHITELIST)
28-
return [game_round, 1]
28+
if game_round in game_assets.ROUNDS:
29+
return [game_round, 1]
30+
return ["999-999",0]
2931

3032

3133
def check_encounter_round() -> list[str]:

0 commit comments

Comments
 (0)