def render(self, *args, **kw):
		Structure.render(self, *args, **kw)
		self.sparkt += 1
		if self.sparkt >= 30 and self.hp > 0:
			self.sparkt = 0
			hq = self.hq
			effects.add(effects.Spark(self.x, self.y, self.z + 22, hq.x, hq.y, hq.z + 10))
Exemplo n.º 2
0
	def attack(self, target):
		if self.t >= self.chargetime:
			self.t = 0
			effects.add(effects.BotBeam(self.x, self.y, self.z, target.x, target.y, self.z))
			target.hurt(self.strength, self)
Exemplo n.º 3
0
	def die(self):
		Attacker.die(self)
		effects.add(effects.Splat(self.x, self.y, self.z))
	def addeffect(self, target):
		effects.add(effects.LightningBolt(self.x, self.y, self.z + 22, target.x, target.y, target.z + 2, self.splashrange))
	def addeffect(self, target):
		effects.add(effects.LaserBeam(self.x, self.y, self.z + 22, target.x, target.y, target.z + 2))
	def addeffect(self, target):
		self.targets.append(target)
		target.addtractor(self)
		effects.add(effects.Tractor(self, target))
	def addeffect(self, target):
		effects.add(effects.Gunshot(self.x, self.y, self.z + 22, target.x, target.y, target.z + 2))
	def destroy(self):
		if self.destroyed: return
		jukebox.play_sound("destroyed")
		effects.add(effects.SmokeCloud(self.x, self.y, self.z))
		self.destroyed = True