mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-27 17:58:57 +08:00
Fix: Fleet auto method in daily
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from module.base.utils import get_color
|
from module.base.utils import get_color
|
||||||
from module.combat.combat import Combat
|
|
||||||
from module.daily.assets import *
|
from module.daily.assets import *
|
||||||
from module.equipment.fleet_equipment import DailyEquipment
|
from module.equipment.fleet_equipment import DailyEquipment
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from module.ocr.ocr import Digit
|
from module.ocr.ocr import Digit
|
||||||
|
from module.reward.reward import Reward
|
||||||
from module.ui.ui import page_daily, page_campaign, BACK_ARROW, DAILY_CHECK
|
from module.ui.ui import page_daily, page_campaign, BACK_ARROW, DAILY_CHECK
|
||||||
|
|
||||||
DAILY_MISSION_LIST = [DAILY_MISSION_1, DAILY_MISSION_2, DAILY_MISSION_3]
|
DAILY_MISSION_LIST = [DAILY_MISSION_1, DAILY_MISSION_2, DAILY_MISSION_3]
|
||||||
@@ -15,7 +15,7 @@ RECORD_OPTION = ('DailyRecord', 'daily')
|
|||||||
RECORD_SINCE = (0,)
|
RECORD_SINCE = (0,)
|
||||||
|
|
||||||
|
|
||||||
class Daily(Combat, DailyEquipment):
|
class Daily(Reward, DailyEquipment):
|
||||||
daily_current: int
|
daily_current: int
|
||||||
daily_checked: list
|
daily_checked: list
|
||||||
daily_auto_checked = False
|
daily_auto_checked = False
|
||||||
@@ -153,8 +153,13 @@ class Daily(Combat, DailyEquipment):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.equipment_take_on()
|
self.equipment_take_on()
|
||||||
|
self.reward_backup_daily_reward_settings()
|
||||||
|
|
||||||
self.daily_run()
|
self.daily_run()
|
||||||
|
|
||||||
|
self.reward_recover_daily_reward_settings()
|
||||||
self.equipment_take_off()
|
self.equipment_take_off()
|
||||||
|
|
||||||
self.ui_goto_main()
|
self.ui_goto_main()
|
||||||
|
|
||||||
def record_executed_since(self):
|
def record_executed_since(self):
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class CampaignHard(CampaignRun):
|
|||||||
logger.hr('Campaign hard', level=1)
|
logger.hr('Campaign hard', level=1)
|
||||||
chapter, stage = self.config.HARD_CAMPAIGN.split('-')
|
chapter, stage = self.config.HARD_CAMPAIGN.split('-')
|
||||||
name = f'campaign_{chapter}_{stage}'
|
name = f'campaign_{chapter}_{stage}'
|
||||||
|
self.reward_backup_daily_reward_settings()
|
||||||
|
|
||||||
# Initial
|
# Initial
|
||||||
self.load_campaign(name='campaign_hard', folder='campaign_hard') # Load campaign file
|
self.load_campaign(name='campaign_hard', folder='campaign_hard') # Load campaign file
|
||||||
@@ -42,6 +43,7 @@ class CampaignHard(CampaignRun):
|
|||||||
self.campaign.run()
|
self.campaign.run()
|
||||||
|
|
||||||
self.campaign.equipment_take_off_when_finished()
|
self.campaign.equipment_take_off_when_finished()
|
||||||
|
self.reward_recover_daily_reward_settings()
|
||||||
|
|
||||||
def record_executed_since(self):
|
def record_executed_since(self):
|
||||||
return self.config.record_executed_since(option=RECORD_OPTION, since=RECORD_SINCE)
|
return self.config.record_executed_since(option=RECORD_OPTION, since=RECORD_SINCE)
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ class Reward(RewardCommission, RewardTacticalClass, RewardResearch, LoginHandler
|
|||||||
return count
|
return count
|
||||||
|
|
||||||
_enable_daily_reward = False
|
_enable_daily_reward = False
|
||||||
|
_fleet_auto_mode = ('combat_auto', 'combat_auto', 'combat_auto')
|
||||||
|
|
||||||
def reward_backup_daily_reward_settings(self):
|
def reward_backup_daily_reward_settings(self):
|
||||||
"""
|
"""
|
||||||
@@ -226,6 +227,9 @@ class Reward(RewardCommission, RewardTacticalClass, RewardResearch, LoginHandler
|
|||||||
"""
|
"""
|
||||||
self._enable_daily_reward = self.config.ENABLE_DAILY_REWARD
|
self._enable_daily_reward = self.config.ENABLE_DAILY_REWARD
|
||||||
self.config.ENABLE_DAILY_REWARD = False
|
self.config.ENABLE_DAILY_REWARD = False
|
||||||
|
self._fleet_auto_mode = self.config.FLEET_1_AUTO_MODE, self.config.FLEET_2_AUTO_MODE, self.config.FLEET_3_AUTO_MODE
|
||||||
|
self.config.FLEET_1_AUTO_MODE, self.config.FLEET_2_AUTO_MODE, self.config.FLEET_3_AUTO_MODE = ('combat_auto', 'combat_auto', 'combat_auto')
|
||||||
|
|
||||||
def reward_recover_daily_reward_settings(self):
|
def reward_recover_daily_reward_settings(self):
|
||||||
self.config.ENABLE_DAILY_REWARD = self._enable_daily_reward
|
self.config.ENABLE_DAILY_REWARD = self._enable_daily_reward
|
||||||
|
self.config.FLEET_1_AUTO_MODE, self.config.FLEET_2_AUTO_MODE, self.config.FLEET_3_AUTO_MODE = self._fleet_auto_mode
|
||||||
|
|||||||
Reference in New Issue
Block a user