修改土豆雷设定

This commit is contained in:
星外之神 2022-05-06 14:32:07 +08:00
parent 1165e083cc
commit ba1788bf5c

View File

@ -593,7 +593,7 @@ class PotatoMine(Plant):
self.is_init = True self.is_init = True
self.init_timer = 0 self.init_timer = 0
self.bomb_timer = 0 self.bomb_timer = 0
self.explode_x_range = c.GRID_X_SIZE / 2 self.explode_x_range = c.GRID_X_SIZE * 0.6
def loadImages(self, name, scale): def loadImages(self, name, scale):
self.init_frames = [] self.init_frames = []
@ -621,8 +621,8 @@ class PotatoMine(Plant):
self.is_init = False self.is_init = False
def canAttack(self, zombie): def canAttack(self, zombie):
if (not self.is_init and zombie.rect.right >= self.rect.x and (not zombie.lostHead) and if (not self.is_init and (not zombie.lostHead) and
(abs(zombie.rect.x - self.rect.x) <= self.explode_x_range)): (abs(zombie.rect.x - self.rect.x) <= self.explode_x_range*(5/6))):
return True return True
return False return False