       Crafty.e('PowerUp').powerUp(contains: 'diagonals', marking: 'D').color('#8080FF')
 
     @sequence(
+      => @entity.invincible = yes
       @animate 'slow', -1, 'eye'
       @disableWeapons()
       @parallel(

          @wait 500
        )
      )
      @enableWeapons()
      @async @placeSquad(Game.Scripts.Stage1BossRocket,
        options:

      @explosion(@location(), damage: 200, radius: 40)
    )

class Game.Scripts.Stage1BossHomingRocket extends Game.EntityScript
  spawn: (options) ->
    options = _.defaults(options,
      pointsOHit: 125
      pointsOnDestroy: 50
    )
    return null unless options.location?

    location = options.location?()
    return null unless location

    Crafty.e('Rocket').rocket(
      health: 250
      x: location.x - 30
      y: location.y - 8 + Math.round(Math.random() * 15)
      z: 0
      speed: 600
      pointsOnHit: options.pointsOnHit
      pointsOnDestroy: options.pointsOnDestroy
    )

  execute: ->
    @bindSequence 'Destroyed', @onKilled
    @sequence(
      @pickTarget('PlayerControlledShip')
      @movePath [
        @targetLocation()
        [-160, .5]
      ]
    )

  onKilled: ->
    @parallel(
      @screenShake(10, duration: 200)
      @explosion(@location(), damage: 200, radius: 40)
    )

class Game.Scripts.Stage1BossPopup extends Game.EntityScript
  assets: ->
