script_enemy_main {
	let bossImage = GetCurrentScriptDirectory~"yukari.png";
	let bossBack = GetCurrentScriptDirectory~"yukariback.png";
	@Initialize {
		if(GetPlayerType==USER_PLAYER) { RaiseError("Why are you using this player","Error"); }
		SetLife(1000);
		SetDamageRate(20, 50);
		SetTimer(65);
		LoadGraphic(bossImage);
		LoadGraphic(bossBack);
		SetText("Boundary "\""Boundary between Rainbow and White"\");
		SetScore(10000);
	}
	let frame = -120;
	@MainLoop {
		if(!OnBomb && GetTimeOfPlayerInvincibility == 0) { SetCollisionA(GetX, GetY, 50); } else { AddLife(5); }
		SetCollisionB(GetX, GetY, 50);
		if(frame == -120) {
			SetMovePosition02(GetCenterX, GetCenterY-50, 15);
			Concentration01(120);
		}
		frame++;
		if(frame % 30 == 0) { ascent(i in 0..60) { CreateShot01(GetX, GetY, 1, GetAngleToPlayer+i*360/60, WHITE11, 10); } }
		if(frame == 150) {
			ascent(i in 0..7) {
				CreateShotA(0, GetX, GetY, 0);
				SetShotDataA(0, 0, 1, GetAngleToPlayer+i*360/7, 0, 0, 0, RED21);
				ascent(j in 0..2) { CreateShotA(1, 0, 0, 0);
				SetShotDataA(1, 0, 1, -GetAngleToPlayer+45*1*j+i*360/7, 0, 0, 0, ORANGE21);
					ascent(k in 0..1) { CreateShotA(2, 0, 0, 0);
					SetShotDataA(2, 0, 2, 15+GetAngleToPlayer+62*k+i*360/7, 0, 0, 0, YELLOW21);
						ascent(m in 0..3) { CreateShotA(3, 0, 0, 0);
						SetShotDataA(3, 0, 2, 75-GetAngleToPlayer+39*m+i*360/7, 0, 0, 0, GREEN21);
							ascent(n in 0..2) { CreateShotA(4, 0, 0, 0);
							SetShotDataA(4, 0, 2, 45+2*GetAngleToPlayer+19*n+i*360/7, 0, 0, 0, AQUA21);
								ascent(p in 0..3) { CreateShotA(5, 0, 0, 0);
								SetShotDataA(5, 0, 2, 5*GetAngleToPlayer+360/3*p+i*360/7, 0, 0, 0, BLUE21);
									ascent(q in 0..2) { CreateShotA(6, 0, 0, 0);
									SetShotDataA(6, 0, 2, -3/2*GetAngleToPlayer+360/2*q+i*360/7, 0, 0, 0, PURPLE21);
									AddShot(30, 5, 6, 0); }
								AddShot(30, 4, 5, 0); }
							AddShot(30, 3, 4, 0); }
						AddShot(30, 2, 3, 0); }
					AddShot(30, 1, 2, 0); }
				AddShot(30, 0, 1, 0); }
				FireShot(0);
			}
			frame = 0;
		}
	}
	@DrawLoop {
		SetTexture(bossImage);
		SetGraphicRect(0, 0, 128, 128);
		SetGraphicScale(1, 1);
		SetGraphicAngle(0, 0, 0);
		SetAlpha(255);
		SetRenderState(ALPHA);
		DrawGraphic(GetX, GetY);
		DrawText("Past Yukari Yakumo", 40, 30, 12, 255);
	}
	let backspin = 0;
	@BackGround {
		SetTexture(bossBack);
		SetGraphicRect(0, 0, 512, 512);
		SetGraphicScale(3/2, 3/2);
		SetGraphicAngle(0, 0, backspin);
		SetAlpha(255);
		SetRenderState(ADD);
		DrawGraphic(GetCenterX, GetCenterY);
		backspin+=1; backspin%=360;
	}
	@Finalize {
		DeleteGraphic(bossImage);
		DeleteGraphic(bossBack);
		if(IsTimeOut) { ExtendPlayer(-GetPlayerLife); ShootDownPlayer; }
	}
}