Opt: No map clear percentage waiting in SOS maps

This commit is contained in:
LmeSzinc 2023-04-15 22:16:40 +08:00
parent d86e8907a2
commit d1b1b0ac7d
11 changed files with 33 additions and 25 deletions

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'I6'
@ -42,7 +42,7 @@ A6, B6, C6, D6, E6, F6, G6, H6, I6, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -80,4 +80,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_6(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'H5'
@ -36,7 +36,7 @@ A5, B5, C5, D5, E5, F5, G5, H5, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -81,4 +81,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_3(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'H7'
@ -43,7 +43,7 @@ A7, B7, C7, D7, E7, F7, G7, H7, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -91,4 +91,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_4(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'H6'
@ -40,7 +40,7 @@ A6, B6, C6, D6, E6, F6, G6, H6, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -85,4 +85,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_4(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'H6'
@ -41,7 +41,7 @@ A6, B6, C6, D6, E6, F6, G6, H6, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -73,4 +73,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'H6'
@ -41,7 +41,7 @@ A6, B6, C6, D6, E6, F6, G6, H6, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -76,4 +76,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'H7'
@ -43,7 +43,7 @@ A7, B7, C7, D7, E7, F7, G7, H7, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -87,4 +87,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_4(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -2,7 +2,7 @@ from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import RoadGrids, SelectedGrids
from .campaign_base import CampaignBase
from .campaign_base import CampaignBase, ConfigBase
MAP = CampaignMap('SOS')
MAP.shape = 'I6'
@ -41,7 +41,7 @@ A6, B6, C6, D6, E6, F6, G6, H6, I6, \
= MAP.flatten()
class Config:
class Config(ConfigBase):
# ===== Start of generated config =====
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
@ -72,4 +72,4 @@ class Campaign(CampaignBase):
return self.battle_default()
def battle_5(self):
self.fleet_boss.clear_boss()
return self.fleet_boss.clear_boss()

View File

@ -5,6 +5,10 @@ from module.exception import CampaignNameError
from module.template.assets import TEMPLATE_STAGE_SOS
class ConfigBase:
MAP_HAS_CLEAR_PERCENTAGE = False
class CampaignBase(CampaignBase_):
ENEMY_FILTER = '1T > 1L > 1E > 1M > 2T > 2L > 2E > 2M > 3T > 3L > 3E > 3M'

View File

@ -107,6 +107,7 @@ class ManualConfig:
"""
module.map.fleet
"""
MAP_HAS_CLEAR_PERCENTAGE = True
MAP_HAS_AMBUSH = True
MAP_HAS_FLEET_STEP = False
MAP_HAS_MOVABLE_ENEMY = False
@ -339,7 +340,7 @@ class ManualConfig:
module.shop
"""
# For dev purpose, auto extract new item templates
SHOP_EXTRACT_TEMPLATE = False
SHOP_EXTRACT_TEMPLATE = True
"""
module.war_archives

View File

@ -251,6 +251,9 @@ class MapOperation(MysteryHandler, FleetPreparation, Retirement, FastForwardHand
self.map_clear_percentage_prev = -1
self.map_clear_percentage_timer.reset()
return False
if not self.config.MAP_HAS_CLEAR_PERCENTAGE:
logger.attr('MAP_HAS_CLEAR_PERCENTAGE', self.config.MAP_HAS_CLEAR_PERCENTAGE)
return True
percent = self.get_map_clear_percentage()
logger.attr('Map_clear_percentage', percent)