1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-04-08 05:51:07 +08:00

Fix: force battle function choice for 15-3/15-4 when clear all (#3655)

This commit is contained in:
guoh064
2024-04-19 21:13:17 +08:00
committed by GitHub
parent 01a3c29c8b
commit 25a33ede7d
2 changed files with 28 additions and 0 deletions

View File

@@ -66,6 +66,20 @@ class Config(ConfigBase):
class Campaign(CampaignBase): class Campaign(CampaignBase):
MAP = MAP MAP = MAP
def battle_function(self):
if not self.config.MAP_CLEAR_ALL_THIS_TIME:
return super().battle_function()
if self.battle_count == 3 \
or (self.battle_count == 0 and not self.map_is_clear_mode):
func = self.FUNCTION_NAME_BASE + str(self.battle_count)
logger.info(f'Using function: {func}')
func = self.__getattribute__(func)
result = func()
return result
return super().battle_function()
def battle_0(self): def battle_0(self):
if not self.map_is_clear_mode: if not self.map_is_clear_mode:
self.mob_move(B3, B4) self.mob_move(B3, B4)

View File

@@ -71,6 +71,20 @@ class Config(ConfigBase):
class Campaign(CampaignBase): class Campaign(CampaignBase):
MAP = MAP MAP = MAP
def battle_function(self):
if not self.config.MAP_CLEAR_ALL_THIS_TIME:
return super().battle_function()
if self.battle_count in [3, 6] \
or (self.battle_count in [0, 1] and not self.map_is_clear_mode):
func = self.FUNCTION_NAME_BASE + str(self.battle_count)
logger.info(f'Using function: {func}')
func = self.__getattribute__(func)
result = func()
return result
return super().battle_function()
def battle_0(self): def battle_0(self):
if not self.map_is_clear_mode: if not self.map_is_clear_mode:
self.clear_chosen_enemy(A1) self.clear_chosen_enemy(A1)