"""
shotE.py - Small blue bullet by player
"""

import common
import shot
import explosionB

class ShotE(shot.Shot):

    # rect = 2d pos -> width and height will be appended!
    def __init__(self,rect,dir,level=0):
        rect   += [6,5]
        shot.Shot.__init__(self,0,rect)
        self.images  = common.images['ShotE']
        self.speed_x = 4*dir
        self.speed_y = 5
        self.level   = level
        self.damage  = 4+level*2

        common.shots_player.append(self)
        
    def move(self):
        r = self.rect
        r[0] += self.speed_x
        r[1] -= self.speed_y
        if r[0]+r[2] < -10 or r[0] > common.resolution[0]+10 or r[1]+r[3] < -10:
            common.shots_player.remove(self)

    def explode(self):
        explosionB.ExplosionB([self.rect[0],self.rect[1]])
