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

script_enemy_main {
  #include_function ".\AnimationLib.dnh"
  #include_function ".\function_cutin.txt"
  let imgNue = GetCurrentScriptDirectory ~ "KE.png";
  let Cut = GetCurrentScriptDirectory ~ "KeCut.png";
  let qwe = GetCurrentScriptDirectory ~ "supershot.txt";
 let cir = GetCurrentScriptDirectory ~ "circle.png";
 let cha = GetCurrentScriptDirectory ~ "ch.png";
 let spbg1 = GetCurrentScriptDirectory ~ "bg1.png";
 let spbg2 = GetCurrentScriptDirectory ~ "bg2.png";
  @Initialize {
  cutin("NAZRIN", "Hidden Sign''Go-Hanazono Crisis''",Cut,0,0,292,512);
  
   LoadUserShotData(qwe);
   SetScore(30000);
    SetLife(15000);
	SetTimer(60);
    SetDurableSpellCard;
    LoadGraphic(imgNue);
    LoadGraphic(cir);
    LoadGraphic(cha);
    LoadGraphic(Cut);
    LoadGraphic(spbg1);
    LoadGraphic(spbg2);
   MagicCircle(false);
    InitializeAnimationData;
	
 
  
  
    Animate("nue", "idle", true);
   mus;
    ShowOffNueAnimation;
    
  }
  let po=0;
  
  task mm{ loop{yield;
	SetMovePosition03(GetX,GetY-10,14,66);
		wait(30);
		SetMovePosition03(GetX,GetY+10,14,66);
		wait(30);
		
		
	
  }}
  @MainLoop {SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 16);
    yield ;
	if(po>1){
	
		
		ae-=0.004;
		
		
	
  }
  
  
  
  if(po>30){po=29;
 mm;}
  
  
  
  
  
  
  
  }let wave=0;
  let x=0;let y=0;let z=0;let dir=60;let dor=60; let sa=0;
  @DrawLoop {
    
	 
	 
	 sa+=1;
	  
	  
	  
	   SetTexture(cir);SetAlpha(150);
 
	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);
   
   //////
   //GetX + dir*cos(dor), GetY + dir*sin(dor);
   

	 
   
  
  
   
    SetTexture(imgNue);SetAlpha(255);SetGraphicScale(1,1);SetRenderState(ALPHA);
	  SetGraphicAngle(y, 0, 0);
    DrawAnimatedSprite("nue", GetX, GetY);
  }
  @BackGround{
  
 
	
	
  
  
  
  SetTexture(spbg1);SetAlpha(255);
 SetColor(210,210,230);
	SetGraphicRect(0,0,256,256);
	SetGraphicScale(2,2);


	
	DrawGraphic(GetCenterX,GetCenterY);
	
	 SetTexture(spbg2);SetAlpha(150);
 
	SetGraphicRect(0,0,16000,16000);
	SetGraphicScale(1,1);


	SetGraphicAngle(0, 0, 0);
	DrawGraphic(GetCenterX-z/2,GetCenterY-z);
	 SetTexture(spbg2);SetAlpha(150);
 
	SetGraphicRect(0,0,16000,16000);
	SetGraphicScale(1,1);


	SetGraphicAngle(0, 0, 0);
	DrawGraphic(GetCenterX-z/2,GetCenterY-z);
  z=z+2;
  }
 task charge{
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch02.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 wait(60);
 }
  task mus{}
  @Finalize {
    DeleteGraphic(imgNue);
   
  }
  
  
  let ang=0;let ab=0;let ang2=0;let ab2=0;
  
  let ae=20;
 
  
  let angle=270;let sp=3;let a=0;let angle2=0;let xx=610;let yy=0;let an=0;let spd=1;
 let sp2=0;
 
 task flo{
 
 
 /*wait(560);
 loop{yield;
 wait(240);
 loop(60){wait(1);
 CreateShotA(121212,GetX,GetY,10);
   SetShotDataA(121212,0,1,90,0,0,-2,155);
   SetShotDataA_XY(121212, 60,1, rand(-5,5), rand(-5,5), 0.09, rand(-5,5), 58, 252);
 FireShot(121212);
 
 }
 
 
 }*/
 
 
 }let aaa=0;
 task ch{wait(660);
 
 charge;
	wait(90);
 }
 
  task ShowOffNueAnimation {
 
  
  
  
    wait(20);sp=0;
    
	
	
	 SetMovePosition03(GetCenterX, GetCenterY-90, 20, 4);
	 if(GetEnemyX<GetCenterX){
      SetNueMoveAnimation("right");}
	   if(GetEnemyX>GetCenterX){
      SetNueMoveAnimation("left");}
      yield ;
      while(GetSpeed>0.1){yield;}
	 charge;
      wait(30);
     
	  wait(30);
	  Animate("nue", "start cast", false);
	loop {yield ;  
	
	  // Animate("nue", "start cast", false);
	 
	 sp2+=10;
	 
	  wait(1);
	
	

	//if(sp>GetClipMaxX+222){sp=0;}
	
	
	
	
	
	
	
	
	break;
	
	  
	  
	
    }
	
	task qw{loop{yield;sa+=10;}}
	wait(30);
	qw;
	
	
	
	
	
	wait(30);
	charge;
	wait(90);
	
	
	task bbl{
	
	PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
	loop(20){
	bb;
	anglebb+=360/20;}
	
	
	
	}let anglebla=0;let a4=0;
	task bla{loop(20){wait(5);PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan02.wav");a4+=5;
	bua;
	
	}}
	task bua{
	 let obj1=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj1,GetX);
	Obj_SetY(obj1,GetY);
	Obj_SetSpeed(obj1,5);
	Obj_SetAngle(obj1,GetAngleToPlayer);
	ObjShot_SetBombResist(obj1,true);
	ObjShot_SetGraphic(obj1,197);
	ObjShot_SetDelay(obj1,5);
	

	while(!Obj_BeDeleted(obj1)){yield;
	Obj_SetAutoDelete(obj1,true);
	
	}}
	task bla2{loop(20){wait(5);PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan02.wav");a4+=-5;
	
	bua;
	

	
	}}
	
	
	
	
	
	
	
	loop {yield ; 

	wait(30);
	loop(18){
	bub;sa+=20;
	angle2+=360/18;
	}angle2=0;
	wait(60);
	charge;
	wait(90);
	 SetMovePosition03(GetClipMaxX-rand(250, 50), GetClipMinY+rand(80, 400), 20, 4);
       SetNueMoveAnimation("right");
      
      yield ;
      while(GetSpeed>0.1){yield;}
	  wait(30);
	  Animate("nue", "start cast", false);
	  bla;
	loop(30){wait(5);aaa+=30;bbl;}
	
	
	
	
	
	charge;
	wait(90);	
	wait(30);

	loop(18){
	bub;sa+=20;
	angle2+=360/18;
	}angle2=0;
	wait(60);
	charge;
	wait(90);
	 SetMovePosition03(GetClipMinX+rand(50, 250), GetClipMinY+rand(8,400), 20, 4);
      SetNueMoveAnimation("left");
      yield ;
      while(GetSpeed>0.1){yield;}
	  wait(30);
	  Animate("nue", "start cast", false);bla2;
	loop(30){wait(5);aaa+=30;bbl;}
	
	}
	
	
	
	
	
	
	
	
  }
  
  
  
  
  
  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, 61, 80);
    SetAnimationFrame("nue", "idle", 1, imgNue,12, 68, 0, 61+61, 80);
    SetAnimationFrame("nue", "idle", 2, imgNue, 12, 68+68, 0, 61+61+61, 80);
    SetAnimationFrame("nue", "idle", 3, imgNue, 12, 68+68+66, 0, 61+61+61+61, 80);
   
    
    CreateAnimation("nue", "start move right", 4);
    SetAnimationFrame("nue", "start move right", 0, imgNue, 8, 0, 80, 63, 159);
    SetAnimationFrame("nue", "start move right", 1, imgNue, 8, 63, 79, 128, 158);
    SetAnimationFrame("nue", "start move right", 2, imgNue, 8, 131, 82, 196, 157);
    SetAnimationFrame("nue", "start move right", 3, imgNue, 8, 194, 85, 253, 152);
    
    CreateAnimation("nue", "stop move right", 3);
    SetAnimationFrame("nue", "stop move right", 0, imgNue, 4, 131, 82, 196, 157);
    SetAnimationFrame("nue", "stop move right", 1, imgNue, 4, 63, 79, 128, 158);
    SetAnimationFrame("nue", "stop move right", 2, imgNue, 4, 0, 80, 63, 159);
    
    CreateAnimation("nue", "start move left", 4);
    SetAnimationFrame("nue", "start move left", 0, imgNue, 8, 195, 240, 255, 316);
    SetAnimationFrame("nue", "start move left", 1, imgNue, 8, 129, 240, 194, 314);
    SetAnimationFrame("nue", "start move left", 2, imgNue, 8, 65, 240, 130, 315);
    SetAnimationFrame("nue", "start move left", 3, imgNue, 8, 0, 240, 66, 313);
    
    CreateAnimation("nue", "stop move left", 3);
    SetAnimationFrame("nue", "stop move left", 0, imgNue, 4, 65, 240, 130, 315);
    SetAnimationFrame("nue", "stop move left", 1, imgNue, 4, 129, 240, 194, 314);
    SetAnimationFrame("nue", "stop move left", 2, imgNue, 4, 195, 240, 255, 316);
    
    CreateAnimation("nue", "start cast", 4);
    SetAnimationFrame("nue", "start cast", 0, imgNue, 6, 0,160,64,240);
    SetAnimationFrame("nue", "start cast", 1, imgNue, 6, 67,159,132,237);
    SetAnimationFrame("nue", "start cast", 2, imgNue, 6, 129,160,194,237);
    SetAnimationFrame("nue", "start cast", 3, imgNue, 6, 195,158,255,234);
  
    
    CreateAnimation("nue", "stop cast", 3);
    SetAnimationFrame("nue", "stop cast", 0, imgNue, 4, 129,160,194,237);
    SetAnimationFrame("nue", "stop cast", 1, imgNue, 4, 67,159,132,237);
  
    SetAnimationFrame("nue", "stop cast", 2, imgNue, 4, 0,160,64,240);
 
 
  }
  let anglebb=0;
  task bb{
  let obj12224=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj12224,GetX);
	Obj_SetY(obj12224,GetY);
	Obj_SetSpeed(obj12224,3);
	Obj_SetAngle(obj12224,anglebb+aaa);
	ObjShot_SetBombResist(obj12224,true);
	ObjShot_SetGraphic(obj12224,209);
	ObjShot_SetDelay(obj12224,1);
	

	while(!Obj_BeDeleted(obj12224)){yield;
	Obj_SetAutoDelete(obj12224,true); 
wait(rand(10,60));
  ObjShot_FadeDelete(obj12224);
 
  
  
  
  }}
  
  task bub{
   task bub22(x,y,an){
   let obj1122=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj1122,x);
	Obj_SetY(obj1122,y);
	Obj_SetSpeed(obj1122,0.5);
	Obj_SetAngle(obj1122,an+aaa);
	ObjShot_SetBombResist(obj1122,true);
	ObjShot_SetGraphic(obj1122,14);
	ObjShot_SetDelay(obj1122,5);
	

	while(!Obj_BeDeleted(obj1122)){yield;
	Obj_SetAutoDelete(obj1122,true);   }
  
  }
  task bub2{
  
 
   let obj122=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj122,Obj_GetX(obj12));
	Obj_SetY(obj122,Obj_GetY(obj12));
	Obj_SetSpeed(obj122,1.3);
	Obj_SetAngle(obj122,Obj_GetAngle(obj12)+180-45);
	ObjShot_SetBombResist(obj122,true);
	ObjShot_SetGraphic(obj122,15);
	ObjShot_SetDelay(obj122,5);
	

	while(!Obj_BeDeleted(obj122)){yield;
	Obj_SetAutoDelete(obj122,true); wait(90);
ObjShot_FadeDelete(obj122);
  Obj_Delete(obj122);	}}
	task bub3{
	let obj1222=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj1222,Obj_GetX(obj12));
	Obj_SetY(obj1222,Obj_GetY(obj12));
	Obj_SetSpeed(obj1222,1.3);
	Obj_SetAngle(obj1222,Obj_GetAngle(obj12)+180+45);
	ObjShot_SetBombResist(obj1222,true);
	ObjShot_SetGraphic(obj1222,15);
	ObjShot_SetDelay(obj1222,5);
	

	while(!Obj_BeDeleted(obj1222)){yield;
	Obj_SetAutoDelete(obj1222,true); 
wait(90);PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_kira00.wav");
bub22(Obj_GetX(obj1222),Obj_GetY(obj1222),Obj_GetAngle(obj1222)+90);
bub22(Obj_GetX(obj1222),Obj_GetY(obj1222),Obj_GetAngle(obj1222)+180);
bub22(Obj_GetX(obj1222),Obj_GetY(obj1222),Obj_GetAngle(obj1222)+270);
bub22(Obj_GetX(obj1222),Obj_GetY(obj1222),Obj_GetAngle(obj1222)+0);



ObjShot_FadeDelete(obj12);
  Obj_Delete(obj12);
  ObjShot_FadeDelete(obj1222);
  Obj_Delete(obj1222);
	}
	
	
	
	
	}PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
  let obj12=Obj_Create(OBJ_SHOT);
	Obj_SetX(obj12,GetPlayerX + 100*cos(sa));
	Obj_SetY(obj12,GetPlayerY + 100*sin(sa));
	Obj_SetSpeed(obj12,0.5);
	Obj_SetAngle(obj12,angle2+GetAngleToPlayer+180);
	ObjShot_SetBombResist(obj12,true);
	ObjShot_SetGraphic(obj12,231);
	ObjShot_SetDelay(obj12,40);
	

	while(!Obj_BeDeleted(obj12)){yield;
	Obj_SetAutoDelete(obj12,true);
  wait(120);
  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_kira00.wav");
  bub2;
  bub3;
  ObjShot_FadeDelete(obj12);
  Obj_Delete(obj12);
  
  
  
  
  }}
  
  
  
  
  
  
  
  
  
}










script_enemy fam{let fi=0;
    let gr = GetCurrentScriptDirectory ~ "circle2.png";
    let gr2 = GetCurrentScriptDirectory ~ "h1.png";
  let dir=0;
  let r=80;let frame2=0;let d=0;
  @Initialize{
  SetLife(112000);
  LoadGraphic(gr);
  LoadGraphic(gr2);
  main;
  }
  @MainLoop{yield;
  SetCollisionA(GetX, GetY, 20);
        //SetCollisionB(GetX, GetY, 16);
  }
  @DrawLoop{
   SetTexture(gr);SetAlpha(155);
 SetGraphicAngle(0,0,-dir*2);
 
	SetGraphicRect(0,0,126,127);
	SetGraphicScale(0.5,0.5);
	DrawGraphic(GetX,GetY);
	
	
	 SetTexture(gr);SetAlpha(95);
 SetGraphicAngle(0,0,dir);
 
	SetGraphicRect(0,0,126,127);
	SetGraphicScale(0.8,0.8);
	DrawGraphic(GetX,GetY);
	
	 SetTexture(gr2);SetAlpha(255);
 SetGraphicAngle(0,0,(360-d)+20*cos(frame2*3));
 frame2+=1;
 d=2;
	SetGraphicRect(0,0,50,50);
	SetGraphicScale(1.8,1.8);
	DrawGraphic(GetX,GetY);
	
	
dir+=1;
sps+=6;
  }
  @Finalize{
  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan0.wav");
  
   
	
  }
  let angle2=0;
  task fir{
  wait(120);
  loop{yield;wait(90);angle+=30;
  loop(5){
   PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan02.wav");
   CreateShot01(GetX,GetY,2,a+angle2,56,0);
   CreateShot01(GetX,GetY,1.7,a+angle2+30,56,0);
   CreateShot01(GetX,GetY,1.4,a+angle2+60,56,0);
   CreateShot01(GetX,GetY,1.1,a+angle2+90,56,0);
  
  
   
  a+=360/5;
  }}}
  let rr=0;
  let dor=0;let rr2=0;
  task fire2{ PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
  loop(15){
   CreateShotA(1122,GetX,GetY,10);
   SetShotDataA(1122,0,1.5,rr,0.2,0,2,239);
   
   
  
   
   FireShot(1122);
   
    CreateShotA(11122,GetX,GetY,10);
   SetShotDataA(11122,0,1.3,rr,-0.2,0,2,240);
   
   
  
   
   FireShot(11122);
   
  rr+=360/15;
  
  }}
  
  
  task st2{task dde{loop{yield;rr2+=1;}}
  wait(1480);
  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch02.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 wait(90);wait(60);loop{yield;fire2;dde;
 wait(120);
  
  }
  }
  
  
  let angle=0;let sps=0;let dir2=0;
  task main{fir;st2;
  loop{yield;
  SetMovePosition03(GetEnemyX+100*cos(dir2),GetEnemyY+100*sin(dir2),3,6);
  dir2+=1;
  
  }
  }
  
  
  
  
  let angle2=0;
 
  let a=0;let s=0;let g=0;
  
  
  
  
   function wait(t){
    loop(t){yield;}
  }
  }
  

//////////////
script_enemy fam2{let fi=0;
    let gr = GetCurrentScriptDirectory ~ "circle2.png";
    let gr2 = GetCurrentScriptDirectory ~ "h3.png";
  let dir=0;
  let r=80;let frame2=0;let d=0;
  @Initialize{
  SetLife(112000);
  LoadGraphic(gr);
  LoadGraphic(gr2);
  main;
  }
  @MainLoop{yield;
  SetCollisionA(GetX, GetY, 20);
        //SetCollisionB(GetX, GetY, 16);
  }
  @DrawLoop{
   SetTexture(gr);SetAlpha(155);
 SetGraphicAngle(0,0,-dir*2);
 
	SetGraphicRect(0,0,126,127);
	SetGraphicScale(0.5,0.5);
	DrawGraphic(GetX,GetY);
	
	
	 SetTexture(gr);SetAlpha(95);
 SetGraphicAngle(0,0,dir);
 
	SetGraphicRect(0,0,126,127);
	SetGraphicScale(0.8,0.8);
	DrawGraphic(GetX,GetY);
	
	 SetTexture(gr2);SetAlpha(255);
 SetGraphicAngle(0,0,-(360-d)+20*cos(frame2*3));
 frame2+=1;
 d=2;
	SetGraphicRect(0,0,50,60);
	SetGraphicScale(1.8,1.8);
	DrawGraphic(GetX,GetY);
	
	
dir+=1;
sps+=6;
  }
  @Finalize{
  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan0.wav");
  
   
	
  }let angle=0;let a=0;
  task fire2{
  
  
  PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
  
  if(GetY>GetCenterY){
    CreateShot01(GetX,GetY,3.5,GetAngleToPlayer,226,10);
	
	
	 CreateShot01(GetX,GetY,3.2,GetAngleToPlayer+15,224,10);
    CreateShot01(GetX,GetY,2.9,GetAngleToPlayer+30,224,10);
    CreateShot01(GetX,GetY,2.6,GetAngleToPlayer+45,224,10);
    CreateShot01(GetX,GetY,2.3,GetAngleToPlayer+60,224,10);
    CreateShot01(GetX,GetY,2,GetAngleToPlayer+75,224,10);
   

	CreateShot01(GetX,GetY,3.2,GetAngleToPlayer-15,224,10);
    CreateShot01(GetX,GetY,2.9,GetAngleToPlayer-30,224,10);
    CreateShot01(GetX,GetY,2.6,GetAngleToPlayer-45,224,10);
    CreateShot01(GetX,GetY,2.3,GetAngleToPlayer-60,224,10);
    CreateShot01(GetX,GetY,2,GetAngleToPlayer-75,224,10);
  }else{
  
   CreateShot01(GetX,GetY,3.5,GetAngleToPlayer,226,10);
	
	
	 CreateShot01(GetX,GetY,3.2,GetAngleToPlayer+5,224,10);
    CreateShot01(GetX,GetY,2.9,GetAngleToPlayer+10,224,10);
    CreateShot01(GetX,GetY,2.6,GetAngleToPlayer+15,224,10);
    CreateShot01(GetX,GetY,2.3,GetAngleToPlayer+20,224,10);
    CreateShot01(GetX,GetY,2,GetAngleToPlayer+25,224,10);
   

	 CreateShot01(GetX,GetY,3.2,GetAngleToPlayer-5,224,10);
    CreateShot01(GetX,GetY,2.9,GetAngleToPlayer-10,224,10);
    CreateShot01(GetX,GetY,2.6,GetAngleToPlayer-15,224,10);
    CreateShot01(GetX,GetY,2.3,GetAngleToPlayer-20,224,10);
    CreateShot01(GetX,GetY,2,GetAngleToPlayer-25,224,10);}
  
  
  }
  task st2{
  wait(1000);
  
  Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 wait(90);wait(60);loop{yield;wait(120);fire2;}
  
  
  
  }
  
  
  
  
  
  
  task hire{
  
   wait(120);
  loop{yield;wait(70);
  loop(5){
  wait(4);
 
   PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
    CreateShot01(GetX,GetY,3,GetAngleToPlayer,224,10);
	
	
	
    CreateShot01(GetX,GetY,3,GetAngleToPlayer+20,224,10);
    CreateShot01(GetX,GetY,3,GetAngleToPlayer-20,224,10);

	
	
  a+=30;
  }
  
  
   /*PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
   CreateShot01(GetX,GetY,1.2,GetAngleToPlayer,224,5);
   CreateShot01(GetX+10,GetY,1.4,GetAngleToPlayer,224,5);
   CreateShot01(GetX+20,GetY,1.6,GetAngleToPlayer,224,5);
   CreateShot01(GetX+30,GetY,1.8,GetAngleToPlayer,224,5);
   CreateShot01(GetX+40,GetY,2,GetAngleToPlayer,224,5);
   
   CreateShot01(GetX,GetY,2,GetAngleToPlayer,224,5);
   CreateShot01(GetX+10,GetY,1.8,GetAngleToPlayer,224,5);
   CreateShot01(GetX+20,GetY,1.6,GetAngleToPlayer,224,5);
   CreateShot01(GetX+30,GetY,1.4,GetAngleToPlayer,224,5);
   CreateShot01(GetX+40,GetY,1.2,GetAngleToPlayer,224,5);8*/
 
  
  
  
  
  }
  }
  let angle=0;let sps=0;let dir2=0;
  task main{hire;st2;
  loop{yield;
  SetMovePosition03(GetEnemyX+100*cos(dir2),GetEnemyY+100*sin(dir2),2,6);
  dir2+=1;
  
  }
  }
  
  
  let angle2=0;
 
  let a=0;let s=0;let g=0;
  
  
  
  
   function wait(t){
    loop(t){yield;}
  }
  }
  





////////////
