Skip to content

Commit

Permalink
Merge pull request #4506 from LmeSzinc/dev
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
LmeSzinc authored Jan 10, 2025
2 parents 30e5ff1 + 3995010 commit ea650eb
Show file tree
Hide file tree
Showing 36 changed files with 108 additions and 67 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions campaign/event_20200917_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def campaign_set_chapter(self, name, mode='normal'):
if chapter.isdigit():
self.ui_goto_campaign()
self.campaign_ensure_mode('normal')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
if mode == 'hard':
self.campaign_ensure_mode('hard')

Expand All @@ -39,11 +39,11 @@ def campaign_set_chapter(self, name, mode='normal'):
self.campaign_ensure_mode('hard')
elif chapter == 'ex_sp':
self.campaign_ensure_mode('ex')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter == 'sp':
self.ui_goto_sp()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter in ['t', 'ts', 'ht', 'hts']:
self.ui_goto_event()
Expand All @@ -60,7 +60,7 @@ def campaign_set_chapter(self, name, mode='normal'):
if chapter == 'ex_sp':
self.campaign_ensure_mode('ex')
# Get stage
self.campaign_ensure_chapter(index=1)
self.campaign_ensure_chapter(1)
else:
logger.warning(f'Unknown campaign chapter: {name}')

Expand Down
8 changes: 4 additions & 4 deletions campaign/event_20201029_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def campaign_set_chapter(self, name, mode='normal'):
if chapter.isdigit():
self.ui_goto_campaign()
self.campaign_ensure_mode('normal')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
if mode == 'hard':
self.campaign_ensure_mode('hard')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter in 'abcd' or chapter == 'ex_sp':
self.ui_goto_event()
Expand All @@ -57,11 +57,11 @@ def campaign_set_chapter(self, name, mode='normal'):
self.campaign_ensure_mode('hard')
elif chapter == 'ex_sp':
pass # Difference
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter == 'sp':
self.ui_goto_event() # Difference
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

else:
logger.warning(f'Unknown campaign chapter: {name}')
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20201126_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _campaign_get_chapter_index(name):

def campaign_set_chapter_event(self, chapter, mode='normal'):
self.ui_goto_event()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
return True

def campaign_get_entrance(self, name):
Expand Down
8 changes: 4 additions & 4 deletions campaign/event_20210121_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def campaign_set_chapter(self, name, mode='normal'):
if chapter.isdigit():
self.ui_weigh_anchor()
self.campaign_ensure_mode('normal')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
if mode == 'hard':
self.campaign_ensure_mode('hard')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter in 'abcd' or chapter == 'ex_sp' or chapter in ['as', 'cs']:
self.ui_goto_event()
Expand All @@ -28,11 +28,11 @@ def campaign_set_chapter(self, name, mode='normal'):
self.campaign_ensure_mode('hard')
elif chapter == 'ex_sp':
self.campaign_ensure_mode('ex')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter == 'sp':
self.ui_goto_sp()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

else:
logger.warning(f'Unknown campaign chapter: {name}')
Expand Down
8 changes: 4 additions & 4 deletions campaign/event_20210722_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def campaign_set_chapter(self, name, mode='normal'):
if chapter.isdigit():
self.ui_goto_campaign()
self.campaign_ensure_mode('normal')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
if mode == 'hard':
self.campaign_ensure_mode('hard')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter in ['a', 'b', 'c', 'd', 'ex_sp', 'as', 'bs', 'cs', 'ds']:
self.ui_goto_event()
Expand All @@ -86,12 +86,12 @@ def campaign_set_chapter(self, name, mode='normal'):
elif chapter == 'ex_sp':
# self.campaign_ensure_mode('ex')
pass # Difference
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter == 'sp':
# self.ui_goto_sp()
self.ui_goto_event() # Difference
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

else:
logger.warning(f'Unknown campaign chapter: {name}')
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20220324_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class CampaignBase(CampaignBase_):
def campaign_set_chapter_sp(self, chapter, mode='normal'):
if chapter == 'sp':
self.ui_goto_event()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20220818_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def campaign_set_chapter_sp(self, chapter, mode='normal'):
logger.info('Set chapter SP')
if chapter in ['sp', 'sp_sp']:
self.ui_goto_event()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20221124_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CampaignBase(CampaignBase_):
def campaign_set_chapter_event(self, chapter, mode='normal'):
if chapter.startswith('t'):
self.ui_goto_event()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
return True

return super().campaign_set_chapter_event(chapter, mode=mode)
Expand Down
4 changes: 3 additions & 1 deletion campaign/event_20221222_cn/a1.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Config:
# ===== End of generated config =====

MAP_SIREN_HAS_BOSS_ICON_SMALL = True
MAP_ENEMY_TEMPLATE = ['Light20221222', 'Main20221222', 'Carrier20221222']
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (1.5, 10),
Expand All @@ -80,9 +81,10 @@ class Config:

class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
ENEMY_FILTER = '1L > 1M > 2L > 2M > 3L > 3M > 1E > 2E > 3E > 1C > 2C > 3C'

def battle_0(self):
self.config.override(EnemyPriority_EnemyScaleBalanceWeight='default_mode')
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
Expand Down
3 changes: 2 additions & 1 deletion campaign/event_20221222_cn/a2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ class Config(ConfigBase):

class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
ENEMY_FILTER = '1L > 1M > 2L > 2M > 3L > 3M > 1E > 2E > 3E > 1C > 2C > 3C'

def battle_0(self):
self.config.override(EnemyPriority_EnemyScaleBalanceWeight='default_mode')
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
Expand Down
3 changes: 2 additions & 1 deletion campaign/event_20221222_cn/a3.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ class Config(ConfigBase):

class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
ENEMY_FILTER = '1L > 1M > 2L > 2M > 3L > 3M > 1E > 2E > 3E > 1C > 2C > 3C'

def battle_0(self):
self.config.override(EnemyPriority_EnemyScaleBalanceWeight='default_mode')
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
Expand Down
4 changes: 3 additions & 1 deletion campaign/event_20221222_cn/b1.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Config:
# ===== End of generated config =====

MAP_SIREN_HAS_BOSS_ICON_SMALL = True
MAP_ENEMY_TEMPLATE = ['Light20221222', 'Main20221222', 'Carrier20221222']
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (1.5, 10),
Expand All @@ -81,9 +82,10 @@ class Config:

class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
ENEMY_FILTER = '1L > 1M > 2L > 2M > 3L > 3M > 1E > 2E > 3E > 1C > 2C > 3C'

def battle_0(self):
self.config.override(EnemyPriority_EnemyScaleBalanceWeight='default_mode')
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
Expand Down
3 changes: 2 additions & 1 deletion campaign/event_20221222_cn/b2.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ class Config(ConfigBase):

class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
ENEMY_FILTER = '1L > 1M > 2L > 2M > 3L > 3M > 1E > 2E > 3E > 1C > 2C > 3C'

def battle_0(self):
self.config.override(EnemyPriority_EnemyScaleBalanceWeight='default_mode')
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
Expand Down
9 changes: 7 additions & 2 deletions campaign/event_20221222_cn/b3.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

MAP = CampaignMap('B3')
MAP.shape = 'I9'
MAP.camera_data = ['D2', 'D5', 'D7', 'F2', 'F5', 'F7']
MAP.camera_data = ['D3', 'F3', 'F5', 'F7']
MAP.camera_data_spawn_point = ['D7']
MAP.map_data = """
-- ++ ++ ME -- ME -- ++ ++
Expand Down Expand Up @@ -48,6 +48,9 @@
A8, B8, C8, D8, E8, F8, G8, H8, I8, \
A9, B9, C9, D9, E9, F9, G9, H9, I9, \
= MAP.flatten()
MAP.ignore_prediction(C5, is_siren=True)
MAP.ignore_prediction(E7, is_siren=True)
MAP.ignore_prediction(G4, is_siren=True)


class Config(ConfigBase):
Expand All @@ -62,16 +65,18 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====

MAP_SIREN_HAS_BOSS_ICON_SMALL = False
MAP_SWIPE_MULTIPLY = (0.997, 1.015)
MAP_SWIPE_MULTIPLY_MINITOUCH = (0.964, 0.982)
MAP_SWIPE_MULTIPLY_MAATOUCH = (0.936, 0.953)


class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
ENEMY_FILTER = '1L > 1M > 2L > 2M > 3L > 3M > 1E > 2E > 3E > 1C > 2C > 3C'

def battle_0(self):
self.config.override(EnemyPriority_EnemyScaleBalanceWeight='default_mode')
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
Expand Down
6 changes: 5 additions & 1 deletion campaign/event_20221222_cn/d3.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

MAP = CampaignMap('D3')
MAP.shape = 'I9'
MAP.camera_data = ['D2', 'D5', 'D7', 'F2', 'F5', 'F7']
MAP.camera_data = ['D3', 'F3', 'F5', 'F7']
MAP.camera_data_spawn_point = ['D7']
MAP.map_data = """
-- ++ ++ ME -- ME -- ++ ++
Expand Down Expand Up @@ -49,6 +49,9 @@
A8, B8, C8, D8, E8, F8, G8, H8, I8, \
A9, B9, C9, D9, E9, F9, G9, H9, I9, \
= MAP.flatten()
MAP.ignore_prediction(C5, is_siren=True)
MAP.ignore_prediction(E7, is_siren=True)
MAP.ignore_prediction(G4, is_siren=True)


class Config(ConfigBase):
Expand All @@ -63,6 +66,7 @@ class Config(ConfigBase):
MAP_HAS_MYSTERY = False
# ===== End of generated config =====

MAP_SIREN_HAS_BOSS_ICON_SMALL = False
MAP_SWIPE_MULTIPLY = (0.997, 1.015)
MAP_SWIPE_MULTIPLY_MINITOUCH = (0.964, 0.982)
MAP_SWIPE_MULTIPLY_MAATOUCH = (0.936, 0.953)
Expand Down
8 changes: 4 additions & 4 deletions campaign/event_20230525_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def campaign_set_chapter(self, name, mode='normal'):
if chapter.isdigit():
self.ui_goto_campaign()
self.campaign_ensure_mode('normal')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
if mode == 'hard':
self.campaign_ensure_mode('hard')

Expand All @@ -41,11 +41,11 @@ def campaign_set_chapter(self, name, mode='normal'):
self.campaign_ensure_mode('hard')
elif chapter == 'ex_sp':
self.campaign_ensure_mode('ex')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter == 'sp':
self.ui_goto_sp()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter in ['t', 'ts', 'ht', 'hts']:
self.ui_goto_event()
Expand All @@ -68,7 +68,7 @@ def campaign_set_chapter(self, name, mode='normal'):
else:
self._campaign_ball_set('red')
# Get stage
self.campaign_ensure_chapter(index=1)
self.campaign_ensure_chapter(1)
else:
logger.warning(f'Unknown campaign chapter: {name}')

Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20231026_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CampaignBase(CampaignBase_):

def campaign_set_chapter_event(self, chapter, mode='normal'):
self.ui_goto_event()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
return True

def _campaign_get_chapter_index(self, name):
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20231123_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CampaignBase(CampaignBase_):

def campaign_set_chapter_event(self, chapter, mode='normal'):
self.ui_goto_event()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
return True

def _campaign_get_chapter_index(self, name):
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20240425_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CampaignBase(CampaignBase_):

def campaign_set_chapter_event(self, chapter, mode='normal'):
self.ui_goto_event()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
return True

def _campaign_get_chapter_index(self, name):
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20241024_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ def campaign_set_chapter_20241219(self, chapter, stage, mode='combat'):
ASIDE_SWITCH_20241219.set('part2', main=self)
else:
logger.warning(f'Stage {chapter}{stage} is not in event_20241024')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

return super().campaign_set_chapter_20241219(chapter, stage, mode)
4 changes: 2 additions & 2 deletions campaign/event_20241121_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ def campaign_set_chapter_20241219(self, chapter, stage, mode='combat'):
self.ui_goto_event()
MODE_SWITCH_20241219.set('combat', main=self)
ASIDE_SWITCH_20241219.set('part1', main=self)
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
if chapter == 'ttl':
self.ui_goto_event()
MODE_SWITCH_20241219.set('combat', main=self)
ASIDE_SWITCH_20241219.set('part2', main=self)
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

return super().campaign_set_chapter_20241219(chapter, stage, mode)
8 changes: 4 additions & 4 deletions campaign/war_archives_20190911_cn/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def campaign_set_chapter(self, name, mode='normal'):
if chapter.isdigit():
self.ui_goto_campaign()
self.campaign_ensure_mode('normal')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)
if mode == 'hard':
self.campaign_ensure_mode('hard')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter in 'abcd' or chapter == 'ex_sp' or chapter in ['as', 'cs']:
self.ui_goto_event()
Expand All @@ -38,11 +38,11 @@ def campaign_set_chapter(self, name, mode='normal'):
self.campaign_ensure_mode('hard')
elif chapter == 'ex_sp':
self.campaign_ensure_mode('ex')
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

elif chapter == 'sp':
self.ui_goto_sp()
self.campaign_ensure_chapter(index=chapter)
self.campaign_ensure_chapter(chapter)

else:
logger.warning(f'Unknown campaign chapter: {name}')
Expand Down
Loading

0 comments on commit ea650eb

Please sign in to comment.