From ada7d690eb573b3efae3c0a838c44679ba2d2a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Sat, 14 May 2022 19:08:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B0=E8=BD=A6=E8=A2=AB=E5=9C=B0=E5=88=BA?= =?UTF-8?q?=E6=9D=80=E6=AD=BB=E5=90=8E=E4=B8=8D=E7=AB=8B=E5=88=BB=E7=88=86?= =?UTF-8?q?=E7=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/plant.py | 2 +- source/component/zombie.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/component/plant.py b/source/component/plant.py index 5518aab..d9106bd 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -848,7 +848,7 @@ class Spikeweed(Plant): if self.canAttack(zombie): # 有车的僵尸 if zombie.name in {c.ZOMBONI}: - zombie.health = 0 + zombie.health = zombie.lostHeadHealth killSelf = True else: zombie.setDamage(20, damageType=c.ZOMBIE_COMMON_DAMAGE) diff --git a/source/component/zombie.py b/source/component/zombie.py index 1742254..6d62bad 100755 --- a/source/component/zombie.py +++ b/source/component/zombie.py @@ -988,7 +988,7 @@ class Zomboni(Zombie): elif self.health <= c.ZOMBONI_DAMAGED1_HEALTH: self.changeFrames(self.walk_damaged1_frames) - if (self.current_time - self.walk_timer) > (c.ZOMBIE_WALK_INTERVAL * self.getTimeRatio()): + if (self.current_time - self.walk_timer) > (c.ZOMBIE_WALK_INTERVAL * self.getTimeRatio()) and (not self.lostHead): self.walk_timer = self.current_time if self.is_hypno: self.rect.x += 1