1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 12:59:25 +08:00

Fix: Exercise power limit

This commit is contained in:
Zuosizhu
2026-01-24 15:52:22 +08:00
parent d613145387
commit 0affcacb26
2 changed files with 5 additions and 1 deletions

View File

@@ -31,6 +31,10 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment, Combat):
# self.equipment_take_on()
pass
# Power limit check
from module.gg_handler.gg_handler import GGHandler
GGHandler(config=self.config, device=self.device).power_limit('Exercise')
self.device.click(BATTLE_PREPARATION)
continue

View File

@@ -195,7 +195,7 @@ class GGHandler:
OCR_CHECK = Digit(OCR_PRE_BATTLE_CHECK, letter=(255, 255, 255), threshold=128)
ocr = OCR_CHECK.ocr(self.device.image)
from module.config.deep import deep_get
limit = deep_get(self.config.data, keys=f'GameManager.PowerLimit.{task}', default=17000)
limit = deep_get(self.config.data, keys=f'GameManager.PowerLimit.{task}', default=20000)
logger.attr('Power Limit', limit)
if ocr >= limit:
logger.critical('There''s high chance that GG is on, restart to disable it')