1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-04-19 15:28:20 +08:00

Fix: W15 optimization (#3660)

* Fix: force battle function choice for 15-1/15-2 when clear all

* Add: battle strategy when missing support fleet in W15

* Opt: open strategy once when checking mob move

* Opt: reuse strategy_get_mob_move_remain()
This commit is contained in:
guoh064
2024-04-22 23:16:39 +08:00
committed by GitHub
parent 250cf4e1a2
commit 41075b4a52
6 changed files with 64 additions and 29 deletions

View File

@@ -66,15 +66,26 @@ class Config(ConfigBase):
class Campaign(CampaignBase):
MAP = MAP
def battle_function(self):
if self.config.MAP_CLEAR_ALL_THIS_TIME \
and 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):
if not self.map_is_clear_mode:
if not self.map_is_clear_mode and self.map_has_mob_move:
self.mob_move(I6, I7)
self.mob_move(I7, H7)
self.clear_chosen_enemy(G7)
return True
else:
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
return self.battle_default()