From 2c10f77e4d5d3bc073cc90b09b52f06a357289b3 Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Thu, 30 Apr 2020 17:11:47 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E8=B0=83=E6=95=B4=E4=BA=86=E5=9B=9E?= =?UTF-8?q?=E5=87=BA=E5=87=BB=E7=95=8C=E9=9D=A2=E6=97=B6=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E5=AE=9A,=20=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=A0=BC=E5=AD=90=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- campaign/campaign_main/campaign_7_2.py | 4 +-- .../campaign_7_2_mystery_farming.py | 28 +------------------ campaign/event_20200423_cn/d3.py | 9 ++++++ module/handler/enemy_searching.py | 11 ++++++-- 4 files changed, 20 insertions(+), 32 deletions(-) diff --git a/campaign/campaign_main/campaign_7_2.py b/campaign/campaign_main/campaign_7_2.py index 15a0206f2..cc58a235d 100644 --- a/campaign/campaign_main/campaign_7_2.py +++ b/campaign/campaign_main/campaign_7_2.py @@ -15,9 +15,9 @@ MAP.map_data = ''' ''' MAP.weight_data = ''' 40 30 30 30 30 30 30 30 - 20 20 20 20 20 20 20 20 + 20 20 20 10 20 20 20 20 10 10 10 10 10 10 10 10 - 20 20 20 20 20 20 20 20 + 20 20 20 10 20 20 20 20 30 30 30 30 30 30 30 30 ''' MAP.camera_data = ['D3'] diff --git a/campaign/campaign_main/campaign_7_2_mystery_farming.py b/campaign/campaign_main/campaign_7_2_mystery_farming.py index af799ed3c..825ba425e 100644 --- a/campaign/campaign_main/campaign_7_2_mystery_farming.py +++ b/campaign/campaign_main/campaign_7_2_mystery_farming.py @@ -2,34 +2,8 @@ from module.campaign.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 campaign.campaign_main.campaign_7_2 import Config +from campaign.campaign_main.campaign_7_2 import Config, MAP - -MAP = CampaignMap('7-2') -MAP.shape = 'H5' -MAP.map_data = ''' - ME ++ ME -- ME ME -- SP - MM ++ ++ MM -- -- ME -- - ME -- ME MB ME -- ME MM - -- ME -- MM -- ME ++ ++ - SP -- ME ME -- ME ++ ++ -''' -MAP.weight_data = ''' - 40 30 30 30 30 30 30 30 - 20 20 20 20 20 20 20 20 - 10 10 10 10 10 10 10 10 - 20 20 20 20 20 20 20 20 - 30 30 30 30 30 30 30 30 -''' -MAP.camera_data = ['D3'] -MAP.spawn_data = [ - {'battle': 0, 'enemy': 3}, - {'battle': 1, 'enemy': 2, 'mystery': 1}, - {'battle': 2, 'enemy': 2, 'mystery': 1}, - {'battle': 3, 'enemy': 1, 'mystery': 2}, - {'battle': 4, 'enemy': 1}, - {'battle': 5, 'boss': 1}, -] # MAP.in_map_swipe_preset_data = (-1, 0) A1, B1, C1, D1, E1, F1, G1, H1, \ diff --git a/campaign/event_20200423_cn/d3.py b/campaign/event_20200423_cn/d3.py index 56a9612db..6eb79249f 100644 --- a/campaign/event_20200423_cn/d3.py +++ b/campaign/event_20200423_cn/d3.py @@ -14,6 +14,15 @@ MAP.map_data = ''' ME -- ME ME ME -- -- ++ -- -- ME ++ ++ ++ MS ME -- -- ''' +MAP.weight_data = ''' + 10 10 10 10 10 10 10 10 10 + 10 10 10 10 10 10 10 10 10 + 10 10 10 10 10 10 10 10 10 + 10 10 10 10 10 10 10 10 10 + 10 10 10 10 10 10 10 10 10 + 20 20 10 10 10 10 10 10 10 + 20 20 10 10 10 10 10 10 10 +''' MAP.camera_data = ['D3', 'D5', 'F3', 'F5'] MAP.spawn_data = [ {'battle': 0, 'enemy': 2, 'siren': 2}, diff --git a/module/handler/enemy_searching.py b/module/handler/enemy_searching.py index 070408398..055f2978a 100644 --- a/module/handler/enemy_searching.py +++ b/module/handler/enemy_searching.py @@ -9,8 +9,8 @@ from module.logger import logger class EnemySearchingHandler(InfoBarHandler, StoryHandler): MAP_ENEMY_SEARCHING_OVERLAY_TRANSPARENCY_THRESHOLD = 0.5 # Usually (0.70, 0.80). - MAP_ENEMY_SEARCHING_TIMEOUT_SECOND = 4.5 - in_stage_timer = Timer(1, count=3) + MAP_ENEMY_SEARCHING_TIMEOUT_SECOND = 5 + in_stage_timer = Timer(1, count=2) def enemy_searching_color_initial(self): MAP_ENEMY_SEARCHING.load_color(self.device.image) @@ -48,10 +48,15 @@ class EnemySearchingHandler(InfoBarHandler, StoryHandler): timeout = Timer(self.MAP_ENEMY_SEARCHING_TIMEOUT_SECOND) appeared = False while 1: - timeout.start() + if self.is_in_map(): + timeout.start() + else: + timeout.reset() + if self.handle_in_stage(): return True if self.handle_story_skip(): + timeout.limit = 10 timeout.reset() if self.enemy_searching_appear(): appeared = True