Skip to content

Commit

Permalink
Update for set11 encounter add one round
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony5301 authored Apr 6, 2024
1 parent a987f39 commit bb62925
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,27 +146,27 @@ def encounter_round_setup(self) -> None:
game_assets.CAROUSEL_ROUND = {
carousel_round
for carousel_round in game_assets.CAROUSEL_ROUND
if not carousel_round.startswith(self.round[0].split("-"))
if not carousel_round.startswith(self.round[0].split("-")[0])
}
game_assets.PVE_ROUND = {
pve_round
for pve_round in game_assets.PVE_ROUND
if not pve_round.startswith(self.round[0].split("-"))
if not pve_round.startswith(self.round[0].split("-")[0])
}
game_assets.PVP_ROUND = {
pvp_round
for pvp_round in game_assets.PVP_ROUND
if not pvp_round.startswith(self.round[0].split("-"))
if not pvp_round.startswith(self.round[0].split("-")[0])
}
game_assets.ANVIL_ROUNDS = {
anvil_round
for anvil_round in game_assets.ANVIL_ROUNDS
if not anvil_round.startswith(self.round[0].split("-"))
if not anvil_round.startswith(self.round[0].split("-")[0])
}
game_assets.ITEM_PLACEMENT_ROUNDS = {
item_placement_round
for item_placement_round in game_assets.ITEM_PLACEMENT_ROUNDS
if not item_placement_round.startswith(self.round[0].split("-"))
if not item_placement_round.startswith(self.round[0].split("-")[0])
}
for index, round_msg in enumerate(game_functions.check_encounter_round()):
if index == 0:
Expand Down
4 changes: 3 additions & 1 deletion game_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def get_round() -> list[str, int]:

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


def check_encounter_round() -> list[str]:
Expand Down

0 comments on commit bb62925

Please sign in to comment.