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(2000);
		SetDamageRate(20, 50);
		SetTimer(65);
		LoadGraphic(bossImage);
		LoadGraphic(bossBack);
		SetText("Perverse Love "\""Easy Harvest Master Spark"\");
		SetScore(10000);
	}
	let frame = -120;
	let frameMove = -120;
	@MainLoop {
		SetCollisionB(GetX, GetY, 50);
		if(frame == -120) {
			SetMovePosition02(GetCenterX, GetCenterY/2, 15);
			Concentration01(120);
		}
		frame++;
		frameMove++;
		if(frame == 180) {
			let a = rand(0,360);
			loop(50) {
				CreateLaser01(GetX, GetY, 7, a, 1250, 15, YELLOW12, 10);
				a+=360/50;
			}
		}
		if(frame >= 300) {
			let a = GetAngleToPlayer;
			loop(6) {
				CreateLaserA(0, GetX, GetY, 750, 400, YELLOW12, 30);
				SetLaserDataA(0, 0, a, 0, 0, 0, 0);
				SetShotKillTime(0, 240);
				FireShot(0);
				a+=360/6;
			}
			frame = 0;
		}
		if(frameMove >= 200) {
			SetMovePosition02(GetCenterX+rand(-150, 150), GetCenterY-50+rand(-25,25), 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);
	}
}