冰车被地刺杀死后不立刻爆炸

This commit is contained in:
星外之神 2022-05-14 19:08:08 +08:00
parent 92beb00dff
commit ada7d690eb
2 changed files with 2 additions and 2 deletions

View File

@ -848,7 +848,7 @@ class Spikeweed(Plant):
if self.canAttack(zombie):
# 有车的僵尸
if zombie.name in {c.ZOMBONI}:
zombie.health = 0
zombie.health = zombie.lostHeadHealth
killSelf = True
else:
zombie.setDamage(20, damageType=c.ZOMBIE_COMMON_DAMAGE)

View File

@ -988,7 +988,7 @@ class Zomboni(Zombie):
elif self.health <= c.ZOMBONI_DAMAGED1_HEALTH:
self.changeFrames(self.walk_damaged1_frames)
if (self.current_time - self.walk_timer) > (c.ZOMBIE_WALK_INTERVAL * self.getTimeRatio()):
if (self.current_time - self.walk_timer) > (c.ZOMBIE_WALK_INTERVAL * self.getTimeRatio()) and (not self.lostHead):
self.walk_timer = self.current_time
if self.is_hypno:
self.rect.x += 1