From 80fdac722027cbebb38ab941147dd78aa540be25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Tue, 7 Jun 2022 13:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=AF=81=E7=81=AD=E8=8F=87?= =?UTF-8?q?=E7=A7=8D=E6=A4=8D=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/state/level.py | 7 +++---- source/state/mainmenu.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/state/level.py b/source/state/level.py index 9c73ab2..89005c6 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -909,11 +909,10 @@ class Level(tool.State): elif self.plant_name == c.TANGLEKLEP: new_plant = plant.TangleKlep(x, y) elif self.plant_name == c.DOOMSHROOM: - if ((self.map_data[c.BACKGROUND_TYPE] in c.ON_ROOF_BACKGROUNDS) or - (self.map_data[c.BACKGROUND_TYPE] in c.POOL_EQUIPPED_BACKGROUNDS)): - new_plant = plant.DoomShroom(x, y, self.map.map[map_y][map_x][c.MAP_PLANT], explode_y_range=3) - else: + if self.map.gridHeightSize == c.GRID_Y_SIZE: new_plant = plant.DoomShroom(x, y, self.map.map[map_y][map_x][c.MAP_PLANT], explode_y_range=2) + else: + new_plant = plant.DoomShroom(x, y, self.map.map[map_y][map_x][c.MAP_PLANT], explode_y_range=3) elif self.plant_name == c.GRAVEBUSTER: new_plant = plant.GraveBuster(x, y, self.plant_groups[map_y], self.map, map_x) elif self.plant_name == c.FUMESHROOM: diff --git a/source/state/mainmenu.py b/source/state/mainmenu.py index 55649e4..143a920 100644 --- a/source/state/mainmenu.py +++ b/source/state/mainmenu.py @@ -97,8 +97,10 @@ class Menu(tool.State): # 高亮冒险模式按钮 if self.inAreaAdventure(x, y): self.adventure_highlight_time = self.current_time + # 高亮退出按钮 elif self.inAreaExit(x, y): self.exit_highlight_time = self.current_time + # 高亮小游戏按钮 elif self.inAreaLittleGame(x, y): self.littleGame_highlight_time = self.current_time @@ -126,8 +128,6 @@ class Menu(tool.State): x, y = mouse_pos if self.inAreaLittleGame(x, y): self.done = True - # 确实小游戏还是用的level - # 因为目前暂时没有生存模式和解谜模式,所以暂时设置为这样 self.persist[c.GAME_MODE] = c.MODE_LITTLEGAME # 播放点击音效 pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "buttonclick.ogg")).play()