#東方弾幕風
#Title[チルノ通常弾１-Normal-]
#Text[通常弾]
#ScriptVersion[2]
#PlayLevel[Normal]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let pet = 0;
 let angle = 0;
 let row = 0;
 let bet = 0;
 let rowt = 0;

 @Initialize {
  SetX(GetCenterX);
  SetY(GetCenterY - 120);
  SetLife(3000);
  LoadGraphic(img);
  SetTexture(img);
  SetGraphicRect(64, 0, 128, 64);
  boss_magic_circle;
 }

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

  pet += 1;
  bet += 1;
  if(pet == 60) {
   loop(20) {
    PlaySE(shotSE);
    CreateShot01(GetX, GetY, 1.5, angle + rowt, BLUE11, 0);
    angle += 18;
   }
   rowt += 4;
   pet = 0;
  }
  if(bet == 40) {
   loop(20) {
    PlaySE(shotSE);
    CreateShot01(GetX, GetY, 1, angle + row, BLUE05, 0);
    angle += 18;
   }
   row = rand(0, 18);
   bet = 0;
  }

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
  loop(20) {
   CreateItem(ITEM_SCORE, rand(GetX - 50, GetX + 50), rand(GetY - 50, GetY + 50));
  }
 }

 task TMain {
  yield;

  TShot;
 }

 task TShot {
  yield;
 }
#include_function ".\変数集.txt"
#include_function ".\functions.txt"
}