修改大嘴花能攻击的范围

This commit is contained in:
星外之神 2022-05-11 20:08:47 +08:00
parent 44a94e1ae3
commit 911ab88c38
2 changed files with 3 additions and 3 deletions

View File

@ -14,8 +14,8 @@
{"time":7000, "map_y":4, "name":"ScreenDoorZombie"},
{"time":8000, "map_y":4, "name":"ScreenDoorZombie"},
{"time":0, "map_y":1, "name":"NewspaperZombie"},
{"time":3000, "map_y":0, "name":"PoleVaultingZombie"},
{"time":0, "map_y":0, "name":"FootballZombie"},
{"time":0, "map_y":0, "name":"PoleVaultingZombie"},
{"time":6000, "map_y":0, "name":"FootballZombie"},
{"time":0, "map_y":2, "name":"ConeheadDuckyTubeZombie"},
{"time":80000, "map_y":2, "name":"ConeheadDuckyTubeZombie"}
]

View File

@ -612,7 +612,7 @@ class Chomper(Plant):
if (zombie.name in {c.POLE_VAULTING_ZOMBIE}) and (not zombie.jumped):
return False
elif (self.state == c.IDLE and zombie.state != c.DIGEST and
self.rect.x <= zombie.rect.right - 10 and (not zombie.lostHead) and
self.rect.x <= zombie.rect.centerx and (not zombie.lostHead) and
(self.rect.x + c.GRID_X_SIZE*2.6 >= zombie.rect.centerx)):
return True
return False