#東方弾幕風
#Title[呪言「日本最古の呪い」]
#Text[改変 by unknown]
#ScriptVersion[2]

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(4000);
        SetTimer(66);
        SetScore(4000000);

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

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

        frame++;
        if(frame == 3) {           
            let angle = angleBase - 10;
            loop(4) {                
                 CreateShot01(GetX, GetY, 3, angle, RED03, 0);
                 CreateShot01(GetX, GetY, 3, angleBase -180, WHITE23, 0);
                 CreateShot01(GetX, GetY, 3, angleBase -170, WHITE23, 0);   
                 CreateShot01(GetX, GetY, 3, angleBase -160, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase -150, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase -140, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase -130, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase -120, WHITE23, 0);

		 if(angle > 1500) {
			 CreateShot01(GetX, GetY, 3, angleBase - 110, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 100, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 90, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 80, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 70, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 60, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 50, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 40, WHITE23, 0);
		 }

		 if(angle > 3000) {
			 CreateShot01(GetX, GetY, 3, angleBase - 260, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 250, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 240, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 230, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 220, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 210, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 200, WHITE23, 0);
			 CreateShot01(GetX, GetY, 3, angleBase - 190, WHITE23, 0);
		 }
               
               
                 
                 angle += 30;
            }
            angleBase += 8;
        } else if(frame == 6) {
            let angle = angleBase - 10;
            loop(9) {
                CreateShot01(GetX, GetY, 3, angle, RED32, 0);                                          
                angle += 10;
            }            
            angleBase += 8;
            frame = 0;
        }
    }

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgBoss);
    }
}