This commit is contained in:
wszqkzqk 2022-08-09 20:23:47 +08:00
parent 08ec7e2d00
commit 777e937d98

View File

@ -1279,17 +1279,19 @@ 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:
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))
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:
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))
c.BULLET_PEA, c.BULLET_DAMAGE_NORMAL,
effect=None, passed_torchwood_x=self.rect.centerx))
i.kill()
class StarFruit(Plant):