From 1e28521f66db5dc963fdb65cba54862ea83ec7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Fri, 6 May 2022 13:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8A=E5=BC=B1=E5=9C=9F=E8=B1=86=E9=9B=B7?= =?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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/component/plant.py b/source/component/plant.py index ad858e5..1f71acf 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -592,7 +592,7 @@ class PotatoMine(Plant): self.is_init = True self.init_timer = 0 self.bomb_timer = 0 - self.explode_x_range = c.GRID_X_SIZE + self.explode_x_range = c.GRID_X_SIZE / 2 def loadImages(self, name, scale): self.init_frames = [] @@ -621,7 +621,7 @@ class PotatoMine(Plant): def canAttack(self, zombie): if (not self.is_init and zombie.rect.right >= self.rect.x and (not zombie.lostHead) and - (abs(zombie.rect.x - self.rect.x) <= self.explode_x_range * 0.7)): + (abs(zombie.rect.x - self.rect.x) <= self.explode_x_range)): return True return False