script_enemy_main {
	#include_function ".\includeSatori.txt"
	task TMain {
		SetDamageRate(175, 75);
		SetMovePosition03(GetCenterX+50, GetCenterY-75, 10, 9);
		SetInvincibility(120); wait(60);
		TCharge(GetCenterX+50, GetCenterY-75);
		PlaySE2("charge");
		wait(60);
		attack1;
	}
	task attack1 {
		loop {
			let time = [15,15,18,18][GetDifficulty];
			let num = [8,14,18,24][GetDifficulty];
			let numshot = [6,6,5,5][GetDifficulty];
			PlaySE2("tan01");
			CreateShotA(0, GetX, GetY, 20);
			SetShotDataA(0, 0, 3, GetAngleToPlayer, 0, -2/90, 1, 204);
			ascent(i in 0..numshot) {
				let ang = GetAngleToPlayer+rand(-15,15); 
				ascent(k in 0..2) { ascent(j in 0..num+1) {
					CreateShotA(1, 0, 0, 10);
					let v = 3/2+1*sin(j*360/num)+j/15;
					let ang2 = ang+j*180/num*((-1)^k);
					SetShotDataA(1, 0, v, 180+ang2, 0, -v/30, 0, 1+5*(i%2));
					SetShotDataA(1, 30, 0, NULL, 0, 1/20, rand(1,2), NULL);
					AddShot(0+time*i, 0, 1, 0);
				} }
			}
			FireShot(0);
			wait(150);
			TCharge(GetX, GetY);
			PlaySE2("charge");
			wait(60);
			SetMovePosition03(GetCenterX+100+rand(-30, 30), GetCenterY-75+rand(-30,30), 10, 9);
			wait(60);
		}
	}
}