1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-26 13:57:53 +08:00

Fix: mob move optimization

This commit is contained in:
Air111
2024-05-20 23:30:47 +08:00
committed by LmeSzinc
parent df88ee7c06
commit 1e793295e8
16 changed files with 14 additions and 20 deletions

View File

@@ -58,8 +58,7 @@ class CampaignBase(CampaignBase_):
sub_view=sub_view,
sub_hunt=sub_hunt,
)
self.map_has_mob_move = (self.strategy_get_mob_move_remain() > 0)
logger.attr("Map has mob move", self.map_has_mob_move)
logger.attr("Map has mob move", self.strategy_has_mob_move())
def _map_swipe(self, vector, box=(239, 159, 1175, 628)):
# Left border to 239, avoid swiping on support fleet
@@ -184,6 +183,7 @@ class CampaignBase(CampaignBase_):
self.map[target].is_boss = self.map[location].is_boss
self.map[location].is_boss = False
self.map[target].is_enemy = True
self.map[target].may_enemy = True
self.map[location].is_enemy = False
def mob_move(self, location, target):
@@ -205,8 +205,7 @@ class CampaignBase(CampaignBase_):
return False
self.strategy_open()
remain = self.strategy_get_mob_move_remain()
if remain == 0:
if not self.strategy_has_mob_move():
logger.warning(f'No remain mob move trials, will abandon moving')
self.strategy_close()
return False