From 3d978a737fbc246c413263ebee5bed066a26741d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Wed, 11 May 2022 23:36:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=93=E7=A2=91=E4=B8=AD=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=86=92=E5=87=BA=E8=B7=AF=E9=9A=9C=E5=83=B5=E5=B0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/menubar.py | 2 +- source/state/level.py | 6 +++++- source/state/mainmenu.py | 2 +- source/state/screen.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/component/menubar.py b/source/component/menubar.py index bcc8e3f..1100c23 100755 --- a/source/component/menubar.py +++ b/source/component/menubar.py @@ -550,4 +550,4 @@ class MoveBar(): def draw(self, surface): surface.blit(self.image, self.rect) for card in self.card_list: - card.draw(surface) \ No newline at end of file + card.draw(surface) diff --git a/source/state/level.py b/source/state/level.py index 990fa28..68ba268 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -220,7 +220,11 @@ class Level(tool.State): if current_time - self.waveTime > 1500: for item in self.graveSet: itemX, itemY = self.map.getMapGridPos(*item) - self.zombie_groups[item[1]].add(zombie.NormalZombie(itemX, itemY, self.head_group)) + # 目前设定:2/3概率普通僵尸,1/3概率路障僵尸 + if randint(0, 2): + self.zombie_groups[item[1]].add(zombie.NormalZombie(itemX, itemY, self.head_group)) + else: + self.zombie_groups[item[1]].add(zombie.ConeHeadZombie(itemX, itemY, self.head_group)) self.graveZombieCreated = True elif self.map_data[c.BACKGROUND_TYPE] in {c.BACKGROUND_POOL, c.BACKGROUND_FOG}: if not self.createdZombieFromPool: diff --git a/source/state/mainmenu.py b/source/state/mainmenu.py index 7e3265b..55649e4 100644 --- a/source/state/mainmenu.py +++ b/source/state/mainmenu.py @@ -175,4 +175,4 @@ class Menu(tool.State): surface.blit(self.bg_image, self.bg_rect) surface.blit(self.adventure_image, self.adventure_rect) surface.blit(self.exit_image, self.exit_rect) - surface.blit(self.littleGame_image, self.littleGame_rect) \ No newline at end of file + surface.blit(self.littleGame_image, self.littleGame_rect) diff --git a/source/state/screen.py b/source/state/screen.py index c76080b..c865f4d 100644 --- a/source/state/screen.py +++ b/source/state/screen.py @@ -54,4 +54,4 @@ class GameLoseScreen(Screen): return c.GAME_LOSE_IMAGE def set_next_state(self): - return c.LEVEL \ No newline at end of file + return c.LEVEL