#東方弾幕風
#Title[通常4]
#Text[ミシャクジ様ナイフバージョン。なぜかナイフが曲がって見える不思議。なんか見た目が怖い。大根にも見える]
#ScriptVersion[2]
#Player[FREE]

script_enemy_main {
   	let imgBoss   = "script\img\ExRumia.png";
   	let frame     =  -200;
    	let angleBase = 90;
	let arrow01=GetCurrentScriptDirectory~"SE\arrow01.wav";

    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(4500);
	SetMovePosition02(GetCenterX,120,50);
        LoadGraphic(imgBoss);
	LoadSE(arrow01);
        SetTexture(imgBoss);
        SetGraphicRect(0, 0, 63, 63);
	SetInvincibility(180)
    }

    @MainLoop 
    {
      SetCollisionA(GetX, GetY, 24);
      SetCollisionB(GetX, GetY, 24);

      frame++;
      let j=rand(0,360);
       
        if(frame>0&&frame <181&&frame%60==0) 
         {
           PlaySE(arrow01);
           let dimasama=0;
           let misyakujisama=0;
           let i=0;
            
            loop(36)
             {
              CreateShotA(dimasama,GetX,GetY,0);
              SetShotDataA(dimasama,0,8,i+j,1.2,-0.3,1,GREEN32);
              SetShotDataA(dimasama,100,NULL,NULL,0.15,0,1,GREEN32);
              FireShot(dimasama);


              CreateShotA(misyakujisama,GetX,GetY,0);
              SetShotDataA(misyakujisama,0,8,i+j,-1.2,-0.3,1,GREEN32);
              SetShotDataA(misyakujisama,100,NULL,NULL,-0.15,0,1,GREEN32);
              FireShot(misyakujisama);
              i+=10;
             }
           
           
           
          }

	if(frame==361){frame = 0;}
         
    }

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize
	 {
        	DeleteGraphic(imgBoss);

    	}






}