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()