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(95);
		LoadGraphic(bossImage);
		LoadGraphic(bossBack);
		SetText("Border Sign "\""Illusionary Boundaries"\");
		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-100, 15);
			Concentration01(120);
		}
		frame++;
		if(frame == 10) {
			loop(20) {
				let a = rand(0,360); let v = rand(4, 15);
				CreateShotA(0, GetX, GetY, 10);
				SetShotDataA(0, 0, v, a, 0, -v/60, 0, BLUE22);
				SetShotDataA(0, 60, 0, a, 3, 1/20, 4, NULL);
				SetShotDataA(0, 105, NULL, NULL, 0, 1/20, 4, NULL);
				FireShot(0);
				a = rand(0,360); v = rand(4, 15);
				CreateShotA(0, GetX, GetY, 10);
				SetShotDataA(0, 0, v, a, 0, -v/60, 0, RED22);
				SetShotDataA(0, 60, 0, a, -3, 1/20, 4, NULL);
				SetShotDataA(0, 105, NULL, NULL, 0, 1/20, 4, NULL);
				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; }
	}
}