mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-19 17:42:13 +08:00
Add: MAP_CHAPTER_SWITCH_20241219_SPEX
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
from module.base.timer import Timer
|
from module.base.timer import Timer
|
||||||
|
from module.base.utils import area_offset
|
||||||
from module.campaign.assets import *
|
from module.campaign.assets import *
|
||||||
from module.campaign.campaign_event import CampaignEvent
|
from module.campaign.campaign_event import CampaignEvent
|
||||||
from module.campaign.campaign_ocr import CampaignOcr
|
from module.campaign.campaign_ocr import CampaignOcr
|
||||||
@@ -29,7 +30,7 @@ MODE_SWITCH_2.add_state('ex', SWITCH_2_EX)
|
|||||||
MODE_SWITCH_20241219 = ModeSwitch('Mode_switch_20241219', is_selector=True, offset=(30, 30))
|
MODE_SWITCH_20241219 = ModeSwitch('Mode_switch_20241219', is_selector=True, offset=(30, 30))
|
||||||
MODE_SWITCH_20241219.add_state('combat', SWITCH_20241219_COMBAT)
|
MODE_SWITCH_20241219.add_state('combat', SWITCH_20241219_COMBAT)
|
||||||
MODE_SWITCH_20241219.add_state('story', SWITCH_20241219_STORY)
|
MODE_SWITCH_20241219.add_state('story', SWITCH_20241219_STORY)
|
||||||
ASIDE_SWITCH_20241219 = ModeSwitch('Aside_switch_20241219', is_selector=True, offset=(30, 30))
|
ASIDE_SWITCH_20241219 = ModeSwitch('Aside_switch_20241219', is_selector=True, offset=(20, 20))
|
||||||
ASIDE_SWITCH_20241219.add_state('part1', CHAPTER_20241219_PART1)
|
ASIDE_SWITCH_20241219.add_state('part1', CHAPTER_20241219_PART1)
|
||||||
ASIDE_SWITCH_20241219.add_state('part2', CHAPTER_20241219_PART2)
|
ASIDE_SWITCH_20241219.add_state('part2', CHAPTER_20241219_PART2)
|
||||||
ASIDE_SWITCH_20241219.add_state('sp', CHAPTER_20241219_SP)
|
ASIDE_SWITCH_20241219.add_state('sp', CHAPTER_20241219_SP)
|
||||||
@@ -321,6 +322,33 @@ class CampaignUI(MapOperation, CampaignEvent, CampaignOcr):
|
|||||||
self.campaign_ensure_aside_20241219('sp')
|
self.campaign_ensure_aside_20241219('sp')
|
||||||
self.campaign_ensure_chapter(chapter)
|
self.campaign_ensure_chapter(chapter)
|
||||||
return True
|
return True
|
||||||
|
if self.config.MAP_CHAPTER_SWITCH_20241219_SPEX:
|
||||||
|
if self._campaign_name_is_hard(f'{chapter}{stage}'):
|
||||||
|
self.config.override(Campaign_Mode='hard')
|
||||||
|
# normal, sp, ex
|
||||||
|
try:
|
||||||
|
ASIDE_SWITCH_20241219.offset = area_offset((-20, -20, 20, 20), (0, -37))
|
||||||
|
if chapter in ['sp', 't', 'ht']:
|
||||||
|
self.ui_goto_event()
|
||||||
|
self.campaign_ensure_mode_20241219('combat')
|
||||||
|
# normal is on the position of part2
|
||||||
|
self.campaign_ensure_aside_20241219('part2')
|
||||||
|
self.campaign_ensure_chapter(chapter)
|
||||||
|
return True
|
||||||
|
if chapter in ['ex_sp']:
|
||||||
|
self.ui_goto_event()
|
||||||
|
self.campaign_ensure_mode_20241219('combat')
|
||||||
|
self.campaign_ensure_aside_20241219('sp')
|
||||||
|
self.campaign_ensure_chapter(chapter)
|
||||||
|
return True
|
||||||
|
if chapter in ['ex_sp']:
|
||||||
|
self.ui_goto_event()
|
||||||
|
self.campaign_ensure_mode_20241219('combat')
|
||||||
|
self.campaign_ensure_aside_20241219('sp')
|
||||||
|
self.campaign_ensure_chapter(chapter)
|
||||||
|
return True
|
||||||
|
finally:
|
||||||
|
ASIDE_SWITCH_20241219.offset = (20, 20)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def campaign_set_chapter(self, name, mode='normal'):
|
def campaign_set_chapter(self, name, mode='normal'):
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ class ManualConfig:
|
|||||||
# Events from 20240725 to 20241219 introduced new chapter switches
|
# Events from 20240725 to 20241219 introduced new chapter switches
|
||||||
MAP_CHAPTER_SWITCH_20241219 = False
|
MAP_CHAPTER_SWITCH_20241219 = False
|
||||||
MAP_CHAPTER_SWITCH_20241219_SP = False
|
MAP_CHAPTER_SWITCH_20241219_SP = False
|
||||||
|
MAP_CHAPTER_SWITCH_20241219_SPEX = False
|
||||||
# Since event_20241219_cn chapter B unlocks event startup
|
# Since event_20241219_cn chapter B unlocks event startup
|
||||||
# which means chapter AB are continuous
|
# which means chapter AB are continuous
|
||||||
STAGE_INCREASE_AB = False
|
STAGE_INCREASE_AB = False
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class Switch:
|
|||||||
"""
|
"""
|
||||||
self.name = name
|
self.name = name
|
||||||
self.is_selector = is_selector
|
self.is_selector = is_selector
|
||||||
self.offset = offset
|
self._offset = offset
|
||||||
self.state_list = []
|
self.state_list = []
|
||||||
self.set_unknown_timer = Timer(5, count=10)
|
self.set_unknown_timer = Timer(5, count=10)
|
||||||
self.set_click_timer = Timer(1, count=2)
|
self.set_click_timer = Timer(1, count=2)
|
||||||
@@ -49,9 +49,19 @@ class Switch:
|
|||||||
'state': state,
|
'state': state,
|
||||||
'check_button': check_button,
|
'check_button': check_button,
|
||||||
'click_button': click_button if click_button is not None else check_button,
|
'click_button': click_button if click_button is not None else check_button,
|
||||||
'offset': offset if offset else self.offset
|
'offset': offset if offset else self._offset
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@property
|
||||||
|
def offset(self):
|
||||||
|
return self._offset
|
||||||
|
|
||||||
|
@offset.setter
|
||||||
|
def offset(self, value):
|
||||||
|
self._offset = value
|
||||||
|
for data in self.state_list:
|
||||||
|
data['offset'] = value
|
||||||
|
|
||||||
def appear(self, main):
|
def appear(self, main):
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
Reference in New Issue
Block a user