#e
#Title[ہuÍ̑zv]
#Text[G@LusHXqv]
#ScriptVersion[2]
#Player[FREE]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let name = "ہuÍ̑zv";
 let pet = 0;

 @Initialize {
  CutIn(KOUMA, name, "", 0, 0, 0, 0);
  SetX(GetCenterX);
  SetY(GetCenterY - 120);
  SetLife(15000);
  SetScore(2000000);

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

  TMain;
 }

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

  pet += 1;
  if(pet == 1860) {
   CreateShot01(rand(GetClipMinX, GetClipMaxX), GetClipMaxY, 0.15, -90, WHITE11, 0);
   pet = 1800;
  }

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
 }

 task TMain {
  yield;

  TShot;
 }

 task TShot {
  let x = 0;
  let y = 0;
  yield;

  loop {
   loop(1) { yield; }
   SetShotColor(1, 1, 1);
   CreateShot01(GetX + offsetX(100, x), GetY + offsetY(100, y), 0.15, atan2(GetY - (GetY + offsetY(100, y)), GetX - (GetX + offsetX(100, x))), WHITE11, 0);
   x += 5;
   y += 5;
  }
 }

 function offsetX(radius, mid) {
  return radius * cos(mid);
 }

 function offsetY(radius, mid) {
  return radius * sin(mid);
 }

}