#TouhouDanmakufu
#Title [Spell 6]
#ScriptVersion[2]


script_enemy_main {

     #include_function "lib\SHOT_REPLACE\shot_replace.dnh"

     let frame = 0;
     let frame2 = 0;
     let angle = 60;
     let angle2 = 40;
     let angle3 = 64;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(1000);
        SetDamageRate(25, 15);
        SetEnemyMarker(true);
        CutIn(KOUMA, " Enternal Hypnosis ", "script\img\Reisen.png", 0, 0, 200, 500);
        SetScore(123456);
        SetTimer(50);
        SetDurableSpellCard;
        MagicCircle(true);
        SetEffectForZeroLife(120, 125, 1);
        shotinit;

        LoadGraphic("script\img\Reisen.png");
        SetTexture("script\img\Reisen.png");
        SetGraphicRect(0, 0, 400, 533);
    }

    @MainLoop {

        SetCollisionA(GetX, GetY, 24);
        SetCollisionB(GetX, GetY, 24);

	if(frame2==2){
		CreateShot01(GetX, GetY, 3, rand(0, 360), REDI04, 0);
       	 	CreateShot01(GetX, GetY, 5, rand(0, 360), BLUEI04, 0);
        	CreateShot01(GetX, GetY, 3, rand(0, 360), WHITEI04, 0);

		frame2 = 0;
	}

	if(frame==2){
		CreateShot01(GetX, GetY, 3, rand(0, 360), RED53, 0);
       	 	CreateShot01(GetX, GetY, 4, rand(0, 360), GREEN53, 0);
        	CreateShot01(GetX, GetY, 3, rand(0, 360), YELLOW53, 0);

		frame = 0;
	}

          frame++;
	  frame2++;
    }

    @DrawLoop {
        DrawGraphic(GetX, GetY);
	SetGraphicScale(0.25, 0.25);
    }

    @Finalize{
        DeleteGraphic("script\img\ExRumia.png");
    }
}