diff --git a/source/component/plant.py b/source/component/plant.py index 143f431..d597971 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -1715,4 +1715,11 @@ class FumeShroom(Plant): class IceFrozenPlot(Plant): def __init__(self, x, y): - Plant.__init__(self, x, y, c.ICE_FROZEN_PLOT, c.INF, None) \ No newline at end of file + 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 \ No newline at end of file diff --git a/source/state/level.py b/source/state/level.py index 424c468..6dcd527 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -1208,6 +1208,10 @@ class Level(tool.State): elif targetPlant.name == c.JALAPENO: self.boomZombies(targetPlant.rect.centerx, map_y, targetPlant.explode_y_range, 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: self.freezeZombies(targetPlant) elif targetPlant.name == c.HYPNOSHROOM and targetPlant.state != c.SLEEP: