
	#東方弾幕風
	#Title[凍符「アイシクルフォール-Extra-」]
	#Text[アイシクルフォールのExtraです]
	#Image[]
	#ScriptVersion[2]
	#BGM[.\BGM3.mp3]
	#Player[FREE]
	script_enemy_main
	{
		let count=0;
		let csub=0;
		let angle=95;
		let baseangle=180;
		let angle2=85;
		let baseangle2=0;
		let cx=GetCenterX();
		let cy=GetCenterY();
		@Initialize
		{
			CutIn(YOUMU, "凍符「アイシクルフォール-Extra-」", "", 0, 0, 0, 0);
			SetLife(5000);
			SetMovePosition02(cx,60,60);
			SetTimer(40);
			SetScore(4000000);
			SetGraphicRect(1,1,48,48);
			LoadGraphic("script\img\2127578.png");
		}
			
		@MainLoop
		{
			
			if(baseangle==120)
				{
				angle=95;
				baseangle=180;
				angle2=85;
				baseangle2=0;
				}

			
			if(count==60){	
					let s=4;
					loop(8){
						let shot=0;
						let shot2=1;
						CreateShotA(shot,GetX(),GetY(),30);
						SetShotDirectionType(ABSOLUTE);
						SetShotDataA(shot,0,s,baseangle,0,-0.15,1,BLUE11);
						SetShotDataA(shot,30,2,angle,0,0,3,BLUE11);
						CreateShotA(shot2,GetX(),GetY(),30);
						SetShotDirectionType(ABSOLUTE);
						SetShotDataA(shot2,0,s,baseangle2,0,-0.15,1,BLUE11);
						SetShotDataA(shot2,30,2,angle2,0,0,3,BLUE11);
						FireShot(shot);
						FireShot(shot2);
						s+=1.5;
						}
					angle-=10;
					baseangle-=10;
					angle2+=10;
					baseangle2+=10;
					count=20;
					}
			
			if(csub==120)
			{	let n=rand_int(2,4)*2;
				let angle1=GetAngleToPlayer()-45;
				let angle2=315;
				let angle3=125;
					loop(n){
					CreateShot01(GetX(),GetY(),2,angle1,YELLOW02,30);
					CreateShot01(32,cy,2,angle2,YELLOW02,30);
					CreateShot01(416,cy,2,angle3,YELLOW02,30);
					angle1+=90/(n-1);
					angle2+=90/(n-1);
					angle3+=90/(n-1);
						}
				
				let angle4=180;
				loop(180){
					CreateShot01(GetX(),GetY(),3,angle4,BLUE11,30);
					angle4++;
						}
				
				csub=60;
			}
					


				SetCollisionA(GetX(),GetY(),32);
				SetCollisionB(GetX(),GetY(),24);
				count++;
				csub++;
		}

		@DrawLoop
		{
			
			SetTexture("script\img\2127578.png");
			DrawGraphic(GetX(),GetY());
		}
		
		@Finalize
		{
			loop(24) {
        		let x = GetX + rand(-64, 64);
       	 		let y = GetY + rand(-64, 64);
        		CreateItem(ITEM_SCORE, x, y);
			}
			DeleteGraphic("script\img\2127578.png");
		}
	}
  
