script_enemy_main {
	let fairyImage = GetCurrentScriptDirectory~"fairy.png";
	let foeImage = GetCurrentScriptDirectory~"foe.png";
	@Initialize {
		if(GetPlayerType==USER_PLAYER) { RaiseError("Why are you using this player","Error"); }
		SetLife(50);
		SetDamageRate(150, 50);
		SetTimer(35);
	}
	let frame = rand(0,2);
	let frame2 = 0;
	@MainLoop {
		SetCollisionA(GetX, GetY, 30);
		SetCollisionB(GetX, GetY, 20);
		frame++; frame2++;
		if(frame >= 2) {
			CreateShot01(GetX, GetY, 3, rand(0,360), RED01+GetArgument[0], 10);
			frame = 0;
		}
		if(frame2 == [60, 90][GetArgument[1] == 0]) {
			SetSpeed(15);
			SetAngle(GetAngleToPlayer);
		}
	}
	@DrawLoop {
		SetTexture(foeImage);
		SetGraphicRect(0, 0, 128, 128);
		SetGraphicScale(1, 1);
		SetGraphicAngle(0, 0, 0);
		SetAlpha(255);
		DrawGraphic(GetX, GetY);
	}
	@Finalize {
	}
}