script_enemy_main {
	let bossImage = GetCurrentScriptDirectory~"marisa.png";
	let bossBack = GetCurrentScriptDirectory~"marisaback.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(""\""Ultimate Shortwave"\");
		SetScore(10000);
	}
	let frame = -120;
	let frame2 = 0;
	let frame3 = 0;
	let x = rand(-5, 5);
	let y = rand(-50, 0);
	let frameMove = -120;
	@MainLoop {
		SetCollisionA(GetX, GetY, 50);
		SetCollisionB(GetX, GetY, 50);
		if(frame == -120) {
			SetMovePosition02(GetCenterX, GetCenterY/2, 15);
			Concentration01(120);
		}
		frame++;
		frameMove++;
		if(frame > 0 && frame <= 120) {
			if(frame % 12 == 0) {
				x = rand(-5,5);
				ascent(i in 0..30) {
					CreateShotA(0, GetClipMinX+x+i*384/30, y+i*100/30, 30);
					SetShotDataA(0, 0, 0, 90, 0, 0, 0, RED23+frame2);
					SetShotDataA(0, 270-frame*2, 0, NULL, 0, (2+1/2*sin(frame3))/45, 2+1/2*sin(frame3), NULL);
					FireShot(0);
					CreateShotA(0, GetClipMaxX+x-i*384/30, y+i*100/30, 30);
					SetShotDataA(0, 0, 0, 270, 0, 0, 0, RED23+frame2);
					SetShotDataA(0, 270-frame*2, 0, NULL, 0, (2+1/2*sin(frame3))/45, 2+1/2*sin(frame3), NULL);
					FireShot(0);
					frame2++; if(frame2 >= 8) { frame2-=8; }
					frame3+=37; if(frame3 >= 360) { frame3-=360; }
				}
				y+=100;
			}
		}
		if(frame >= 360) {
			y = rand(-50,0);
			frame = 0;
		}
		if(frameMove >= 200) {
			SetMovePosition02(GetCenterX+rand(-150, 150), GetCenterY/2+rand(-100, 100), 60);
		frameMove = 0; }
	}
	@DrawLoop {
		SetTexture(bossImage);
		SetGraphicRect(0, 0, 128, 128);
		SetGraphicScale(1, 1);
		SetGraphicAngle(0, 0, 0);
		SetAlpha(255);
		DrawGraphic(GetX, GetY);
		DrawText("Marisa Kirisame", 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);
		DrawGraphic(GetCenterX, GetCenterY);
		backspin-=1; backspin%=360;
	}
	@Finalize {
		DeleteGraphic(bossImage);
		DeleteGraphic(bossBack);
	}
}