mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-23 00:52:22 +00:00
Fix: 修复一些bug
- 修复了收完菜后不重新检查潜艇的问题 - 修复了使用潜艇时, 经验结算卡住的问题 - 调整了日常委托和教材类委托的权重, 不然一天下来, 日常委托做不完
This commit is contained in:
parent
6b41f3f692
commit
69b868a79e
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
@ -59,7 +59,7 @@ duration_shorter_than_2 = 11
|
|||||||
duration_longer_than_6 = -11
|
duration_longer_than_6 = -11
|
||||||
expire_shorter_than_2 = 11
|
expire_shorter_than_2 = 11
|
||||||
expire_longer_than_6 = -11
|
expire_longer_than_6 = -11
|
||||||
daily_comm = 100
|
daily_comm = 120
|
||||||
major_comm = 0
|
major_comm = 0
|
||||||
extra_drill = 20
|
extra_drill = 20
|
||||||
extra_part = 60
|
extra_part = 60
|
||||||
@ -69,7 +69,7 @@ extra_book = 70
|
|||||||
urgent_drill = 45
|
urgent_drill = 45
|
||||||
urgent_part = 95
|
urgent_part = 95
|
||||||
urgent_cube = 165
|
urgent_cube = 165
|
||||||
urgent_book = 145
|
urgent_book = 95
|
||||||
urgent_box = 195
|
urgent_box = 195
|
||||||
urgent_gem = 205
|
urgent_gem = 205
|
||||||
urgent_ship = 155
|
urgent_ship = 155
|
||||||
|
@ -112,7 +112,7 @@ class CampaignRun(CampaignUI, Reward):
|
|||||||
self.run_count = 0
|
self.run_count = 0
|
||||||
while 1:
|
while 1:
|
||||||
if self.handle_reward():
|
if self.handle_reward():
|
||||||
self.campaign.config.FLEET_CHECKED = False
|
self.campaign.fleet_checked_reset()
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if total and self.run_count == total:
|
if total and self.run_count == total:
|
||||||
@ -135,7 +135,7 @@ class CampaignRun(CampaignUI, Reward):
|
|||||||
self.campaign.ENTRANCE = self.campaign_get_entrance(name=self.stage)
|
self.campaign.ENTRANCE = self.campaign_get_entrance(name=self.stage)
|
||||||
if self.commission_notice_show_at_campaign():
|
if self.commission_notice_show_at_campaign():
|
||||||
if self.reward():
|
if self.reward():
|
||||||
self.campaign.config.FLEET_CHECKED = False
|
self.campaign.fleet_checked_reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# End
|
# End
|
||||||
|
@ -16,7 +16,6 @@ BATTLE_STATUS_S = Button(area=(633, 297, 722, 320), color=(233, 241, 127), butto
|
|||||||
COMBAT_AUTO = Button(area=(136, 573, 167, 604), color=(229, 242, 255), button=(136, 573, 167, 604), file='./assets/combat/COMBAT_AUTO.png')
|
COMBAT_AUTO = Button(area=(136, 573, 167, 604), color=(229, 242, 255), button=(136, 573, 167, 604), file='./assets/combat/COMBAT_AUTO.png')
|
||||||
COMBAT_AUTO_SWITCH = Button(area=(18, 38, 36, 56), color=(179, 198, 235), button=(18, 38, 36, 56), file='./assets/combat/COMBAT_AUTO_SWITCH.png')
|
COMBAT_AUTO_SWITCH = Button(area=(18, 38, 36, 56), color=(179, 198, 235), button=(18, 38, 36, 56), file='./assets/combat/COMBAT_AUTO_SWITCH.png')
|
||||||
EXP_INFO_A = Button(area=(389, 100, 444, 116), color=(236, 231, 116), button=(1000, 631, 1055, 689), file='./assets/combat/EXP_INFO_A.png')
|
EXP_INFO_A = Button(area=(389, 100, 444, 116), color=(236, 231, 116), button=(1000, 631, 1055, 689), file='./assets/combat/EXP_INFO_A.png')
|
||||||
EXP_INFO_CONFIRM = Button(area=(1001, 632, 1173, 689), color=(229, 159, 66), button=(1001, 632, 1173, 689), file='./assets/combat/EXP_INFO_CONFIRM.png')
|
|
||||||
EXP_INFO_S = Button(area=(396, 122, 457, 137), color=(233, 241, 127), button=(1000, 631, 1055, 689), file='./assets/combat/EXP_INFO_S.png')
|
EXP_INFO_S = Button(area=(396, 122, 457, 137), color=(233, 241, 127), button=(1000, 631, 1055, 689), file='./assets/combat/EXP_INFO_S.png')
|
||||||
GET_ITEMS_1 = Button(area=(538, 217, 741, 253), color=(160, 192, 248), button=(1000, 631, 1055, 689), file='./assets/combat/GET_ITEMS_1.png')
|
GET_ITEMS_1 = Button(area=(538, 217, 741, 253), color=(160, 192, 248), button=(1000, 631, 1055, 689), file='./assets/combat/GET_ITEMS_1.png')
|
||||||
GET_ITEMS_2 = Button(area=(538, 146, 742, 182), color=(160, 192, 248), button=(1000, 631, 1055, 689), file='./assets/combat/GET_ITEMS_2.png')
|
GET_ITEMS_2 = Button(area=(538, 146, 742, 182), color=(160, 192, 248), button=(1000, 631, 1055, 689), file='./assets/combat/GET_ITEMS_2.png')
|
||||||
|
@ -247,27 +247,19 @@ class Combat(HPBalancer, UrgentCommissionHandler, EnemySearchingHandler, Retirem
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def handle_exp_info(self, save_get_items=False):
|
def handle_exp_info(self):
|
||||||
"""
|
"""
|
||||||
Args:
|
|
||||||
save_get_items (bool):
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool:
|
bool:
|
||||||
"""
|
"""
|
||||||
if save_get_items:
|
if self.appear_then_click(EXP_INFO_S):
|
||||||
return self.appear_then_click(EXP_INFO_CONFIRM, interval=self.battle_status_click_interval)
|
self.device.sleep((0.25, 0.5))
|
||||||
else:
|
return True
|
||||||
if self.appear_then_click(EXP_INFO_S):
|
if self.appear_then_click(EXP_INFO_A):
|
||||||
if not save_get_items:
|
self.device.sleep((0.25, 0.5))
|
||||||
self.device.sleep((0.25, 0.5))
|
return True
|
||||||
return True
|
|
||||||
if self.appear_then_click(EXP_INFO_A):
|
|
||||||
if not save_get_items:
|
|
||||||
self.device.sleep((0.25, 0.5))
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def handle_get_ship(self, save_get_items=False):
|
def handle_get_ship(self, save_get_items=False):
|
||||||
"""
|
"""
|
||||||
@ -301,7 +293,7 @@ class Combat(HPBalancer, UrgentCommissionHandler, EnemySearchingHandler, Retirem
|
|||||||
continue
|
continue
|
||||||
if self.handle_popup_confirm():
|
if self.handle_popup_confirm():
|
||||||
continue
|
continue
|
||||||
if self.handle_exp_info(save_get_items=save_get_items):
|
if self.handle_exp_info():
|
||||||
continue
|
continue
|
||||||
if self.handle_urgent_commission(save_get_items=save_get_items):
|
if self.handle_urgent_commission(save_get_items=save_get_items):
|
||||||
continue
|
continue
|
||||||
|
@ -34,7 +34,6 @@ class AzurLaneConfig:
|
|||||||
FLEET_3_FORMATION = 2
|
FLEET_3_FORMATION = 2
|
||||||
# Fleet 1-2, if empty use 0.
|
# Fleet 1-2, if empty use 0.
|
||||||
SUBMARINE = 0
|
SUBMARINE = 0
|
||||||
FLEET_CHECKED = False
|
|
||||||
|
|
||||||
USING_SPARE_FLEET = False
|
USING_SPARE_FLEET = False
|
||||||
|
|
||||||
|
@ -314,3 +314,8 @@ class Fleet(Camera, MapOperation, AmbushHandler):
|
|||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def fleet_checked_reset(self):
|
||||||
|
self.map_fleet_checked = False
|
||||||
|
self.fleet_1_formation_fixed = False
|
||||||
|
self.fleet_2_formation_fixed = False
|
||||||
|
@ -103,6 +103,8 @@ class FleetOperator:
|
|||||||
|
|
||||||
|
|
||||||
class FleetPreparation(ModuleBase):
|
class FleetPreparation(ModuleBase):
|
||||||
|
map_fleet_checked = False
|
||||||
|
|
||||||
def fleet_preparation(self):
|
def fleet_preparation(self):
|
||||||
"""Change fleets.
|
"""Change fleets.
|
||||||
|
|
||||||
@ -110,7 +112,7 @@ class FleetPreparation(ModuleBase):
|
|||||||
bool: True if changed.
|
bool: True if changed.
|
||||||
"""
|
"""
|
||||||
logger.info(f'Using fleet: {[self.config.FLEET_1, self.config.FLEET_2, self.config.SUBMARINE]}')
|
logger.info(f'Using fleet: {[self.config.FLEET_1, self.config.FLEET_2, self.config.SUBMARINE]}')
|
||||||
if self.config.FLEET_CHECKED:
|
if self.map_fleet_checked:
|
||||||
return False
|
return False
|
||||||
if self.appear(FLEET_PREPARATION_HARD_1) or self.appear(FLEET_PREPARATION_HARD_2):
|
if self.appear(FLEET_PREPARATION_HARD_1) or self.appear(FLEET_PREPARATION_HARD_2):
|
||||||
logger.info('Hard Campaign. No fleet preparation')
|
logger.info('Hard Campaign. No fleet preparation')
|
||||||
@ -139,7 +141,7 @@ class FleetPreparation(ModuleBase):
|
|||||||
if fleet_2.in_use():
|
if fleet_2.in_use():
|
||||||
fleet_2.clear()
|
fleet_2.clear()
|
||||||
fleet_1.ensure_to_be(self.config.FLEET_1)
|
fleet_1.ensure_to_be(self.config.FLEET_1)
|
||||||
self.config.FLEET_CHECKED = True
|
self.map_fleet_checked = True
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Using both fleets.
|
# Using both fleets.
|
||||||
@ -147,7 +149,7 @@ class FleetPreparation(ModuleBase):
|
|||||||
selected = fleet_1.selected()
|
selected = fleet_1.selected()
|
||||||
if self.config.FLEET_1 in selected and self.config.FLEET_2 in selected:
|
if self.config.FLEET_1 in selected and self.config.FLEET_2 in selected:
|
||||||
fleet_1.close()
|
fleet_1.close()
|
||||||
self.config.FLEET_CHECKED = True
|
self.map_fleet_checked = True
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
fleet_1.close()
|
fleet_1.close()
|
||||||
@ -155,5 +157,5 @@ class FleetPreparation(ModuleBase):
|
|||||||
fleet_2.clear()
|
fleet_2.clear()
|
||||||
fleet_1.ensure_to_be(self.config.FLEET_1)
|
fleet_1.ensure_to_be(self.config.FLEET_1)
|
||||||
fleet_2.ensure_to_be(self.config.FLEET_2)
|
fleet_2.ensure_to_be(self.config.FLEET_2)
|
||||||
self.config.FLEET_CHECKED = True
|
self.map_fleet_checked = True
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user