更改冰道设定

This commit is contained in:
星外之神 2022-05-14 12:01:58 +08:00
parent 8a934ebbb1
commit 5bb62383c5
2 changed files with 12 additions and 1 deletions

View File

@ -1715,4 +1715,11 @@ class FumeShroom(Plant):
class IceFrozenPlot(Plant): class IceFrozenPlot(Plant):
def __init__(self, x, y): def __init__(self, x, y):
Plant.__init__(self, x, y, c.ICE_FROZEN_PLOT, c.INF, None) Plant.__init__(self, x, y, c.ICE_FROZEN_PLOT, c.INF, None)
self.timer = 0
def idling(self):
if self.timer == 0:
self.timer = self.current_time
elif self.current_time - self.timer >= 30000:
self.health = 0

View File

@ -1208,6 +1208,10 @@ class Level(tool.State):
elif targetPlant.name == c.JALAPENO: elif targetPlant.name == c.JALAPENO:
self.boomZombies(targetPlant.rect.centerx, map_y, targetPlant.explode_y_range, self.boomZombies(targetPlant.rect.centerx, map_y, targetPlant.explode_y_range,
targetPlant.explode_x_range, effect=c.BULLET_EFFECT_UNICE) targetPlant.explode_x_range, effect=c.BULLET_EFFECT_UNICE)
# 消除冰道
for i in self.plant_groups[map_y]:
if i.name == c.ICE_FROZEN_PLOT:
i.health = 0
elif targetPlant.name == c.ICESHROOM and targetPlant.state != c.SLEEP: elif targetPlant.name == c.ICESHROOM and targetPlant.state != c.SLEEP:
self.freezeZombies(targetPlant) self.freezeZombies(targetPlant)
elif targetPlant.name == c.HYPNOSHROOM and targetPlant.state != c.SLEEP: elif targetPlant.name == c.HYPNOSHROOM and targetPlant.state != c.SLEEP: