From b5bdf1234c13e5714ead8b7cf24101f0003e3659 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, 10 May 2022 17:06:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=A0=E7=BB=95=E6=B0=B4?= =?UTF-8?q?=E8=8D=89=E8=A2=AB=E6=AD=BB=E4=BA=A1=E5=83=B5=E5=B0=B8=E8=AF=AF?= =?UTF-8?q?=E8=A7=A6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/plant.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/component/plant.py b/source/component/plant.py index 542f065..76d3a20 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -1406,8 +1406,9 @@ class TangleKlep(Plant): self.frames = self.idle_frames def canAttack(self, zombie): - if pg.sprite.collide_circle_ratio(0.7)(zombie, self): - return True + if zombie.state != c.DIE and (not zombie.lostHead): + if pg.sprite.collide_circle_ratio(0.7)(zombie, self): + return True return False def setAttack(self, zombie, zombie_group):