#TouhouDanmakufu
#Title[SunnyN1_H]
#Text[SunnyN1_H]
#Player[FREE]
#ScriptVersion[2]
#BGM[.\mu\bgm.mp3]

script_enemy_main {
#include_function ".\Sunnyinclude.txt";

	@Initialize{
	InitializeAction;
	LoadMusic(bgm);
	LoadSE(shot3);
	LoadSE(time1);
	LoadSE(teleport);
	LoadGraphic(imageFile);
	LoadSE(time2);
	LoadSE(wtf);
	shotinit;
	LoadSE(charge);
	SetAction(ACT_MOVE, 120);
	LoadSE(shot);
	LoadSE(laser);
	LoadSE(familiarspawn);
	LoadGraphic(imglifebar); 
	SetLife(6000);
	LoadSE(shot2);
	SetTimer(45);
	SetInvincibility(180);
	SetDamageRate(150, 75);
	SetMovePosition03(GetCenterX, GetClipMinY + 120, 10, 2);
	LoadGraphic(SP);
	LoadGraphic(MC);
	attack1;
	MagicCircle(false);
	SetShotAutoDeleteClip(10, 10, 10, 10);
	SetEnemyMarker(true);
	SetCommonData("lastattack", false);
	}

task attack1 {
let angle2 = 20;
let angle3 = 0;
let sine = 0;
let b = 20;
let a = -5;
wait(70);
loop{
SetAction(ACT_SHOT_A, 480);
ascent(i in 0..96){
PlaySE(shot3);
loop(10){
SetShotColor(255, 255, 220);
CreateShot01(GetX, GetY, 2.25, angle+angle2, YELLOW01, 10);

angle+=360/10;
}
SetShotColor(255, 255, 255);
if(a%b==0){
PlaySE(shot);
	ascent(i in 0..4){
		loop(20){
CreateShot01(GetX, GetY, 0.75+(i/2), angle3, YELLOW54, 10);
	angle3+=360/20;
		}
	}
angle3+=360/20/3;
}
a++;
sine+=7;
angle2+=(2.25+(i/60))*sin(sine);
wait(5);
}
ExMove;
wait(90);
angle2+=rand(-10, 10);
}


}
}



