From 8e45fc54db3e7bcb756446a971c0c46383d582c8 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Tue, 2 Jan 2024 04:13:40 +0800 Subject: [PATCH] Fix: Reversed condition is used --- tasks/dungeon/event.py | 2 +- tasks/dungeon/state.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/dungeon/event.py b/tasks/dungeon/event.py index a9637d4e8..2f771ddc8 100644 --- a/tasks/dungeon/event.py +++ b/tasks/dungeon/event.py @@ -84,7 +84,7 @@ class DungeonEvent(UI): ocr = DoubleEventOcr(OCR_DOUBLE_EVENT_REMAIN_AT_COMBAT) for row in ocr.detect_and_ocr(self.device.image): - if ocr.is_format_matched(row.ocr_text): + if not ocr.is_format_matched(row.ocr_text): continue remain, _, total = ocr.format_result(row.ocr_text) if total in [3, 12]: diff --git a/tasks/dungeon/state.py b/tasks/dungeon/state.py index 93d29b5a9..6cd691d3b 100644 --- a/tasks/dungeon/state.py +++ b/tasks/dungeon/state.py @@ -86,7 +86,7 @@ class DungeonState(UI): continue if row.ocr_text == '+': continue - if ocr.is_format_matched(row.ocr_text): + if not ocr.is_format_matched(row.ocr_text): continue data = ocr.format_result(row.ocr_text) if data[2] == self.config.stored.TrailblazePower.FIXED_TOTAL: