diff --git a/source/component/plant.py b/source/component/plant.py index 8c85334..a4e4a59 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -1279,18 +1279,20 @@ class TorchWood(Plant): def idling(self): for i in self.bullet_group: - if i.name == c.BULLET_PEA: - if i.passed_torchwood_x != self.rect.centerx: - if abs(i.rect.centerx - self.rect.centerx) <= 20: - self.bullet_group.add(Bullet(i.rect.x, i.rect.y, i.dest_y, - c.BULLET_FIREBALL, c.BULLET_DAMAGE_FIREBALL_BODY, effect=c.BULLET_EFFECT_UNICE, passed_torchwood_x=self.rect.centerx)) - i.kill() - elif i.name == c.BULLET_PEA_ICE: - if i.passed_torchwood_x != self.rect.centerx: - if abs(i.rect.centerx - self.rect.centerx) <= 20: - self.bullet_group.add(Bullet(i.rect.x, i.rect.y, i.dest_y, - c.BULLET_PEA, c.BULLET_DAMAGE_NORMAL, effect=None, passed_torchwood_x=self.rect.centerx)) - i.kill() + if (i.name == c.BULLET_PEA + and i.passed_torchwood_x != self.rect.centerx + and abs(i.rect.centerx - self.rect.centerx) <= 20): + self.bullet_group.add(Bullet(i.rect.x, i.rect.y, i.dest_y, + c.BULLET_FIREBALL, c.BULLET_DAMAGE_FIREBALL_BODY, + effect=c.BULLET_EFFECT_UNICE, passed_torchwood_x=self.rect.centerx)) + i.kill() + elif (i.name == c.BULLET_PEA_ICE + and i.passed_torchwood_x != self.rect.centerx + and abs(i.rect.centerx - self.rect.centerx)): + self.bullet_group.add(Bullet(i.rect.x, i.rect.y, i.dest_y, + c.BULLET_PEA, c.BULLET_DAMAGE_NORMAL, + effect=None, passed_torchwood_x=self.rect.centerx)) + i.kill() class StarFruit(Plant): def __init__(self, x, y, bullet_group, level):