From e1dfa8558f11237a875b1ca0075bdfc107746077 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, 5 Apr 2022 11:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=A4=A7=E5=98=B4=E8=8A=B1?= =?UTF-8?q?=E6=94=BB=E5=87=BB=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/plant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/component/plant.py b/source/component/plant.py index 909c387..7c6cc12 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -429,7 +429,7 @@ class Chomper(Plant): def canAttack(self, zombie): if (self.state == c.IDLE and zombie.state != c.DIGEST and self.rect.x <= zombie.rect.right and - (self.rect.right + c.GRID_X_SIZE // 3 >= zombie.rect.x)): + (self.rect.right + c.GRID_X_SIZE >= zombie.rect.x)): return True return False