	#東方弾幕風
	#Title[誤字「変の迷路」]
	#Text[spel]
	#Image[]
	#ScriptVersion[2]
	#BGM[.\BGM3.mp3]
	#Player[FREE]
	script_enemy_main
	{
		let t=0;
		let c=0;
		let e=0;
		let s=2;
		let v=0;
		let mode=0;
		let modec=-60;
		let angle1=120;
		let angle2=120;
		let angle3=120;
		let angle4=120;
		let cx=GetCenterX();
		let cy=GetCenterY();
		
		@Initialize
		{
			CutIn(YOUMU, "誤字「変の迷路」", "", 0, 0, 0, 0);
			SetLife(3000);
			SetMovePosition02(cx,cy,60);
			SetTimer(30);
        		SetScore(4000000);
			SetGraphicRect(1,1,40,45);
			LoadGraphic("script\img\2127578.png");
			SetDurableSpellCard()



		}
			
		@MainLoop
		{
		if(mode==1){
			if(t==60)
			{	
			loop(60){
				CreateShot01(GetX(),GetY(),2,angle1,BLUE23,0);
				angle1+=5;
				 }
			angle1+=30;
			t=30;
			}		
			if(c==60)
			{	
			loop(15){
				loop(3){
					CreateShot01(GetX(),GetY(),s,angle2,RED01,e);
					s++;
					}
				s=2;
				angle2+=20;
				e++;
				}
			angle2+=30;	
			e=0;
			c=30;
			}
			if(v==60){
				CreateShot01(GetX(),GetY(),3,GetAngleToPlayer,BLUE04,e);
				v=0;
				}
			}	
/*---------------------------------------------------------------------------------*/		
		if(mode==2){			
			if(t==60)
			{	
			loop(60){
				CreateShot01(GetX(),GetY(),2,angle3,RED23,0);
				angle3-=5;
				 }
			angle3-=30;
			t=30;
			}			
			if(c==60)
			{	
			loop(15){
				loop(3){
					CreateShot01(GetX(),GetY(),s,angle4,BLUE01,e);
					s++;
					}
				s=2;
				angle4-=20;
				e++;
				}
			angle4-=30;	
			e=0;
			c=30;
			}		
			if(v==60){
				CreateShot01(GetX(),GetY(),3,GetAngleToPlayer,BLUE04,e);
				v=0;
				}
			}	
			
				
				SetCollisionB(GetX(),GetY(),24);
				t++;
				c++;
				v++;
				modec++;
				if(modec<360){mode=1;}
				if(modec>420){mode=2;}
				if(modec>360&&modec<420){mode=3;t=0;c=0;v=0;}
				if(modec>780&&modec<840){mode=3;t=0;c=0;v=0;}
				if(modec==840){modec=0;}
		
		}

		@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");
		}
	
	
	}
  
