

  let csd = GetCurrentScriptDirectory;
  let cx=GetCenterX();
  let cy=GetCenterY();
  let minx=GetClipMinX();
  let miny=GetClipMinY();
  let maxx=GetClipMaxX();
  let maxy=GetClipMaxY();
  let limit1 = csd~ "se\limit1.wav"; LoadSE(limit1);
  let limit2 = csd~ "se\limit2.wav"; LoadSE(limit2);
  let seshot1 = csd~ "se\enemyshot01.wav"; LoadSE(seshot1);
  let seshot2 = csd~ "se\exshot02.wav"; LoadSE(seshot2);
  let seshot3 = csd~ "se\gunshot03.wav"; LoadSE(seshot3);
   let seshot4 = csd~ "se\enemyshot04.wav"; LoadSE(seshot4);
  let dlaser = csd~ "se\laserdelay.wav"; LoadSE(dlaser);
  let sevanish = csd~ "se\BossVanish.wav"; LoadSE(sevanish);
  let secon= csd~ "se\Concentration.wav"; LoadSE(secon);
  let sefreeze = csd~ "se\freeze.wav"; LoadSE(sefreeze);
  let sevanish1 = csd~ "se\shock01.wav"; LoadSE(sevanish);
  let sevanish2 = csd~ "se\shock03.wav"; LoadSE(sevanish2);
  let MS = csd~ "se\MS.wav"; LoadSE(MS);
  let seray = csd~ "se\Laser.wav"; LoadSE(seray);
  SetRateScoreSystemEnable(false);

  task DamageEnemy{
  let rate = 50;
   loop{
 let rank = GetCommonDataDefaultEx("","PlayRank",0);
  if(rank < 100){rate = 50;}
  else if(100 <= rank && rank < 200){rate = 55;}
  else if(200 <= rank && rank < 300){rate = 60;}
  else if(300 <= rank && rank < 400){rate = 65;}
  else if(400 <= rank && rank < 500){rate = 70;}
  else if(500 <= rank && rank < 600){rate = 75;}
  else if(600 <= rank && rank < 700){rate = 78;}
  else if(700 <= rank && rank < 800){rate = 81;}
  else if(800 <= rank && rank < 900){rate = 84;}
  else if(900 <= rank && rank < 1000){rate = 87;}
  else if(1000 <= rank && rank < 1300){rate = 90;}
  else if(1300 <= rank && rank < 1500){rate = 93;}
  else if(1500 <= rank && rank < 1800){rate = 96;}
  else if(1800 <= rank && rank <= 2010){rate = 100;}
    SetDamageRate(rate,rate);
   yield;
    }
  }
   
  task DamageBoss(bombresist){
  let rate = 50;
   loop{
 let rank = GetCommonDataDefaultEx("","PlayRank",0);
  if(rank < 100){rate = 10;}
  else if(100 <= rank && rank < 200){rate = 25;}
  else if(200 <= rank && rank < 300){rate = 30;}
  else if(300 <= rank && rank < 400){rate = 35;}
  else if(400 <= rank && rank < 500){rate = 50;}
  else if(500 <= rank && rank < 600){rate = 55;}
  else if(600 <= rank && rank < 700){rate = 60;}
  else if(700 <= rank && rank < 800){rate = 75;}
  else if(800 <= rank && rank < 900){rate = 80;}
  else if(900 <= rank && rank < 1000){rate = 85;}
  else if(1000 <= rank && rank <= 2010){rate = 100;}
    SetDamageRate(rate,bombresist);
   yield;
    }
  }    
  
    task Count{
  SetEnemyMarker(false);
        while(GetTimer > 10){yield;}
     loop(5){
      PlaySE(limit1); 
        loop(60){yield;}
       }
       loop(5){
          PlaySE(limit2); 
        loop(60){yield;}
       }
    }

   task Circle(size){
           let c= Obj_Create(OBJ_EFFECT);
             Obj_SetX(c,GetX);
             Obj_SetY(c,GetY);
             Obj_SetAngle(c,0);
             ObjEffect_SetAngle(c,0,0,0);
             ObjEffect_SetTexture(c,effect);
             ObjEffect_SetRenderState(c,ADD);
             ObjEffect_SetPrimitiveType(c,PRIMITIVE_TRIANGLEFAN);
             ObjEffect_SetLayer(c,0);
             ObjEffect_CreateVertex(c,62);
             ObjEffect_SetVertexXY(c,0,0,0);
             ObjEffect_SetVertexUV(c,0,128,128);
             ObjEffect_SetVertexColor(c,0,255,255,255,255);
             ObjEffect_SetScale(c,size/10,size/10);

            ascent(let i in 0..61){
                ObjEffect_SetVertexXY(c,i+1,cos(i*6)*20,sin(i*6)*20);
                ObjEffect_SetVertexUV(c,i+1,cos(i*6)*128+128,sin(i*6)*128+128);
                ObjEffect_SetVertexColor(c,i+1,255,255,255,255);
            }
      Set; 
     task Set{
         while(!Obj_BeDeleted(c)){
            Obj_SetX(c,GetX); Obj_SetY(c,GetY);
            yield;
           }
         }
    }

  task Circle2(size){
           let c= Obj_Create(OBJ_EFFECT);
             Obj_SetX(c,GetX);
             Obj_SetY(c,GetY);
             Obj_SetAngle(c,0);
             ObjEffect_SetAngle(c,0,0,0);
             ObjEffect_SetTexture(c,effect);
             ObjEffect_SetRenderState(c,ADD);
             ObjEffect_SetPrimitiveType(c,PRIMITIVE_TRIANGLEFAN);
             ObjEffect_SetLayer(c,0);
             ObjEffect_CreateVertex(c,62);
             ObjEffect_SetVertexXY(c,0,0,0);
             ObjEffect_SetVertexUV(c,0,128,128);
             ObjEffect_SetVertexColor(c,0,255,255,255,255);
             ObjEffect_SetScale(c,size/10,size/10);

            ascent(let i in 0..61){
                ObjEffect_SetVertexXY(c,i+1,cos(i*6)*20,sin(i*6)*20);
                ObjEffect_SetVertexUV(c,i+1,cos(i*6)*128+128,sin(i*6)*128+128);
                ObjEffect_SetVertexColor(c,i+1,255,255,255,255);
            }
      Set; 
     task Set{
   let h = 0;
         while(!Obj_BeDeleted(c)){
            Obj_SetX(c,GetX); Obj_SetY(c,GetY);
       ObjEffect_SetAngle(c,0,0,h);
      h += 1.2;
            yield;
           }
         }
    }

   task Circle3(size){
           let c= Obj_Create(OBJ_EFFECT);
             Obj_SetX(c,GetX);
             Obj_SetY(c,GetY);
             Obj_SetAngle(c,0);
             ObjEffect_SetAngle(c,0,0,0);
             ObjEffect_SetTexture(c,effect);
             ObjEffect_SetRenderState(c,ADD);
             ObjEffect_SetPrimitiveType(c,PRIMITIVE_TRIANGLEFAN);
             ObjEffect_SetLayer(c,0);
             ObjEffect_CreateVertex(c,62);
             ObjEffect_SetVertexXY(c,0,0,0);
             ObjEffect_SetVertexUV(c,0,128,128);
             ObjEffect_SetVertexColor(c,0,255,255,255,255);
             ObjEffect_SetScale(c,size/10,size/10);

            ascent(let i in 0..61){
                ObjEffect_SetVertexXY(c,i+1,cos(i*6)*20,sin(i*6)*20);
                ObjEffect_SetVertexUV(c,i+1,cos(i*6)*128+128,sin(i*6)*128+128);
                ObjEffect_SetVertexColor(c,i+1,255,255,255,255);
            }
      Set; 
     task Set{
   let h = 0;
         while(!Obj_BeDeleted(c)){
            Obj_SetX(c,GetX); Obj_SetY(c,GetY);
       ObjEffect_SetAngle(c,0,0,h);
      h += 1.2;
             yield;
           }
         }
   loop(121){ yield;}
     Obj_Delete(c);
    }