From 75254b659927c334a43523b40d575950b373aa61 Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Fri, 8 May 2020 23:10:55 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D=E8=A1=80=E9=87=8F?= =?UTF-8?q?=E5=B9=B3=E8=A1=A1=E6=8B=96=E6=8B=BD=E6=97=A0=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复12-2不打小型的问题 --- campaign/campaign_main/campaign_12_2_leveling.py | 6 +++++- module/combat/hp_balancer.py | 2 +- module/config/argparser.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/campaign/campaign_main/campaign_12_2_leveling.py b/campaign/campaign_main/campaign_12_2_leveling.py index 68d8b7d86..59c3b9ef1 100644 --- a/campaign/campaign_main/campaign_12_2_leveling.py +++ b/campaign/campaign_main/campaign_12_2_leveling.py @@ -47,7 +47,9 @@ class Campaign(CampaignBase): elif self.battle_count >= 5: self.withdraw() - current = self.map.select(is_enemy=True, enemy_scale=2).count + current = self.map.select(is_enemy=True, enemy_scale=2)\ + .add(self.map.select(is_enemy=True, enemy_scale=1))\ + .count logger.attr('S2_enemy', current) if self.s3_enemy_count >= self.config.C122_S3_TOLERANCE and current == 0: @@ -57,6 +59,8 @@ class Campaign(CampaignBase): self.check_s3_enemy() if self.clear_enemy(scale=(2,)): return True + if self.clear_enemy(scale=(1,)): + return True if self.clear_enemy(scale=(3,)): self.s3_enemy_count += 1 return True diff --git a/module/combat/hp_balancer.py b/module/combat/hp_balancer.py index b016a6958..c998a41fc 100644 --- a/module/combat/hp_balancer.py +++ b/module/combat/hp_balancer.py @@ -75,7 +75,7 @@ class HPBalancer(ModuleBase): p2 (int): Target position [0, 2]. """ logger.info('scout_position_change (%s, %s)' % (p1, p2)) - self.device.drag(p1=SCOUT_POSITION[p1], p2=SCOUT_POSITION[p2]) + self.device.drag(p1=SCOUT_POSITION[p1], p2=SCOUT_POSITION[p2], segments=3) def _expected_scout_order(self, hp): descending = np.sort(hp)[::-1] diff --git a/module/config/argparser.py b/module/config/argparser.py index e716b22d7..31d6e0365 100644 --- a/module/config/argparser.py +++ b/module/config/argparser.py @@ -179,10 +179,10 @@ def main(ini_name=''): e3.add_argument('--全员已婚3', default=default('--全员已婚3'), choices=['是', '否']) # 血量平衡 - balance = setting_parser.add_argument_group('血量平衡', '') + balance = setting_parser.add_argument_group('血量平衡', '需关闭舰队锁定才能生效') balance.add_argument('--启用血量平衡', default=default('--启用血量平衡'), choices=['是', '否']) balance.add_argument('--启用低血量撤退', default=default('--启用低血量撤退'), choices=['是', '否']) - balance.add_argument('--先锋血量平衡阈值', default=default('--先锋血量平衡阈值'), help='血量差值大于阈值时, 换位. 启用阵容锁定后停用') + balance.add_argument('--先锋血量平衡阈值', default=default('--先锋血量平衡阈值'), help='血量差值大于阈值时, 换位') balance.add_argument('--低血量撤退阈值', default=default('--低血量撤退阈值'), help='任意一人血量低于阈值时, 撤退') # 退役选项