script_enemy_main
{

	#include_function".\..\function\glo_enemydrop.txt";
	#include_function".\stage1_Boss_Info.txt";


	sfx01 = "t";

	sfx50 = "t";
	sfx51 = "t";

	#include_function".\..\function\soundfx.txt";


	ng_timeset = 20;
	ng_spellcard = 0;



	let nb_num = 0;

	let frame1 = 0;
	let frame2 = 0;

//-------------------------------------------------------------------------------------------------
// Any Task




//---------------------------------------------------------------

	@Initialize
	{
	SetX(0);
	SetY(-128);
	SetInvincibility(120);
	SetLife(1250);
	SetDamageRate(0,0);
	SetTimer(ng_timeset);
	SetEnemyMarker(true);

	SetMovePosition03(GetCenterX, GetClipMinY + 90, 10, 5);

	LoadGraphic(BossSprite);

	// Fever score decrease if this is not survival card.
	SetCommonData("ng_feverdecrease", 1);

	}

//---------------------------------------------------------------

	@MainLoop 
	{
	SFU_GloBossCounter;

	SetCollisionA(GetX, GetY, 32);
	SetCollisionB(GetX, GetY, 16);

	SetShotDirectionType(ABSOLUTE);

//----------------------
// Attack script below
//----------------------

	if (frame1 == 90)
	{
if (GetCommonData("CD_gamemode") == 2)
{
	nb_num = rand_int(0,5);
	PlaySE(sfx01);
	CreateShotA(0, GetClipMinX+10, 0, 5);
	SetShotDataA(0, 0, 0, 90, 0, 0.05, 4, AQUA21);
	ascent (i in 1..50)
		{
		CreateShotA(i, 0, 0, 30);
		SetShotDataA(i, 0, 0, 0, 0, 0.05, 3, AQUA12);
		AddShot((i*5)+nb_num, 0, i, 0);
		}
	FireShot(0);
	CreateShotA(0, GetClipMaxX-10, 0, 5);
	SetShotDataA(0, 0, 0, 90, 0, 0.05, 4, AQUA21);
	ascent (i in 1..50)
		{
		CreateShotA(i, 0, 0, 30);
		SetShotDataA(i, 0, 0, 180, 0, 0.05, 3, AQUA12);
		AddShot((i*5)+nb_num, 0, i, 0);
		}
	FireShot(0);
}
else
{
	nb_num = rand_int(0,10);
	PlaySE(sfx01);
	CreateShotA(0, GetClipMinX+10, 0, 5);
	SetShotDataA(0, 0, 0, 90, 0, 0.05, 4, AQUA21);
	ascent (i in 1..50)
		{
		CreateShotA(i, 0, 0, 30);
		SetShotDataA(i, 0, 0, 0, 0, 0.05, 3, AQUA12);
		AddShot((i*10)+nb_num, 0, i, 0);
		}
	FireShot(0);
	CreateShotA(0, GetClipMaxX-10, 0, 5);
	SetShotDataA(0, 0, 0, 90, 0, 0.05, 4, AQUA21);
	ascent (i in 1..50)
		{
		CreateShotA(i, 0, 0, 30);
		SetShotDataA(i, 0, 0, 180, 0, 0.05, 3, AQUA12);
		AddShot((i*10)+nb_num, 0, i, 0);
		}
	FireShot(0);
}



	frame1 = 0;
	}

	if ((frame2 >= 60) && (ng_timeframe > 90))
	{
	PlaySE(sfx01);
	CreateShot02(GetX, GetY, 0, GetAngleToPlayer, 0.25, 3, AQUA02, 5);
	frame2 = 0;
	}



	if (ng_bossmframe == 120)
	{
		SetMovePositionRandom01(rand_int(25,100),10,5,GetClipMinX+100,50,GetClipMaxX-100,100);
		ng_bossmframe = 0;
	}





	frame1++;
	frame2++;

//----------------------
// Attack script above
//----------------------

	#include_function".\..\function\glo_timernotice.txt";
	yield;

	}

//---------------------------------------------------------------

	@DrawLoop
	{
	SetTexture(BossSprite);
	SetGraphicAngle(0, 0, 0);
	SetGraphicScale(1, 1);
	#include_function".\..\function\boss_draw.txt";
	}

//---------------------------------------------------------------

	@BackGround
	{
	}

//---------------------------------------------------------------

	@Finalize
	{
	DeleteGraphic(BossSprite);
	SFX_Delete;
    	}
}
