
#Title[Spell01]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {#include_function ".\Halo.txt"
  #include_function ".\AnimationLib.dnh"
  #include_function ".\function_cutin.txt"
  let imgNue = GetCurrentScriptDirectory ~ "KE.png";
  let Cut = GetCurrentScriptDirectory ~ "TW.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";
 let name = GetCurrentScriptDirectory ~ "222.png";
 let name2 = GetCurrentScriptDirectory ~ "222.png";
  @Initialize {
  PlayMusic(GetCurrentScriptDirectory ~ ".\Sounds\st2.mp3");
  CreateAura01("RED",0,2);
   LoadUserShotData(qwe);
  
  
  
    SetLife(8000);
	SetTimer(50);
    SetDurableSpellCard;
    LoadGraphic(imgNue);
    LoadGraphic(name);
    LoadGraphic(name2);
    LoadGraphic(cir);
    LoadGraphic(cha);
    LoadGraphic(Cut);
    LoadGraphic(spbg1);
    LoadGraphic(spbg2);
    MagicCircle(false);
    InitializeAnimationData;
	inc;
 mus;
  
  
    Animate("nue", "idle", true);
   mus;
    ShowOffNueAnimation;
   //cutin("NAZRIN", "",Cut,0,0,229,485); 
  }
  let po=0;
  let qwer=0;
  task mm{ loop{yield;
	SetMovePosition03(GetX,GetY-10,14,1);
		wait(30);
		SetMovePosition03(GetX,GetY+10,14,1);
		wait(30);
		
		
	
  }}
  let wai=120;
let angleb=0;let aa=0;
  task blasta{
  wait(240);wai=15;
  loop{
  
aa+=15;
   PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
  loop(5){
  as+=72;
  CreateShot01(GetX+40*cos(as),GetY+40*sin(as),2.5,angleb+aa,32,10);
  angleb+=360/5;
  }
  wait(wai);
  
  }
  
  
  }
  let yyyy2=0;
  task inc{wait(110);
  loop(30){
  xxxx+=10;
  yield;
  }
  loop(60){
  xxxx+=1;
  yield;
  }
  
  loop(10){
  xxxx+=7;
  yield;
  }
   loop(54){yyyy2+=0.5;
  yyyy+=yyyy2;
  yield;
  }
  yyyy=-190;xxxx=GetCenterX+155;
    loop(5){
  yyyy+=1;
  yield;
  }
  
  
  
  
  }
  @MainLoop {SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 16);
    yield ;
	if(po>1){
	
		
	
		
	
  }
  
  
  
  
  
  
  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;let xxxx=0; let yyyy=0;let cds=0;
  @DrawLoop {
    
	  

	  
	 
	 
	  
	     SetTexture(cir);SetAlpha(150);
 
	SetGraphicRect(0,0,128,127);
	SetGraphicScale(2+sin(wave)*0.2,2+sin(wave)*0.2);

wave+=3;x+=3;
	SetGraphicAngle(0, 0, x);
	DrawGraphic(GetX,GetY);
	
	
	 SetTexture(cir);SetAlpha(90);
 
	SetGraphicRect(0,0,128,127);
	SetGraphicScale(2.3+sin(wave)*0.2,2.3+sin(wave)*0.2);


	SetGraphicAngle(0, 0, -x);
	DrawGraphic(GetX,GetY);
	
	 SetTexture(cir);SetAlpha(40);
 
	SetGraphicRect(0,0,128,127);
	SetGraphicScale(2.6+sin(wave)*0.2,2.6+sin(wave)*0.2);


	SetGraphicAngle(0, 0, x);
	DrawGraphic(GetX,GetY);
	
   //////
   //GetX + dir*cos(dor), GetY + dir*sin(dor);
   

	
  
  
   
    SetTexture(imgNue);SetAlpha(255);SetGraphicScale(1.3,1.3);SetRenderState(ALPHA);
	  SetGraphicAngle(y, 0, 0);
    DrawAnimatedSprite("nue", GetX, GetY+5*sin(dor));
	
	    SetTexture(name);SetAlpha(250);
 
	SetGraphicRect(0,0,325,36);
	SetGraphicScale(1,1);


	SetGraphicAngle(0, 0, 0);
	DrawGraphic(xxxx-150,230+yyyy);
	
	
	 dor+=6;
    
	
	
  }let yyt=0;
  @BackGround{
  
  angle55+=yyt;
	
	
  
   
	
///	
	
	
	
	///
	
	  SetTexture(spbg2);SetAlpha(255);
 //SetRenderState(ADD);
	SetGraphicRect(0,0,384,448);
	SetGraphicScale(1.1+0.01*sin(dor),1.1+0.01*sin(dor));
//SetRenderState(ALPHA);

	SetGraphicAngle(0, 0, 0);
	DrawGraphic(GetCenterX,GetCenterY);
	
	
	
  
SetTexture(spbg1);SetAlpha(155);
	SetRenderState(ADD);
 SetColor(210,210,230);
	SetGraphicRect(0,0,256,256);
	SetGraphicScale(2,2);
SetGraphicAngle(0, 0, dor/10);

	
	DrawGraphic(GetCenterX,GetCenterY);
	
  z=z+2;
  }let as=0;
 task charge{
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch02.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 wait(60);
 }
 let xc=160;
 let yc=148;
 let yc2=175;
 
 let co=0;
  task mus{
  loop{
  yield;
  if(co==1){
  if(GetPlayerX<GetCenterX-xc){SetPlayerX(GetCenterX-xc);}
  if(GetPlayerX>GetCenterX+xc+2){SetPlayerX(GetCenterX+xc+2);}
  
  
  
  if(GetPlayerY>GetCenterY+yc){SetPlayerY(GetCenterY+yc);}
  if(GetPlayerY<GetCenterY-yc2){SetPlayerY(GetCenterY-yc2);}
  
  
  
  }
  
  
  //if(GetPlayerX==GetClipMinX+xc){SetPlayerX(GetPlayerX);}
  
  
  }
  }
  @Finalize {
    DeleteGraphic(imgNue);
   
  }
  let ab=0;let ang=0;

 let choise=0;
	let choise2=0;
	let dx=0;
	let dy=0;
	let ds=0;
	
	let choise22=0;
	let choise222=0;
	let dx2=0;
	let dy2=0;
	let ds2=0;
	
	let choise223=0;
	let choise2223=0;
	let dx23=0;
	let dy23=0;
	let ds23=0;
	let qwer223=0;
	let sp23=0;
	////////////

let angle55=0;
let ae=0;let sp=0;let sp2=0;
let spd=0;




let angle2=0;

let sd2=0;







let dar=0;

let aq=0;



task spina{



loop(90){wait(5);


CreateShot01(GetX,GetY,1.8,aq,61,10);
CreateShot01(GetX,GetY,1.6,aq+45,62,10);
CreateShot01(GetX,GetY,1.4,aq+90,63,10);




aq+=19.7543;
}





}

let la=0;

  task ShowOffNueAnimation {
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_fault.wav");
let qe=0;
let xc=60;




let qe2=0;
let qe3=0;
let qe4=0;
let qe44=0;
let qe33=0;


task away{

wait(400);

SetMovePosition03(GetCenterX+190,GetCenterY-380,2,1);
Animate("nue", "spin", true);
wait(425);
 DeleteMusic(GetCurrentScriptDirectory ~ ".\Sounds\st2.mp3");PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_fault.wav");
VanishEnemy;
wait(120);
}

task lasa2{
//blos2;
loop(41){
lasarus(rand(GetClipMinX+5,GetClipMaxX-5),GetClipMinY-1);
lasarus(rand(GetClipMinX+5,GetClipMaxX-5),GetClipMaxY+1);
wait(30);
}
wait(38);
Animate("nue", "idle", true);

}



task lasar3{

wait(120);
loop(17){
PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
loop(20){




 CreateShot01(GetX,GetY,1.8,qe+qe2,121,10);
 
 
qe+=360/20;

}qe2+=44.435647;
wait(60);


}away;}


task lasar2{
lasar3;
wait(120);
loop(30){
PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
loop(10){




 CreateShot01(GetX,GetY,1.35,qe+qe2,198,10);
 
 
qe+=360/10;

}qe2+=19.435647;
wait(40);


}}

task lasar{
lasar2;lasa2;
loop(246){ PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");

CreateShot01(GetX,GetY,2.8,0+180*cos(as2),22,10);
 CreateShot01(GetX,GetY,2.8,0+180*cos(as2)+180,22,10);

 CreateShot01(GetX,GetY,2.6,0+180*cos(as2),21,10);
 CreateShot01(GetX,GetY,2.6,0+180*cos(as2)+180,21,10);

 
 as2+=6.789844;
wait(5);
}

}





task spins13{
la=1;
wait(55);
trail;gra=0;

SetMovePosition03(GetX+60,GetCenterY-100,15,23);

trail;
wait(20);
trail;gra=0;
wait(20);
SetMovePosition03(GetX-120,GetCenterY-100,15,23);

trail;
wait(20);
trail;gra=0;
wait(20);
SetMovePosition03(GetCenterX,GetCenterY+30,15,23);
trail;
wait(20);
trail;gra=0;
wait(20);
SetMovePosition03(GetCenterX,GetCenterY-80,15,23);
trail;
wait(20);


	 
	PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_power0.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration01(120);
 Concentration02(120);
wait(150);
lasar;


}
task spins12{
wait(750);
loop(31){wait(20);
//PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
 loop(10){

 
 
CreateShotA(2211111,GetX,GetY,10);
   SetShotDataA(2211111,0,3,qe33+qe44,2,0,0,169);
   SetShotDataA(2211111,20,1.3,NULL,0,0,0,169);
 
FireShot(2211111);
 
CreateShotA(211111,GetX,GetY,10);
   SetShotDataA(211111,0,3,qe33+qe44,-2,0,0,169);
   SetShotDataA(211111,20,1.3,NULL,0,0,0,169);
 
FireShot(211111);

 qe33+=360/10;
 }qe44+=-17.53;

}

spins13;

}


task spins11{
spins12;
wait(85);
qe3=0;
qe4=0;
Animate("nue", "spin", true);
loop(84){wait(15);
PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
 loop(6){

 
 
CreateShotA(21111,GetX,GetY,10);
   SetShotDataA(21111,0,3,qe3+qe4,0,0,0,205);
   SetShotDataA(21111,30,1,NULL,0,0,0,205);
 
FireShot(21111);

 qe3+=360/6;
 }qe4+=137.53;

}}




task spins10{
wait(345);

loop(25){wait(25);
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");

 
 loop(15){
 CreateShot01(GetX,GetY,1.8,qe3+qe4,74,10);

 qe3+=360/15
 }qe4+=17.53;
 
}

 
}




task spins9{

wait(345);
spins10;
loop(191){wait(5);
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
qe2+=13.7;
 
 CreateShot01(GetX,GetY,1.8,qe+90,122,10);
 CreateShot01(GetX,GetY,1.8,qe+120+90,122,10);
 CreateShot01(GetX,GetY,1.8,qe+120+120+90,122,10);
 
}}

task spins8{

spins9;

Animate("nue", "spin", true);
loop(260){wait(5);
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
qe+=13.7;
 
 CreateShot01(GetX,GetY,1.8,qe,61,10);
 CreateShot01(GetX,GetY,1.8,qe+120,61,10);
 CreateShot01(GetX,GetY,1.8,qe+120+120,61,10);
 
}

}



task blos2{
wait(320);
loop(21){
PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
loop(20){




 CreateShot01(GetX,GetY,1.35,qe+qe2,15,10);
 
 
qe+=360/20;

}qe2+=19.435647;
wait(40);
}
wait(318);
CreateEnemyFromScript("fam77",GetX,GetY,0,0,0);
wait(60);
spins8;
loop(1300){yield;

  
  SetMovePosition03(GetCenterX-60*cos(dir),GetCenterY-80-60*sin(dir),15,23);
  dir+=6;
  ds+=1;
  
  
  
  }
  SetMovePosition03(GetCenterX, GetCenterY-80, 20, 4);
  wait(20);
    Animate("nue", "idle", true);
	
	spins11;
	
}
task blos{
blos2;
loop(59){ PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
loop(4){




 CreateShot01(GetX,GetY,2.1,ty+as22,183,10);
 CreateShot01(GetX,GetY,2.2,ty+as22,183,10);
 CreateShot01(GetX,GetY,2.3,ty+as22,183,10);
  CreateShot01(GetX,GetY,2.4,ty+as22,207,10);
 
ty+=360/4;

}as22+=13.97665;


wait(20);}}
task lasa{
blos;
loop(41){
lasarus(GetClipMinX-5,rand(GetClipMinY+5,GetClipMaxY-5));
lasarus(GetClipMaxX+5,rand(GetClipMinY+5,GetClipMaxY-5));
wait(30);
}
wait(38);
Animate("nue", "idle", true);

}


/////////////////
let as2=0;
let as22=0;
let gra=0;
let ty=0;
let ty2=0;
task trail{


loop(15){



 CreateShot01(GetX,GetY,1.2,ty+as22,54,0);
 CreateShot01(GetX,GetY,0.8,ty+as22,54,0);
 
ty+=360/15;

}

loop(20){

CreateShotA(2211111,GetX,GetY,10);
   SetShotDataA(2211111,0,1,as2+as22,0,0,0,97+gra);
 
FireShot(2211111);
as2+=360/20;
}gra+=2;
as22+=34.7466;
}gra=0;

task spins6{


wait(55);
trail;

SetMovePosition03(GetX+60,GetCenterY-100,15,23);


wait(40);
trail;
SetMovePosition03(GetX-120,GetCenterY-100,15,23);


wait(40);
trail;
SetMovePosition03(GetCenterX,GetCenterY+30,15,23);


wait(40);
trail;
SetMovePosition03(GetCenterX,GetCenterY-80,15,23);

wait(30);
	 
	PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_power0.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration01(120);
 Concentration02(120);
wait(180);
lasa;
}



task spins5{
wait(750);
loop(34){wait(20);
//PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
 loop(6){

 
 
CreateShotA(2211111,GetX,GetY,10);
   SetShotDataA(2211111,0,2,qe33+qe44,0,0,0,166);
   SetShotDataA(2211111,40,1.3,NULL,0,0,0,166);
 
FireShot(2211111);
 
CreateShotA(211111,GetX,GetY,10);
   SetShotDataA(211111,0,2,qe33+qe44,0,0,0,166);
   SetShotDataA(211111,40,1.3,NULL,0,0,0,166);
 
FireShot(211111);

 qe33+=360/6;
 }qe44+=-17.53;

}

}




task spins4{
spins5;
wait(145);
qe3=0;
qe4=0;
Animate("nue", "spin", true);
loop(64){wait(20);
PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");
 loop(12){

 
 
CreateShotA(21111,GetX,GetY,10);
   SetShotDataA(21111,0,3,qe3+qe4,0,0,0,206);
   SetShotDataA(21111,30,1,NULL,0,0,0,206);
 
FireShot(21111);

 qe3+=360/12;
 }qe4+=167.53;

}spins6;}


task spins3{
wait(345);

loop(25){wait(25);
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan00.wav");

 
 loop(20){
 CreateShot01(GetX,GetY,1.8,qe3+qe4,76,10);

 qe3+=360/20
 }qe4+=17.53;
 
}spins4;}



task spins2{

wait(345);
spins3;
loop(195){wait(5);
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
qe2+=19.7;
 
 CreateShot01(GetX,GetY,1.8,qe2,29,10);
 CreateShot01(GetX,GetY,1.8,qe2+180,29,10);
 //CreateShot01(GetX,GetY,1.8,qe+120+120,26,10);
 
}}


task spins{
spins2;


loop(260){wait(5);
 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan01.wav");
qe+=13.7;
 
 CreateShot01(GetX,GetY,1.8,qe,28,10);
 CreateShot01(GetX,GetY,1.8,qe+180,28,10);
 //CreateShot01(GetX,GetY,1.8,qe+120+120,26,10);
 
}






}



task fs{
loop{
yield;
if(cds==1){
PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch02.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 wait(60);
	 
	  wait(20);cds=0;

}

}

}
	Animate("nue", "spin", true);
	 SetMovePosition03(GetCenterX, GetCenterY-80, 20, 4);
	 fs;
      while(GetSpeed>0.1){yield;}
	  wait(20);
	  	Animate("nue", "idle", true);
	wait(90);
	Animate("nue", "spin", true);
     wait(20);
	 PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_cat00.wav");
	  cutin("NAZRIN", " '' Hinarin's Relation of Misfortune '' ",Cut,0,0,256,512); 
	 // MotionBlurEx(ALL,180,50,ALPHA);
	   SetScore(30000);
	   
	
	  
	wait(20);
	
	
	   wait(20);
	   Animate("nue", "idle", true);
	PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch02.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 Concentration02(30);
 Concentration02(40);
 wait(60);
	wait(60);let yyu=0;
	
	Animate("nue", "spin", false);
	wait(30);
	PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_focus.wav");
	CreateEnemyFromScript("fam7",GetCenterX,GetCenterY,0,0,0);co=1;  SetDamageRate(0,0);
	SetTimer(190);
	wait(110);
	Animate("nue", "idle", true);
	  wait(30);
	PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_power0.wav");
 Concentration02(30);
 Concentration02(40);
 Concentration01(130);
 Concentration02(130);
 Concentration02(40);
 Concentration02(130);
 Concentration02(130);
 Concentration02(40);
 wait(160);
	let ds=0;
	Animate("nue", "spin", true);
	spins;
	loop(1300){yield;

  
  SetMovePosition03(GetCenterX-30*cos(dir),GetCenterY-80-30*sin(dir),15,23);
  dir+=3;
  ds+=1;
  
  
  
  }

  SetMovePosition03(GetCenterX,GetCenterY-80,15,23);
  
  wait(30);
	let ds=0;
	Animate("nue", "idle", true);
  
  
  
	}
  
  let x2=0;let angleg=0;
  let ob=0;let angla=0;
  
  
  
  function wait(t){
    loop(t){yield;}
  }
sub InitializeAnimationData {
 CreateAnimation("nue", "idle", 4);
    SetAnimationFrame("nue", "idle", 0, imgNue,38, 17, 3, 48, 62);
    SetAnimationFrame("nue", "idle", 1, imgNue,38, 81, 3, 112, 62);
    SetAnimationFrame("nue", "idle", 2, imgNue,38, 145, 3, 176, 62);
    SetAnimationFrame("nue", "idle", 3, imgNue,38, 209, 3, 240, 62);
  
   
    
    CreateAnimation("nue", "spin", 8);
  SetAnimationFrame("nue", "spin", 0, imgNue, 8, 17,68, 48, 125);
	SetAnimationFrame("nue", "spin", 1, imgNue, 8, 81,68, 112, 125);
	
	SetAnimationFrame("nue", "spin", 2, imgNue, 8, 145,68, 176, 125);
	SetAnimationFrame("nue", "spin", 3, imgNue, 8, 209,68, 240, 125);
	
	SetAnimationFrame("nue", "spin", 4, imgNue, 8, 16,131, 47, 187);
	
	SetAnimationFrame("nue", "spin", 5, imgNue, 8, 80,131, 111, 189);
	
	SetAnimationFrame("nue", "spin", 6, imgNue, 8, 144,131, 175, 188);
	SetAnimationFrame("nue", "spin", 7, imgNue, 8, 209,131, 240, 190);
    
	
   
   
    
   

  
  }
   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);
  }
  let asd=0;
  let yy=0;
  
  //////////
  let yyy=0;


  
  
  
  


task lasarus(x,y){




let obj = Obj_Create(OBJ_LASER);

    // initial settings
    Obj_SetPosition   (obj, x, y);
	
	
	
	if(Obj_GetX(obj)<GetClipMinX+1){
	
    Obj_SetAngle      (obj, 0+rand(40,-40));
	
	}
	
	if(Obj_GetX(obj)>GetClipMaxX-1){
	
    Obj_SetAngle      (obj, 180+rand(40,-40));
	
	}
	
	if(la==1){
	if(Obj_GetY(obj)<GetClipMinY+1){
	
    Obj_SetAngle      (obj, 90+rand(40,-40));
	
	}
	
	if(Obj_GetY(obj)>GetClipMaxY-1){
	
    Obj_SetAngle      (obj, 270+rand(40,-40));
	
	}}
	
	
    ObjLaser_SetWidth (obj, -4);
    ObjLaser_SetLength (obj, 600);
	
	if(la==1){ObjShot_SetGraphic(obj, 13);}else{
    ObjShot_SetGraphic(obj, 15);}
	
	
    ObjLaser_SetSource(obj, false);
  
  let anglel=0;
  while(!Obj_BeDeleted(obj)){yield;
	Obj_SetAutoDelete(obj,true);

  
  
wait(60); 
 

PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_lazer01.wav");
  loop(10){yield;
 ObjLaser_SetWidth (obj, ObjLaser_GetWidth(obj)+2);
  
  }
  wait(20);
ObjShot_FadeDelete(obj);
  }





}
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
}


script_enemy fam7{   // Declare the image file name as a variable.
    // This makes it easier to reference it in code.
    let imagefile = GetCurrentScriptDirectory ~ "fra.png";
  let objid;
   // let count = 60;
 
    @Initialize
    {drawl;ch;SetLife(91111);
       // Load the graphic file into memory.
       LoadGraphic(imagefile);
    }let counter=0;
 let d=0; let frame2=0;let a=0;
 
 task ch{loop{yield;
 
 
  
 
 
 
 
 }}
    @MainLoop
    { 
		  yield;
		  
       
    }
 task drawl{

 
 
 yield;
 
 
 draw(GetY);
 
 
 
 }
    @DrawLoop
    {
    }let a=0;
 let a3=0;
    @BackGround
    {
    }
 
    @Finalize
    {
       // clear the loaded image file from memory
       DeleteGraphic(imagefile);
    }
	
	
	
	
	
	task draw(y){
 
 
 
 
     objid = Obj_Create(OBJ_EFFECT);
          Obj_SetX(objid, GetCenterX+96);
          Obj_SetY(objid, GetCenterY);
          ObjEffect_SetLayer(objid, 8);
          ObjEffect_SetScale(objid,1,1);
          ObjEffect_SetAngle(objid, 0,0,0);
 Obj_SetAlpha(objid,0);
          // Set the object's texture
          ObjEffect_SetTexture(objid, imagefile);
 
          // Set the primitive type (here, we use a simple triangle list)
          ObjEffect_SetPrimitiveType(objid, PRIMITIVE_TRIANGLESTRIP);
 
          // Create the vertex list (3 vertices - just one triangle)
          ObjEffect_CreateVertex(objid, 4);
		  
		  
		  
		  
		  
		  
 
         //ordinates and texture coordinates for the first vertex (number 0)
          ObjEffect_SetVertexXY(objid, 0, -320, -240);
          ObjEffect_SetVertexUV(objid, 0, 0, 0);
 
        //
          ObjEffect_SetVertexXY(objid, 1, 320, -240);
          ObjEffect_SetVertexUV(objid, 1, 640, 0);
 
        //
          ObjEffect_SetVertexXY(objid, 2, -320, 240);
          ObjEffect_SetVertexUV(objid, 2, 0, 480);
		 //
		   ObjEffect_SetVertexXY(objid, 3, 320, 240);
          ObjEffect_SetVertexUV(objid, 3, 640, 480);
		 
		 
		 Obj_SetAlpha(objid,0);
		
		 
		  
while(!Obj_BeDeleted(objid)){
		
	yield;
		
		}
 
 
 
 
 }


 }
 
 
 

script_enemy fam77{   // Declare the image file name as a variable.
    // This makes it easier to reference it in code.
    let imagefile = GetCurrentScriptDirectory ~ "fac.png";
  let objid;
   // let count = 60;
 
    @Initialize
    {drawl;ch;SetLife(91111);
	
       // Load the graphic file into memory.
       LoadGraphic(imagefile);
    }let counter=0;
 let d=0; let frame2=0;let a=0;
 
 task ch{loop{yield;
 
 
  
 
 
 
 
 }}
    @MainLoop
    { 
		  yield;
		 
       
    }
 task drawl{

 
 
 yield;
 
 
 draw(GetY);
 
 
 
 }
    @DrawLoop
    {
    }let a=0;
 let a3=0;
    @BackGround
    {
    }
 
    @Finalize
    {
       // clear the loaded image file from memory
       DeleteGraphic(imagefile);
    }
	
	
	
	
	
	task draw(y){
 
 
 
 
     objid = Obj_Create(OBJ_EFFECT);
          Obj_SetX(objid, GetCenterX+30);
          Obj_SetY(objid, GetCenterY+40);
          ObjEffect_SetLayer(objid, 7);
          ObjEffect_SetScale(objid,3.5,3.5);
          ObjEffect_SetAngle(objid, 0,0,10);
 Obj_SetAlpha(objid,0);
          // Set the object's texture
          ObjEffect_SetTexture(objid, imagefile);
 
          // Set the primitive type (here, we use a simple triangle list)
          ObjEffect_SetPrimitiveType(objid, PRIMITIVE_TRIANGLESTRIP);
 
          // Create the vertex list (3 vertices - just one triangle)
          ObjEffect_CreateVertex(objid, 4);
		  
		  
		  
		  
		  
		  
 
         //ordinates and texture coordinates for the first vertex (number 0)
          ObjEffect_SetVertexXY(objid, 0, -128, -128);
          ObjEffect_SetVertexUV(objid, 0, 0, 0);
 
        //
          ObjEffect_SetVertexXY(objid, 1, 128, -128);
          ObjEffect_SetVertexUV(objid, 1, 256, 0);
 
        //
          ObjEffect_SetVertexXY(objid, 2, -128, 128);
          ObjEffect_SetVertexUV(objid, 2, 0, 256);
		 //
		   ObjEffect_SetVertexXY(objid, 3, 128, 128);
          ObjEffect_SetVertexUV(objid, 3, 256, 256);
		 
		 
		 Obj_SetAlpha(objid,0);
		
		 
		  
while(!Obj_BeDeleted(objid)){
		 wait(60);
		  VanishEnemy;
	yield;
		
		}
 
 
 
 
 }

  function wait(t){
    loop(t){yield;}
  }

 }