mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-19 23:33:33 +08:00
Add: 增加主线图开荒功能, 支持打三星, 打到绿海
This commit is contained in:
@@ -4,6 +4,7 @@ from module.map.exception import CampaignEnd
|
||||
from module.map.exception import ScriptError
|
||||
from module.map.map import Map
|
||||
from module.map.map_base import CampaignMap
|
||||
from module.base.decorator import Config
|
||||
|
||||
|
||||
class CampaignBase(Map):
|
||||
@@ -18,6 +19,23 @@ class CampaignBase(Map):
|
||||
logger.warning('No battle executed.')
|
||||
return False
|
||||
|
||||
@Config.when(MAP_CLEAR_ALL_THIS_TIME=True)
|
||||
def execute_a_battle(self):
|
||||
logger.info('Using function: clear_all')
|
||||
self.clear_all_mystery()
|
||||
|
||||
if self.battle_count >= 3:
|
||||
self.pick_up_ammo()
|
||||
|
||||
if self.map.select(is_enemy=True, is_boss=False).count > 0:
|
||||
return self.battle_default()
|
||||
else:
|
||||
if self.config.FLEET_2:
|
||||
return self.fleet_2.clear_boss()
|
||||
else:
|
||||
return self.clear_boss()
|
||||
|
||||
@Config.when(MAP_CLEAR_ALL_THIS_TIME=False)
|
||||
def execute_a_battle(self):
|
||||
func = self.FUNCTION_NAME_BASE + 'default'
|
||||
for extra_battle in range(10):
|
||||
@@ -45,7 +63,7 @@ class CampaignBase(Map):
|
||||
self.handle_fleet_reverse()
|
||||
self.map_init(self.MAP)
|
||||
|
||||
for _ in range(15):
|
||||
for _ in range(20):
|
||||
try:
|
||||
self.execute_a_battle()
|
||||
except CampaignEnd:
|
||||
|
||||
Reference in New Issue
Block a user