task missiles(){
  if(ObjEnemy_GetInfo(objBoss, INFO_LIFE) <= 0){return;} //Default kill to prevent (0,0) spawning
	//{
		let aux;
    
    let r = 0; let n = 0;
    let pos = []; let rani = 0;
	//}
	
  action();
  while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
    if(Obj_IsDeleted(objBoss)){break;}

    PlaySFXV(SFX_SHOT00, 18);
    ascent(i in 0..2){
      let a = r + 360/2*i; let b = n + 360/2*i;

      ascent(j in 0..7){
        aux = CShotA2(bx + rani*cos(b), by + rani*sin(b), 3, a+(360/7*j)*(-1 + i*2), 1/60, 4, AMULET_INV_AZURE - 7*i, 5);
      }
    }

    rani += 3; rani = (rani < 55) ? rani : 55;

    r += 13; n += 17; 
    wait(7);
  }
}

task action(){
  //{
		let aux;
    
    let r = 0; let n = 0;
    let pos = []; let rani = 0;
	//}

  wait(60*2.2); 
  while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
    if(Obj_IsDeleted(objBoss)){break;}
    
    PlaySFXV(SFX_SHOT01, 46);
    ascent(i in 0..21){
      let a = r + 360/21*i; 

      aux = CShotA1(bx, by, 3, a, LARGE_PURPLE, 11);
      ObjShot_SetSpellResist(aux, true);
    }

    r += 360/42 + rand(-4,4);
    wait(60*0.8);
  }
}