Example #1
0
	def hitany(self, objs):
		for h in objs:
			if not h.alive:
				continue
			if h.z > self.r:
				continue
			dx, dy = h.x - self.x, h.y - self.y
			if dx ** 2 + dy ** 2 < (self.r + h.r) ** 2:
				self.alive = False
				state.addsmoke(self, self.smokes)
				state.addsilver(self)
				h.causedamage()
Example #2
0
 def die(self):
     PirateShip.die(self)
     if random() < 0.2:
         state.addsilver(self)
Example #3
0
	def die(self):
		PirateShip.die(self)
		if random() < 0.2:
			state.addsilver(self)