From 8fd178cf47c5db40fea204b8ff3472f0abc08ade 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, 3 May 2022 13:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E6=94=BB=E5=87=BB=E8=8C=83?= =?UTF-8?q?=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 1449b6b..a0331d5 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -596,7 +596,7 @@ class PuffShroom(Plant): def canAttack(self, zombie): if (self.rect.x <= zombie.rect.right and - (self.rect.x + c.GRID_X_SIZE * 3.5 >= zombie.rect.x) and (zombie.rect.left <= c.SCREEN_WIDTH)): + (self.rect.x + c.GRID_X_SIZE * 3.5 >= zombie.rect.x) and (zombie.rect.left <= c.SCREEN_WIDTH + 10)): return True return False