#TouhouDanmakufu[Single]
#Title[Koishi - Nonspell #1]
#BackGround[User(.\bgNon.png, 0, 0)]
#BGM[.\music0.mp3]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

	#include_function ".\Include.~ath"

	task codeInit {
		SetLife(10000); SetTimer(62);
		SetMovePosition03(GetCenterX, GetCenterY-125, 10, 4);
		//cutin("???",imgBossCut,0,0,255,511); SetScore(1000000);
		SetInvincibility(120);
		wait(120);
		attack1;
	}
	task attack1 {
		let a = rand(0,360); let s = 1;
		loop {
			Animate("koishi", "attack", false);
			let n = -90; let r = 30; let x = -50*s; let v = 0;
			loop(45) {
				PlaySE2("se_shot_tan");
				ascent(i in 0..9) {
					CreateShot01(GetX+x+r*cos(n), GetY+r*sin(n), 3/2+v, a+i*360/9, RED12+2*[0,1][s==-1], 10);
				}
				a+=33/pi*s; a%=360; n+=25/7*s; r+=pi; x+=1*s; v+=1/30;
				wait(1);
			} wait(30); s*=-1; ExMove03_(GetCenterY-125, rand(25, 60), rand(10, 30), 11, 4); wait(45);
		}
	}
}