1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 06:18:21 +08:00

Opt: Cache ButtonGrid.buttons and add move() crop()

This commit is contained in:
LmeSzinc
2021-06-29 23:04:19 +08:00
parent 97980d1681
commit e6facc606a
13 changed files with 50 additions and 18 deletions

View File

@@ -83,7 +83,7 @@ class HPBalancer(ModuleBase):
Logs:
[HP] 98% ____ ____ 98% 98% 98%
"""
hp = [self._calculate_hp(button.area) for button in self._hp_grid().buttons()]
hp = [self._calculate_hp(button.area) for button in self._hp_grid().buttons]
scout = np.array(hp[3:]) * np.array(self.config.SCOUT_HP_WEIGHTS) / np.max(self.config.SCOUT_HP_WEIGHTS)
self.hp = hp[:3] + scout.tolist()