Add: 增加处理光墙(海域格子间的分隔)

- 优化寻路初始化
- 修复海图log显示单字符显示'E'
This commit is contained in:
LmeSzinc 2020-05-23 17:44:49 +08:00
parent 7b97d3243c
commit 7f27a7a729
3 changed files with 4 additions and 4 deletions

View File

@ -327,7 +327,7 @@ class Fleet(Camera, MapOperation, AmbushHandler):
self.map.reset()
self.handle_map_green_config_cover()
self.map.poor_map_data = self.config.POOR_MAP_DATA
self.map.grid_connection_initial(wall=self.config.MAP_HAS_WALL and self.is_map_green)
self.map.grid_connection_initial(wall=self.config.MAP_HAS_WALL and not self.is_map_green)
self.hp_init()
self.handle_strategy(index=self.fleet_current_index)
self.ensure_edge_insight(preset=self.map.in_map_swipe_preset_data)

View File

@ -389,7 +389,7 @@ class Map(Fleet):
logger.info(f'Break siren caught, fleet_2: {self.fleet_2_location}')
self.fleet_2.switch_to()
self.ensure_edge_insight(reverse=True)
self.ensure_edge_insight()
self.clear_chosen_enemy(self.map[self.fleet_2_location])
self.fleet_1.switch_to()
for grid in self.map:

View File

@ -280,10 +280,10 @@ class CampaignMap:
if cost < arr.cost:
arr.cost = cost
arr.connection = grid
arr.connection = grid.location
elif cost == arr.cost:
if abs(arr.location[0] - grid.location[0]) == 1:
arr.connection = grid
arr.connection = grid.location
if arr.is_sea:
new.add(arr)
if len(new) == len(visited):