From 2fa8b4d4fc3b0ad3cb96635c059e91b72ec1ed2f Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Mon, 1 Jun 2020 17:26:35 +0800 Subject: [PATCH 1/4] Fix: Enhance failed turn to retry retire when mood notice popup --- module/combat/combat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/combat/combat.py b/module/combat/combat.py index 654f6ab6c..e704ee0fe 100644 --- a/module/combat/combat.py +++ b/module/combat/combat.py @@ -50,6 +50,8 @@ class Combat(HPBalancer, EnemySearchingHandler, Retirement, SubmarineCall, Comba continue if self.handle_combat_low_emotion(): continue + if self.handle_retirement(): + continue # Break if self.combat_appear(): From 6d6fcc5edb06674a596afdf2c8a800e09ba30f2d Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Mon, 1 Jun 2020 20:22:04 +0800 Subject: [PATCH 2/4] Doc: [CN] Fix mis-introduction in README.md - Add tips, when failed to retire ships --- README.md | 11 +++++++---- module/retire/retirement.py | 6 ++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d46613bbc..7343d9e57 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,11 @@ [English Readme](README_en.md) `Translation in progress` # AzurLaneAutoScript -Alas, an Azur Lane automation tool with GUI (For CN server, can support other server). +Alas, an Azur Lane automation tool with GUI (Support CN and EN, can support other server). -Alas, 一个带GUI的碧蓝航线脚本 (支持国服, 可以支持其他服务器). +Alas, 一个带GUI的碧蓝航线脚本 (支持国服和国际服, 可以支持其他服务器). + +EN support, Thanks **[@whoamikyo](https://github.com/whoamikyo)** ![gui](doc/README.assets/gui.png) @@ -126,10 +128,11 @@ python -m uiautomator2 init ## 使用方法 Usage -- 双击 alas.pyw, 通过图形界面(GUI)运行 +- 编辑`alas.bat`, 并双击运行 +- 创建快捷方式, 把目标修改为`<绝对路径至python虚拟环境> <绝对路径至alas.pyw>`, 把起始位置修改为 `<绝对路径至AzurLaneAutoScript的目录>`, 双击运行 - (不推荐) 通过命令行运行. 虽然alas使用了 [Gooey](https://github.com/chriskiehl/Gooey), 一个将命令行转为GUI的库, 但是Alas并不是先有命令行方法运行再用gooey的, Alas是为了使用gooey快速编写GUI而去拼凑命令行参数的. 因此使用命令行会很难受. - (不推荐) 修改配置文件 `config/alas.ini` , 在 `alas.py` 中调用相关函数 -- 多开运行, 复制 alas.pyw, 并重命名, 双击运行即可. 首次运行时会复制template.ini的设置. 脚本运行时会使用同名的ini配置文件. +- 多开运行, 复制 alas.pyw, 并重命名. 首次运行时会复制template.ini的设置. 脚本运行时会使用同名的ini配置文件. diff --git a/module/retire/retirement.py b/module/retire/retirement.py index 5ee4e0e80..c4e6ac85d 100644 --- a/module/retire/retirement.py +++ b/module/retire/retirement.py @@ -247,13 +247,15 @@ class Retirement(Enhancement): self._unable_to_enhance = False if not total: logger.warning('No ship retired, exit') - raise ScriptError('No ship retired, exit') + logger.info('This may happens because wrong options of one click retirement in game') + exit(1) elif 'retire' in self.config.RETIREMENT_METHOD or self._unable_to_enhance: total = self._retire_handler() self._unable_to_enhance = False if not total: logger.warning('No ship retired, exit') - raise ScriptError('No ship retired, exit') + logger.info('This may happens because some filters are set in dock') + exit(1) else: total = self._enhance_handler() if not total: From cad6d052a600945250deb7e2d9cc78a7212ad348 Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Tue, 2 Jun 2020 01:11:02 +0800 Subject: [PATCH 3/4] Fix: Timer for reward --- module/reward/reward.py | 2 +- module/reward/tactical_class.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/reward/reward.py b/module/reward/reward.py index 05b44e4b2..cf0ec175d 100644 --- a/module/reward/reward.py +++ b/module/reward/reward.py @@ -52,7 +52,7 @@ class Reward(RewardCommission, RewardTacticalClass): logger.hr('Reward receive') reward = False - exit_timer = Timer(1, count=3) + exit_timer = Timer(1.5, count=5) click_timer = Timer(1) exit_timer.start() btn = [] diff --git a/module/reward/tactical_class.py b/module/reward/tactical_class.py index 4f19024ab..9d4a0a097 100644 --- a/module/reward/tactical_class.py +++ b/module/reward/tactical_class.py @@ -148,7 +148,7 @@ class BookGroup: class RewardTacticalClass(UI, InfoHandler): - tactical_animation_timer = Timer(2, count=3) + tactical_animation_timer = Timer(2, count=6) def _tactical_animation_running(self): """ From 496a47bdb98a345fa839d0ebd76957f90520454f Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Tue, 2 Jun 2020 02:06:38 +0800 Subject: [PATCH 4/4] Revert "Fix: Timer for reward" This reverts commit cad6d052 --- module/reward/reward.py | 2 +- module/reward/tactical_class.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/reward/reward.py b/module/reward/reward.py index cf0ec175d..05b44e4b2 100644 --- a/module/reward/reward.py +++ b/module/reward/reward.py @@ -52,7 +52,7 @@ class Reward(RewardCommission, RewardTacticalClass): logger.hr('Reward receive') reward = False - exit_timer = Timer(1.5, count=5) + exit_timer = Timer(1, count=3) click_timer = Timer(1) exit_timer.start() btn = [] diff --git a/module/reward/tactical_class.py b/module/reward/tactical_class.py index 9d4a0a097..4f19024ab 100644 --- a/module/reward/tactical_class.py +++ b/module/reward/tactical_class.py @@ -148,7 +148,7 @@ class BookGroup: class RewardTacticalClass(UI, InfoHandler): - tactical_animation_timer = Timer(2, count=6) + tactical_animation_timer = Timer(2, count=3) def _tactical_animation_running(self): """