using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using BepInEx; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("StickFightTheGameMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("StickFightTheGameMod")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("07ad7751-658e-41ea-b1ee-8a7e59ffbe73")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.0")] namespace InfiniteAmmo; [BepInPlugin("bayturtleking.stickfight.infiniteammo", "Infinite Ammo", "1.0.0")] public class InfinAmmoMod : BaseUnityPlugin { private Harmony harmony; private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown harmony = new Harmony("bayturtleking.stickfight.infiniteammo"); harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"bayturtle's infinite ammo loadedd"); } private void OnDestroy() { Harmony obj = harmony; if (obj != null) { obj.UnpatchSelf(); } } } [HarmonyPatch(typeof(Fighting), "Attack")] public static class patcherr { private static readonly FieldInfo dideyleave = AccessTools.Field(typeof(Fighting), "bulletsLeft"); private static void Postfix(Fighting __instance) { if (!((Object)(object)__instance.weapon == (Object)null)) { dideyleave.SetValue(__instance, __instance.weapon.startBullets); } } }