#TouhouDanmakufu
#Title[Spell03]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
  #include_function ".\AnimationLib.dnh"
 
  let imgNue = GetCurrentScriptDirectory ~ "Nue.png";
  let cir = GetCurrentScriptDirectory ~ "circle.png";
  let qwe = GetCurrentScriptDirectory ~ "supershot.txt";
  let co=rand_int(1,5);
  let sp1= GetCurrentScriptDirectory ~ "spbg1.png";
  let sp2= GetCurrentScriptDirectory ~ "spbg2.png";
  
   let Cut = GetCurrentScriptDirectory ~ "NueCut.png";
 #include_function ".\function_cutin.txt"
  #include_function ".\Halo.txt"
  @Initialize { PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_cat00.wav");
  CreateAura01("RED",0,2);
   LoadUserShotData(qwe);
    SetLife(9000);
	SetTimer(45);
    //SetY(-120);
	yim;
    LoadGraphic(imgNue);
    LoadGraphic(cir);
    LoadGraphic(Cut);
    LoadGraphic(sp1);
    LoadGraphic(sp2);
    // SetDurableSpellCard;
	 SetScore(30000);
    InitializeAnimationData;
	  MagicCircle(false);
  cutin("NAZRIN", "Provocation | Cornered |",Cut,0,0,411,500);
    Animate("nue", "idle", true);
   mus;
    ShowOffNueAnimation;
    // CreateAura01;
  }
  
  task yim{loop{yield;
  
   if(GetTimer<11&&GetTimer>=0){PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_timeout.wav");wait(60);}
 
  }}let qeq=0;
  @MainLoop {
   yield ;
  SetCollisionA(GetX+qeq,GetY,10);
  SetCollisionB(GetX,GetY,10);
   
    }
  let wave=0;
  let x=0;
  @DrawLoop {
  
  
  
  
  
     SetTexture(imgNue);
	 if(col==255){
	 SetAlpha(255);
 }
  if(col<255){
	 SetAlpha(120);
 }
 SetGraphicRect(0,0,0,0);
	//SetColor(col,col,col);
	SetGraphicScale(1,1);


	SetGraphicAngle(0, 0, 0);
	DrawGraphic(GetX,GetY);
      DrawAnimatedSprite("nue", GetX, GetY+sin(wave*2)*2.2);
   
	    SetTexture(cir);SetAlpha(210);
 
	SetGraphicRect(0,0,128,127);
	SetGraphicScale(2+sin(wave)*0.2,2+sin(wave)*0.2);

wave+=3;x+=5;
	SetGraphicAngle(0, 0, x);
	DrawGraphic(GetX,GetY);
  
  
  

   
  }
  task mus{PlayMusic(GetCurrentScriptDirectory ~ ".\Sounds\Nue1.mp3");}
  
  
  
   @BackGround{
  
 
	 
	
  
   
  
      SetTexture(sp1);SetAlpha(255);
 
	SetGraphicRect(0,0,384,448);
	SetGraphicScale(1,1);


	SetGraphicAngle(0, 0, 0);
	DrawGraphic(GetCenterX,GetCenterY);
	
	
	  SetTexture(sp2);SetAlpha(125);
 
	SetGraphicRect(0,0,384+x/3,448+x/3);
	SetGraphicScale(1,1);


	SetGraphicAngle(0, 0, 0);
	DrawGraphic(GetCenterX,GetCenterY);
	
	
	 SetTexture(sp2);SetAlpha(125);
 
	SetGraphicRect(0,0,-384-x/3,448+x/3.2);
	SetGraphicScale(1,1);


	SetGraphicAngle(0, 0, 0);
	DrawGraphic(GetCenterX,GetCenterY);
	
	
	
	
  }
  
  
  
  
  @Finalize {
    DeleteGraphic(imgNue);
   
  }
  
  
 
  
 
  
  
  let anglel=0;let al=0;
  task las{
  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_lazer01.wav");al+=39;
  loop(15){
  CreateLaser01(GetX,GetY,3,anglel+al,300,15,4,5);
  CreateLaser01(GetX,GetY,3,anglel+al,110,-110,1,0);
  
  
  
 
  
  
  
  
  
  
  
  
  
  anglel+=360/15;
  }
  }let wawa=30;
  let ana=0;let anan=0;
  task blast{
  loop{yield;PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
  loop(4){
  CreateShot01(GetX,GetY,2,90+ana+anan,203,5);
  ana+=360/4;
  }
  wait(wawa);
  anan+=30;wawa-=0.2;
  
  
  
  
  
  
  }
  
  
  
  }
  let blan=0;
  let blana=0;
  
  
  task blasta{
  loop(25){
  
  loop(5){
  CreateShot01(GetX,GetY,1,blan+blana,95,10);
  blan+=360/5;
  }
  blana+=12;
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav"); 
 wait(15);
  
  }
  
  
  
  }

  let soe=0.5;let ttt=0;let angle2=0;
  task arrow{
  wait(360);
   Concentration02(60);
	  	  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch02.wav");
  wait(120);
  loop{ttt+=1;
  
  
  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_kira00.wav");


if(ttt>4){
 
loop(10){

CreateShotA(1,GetX,GetY,0);
   SetShotDataA(1,0,0.5,angle2,3,0,0,43);
   SetShotDataA(1,30,1,NULL,0.1,0,0,43);
   FireShot(1);
 
 CreateShotA(11,GetX,GetY,0);
   SetShotDataA(11,0,0.5,angle2,-3,0,0,43);
   SetShotDataA(11,30,1,NULL,-0.1,0,0,43);
   FireShot(11);
 
 angle2+=360/10;



}
  
  }


  loop(30){
  CreateShot01(GetX,GetY,soe,GetAngleToPlayer,12,0);
  CreateShot01(GetX,GetY,soe,GetAngleToPlayer+120,12,0);
  CreateShot01(GetX,GetY,soe,GetAngleToPlayer+240,12,0);
  
  
  soe+=0.1;
  }soe=0.5;
  
  
  
  
  
  
  
  wait(180);}
  
  }
  
  
  
  
  
  
  let wy=0;let wan=0;let waii=30;
  task walls{arrow;
  loop{waii-=3;if(waii<15){waii=15;}
  loop(9){
  wait(waii); PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
  loop(5){
 
 
  CreateShot01(GetClipMinX,wy+50,3-waii/15,wan,100,10);
  wy+=GetClipMaxY/5;
  }wy=0;
  wan+=10;}
 wan=0;
  
  loop(9){
  wait(waii); PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
  loop(5){
 
 
  CreateShot01(GetClipMaxX,wy+50,3-waii/15,wan+180,99,10);
  wy+=GetClipMaxY/5;
  }wy=0;
  wan+=-10;}
 wan=0;
  
  
  
  
  
  
  
  
  }
  
  }
  
  
  
  
  
  let col=255;
  
  task ShowOffNueAnimation {
  wait(60);
   if(GetX>GetCenterX){
	SetMovePosition03(GetCenterX, GetCenterY-50, 13, 4);
      SetNueMoveAnimation("left");}
	   if(GetX<GetCenterX){
	SetMovePosition03(GetCenterX, GetCenterY-50, 13, 4);
      SetNueMoveAnimation("right");}
	    if(GetX==GetCenterX){
	SetMovePosition03(GetCenterX, GetCenterY-50, 13, 4);
      SetNueMoveAnimation("right");}
      yield ;
      while(GetSpeed>0.1){yield;}

      wait(30);
	  Concentration02(60);
	  	  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch02.wav");
      wait(120);
walls;qeq=2222;
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_boon01.wav");

	 col=0;
	   Explosion01(GetX,GetY,11,1,60);
 Explosion01(GetX,GetY,11,1,60);
 Explosion01(GetX,GetY,6,1,60);
	
	 
	 
	   loop{
	   yield;
	   
	   wait(120);
	  SetMovePosition03(GetCenterX+rand(10,80), GetClipMinY+rand(40, 80), 20, 4);
	  
	  
      SetNueMoveAnimation("right");
	    yield ;
      while(GetSpeed>0.1){yield;}
	    wait(120);
	
	

      
	  
	   SetMovePosition03(GetCenterX-rand(10,80), GetClipMinY+rand(40, 80), 13, 4);
     
      SetNueMoveAnimation("left");
	 
	    yield ;
      while(GetSpeed>0.1){yield;}
	    wait(30);
	
	   }
  }
  
  task SetNueMoveAnimation(direction) {
    if(direction == "left"){
      Animate("nue", "start move left", false);
      yield ;
      while(GetSpeed>0.1){
        yield ;
      }
      Animate("nue", "stop move left", false);
    }
    if(direction == "right"){
      Animate("nue", "start move right", false);
      yield ;
      while(GetSpeed>0.1){
        yield ;
      }
      Animate("nue", "stop move right", false);
    }
    wait(12);
    Animate("nue", "idle", true);
  }
  
  function wait(t){
    loop(t){yield;}
  }
  
  sub InitializeAnimationData {
    CreateAnimation("nue", "idle", 4);
    SetAnimationFrame("nue", "idle", 0, imgNue, 12, 0, 0, 96, 112);
    SetAnimationFrame("nue", "idle", 1, imgNue, 12, 96, 0, 192, 112);
    SetAnimationFrame("nue", "idle", 2, imgNue, 12, 192, 0, 288, 112);
    SetAnimationFrame("nue", "idle", 3, imgNue, 12, 288, 0, 384, 112);
    
    CreateAnimation("nue", "start move right", 4);
    SetAnimationFrame("nue", "start move right", 0, imgNue, 8, 0, 112, 96, 224);
    SetAnimationFrame("nue", "start move right", 1, imgNue, 8, 96, 112, 192, 224);
    SetAnimationFrame("nue", "start move right", 2, imgNue, 8, 192, 112, 288, 224);
    SetAnimationFrame("nue", "start move right", 3, imgNue, 8, 288, 112, 384, 224);
    
    CreateAnimation("nue", "stop move right", 3);
    SetAnimationFrame("nue", "stop move right", 0, imgNue, 4, 288, 112, 384, 224);
    SetAnimationFrame("nue", "stop move right", 1, imgNue, 4, 192, 112, 288, 224);
    SetAnimationFrame("nue", "stop move right", 2, imgNue, 4, 96, 112, 192, 224);
    
    CreateAnimation("nue", "start move left", 4);
    SetAnimationFrame("nue", "start move left", 0, imgNue, 8, 0, 224, 96, 336);
    SetAnimationFrame("nue", "start move left", 1, imgNue, 8, 96, 224, 192, 336);
    SetAnimationFrame("nue", "start move left", 2, imgNue, 8, 192, 224, 288, 336);
    SetAnimationFrame("nue", "start move left", 3, imgNue, 8, 288, 224, 384, 336);
    
    CreateAnimation("nue", "stop move left", 3);
    SetAnimationFrame("nue", "stop move left", 0, imgNue, 4, 288, 224, 384, 336);
    SetAnimationFrame("nue", "stop move left", 1, imgNue, 4, 192, 224, 288, 336);
    SetAnimationFrame("nue", "stop move left", 2, imgNue, 4, 96, 224, 192, 336);
    
    CreateAnimation("nue", "start cast", 5);
    SetAnimationFrame("nue", "start cast", 0, imgNue, 4, 0,336,96,448);
    SetAnimationFrame("nue", "start cast", 1, imgNue, 4, 96,336,192,448);
    SetAnimationFrame("nue", "start cast", 2, imgNue, 4, 192,336,288,448);
    SetAnimationFrame("nue", "start cast", 3, imgNue, 4, 288,336,384,448);
    SetAnimationFrame("nue", "start cast", 4, imgNue, 4, 384,336,480,448);
    
    CreateAnimation("nue", "stop cast", 4);
    SetAnimationFrame("nue", "stop cast", 0, imgNue, 4, 384,336,480,448);
    SetAnimationFrame("nue", "stop cast", 1, imgNue, 4, 288,336,384,448);
    SetAnimationFrame("nue", "stop cast", 2, imgNue, 4, 192,336,288,448);
    SetAnimationFrame("nue", "stop cast", 3, imgNue, 4, 96,336,192,448);
 
  }
}


















let obj=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj,GetX);
	Obj_SetY(obj,GetY);
	Obj_SetSpeed(obj,0);
	Obj_SetAngle(obj,a);
	ObjShot_SetBombResist(obj,true);
	ObjShot_SetGraphic(obj,203);
	ObjShot_SetDelay(obj,0);
	

	while(!Obj_BeDeleted(obj)){yield;
	Obj_SetAutoDelete(obj,true);
	

  
      


	
	
	}}


	
	
	script_enemy fam{
	SetCommonData("speed",0);
	#include_function ".\AnimationLib.dnh"
	let fi=0;
    let imgNue = GetCurrentScriptDirectory ~ "ufo2.png";
  let dir=0;
  let r=0;
  @Initialize{vg;
  SetLife(2000);
  LoadGraphic(imgNue);
  main;db;
  }let aa=0;
  task db{fi=rand_int(10,60);}
  task vg{vg2;
  dir=20;
  
   loop{
  yield;
  CreateShot01(GetX,GetY,3,44,162,20);}
  
  
  }
  
  task vg2{
  
  loop{
  firee;
  
  
  
  
  
  wait(1);}
  
  
  
  }
  
  
  
  @MainLoop{yield;
  
  if(GetX<GetEnemyX){aa+=dir;}else{r+=-dir;}
  SetCollisionA(GetX,GetY,20);
  SetCollisionB(GetX,GetY,10);
  }
  
  
  task firee{
  
  let obj=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj,GetX);
	Obj_SetY(obj,GetY);
	Obj_SetSpeed(obj,0);
	
	
	if(GetX<GetEnemyX){Obj_SetAngle(obj,aa);}
	if(GetX>GetEnemyX){Obj_SetAngle(obj,r+180);}
	
	
	ObjShot_SetBombResist(obj,true);
	ObjShot_SetGraphic(obj,152);
	ObjShot_SetDelay(obj,10);
	

	while(!Obj_BeDeleted(obj)){yield;
	Obj_SetAutoDelete(obj,true);
	
if(GetCommonData("speed")==1){
loop(80){
wait(5);
Obj_SetSpeed(obj,Obj_GetSpeed(obj)+0.07);
}break;

}
  
      


	
	
	}
  
  
  
  
  }
  
  
   task firee2{
  
  let obj2=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj2,GetX);
	Obj_SetY(obj2,GetY);
	Obj_SetSpeed(obj2,0);
	
	
	if(GetX<GetEnemyX){Obj_SetAngle(obj2,aa/2);}
	if(GetX>GetEnemyX){Obj_SetAngle(obj2,r/2+180);}
	
	
	ObjShot_SetBombResist(obj2,true);
	ObjShot_SetGraphic(obj2,17);
	ObjShot_SetDelay(obj2,10);
	

	while(!Obj_BeDeleted(obj2)){yield;
	Obj_SetAutoDelete(obj2,true);
	
if(GetCommonData("speed")==1){
loop(80){
wait(5);
Obj_SetSpeed(obj2,Obj_GetSpeed(obj2)+0.05);
}break;

}
  
      


	
	
	}
  
  
  
  
  }
  
  
  let tt=0;
  let tt2=0;
  
  @DrawLoop{re=20*cos(6*3);
  
  tt+=77;
  
  tt2=3;
    DrawAnimatedSprite("nue", GetX, GetY);
  }
  let sped=3;let ran=0;
  @Finalize{
  ran=rand(0,360);
 
  angle2=0;
  
  loop(20){
  
   CreateShotA(12,GetX,GetY,30);
   SetShotDataA(12,0,0,0,0,0,0,200);
 
   FireShot(12);
  
   CreateShotA(12,GetX,GetY,0);
   SetShotDataA(12,0,1,angle2,6,0,0,155);
   SetShotDataA(12,60,1,NULL,-0.1,0,0,155);
   FireShot(12);
  
  
  
 
 CreateShotA(11,GetX,GetY,0);
   SetShotDataA(11,0,2,angle2,-6,0,0,155);
   SetShotDataA(11,60,2,NULL,0.15,0,0,155);
   FireShot(11);
  angle2+=360/20;
  }
  
  
  
  
  
  
  }
  let angle=0;
  task main{
    CreateAnimation("nue", "idle", 4);
    SetAnimationFrame("nue", "idle", 0, imgNue, 12, 0, 143, 65, 198);
    SetAnimationFrame("nue", "idle", 1, imgNue, 12, 65, 143, 130, 198);
    SetAnimationFrame("nue", "idle", 2, imgNue, 12, 130, 143, 195, 198);
    SetAnimationFrame("nue", "idle", 3, imgNue, 12, 195, 143, 255, 198);
    
  
 
  Animate("nue", "idle", true);
  
  
 
 
 
  if(GetCommonData("count")==1)  {SetMovePosition03(GetX+400,GetY,1,4);}
  if(GetCommonData("count")==2)  {SetMovePosition03(GetX-400,GetY,1,4);}
  if(GetCommonData("count")==3)  {loop(240){yield;SetMovePosition03(GetPlayerX,GetPlayerY,1,2);}SetLife(0)}
 wait(300);VanishEnemy;
  
  
  }
  let angle2=0;let re=0;
  task f{
  
  fi=1;
  
  }
  task fire2{PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_lazer01.wav");
  loop(10){
      CreateLaserC(1, GetX+rand(20,-20), GetY-20, 30, 40, 192, 0);
          SetLaserDataC(1, 0,rand(0.5,3), rand(0,180), rand(-0.05,0.05), 0.15, 10);
          
        
          FireShot(1); 
  
  }}let ae=0;
  task fg{
  loop{yield;a++;}
  }
  let a=0;let s=0;let angle=0;let sp=0.5;
  task fire{
 loop(60){
 yield;
 sp+=0.01;
 wait(5);
 //PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");

  CreateShot01(GetX,GetY,2,GetAngle+90,69,30);
 
 loop(3){
    CreateShotA(12,GetX,GetY,0);
   SetShotDataA(12,0,0.5,-ae+a+180,0,0,0,54);
   SetShotDataA(12,30,0.7,NULL,0,0,0,54);
   SetShotDataA(12,4,0.9,NULL,0,0,0,54);
   SetShotDataA(12,50,1.1,NULL,0,0,0,54);
   SetShotDataA(12,60,1.3,NULL,0,0,0,54);
   SetShotDataA(12,70,1.5,NULL,0,0,0,54);
   FireShot(12);
  
  ae+=360/3;
  }
 }sp=0.5;SetLife(0);
 
  }
  
  
  
  
  
  
  
  
  
  
  
   function wait(t){
    loop(t){yield;}
  }
  }
  


	script_enemy fam2{
	SetCommonData("speed",0);
	#include_function ".\AnimationLib.dnh"
	let fi=0;
    let imgNue = GetCurrentScriptDirectory ~ "ufo2.png";
  let dir=0;
  let r=0;
  @Initialize{vg;
  SetLife(2000);
  LoadGraphic(imgNue);
  main;db;
  }let aa=0;
  task db{fi=rand_int(10,60);}
  task vg{vg2;
  dir=20;
  loop{
  
  CreateShot01(GetX,GetY,3,44,197,20);
  firee2;
  
  
  
  wait(1);}
  
  
  
  }
  
  task vg2{
  firee3;
  loop{
  firee;
  
  
  
  
  
  wait(2);}
  
  
  
  }
  
  
  
  @MainLoop{yield;
  
  if(GetX<GetEnemyX){aa+=dir;}else{r+=-dir;}
  SetCollisionA(GetX,GetY,20);
  SetCollisionB(GetX,GetY,10);
  }
  
  
  task firee{
  
  let obj=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj,GetX);
	Obj_SetY(obj,GetY);
	Obj_SetSpeed(obj,0);
	
	
	if(GetX<GetEnemyX){Obj_SetAngle(obj,aa);}
	if(GetX>GetEnemyX){Obj_SetAngle(obj,r+180);}
	
	
	ObjShot_SetBombResist(obj,true);
	ObjShot_SetGraphic(obj,151);
	ObjShot_SetDelay(obj,10);
	

	while(!Obj_BeDeleted(obj)){yield;
	Obj_SetAutoDelete(obj,true);
	

  
      


	
	
	}
  
  
  
  
  }
  
  
   task firee2{
  
  let obj2=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj2,GetX);
	Obj_SetY(obj2,GetY);
	Obj_SetSpeed(obj2,0);
	
	
	if(GetX<GetEnemyX){Obj_SetAngle(obj2,aa/2);}
	if(GetX>GetEnemyX){Obj_SetAngle(obj2,r/2+180);}
	
	
	ObjShot_SetBombResist(obj2,true);
	ObjShot_SetGraphic(obj2,17);
	ObjShot_SetDelay(obj2,10);
	

	while(!Obj_BeDeleted(obj2)){yield;
	Obj_SetAutoDelete(obj2,true);
	

      


	
	
	}
  
  
  
  
  }
  
  
  
   task firee3{
  
  let obj22=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj22,GetX);
	Obj_SetY(obj22,GetY);
	Obj_SetSpeed(obj22,0);
	
	
	if(GetX<GetEnemyX){Obj_SetAngle(obj22,aa/2);}
	if(GetX>GetEnemyX){Obj_SetAngle(obj22,r/2+180);}
	
	
	ObjShot_SetBombResist(obj22,true);
	ObjShot_SetGraphic(obj22,rand_int(229,236));
	ObjShot_SetDelay(obj22,10);
	

	while(!Obj_BeDeleted(obj22)){yield;
	Obj_SetAutoDelete(obj22,true);
	

      


	
	
	}
  
  
  
  
  }
  
  
  
  
  
  
  
  let tt=0;
  let tt2=0;
  
  @DrawLoop{re=20*cos(6*3);
  
  tt+=77;
  
  tt2=3;
    DrawAnimatedSprite("nue", GetX, GetY);
  }
  let sped=3;let ran=0;
  @Finalize{
  ran=rand(0,360);
 
  angle2=0;
  
  loop(20){
  
  
  
   CreateShotA(12,GetX,GetY,0);
   SetShotDataA(12,0,1,angle2,3,0,0,9);
   SetShotDataA(12,30,1,NULL,0,0,0,9);
   FireShot(12);
  
   CreateShotA(122,GetX,GetY,0);
   SetShotDataA(122,0,0.5,angle2,-3,0,0,9);
   SetShotDataA(122,30,0.5,NULL,0,0,0,9);
   FireShot(122);
  
 
 
  angle2+=360/20;
  }
  
  
  
  
  
  
  }
  let angle=0;
  task main{
    CreateAnimation("nue", "idle", 4);
    SetAnimationFrame("nue", "idle", 0, imgNue, 12, 0, 143, 65, 198);
    SetAnimationFrame("nue", "idle", 1, imgNue, 12, 65, 143, 130, 198);
    SetAnimationFrame("nue", "idle", 2, imgNue, 12, 130, 143, 195, 198);
    SetAnimationFrame("nue", "idle", 3, imgNue, 12, 195, 143, 255, 198);
    
  
 
  Animate("nue", "idle", true);
  
  
 
 
 
  if(GetCommonData("count")==1)  {SetMovePosition03(GetX+400,GetY,1,4);}
  if(GetCommonData("count")==2)  {SetMovePosition03(GetX-400,GetY,1,4);}
 
 if(GetCommonData("count")==3)  {loop(160){yield;SetMovePosition03(GetPlayerX,GetPlayerY,26,2);}
 firee3;
   Explosion01(GetX,GetY,11,1,60);
 Explosion01(GetX,GetY,11,1,60);
 Explosion01(GetX,GetY,6,1,60);
	
 
  SetLife(0)}
 wait(300);VanishEnemy;
  
  
  }
  let angle2=0;let re=0;
  task f{
  
  fi=1;
  
  }
  task fire2{PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_lazer01.wav");
  loop(10){
      CreateLaserC(1, GetX+rand(20,-20), GetY-20, 30, 40, 192, 0);
          SetLaserDataC(1, 0,rand(0.5,3), rand(0,180), rand(-0.05,0.05), 0.15, 10);
          
        
          FireShot(1); 
  
  }}let ae=0;
  task fg{
  loop{yield;a++;}
  }
  let a=0;let s=0;let angle=0;let sp=0.5;
  task fire{
 loop(60){
 yield;
 sp+=0.01;
 wait(5);
 //PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");

  CreateShot01(GetX,GetY,2,GetAngle+90,69,30);
 
 loop(3){
    CreateShotA(12,GetX,GetY,0);
   SetShotDataA(12,0,0.5,-ae+a+180,0,0,0,54);
   SetShotDataA(12,30,0.7,NULL,0,0,0,54);
   SetShotDataA(12,4,0.9,NULL,0,0,0,54);
   SetShotDataA(12,50,1.1,NULL,0,0,0,54);
   SetShotDataA(12,60,1.3,NULL,0,0,0,54);
   SetShotDataA(12,70,1.5,NULL,0,0,0,54);
   FireShot(12);
  
  ae+=360/3;
  }
 }sp=0.5;SetLife(0);
 
  }
  
  
  
  
  
  
  
  
  
  
  
   function wait(t){
    loop(t){yield;}
  }
  }
  





