Skip to content

Commit

Permalink
Merge pull request #3308 from LmeSzinc/dev
Browse files Browse the repository at this point in the history
Add: Event The Ninja Scrolls: Azur Flash (event_20231123_cn)
  • Loading branch information
LmeSzinc authored Nov 23, 2023
2 parents 3aca355 + b29d5eb commit 47a987f
Show file tree
Hide file tree
Showing 44 changed files with 1,038 additions and 66 deletions.
Binary file modified assets/cn/meowfficer/MEOWFFICER_GOLD_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/template/TEMPLATE_SIREN_SK_BB.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/template/TEMPLATE_SIREN_SK_CA.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/template/TEMPLATE_SIREN_SK_CL.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/template/TEMPLATE_SIREN_SK_CV.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/template/TEMPLATE_SIREN_SK_DD.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/template/TEMPLATE_SIREN_SK_BB.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/template/TEMPLATE_SIREN_SK_CA.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/template/TEMPLATE_SIREN_SK_CL.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/template/TEMPLATE_SIREN_SK_CV.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/template/TEMPLATE_SIREN_SK_DD.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/jp/template/TEMPLATE_SIREN_SK_BB.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/jp/template/TEMPLATE_SIREN_SK_CA.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/jp/template/TEMPLATE_SIREN_SK_CL.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/jp/template/TEMPLATE_SIREN_SK_CV.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/jp/template/TEMPLATE_SIREN_SK_DD.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tw/template/TEMPLATE_SIREN_SK_BB.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tw/template/TEMPLATE_SIREN_SK_CA.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tw/template/TEMPLATE_SIREN_SK_CL.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tw/template/TEMPLATE_SIREN_SK_CV.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tw/template/TEMPLATE_SIREN_SK_DD.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions campaign/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@ To add a new event, add a new row in here, and run `python -m module.config.conf
| 20231026 | event 20231026 cn | Tempesta and the Fountain of Youth | 飓风与青春之泉 | Tempesta and the Fountain of Youth | テンペスタと若返りの泉 | - |
| 20231109 | event 20210916 cn | Upon the Shimmering Blue | 复刻碧海光粼 | Upon the Shimmering Blue Rerun | 駆けよ 碧海の吹き風(復刻) | - |
| 20231109 | event 20220728 cn | Aquilifer's Ballade | - | - | - | 雄鷹的敘事歌 |
| 20231123 | event 20220210 cn | Northern Overture Rerun | - | - | - | 復刻北境序曲 |
| 20231123 | event 20231123 cn | The Ninja Scrolls: Azur Flash | 苍闪忍法帖 | The Ninja Scrolls: Azur Flash | 蒼閃忍法帖 | - |
36 changes: 36 additions & 0 deletions campaign/event_20231123_cn/campaign_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from module.campaign.campaign_base import CampaignBase as CampaignBase_


class CampaignBase(CampaignBase_):
STAGE_INCREASE = [
"""
T1 > T2 > T3 > T4 > T5
""",
"""
TSK1 > TSK2 > TSK3 > TSK4 > TSK5
""",
]

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

def _campaign_get_chapter_index(self, name):
"""
Args:
name (str, int):
Returns:
int
"""
if name == 't':
return 1
if name == 'tsk':
return 2
if name == 'ex_sp':
return 3
if name == 'ex_ex':
return 4

return super(CampaignBase, CampaignBase)._campaign_get_chapter_index(name)
131 changes: 131 additions & 0 deletions campaign/event_20231123_cn/sp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
from .campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

MAP = CampaignMap('SP')
MAP.shape = 'I9'
MAP.camera_data = ['D4', 'D6', 'F4', 'F6']
MAP.camera_data_spawn_point = ['F6', 'D6']
MAP.map_data = """
++ ++ ++ ++ ++ ++ ++ ++ ++
++ MS -- -- MS -- -- MS ++
++ -- Me -- -- -- Me -- ++
ME -- -- ++ -- ++ -- -- ME
-- ME -- -- MB -- -- ME --
ME -- -- ++ -- ++ -- -- ME
++ -- Me -- __ -- Me -- ++
++ ME -- SP -- SP -- ME ++
++ ++ ++ ++ -- ++ ++ ++ ++
"""
MAP.map_data_loop = """
++ ++ ++ ++ ++ ++ ++ ++ ++
++ -- -- -- -- -- -- -- ++
++ -- Me -- -- -- Me -- ++
ME -- -- ++ MS ++ -- -- ME
-- ME -- MS MB MS -- ME --
ME -- -- ++ -- ++ -- -- ME
++ -- Me -- __ -- Me -- ++
++ -- -- SP -- SP -- -- ++
++ ++ ++ ++ -- ++ ++ ++ ++
"""
MAP.weight_data = """
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
"""
MAP.spawn_data = [
{'battle': 0, 'enemy': 10, 'siren': 3},
{'battle': 1},
{'battle': 2},
{'battle': 3},
{'battle': 4},
{'battle': 5},
{'battle': 6},
{'battle': 7, 'boss': 1},
]
MAP.spawn_data_loop = [
{'battle': 0, 'enemy': 10, 'siren': 3},
{'battle': 1},
{'battle': 2},
{'battle': 3},
{'battle': 4},
{'battle': 5},
{'battle': 6},
{'battle': 7, 'boss': 1},
]
A1, B1, C1, D1, E1, F1, G1, H1, I1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, \
A6, B6, C6, D6, E6, F6, G6, H6, I6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, \
A8, B8, C8, D8, E8, F8, G8, H8, I8, \
A9, B9, C9, D9, E9, F9, G9, H9, I9, \
= MAP.flatten()


class Config:
# ===== Start of generated config =====
MAP_SIREN_TEMPLATE = ['SK_BB', 'SK_CV']
MOVABLE_ENEMY_TURN = (2,)
MAP_HAS_SIREN = True
MAP_HAS_MOVABLE_ENEMY = True
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
MAP_HAS_AMBUSH = False
MAP_HAS_MYSTERY = False
STAR_REQUIRE_1 = 0
STAR_REQUIRE_2 = 0
STAR_REQUIRE_3 = 0
# ===== End of generated config =====

INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (1.5, 10),
'prominence': 10,
'distance': 35,
}
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
'height': (255 - 33, 255),
'prominence': 10,
'distance': 50,
'wlen': 1000
}
HOMO_EDGE_COLOR_RANGE = (0, 33)
MAP_SWIPE_MULTIPLY = (1.038, 1.058)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.004, 1.023)
MAP_SWIPE_MULTIPLY_MAATOUCH = (0.975, 0.992)
MAP_ENSURE_EDGE_INSIGHT_CORNER = 'bottom'
MAP_IS_ONE_TIME_STAGE = True


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

def battle_0(self):
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=2):
return True

return self.battle_default()

def battle_5(self):
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True

return self.battle_default()

def battle_7(self):
return self.fleet_boss.clear_boss()
108 changes: 108 additions & 0 deletions campaign/event_20231123_cn/t1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
from .campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

MAP = CampaignMap('T1')
MAP.shape = 'I8'
MAP.camera_data = ['E3', 'E6']
MAP.camera_data_spawn_point = ['E3']
MAP.map_data = """
-- -- -- -- -- -- -- -- --
-- -- SP -- SP -- ME ++ --
-- ++ -- -- -- -- -- -- --
-- ME -- -- -- ++ ME -- ME
-- -- Me -- Me ++ -- __ --
-- ME -- MS -- -- -- ME --
++ ++ Me -- Me -- ME -- ME
++ ++ -- MB -- ++ ++ ++ --
"""
MAP.map_data_loop = """
-- -- -- -- -- -- -- -- --
-- -- SP -- SP -- ME ++ --
-- ++ -- -- -- -- -- -- --
-- ME -- MS -- ++ ME -- ME
-- -- Me -- Me ++ -- __ --
-- ME -- -- -- -- -- ME --
++ ++ Me -- Me -- ME -- ME
++ ++ -- MB -- ++ ++ ++ --
"""
MAP.weight_data = """
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
"""
MAP.spawn_data = [
{'battle': 0, 'enemy': 2, 'siren': 1},
{'battle': 1, 'enemy': 2},
{'battle': 2, 'enemy': 1},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'boss': 1},
]
MAP.spawn_data_loop = [
{'battle': 0, 'enemy': 2, 'siren': 1},
{'battle': 1, 'enemy': 2},
{'battle': 2, 'enemy': 1},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'boss': 1},
]
A1, B1, C1, D1, E1, F1, G1, H1, I1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, \
A6, B6, C6, D6, E6, F6, G6, H6, I6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, \
A8, B8, C8, D8, E8, F8, G8, H8, I8, \
= MAP.flatten()


class Config:
# ===== Start of generated config =====
MAP_SIREN_TEMPLATE = ['SK_DD']
MOVABLE_ENEMY_TURN = (2,)
MAP_HAS_SIREN = True
MAP_HAS_MOVABLE_ENEMY = True
MAP_HAS_MAP_STORY = True
MAP_HAS_FLEET_STEP = True
MAP_HAS_AMBUSH = False
MAP_HAS_MYSTERY = False
# ===== End of generated config =====

INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (1.5, 10),
'prominence': 10,
'distance': 35,
}
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
'height': (255 - 33, 255),
'prominence': 10,
'distance': 50,
'wlen': 1000
}
HOMO_EDGE_COLOR_RANGE = (0, 33)
MAP_SWIPE_MULTIPLY = (1.187, 1.209)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.148, 1.169)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.115, 1.135)


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

def battle_0(self):
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True

return self.battle_default()

def battle_4(self):
return self.clear_boss()
88 changes: 88 additions & 0 deletions campaign/event_20231123_cn/t2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
from .campaign_base import CampaignBase
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
from .t1 import Config as ConfigBase

MAP = CampaignMap('T2')
MAP.shape = 'I7'
MAP.camera_data = ['D3', 'D5', 'F3', 'F5']
MAP.camera_data_spawn_point = ['D3']
MAP.map_data = """
-- ++ ++ ++ MS ++ ++ ++ --
-- -- -- -- __ -- -- Me --
SP -- -- ME -- ME -- -- ME
SP -- ++ -- MB -- ++ ME --
-- -- -- ME -- ME -- -- ME
++ Me -- -- ++ -- -- Me ++
++ -- ME -- -- -- ME -- ++
"""
MAP.map_data_loop = """
-- ++ ++ ++ -- ++ ++ ++ --
-- -- MS -- __ -- -- Me --
SP -- -- ME -- ME -- -- ME
SP -- ++ -- MB -- ++ ME --
-- -- -- ME -- ME -- -- ME
++ Me -- -- ++ -- -- Me ++
++ -- ME -- -- -- ME -- ++
"""
MAP.weight_data = """
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
"""
MAP.spawn_data = [
{'battle': 0, 'enemy': 3, 'siren': 1},
{'battle': 1, 'enemy': 2},
{'battle': 2, 'enemy': 1},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'boss': 1},
]
MAP.spawn_data_loop = [
{'battle': 0, 'enemy': 3, 'siren': 1},
{'battle': 1, 'enemy': 2},
{'battle': 2, 'enemy': 1},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'boss': 1},
]
A1, B1, C1, D1, E1, F1, G1, H1, I1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, \
A6, B6, C6, D6, E6, F6, G6, H6, I6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, \
= MAP.flatten()


class Config(ConfigBase):
# ===== Start of generated config =====
MAP_SIREN_TEMPLATE = ['SK_DD', 'SK_CL']
MOVABLE_ENEMY_TURN = (2,)
MAP_HAS_SIREN = True
MAP_HAS_MOVABLE_ENEMY = True
MAP_HAS_MAP_STORY = True
MAP_HAS_FLEET_STEP = True
MAP_HAS_AMBUSH = False
MAP_HAS_MYSTERY = False
# ===== End of generated config =====


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

def battle_0(self):
if self.clear_siren():
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True

return self.battle_default()

def battle_4(self):
return self.clear_boss()
Loading

0 comments on commit 47a987f

Please sign in to comment.