#東方弾幕風
#Title[結晶「クリスタルワールド〜Easyβ」]
#Text[やっぱりワンパターン]
#ScriptVersion[2]
#PlayLevel[Normal]

script_enemy_main {
    let name ="結晶「クリスタルワールド」";
    let imgBoss   = "script\img\ExRumia.png";
    let frame     =  0;
    let angleBase = 90;

    @Initialize {
        CutIn(YOUMU, name, "", 0, 0, 0, 0);     

        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(3500);
        SetTimer(47);
        SetScore(4000000);

        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        SetGraphicRect(0, 0, 63, 63);
    }

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

          frame++;
        if(frame == 2) {           
            let angle = angleBase - 10;
            loop(10) {           
                 CreateShot01(GetX, GetY, 3, angleBase -90, BLUE23, 0);
                 CreateShot01(GetX, GetY, 3, angleBase -70, BLUE23, 0);   
                 CreateShot01(GetX, GetY, 3, angleBase -50, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase -30, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase -10, BLUE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +10, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +30, BLUE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +50, BLUE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +70, BLUE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +90, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +110, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +130, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +150, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +170, BLUE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +190, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +210, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +230, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +250, BLUE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +270, BLUE23, 0); 
 if(angle > 800){
                 CreateShot01(GetX, GetY, 4, angleBase -36, WHITE23, 0);
                 CreateShot01(GetX, GetY, 4, angleBase -72, WHITE23, 0);   
                 CreateShot01(GetX, GetY, 4, angleBase -108, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 4, angleBase -144, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 4, angleBase -180, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 4, angleBase +36, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 4, angleBase +72, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 4, angleBase +108, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 4, angleBase +144, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 4, angleBase, WHITE23, 0); 
                
		 
            }
                 angle += 10;
            }
            angleBase += 8;
        } else if(frame == 10) {
            let angle = angleBase - 10;
            loop(1) {         
                 CreateShot01(GetX, GetY, 3, angleBase -36, AQUA23, 0);
                 CreateShot01(GetX, GetY, 3, angleBase -72, AQUA23, 0);   
                 CreateShot01(GetX, GetY, 3, angleBase -108, AQUA23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase -144, AQUA23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase -180, AQUA23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +36, AQUA23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +72, AQUA23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +108, AQUA23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +144, AQUA23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase, AQUA23, 0); 
                                        
                angle += 10;
            }            
            angleBase += 8;
            frame = 0;
        }
    }

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgBoss);
    }
}