script_enemy_main {
	#include_function ".\includeKoishi.txt"
	task TMain {
		SetDamageRate(225, 125);
		SetMovePosition03(GetX+rand(-50, 50), GetY+rand(-30, 30), 10, 9);
		SetInvincibility(180);
		wait(60);
		SetMovePosition03(GetCenterX, GetCenterY-100, 10, 9);
		wait(60);
		TCharge(GetCenterX, GetCenterY-100);
		PlaySE2("charge");
		wait(60);
		attack1;
	}
	task attack1 {
		let side = 1;
		loop {
			ascent(n in 0..4) {
				let a = -90;
				let y = 0; let y2 = -8;
				ascent(j in 0..[5, 10, 10, 20][GetDifficulty]) {
					PlaySE2("tan00");
					let num = [14, 9, 15, 10][GetDifficulty];
					let ang = (n*[19, 14, 14, 14][GetDifficulty]-j*[7, 11, 11, 18][GetDifficulty]);
					ascent(i in 0..num) { CreateShot02(GetX+(35*cos(a))*(1+n/2), GetY+(35*sin(a)+y)*(1+n/2), 2, a+ang*side+i*360/num, ((3/2+j/5)-(2))/30, 3/2+j/5, [41, 44, 46, 48][n], 20); }
					a+=[40, 20, 20, 10][GetDifficulty]*side;
					y+=y2; y2+=[4, 2, 2, 1][GetDifficulty];
					wait([4, 2, 2, 1][GetDifficulty]);
				}
				wait(10);
			}
			wait(30);
			TCharge(GetX, GetY);
			PlaySE2("charge");
			ExMove;
			wait(60);
			side*=-1;
		}
	}
}