def FirePrimary(self): for i in range(6): shot = Shot(self.root, self.x, self.y) shot.owner = self.owner shot.direction = self.direction + (7 - random.randint(0, 15)) shot.speed = 100 + (20 - random.randint(0, 40)) radDirection = math.radians(shot.direction) shot.hspeed = math.cos(radDirection) * shot.speed + self.owner.hspeed/2 shot.vspeed = math.sin(radDirection) * -shot.speed shot.speed = math.hypot(shot.hspeed, shot.vspeed) self.refireAlarm = self.refireTime