Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/cn/handler/AIR_STRIKE_CANCEL.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/handler/AIR_STRIKE_CONFIRM.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/handler/AIR_STRIKE_ENTER.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/handler/MAP_AIR_STRIKE.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/map/FLEET_SUPPORT_EMPTY.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_AIR_STRIKE_ICON.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/en/handler/MAP_AIR_STRIKE.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/en/template/TEMPLATE_AIR_STRIKE_ICON.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/jp/handler/AIR_STRIKE_CANCEL.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/jp/handler/AIR_STRIKE_CONFIRM.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/jp/handler/MAP_AIR_STRIKE.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/jp/template/TEMPLATE_AIR_STRIKE_ICON.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added assets/tw/handler/MAP_AIR_STRIKE.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/tw/template/TEMPLATE_AIR_STRIKE_ICON.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 2 additions & 13 deletions campaign/campaign_main/campaign_15_base.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
from module.base.mask import Mask
from module.base.timer import Timer
from module.campaign.campaign_base import CampaignBase as CampaignBase_
from module.handler.assets import STRATEGY_OPENED
from module.handler.strategy import MOB_MOVE_OFFSET
from module.logger import logger
from module.map.map_grids import SelectedGrids
from module.map.utils import location_ensure
from module.map_detection.grid import GridInfo
from module.map_detection.utils_assets import ASSETS

MASK_MAP_UI_W15 = Mask(file='./assets/mask/MASK_MAP_UI_W15.png')
from .campaign_support_fleet import CampaignBase as CampaignBase_


class Config:
Expand Down Expand Up @@ -45,12 +43,6 @@ def merge(self, info, mode='normal'):
class CampaignBase(CampaignBase_):
ENEMY_FILTER = '1L > 1M > 1E > 2L > 3L > 2M > 2E > 1C > 2C > 3M > 3E > 3C'

def map_data_init(self, map_):
super().map_data_init(map_)
# Patch ui_mask, get rid of supporting fleet
_ = ASSETS.ui_mask
ASSETS.ui_mask = MASK_MAP_UI_W15.image

map_has_mob_move = True

def strategy_set_execute(self, formation=None, sub_view=None, sub_hunt=None):
Expand All @@ -61,10 +53,6 @@ def strategy_set_execute(self, formation=None, sub_view=None, sub_hunt=None):
)
logger.attr("Map has mob move", self.strategy_has_mob_move())

def _map_swipe(self, vector, box=(239, 159, 1175, 628)):
# Left border to 239, avoid swiping on support fleet
return super()._map_swipe(vector, box=box)

def mob_movable(self, location, target):
"""
Check if mob is movable from location to target.
Expand Down Expand Up @@ -217,3 +205,4 @@ def mob_move(self, location, target):
self._mob_move_info_change(location, target)
self.find_path_initial()
self.map.show()
return True
85 changes: 85 additions & 0 deletions campaign/campaign_main/campaign_16_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

from .campaign_16_base_submarine import CampaignBase
from .campaign_16_base_submarine import Config as ConfigBase

MAP = CampaignMap('16-1')
MAP.shape = 'I9'
MAP.camera_data = ['C2', 'C6', 'F2', 'F6']
MAP.camera_data_spawn_point = ['F6']
MAP.camera_sight = (-2, -1, 3, 2)
MAP.map_data = """
++ ME -- -- ME -- -- ME --
ME -- -- ME ++ ME -- -- ME
-- -- ME -- ME -- -- ME ++
-- ME ++ ME -- ME -- ME Me
-- -- ME -- Me ++ __ -- --
-- ME -- __ ME -- -- -- MB
-- ++ 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': 2},
{'battle': 1, 'enemy': 2},
{'battle': 2, 'enemy': 2},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'enemy': 1},
{'battle': 5, '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(ConfigBase):
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
MAP_HAS_AMBUSH = True

MAP_SWIPE_MULTIPLY = (1.050, 1.069)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.015, 1.034)
MAP_SWIPE_MULTIPLY_MAATOUCH = (0.985, 1.003)


class Campaign(CampaignBase):
MAP = MAP

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

return self.battle_default()

def battle_5(self):
boss = self.map.select(is_boss=True)
if boss:
return self.fleet_boss.clear_boss()

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

return self.battle_default()

def battle_6(self):
return self.fleet_boss.clear_boss()
82 changes: 82 additions & 0 deletions campaign/campaign_main/campaign_16_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

from .campaign_16_base_submarine import CampaignBase
from .campaign_16_base_submarine import Config as ConfigBase

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


class Config(ConfigBase):
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
MAP_HAS_AMBUSH = True

MAP_SWIPE_MULTIPLY = (1.093, 1.113)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.057, 1.077)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.026, 1.045)


class Campaign(CampaignBase):
MAP = MAP

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

return self.battle_default()

def battle_5(self):
boss = self.map.select(is_boss=True)
if boss:
return self.fleet_boss.clear_boss()

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

return self.battle_default()

def battle_6(self):
return self.fleet_boss.clear_boss()
111 changes: 111 additions & 0 deletions campaign/campaign_main/campaign_16_3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger

from .campaign_16_base_aircraft import CampaignBase
from .campaign_16_base_aircraft import Config as ConfigBase

MAP = CampaignMap('16-3')
MAP.shape = 'K6'
MAP.camera_data = ['C2', 'C5', 'F2', 'F5', 'H2', 'H5']
MAP.camera_data_spawn_point = ['C5']
MAP.camera_sight = (-2, -1, 3, 2)
MAP.map_data = """
-- -- ++ ++ ++ -- -- ME ++ -- MB
-- ME -- ++ -- ME -- -- ++ -- --
-- -- ME ME -- ME ++ ME ++ -- --
-- -- -- ++ ++ __ ME ME -- -- --
SP -- -- ++ -- ME ++ -- -- -- --
SP -- -- 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 50 50 50
"""
MAP.spawn_data = [
{'battle': 0, 'enemy': 3},
{'battle': 1, 'enemy': 6},
{'battle': 2, 'enemy': 3},
{'battle': 3, 'boss': 1},
]
MAP.spawn_data_loop = [
{'battle': 0, 'enemy': 3},
{'battle': 1, 'enemy': 6},
{'battle': 2, 'enemy': 3},
{'battle': 3},
{'battle': 4},
{'battle': 5, 'boss': 1},
]
A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, \
A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, \
= MAP.flatten()

road_main = RoadGrids([G4, H4])


class Config(ConfigBase):
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
MAP_HAS_AMBUSH = True

MAP_SWIPE_MULTIPLY = (1.180, 1.202)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.141, 1.162)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.108, 1.128)


class Campaign(CampaignBase):
MAP = MAP
use_single_fleet = False

def map_init(self, map_):
super().map_init(map_)
self.map_has_mob_move = self.use_support_fleet and self.map_is_clear_mode
self.use_single_fleet = 'standby' in self.config.Fleet_FleetOrder

def battle_0(self):
if self.map_has_mob_move:
if self.mob_move(C3, C2):
return self.clear_chosen_enemy(D6)
self.map_has_mob_move = False

return self.clear_chosen_enemy(C3)

def battle_1(self):
if self.map_has_mob_move:
self.mob_move(E6, E5)
if not self.use_single_fleet:
self.fleet_boss.goto(F4)
self.fleet_ensure(index=3 - self.fleet_boss_index)
return self.clear_chosen_enemy(G4)

if self.use_support_fleet and not self.map_is_clear_mode:
self.goto(C3)
self.air_strike(E3)
return self.clear_chosen_enemy(D3)

def battle_2(self):
return self.clear_chosen_enemy(F3)

def battle_3(self):
boss = self.map.select(is_boss=True)
if boss:
if not self.check_accessibility(boss[0], fleet='boss'):
return self.clear_roadblocks([road_main])
if self.use_support_fleet and not self.map_is_clear_mode:
# at this stage the most right zone should be accessible
self.goto(K5)
self.air_strike(J6)
return self.fleet_boss.clear_boss()
if self.clear_roadblocks([road_main]):
return True
if self.clear_any_enemy(genre=("Light",), strongest=True):
return True
return self.battle_default()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                self.goto(K5)
                self.air_strike(J6)

这个操作的作用是什么, J6 是一个完全空的海域,没有打击到任何敌人
16-4 也有一个类似的操作

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是非周回模式的轰炸机场,属于16-3/16-4特殊机制。建议保留以防止黄鸡修bug之后难度上升
周回模式下应该不会执行这个操作。

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那这个打击需要移动队伍吗

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要,因为这个打击只有同时在视野范围内(没有迷雾)和打击范围内(靶心范围)才能生效,否则就是白打

Loading