#TouhouDanmakufu[Single]
#Title[Koishi - Nonspell #3]
#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/2, 10, 4);
		//cutin("???",imgBossCut,0,0,255,511); SetScore(1000000);
		SetInvincibility(120);
		wait(120);
		attack0;
		attack1;
		attack2;
	}
	task attack0 {
		let a = 0; wait(150);
		loop {
			ascent(i in 0..11) { ascent(j in 0..2) { CreateShot01(GetX, GetY, 2-j/2, a+i*360/11, RED21, 10); } }
			a+=37/pi; a%=360;
			wait(30);
		}
	}
	task attack2 {
		let a = 0; wait(150);
		loop {
			loop(6) {
				ascent(j in 0..2) { CreateShot01(GetX, GetY, 4-j/4, GetAngleToPlayer, BLUE02, 10); }
				wait(10);
			} wait(30);
		}
	}
	task attack1 {
		loop {
			loop(150/10) {
				PlaySE2("se_shot_tan");
				ascent(i in 0..2) { ascent(j in 0..17) {
					CreateShotA(0, GetX, GetY, 10);
					SetShotDataA(0, 0, 3/2+j*3/2, GetAngleToPlayer+90*((-1)^i), 0, -(3/2+j*3/2)/45, 0, PURPLE12);
					SetShotDataA(0, 45, 0, GetAngleToPlayer, 0, 1/20, 3, NULL);
					FireShot(0);
				} }
				wait(10);
			} ExMove03_(GetCenterY/2, rand(25, 60), rand(30, 50), 11, 4);
		}
	}
}