Decompiled source of LLB Funny Mod v1.0.0

LLB_Funny_Mod.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Abilities;
using BepInEx;
using BepInEx.Logging;
using GameplayEntities;
using HarmonyLib;
using LLB_Infinite_Ability.Patches;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("LLB_Infinite_Ability")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LLB_Infinite_Ability")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("672dcdb2-08dc-4e66-b9ce-91f9e16c4f65")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LLB_Infinite_Ability
{
	[BepInPlugin("Gaming.AbilityMod", "Infinite Ability", "1.0.0")]
	public class InfiniteAbilityBase : BaseUnityPlugin
	{
		private const string modGUID = "Gaming.AbilityMod";

		private const string modName = "Infinite Ability";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Gaming.AbilityMod");

		private static InfiniteAbilityBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Gaming.AbilityMod");
			mls.LogInfo((object)"Mod successfully loaded");
			harmony.PatchAll(typeof(InfiniteAbilityBase));
			harmony.PatchAll(typeof(AbilityBallEntityPatch));
			harmony.PatchAll(typeof(TeleportAbilityPatch));
			harmony.PatchAll(typeof(SkatePlayerPatch));
			harmony.PatchAll(typeof(GetHitBallEntityPatch));
			harmony.PatchAll(typeof(DoubleStrikeAbilityPatch));
			harmony.PatchAll(typeof(BoomPlayerPatch));
		}
	}
}
namespace LLB_Infinite_Ability.Patches
{
	[HarmonyPatch(typeof(AbilityBallEntity))]
	internal class AbilityBallEntityPatch
	{
		[HarmonyPatch("CandyWrap")]
		[HarmonyPostfix]
		private static void InfiniteCandyBallPatch(ref BouncingData ___bouncingData)
		{
			ManualLogSource val = Logger.CreateLogSource("aasdasdasdasdas");
			val.LogInfo((object)"candy workin");
			___bouncingData.specialHitHoriWall = false;
			___bouncingData.specialHitVertWall = false;
		}

		[HarmonyPatch("UpdateBubbleBall")]
		[HarmonyPrefix]
		private static void InfiniteOutBubblePrePatch(out HHBCPNCDNDH __state, ref BouncingData ___bouncingData)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ManualLogSource val = Logger.CreateLogSource("aasdasdasdasdas");
			val.LogInfo((object)"bubble workin");
			__state = ___bouncingData.timeSinceHit;
			___bouncingData.timeSinceHit = HHBCPNCDNDH.NKKIFJJEPOL(0.1m);
		}

		[HarmonyPatch("UpdateBubbleBall")]
		[HarmonyPostfix]
		private static void InfiniteOutBubblePostPatch(HHBCPNCDNDH __state, ref BouncingData ___bouncingData)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			___bouncingData.timeSinceHit = __state;
		}
	}
	[HarmonyPatch(typeof(GetHitBallEntity))]
	internal class GetHitBallEntityPatch
	{
		[HarmonyPatch("CanActivateSpecialOnThisBall")]
		[HarmonyPrefix]
		private static bool CuffCanBeAbilitiedPatch(ref bool __result)
		{
			__result = true;
			return true;
		}
	}
	[HarmonyPatch(typeof(DoubleStrikeAbility))]
	internal class DoubleStrikeAbilityPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPrefix]
		private static void EndlessDoubleStrikePatch(ref PlayerData ___data, ref HHBCPNCDNDH ___doubleStrikeWindUpDuration)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			ManualLogSource val = Logger.CreateLogSource("aasdasdasdasdas");
			val.LogInfo((object)"kid workin");
			if (HHBCPNCDNDH.OCDKNPDIPOB(((MovableData)___data).abilityStateTimer, ___doubleStrikeWindUpDuration))
			{
				val.LogInfo((object)"Timer reached");
				((MovableData)___data).abilityStateTimer = ___doubleStrikeWindUpDuration;
			}
		}
	}
	[HarmonyPatch(typeof(BoomPlayer))]
	internal class BoomPlayerPatch
	{
		[HarmonyPatch("ActivateSpecial")]
		[HarmonyPostfix]
		private static void InfiniteSoundPatch(ref PlayerData ___playerData)
		{
			((AbilityData)___playerData).specialAmount = 999;
		}
	}
	[HarmonyPatch(typeof(SkatePlayer))]
	internal class SkatePlayerPatch
	{
		[HarmonyPatch("UpdateHitPause")]
		[HarmonyPrefix]
		private static void InfiniteBubblesPatch(ref PlayerData ___playerData)
		{
			((AbilityData)___playerData).specialAmount = 1;
		}
	}
	[HarmonyPatch(typeof(TeleportAbility))]
	internal class TeleportAbilityPatch
	{
		[HarmonyPatch("Teleport")]
		[HarmonyPostfix]
		private static void InfiniteTeleportPatch(ref PlayerData ___data)
		{
			PlayerData obj = ___data;
			((AbilityData)obj).specialAmount = ((AbilityData)obj).specialAmount + 1;
			((AbilityData)___data).bufferedSpecial = false;
		}
	}
}