def __init__(self, owner): self.RIFLE_RANGE = 4 self.RIFLE_INIT_DAMAGE = 10 self.AMMO_LIMIT = 6 self.AMMO_RECHARGE = 3 Weapon.__init__(self,self.RIFLE_RANGE, self.RIFLE_INIT_DAMAGE, owner) self.ammo = self.AMMO_LIMIT
def __init__(self, imageName=None, colorkey=None, clipRect=None, sound=None, soundVolume=1): Weapon.__init__(self, imageName, colorkey, clipRect, sound, soundVolume) self.attackAngle = 0 self.hip = math.sqrt(self.rect.w * self.rect.w + self.rect.h * self.rect.h) self.melee = True
def __init__(self, x, y, speedX, speedY, imageName=None, colorkey=None, clipRect=None): Weapon.__init__(self, imageName, colorkey, clipRect) self.rect = Rect(x, y, 0, 0) self.speedX = speedX self.speedY = speedY self.atk = 5 # Important if you want pinpoint accuracy self.floatX = float(self.rect.x) self.floatY = float(self.rect.y) self.angle = math.degrees(math.atan2(speedY, speedX)) self.flipH = True
def __init__(self, canvas): Weapon.__init__(self, MISSILE_DMG, MISSILE_STAM, MISSILE_IMG, MISSILE_IMG_EXPL, MISSILE_FIRE, MISSILE_EXPL, MISSILE_SPEED, MISSILE_COOLDOWN, TYPE_M, canvas)
def __init__(self): Weapon.__init__(self, "sw_weapons.png", -1, Rect(78, 24, 15, 18), "laser_shot.wav", 0.5) self.sheetCoord[0].append(Rect(132, 21, 16, 20)) self.cooldown = 0
def __init__(self, imageName=None, colorkey=None, clipRect=None): Weapon.__init__(self, imageName, colorkey, clipRect, "bow_shot.wav") self.cooldown = 0
def __init__(self, owner): self.AXE_RANGE = 1 self.AXE_INIT_DAMAGE = 40 Weapon.__init__(self, self.AXE_RANGE, self.AXE_INIT_DAMAGE, owner)
def __init__(self, canvas): Weapon.__init__(self, BOMB_DMG, BOMB_STAM, BOMB_IMG, BOMB_IMG_EXPL, BOMB_FIRE, BOMB_EXPL, BOMB_SPEED, BOMB_COOLDOWN, TYPE_B, canvas)
def __init__(self): Weapon.__init__(self, "items-1small.png", None, Rect(110, 120, 9, 11)) self.cooldown = 0
def __init__(self): Weapon.__init__(self, "wpns-modern2.png", -1, Rect(48, 28, 24, 17), "bullet_shot.ogg", 0.5) self.sheetCoord[0].append(pygame.Rect(82, 25, 26, 20)) self.cooldown = 0
def __init__(self, canvas): Weapon.__init__(self, MAINGUN_DMG, MAINGUN_STAM, LASER_GREEN, LASER_BLUE, LASER_FIRE, LASER_EXPL, MAINGUN_SPEED, MAINGUN_COOLDOWN, TYPE_L, canvas)
def __init__(self, imageName=None, colorkey=None, clipRect=None, *args): Weapon.__init__(self, sound="wolf_bite.wav", soundVolume=0.5) self.melee = True