#東方弾幕風
#Title[氷雫「アクアイスフォール-Hara-」]
#Text[仮です]
#ScriptVersion[2]
#PlayLevel[Hard]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let name = "氷雫「アクアイスフォール」";
 let pet = 0;

 @Initialize {
  CutIn(KOUMA, name, "", 0, 0, 0, 0);
  SetX(GetCenterX);
  SetY(GetClipMinY + 64);
  SetLife(5000);
  SetScore(1000000);

  boss_magic_circle;

  LoadGraphic(img);
  SetTexture(img);
  SetGraphicRect(64, 0, 128, 64);

  PlaySE(spellSE);

  TShot;
  TShot2;
 }

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

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

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

 task TShot {
  let angle = 0;
  let pot = 0;
  yield;

  loop {
   loop(2) { yield; }
   loop(2) {
    loop(10) {
     CreateShotA(1, GetX, GetY, 0);
     SetShotDataA(1, 0, 2, angle, 0, 0, 2, BLUE01);
     SetShotDataA(1, 60, 1, angle, 0, pot, 1 + pot * 2, WHITE01);
     pot += 0.1;
     FireShot(1);
    }
    angle = -angle;
    yield;
   }
   angle += 10;
   pot = 0;
  }
 }

 task TShot2 {
  let angle = 180;
  let pot = 0;
  yield;

  loop {
   loop(2) { yield; }
   loop(2) {
    loop(10) {
     CreateShotA(1, GetX, GetY, 0);
     SetShotDataA(1, 0, 2, angle, 0, 0, 2, BLUE01);
     SetShotDataA(1, 60, 1, angle, 0, pot, 1 + pot * 2, WHITE01);
     pot += 0.1;
     FireShot(1);
    }
    angle = -angle;
    yield;
   }
   angle -= 7;
   pot = 0;
  }
 }
    

#include_function ".\変数集.txt"
#include_function ".\functions.txt"
}