using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
using UnityEngine.AI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("NoMoreCheatCompany")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoMoreCheatCompany")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fa45ba87-70ba-4d08-bcb5-fa8bb4d4232e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace JesterNerfMod;
[BepInPlugin("NoMoreFunForJester", "JesterNerf", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private readonly Harmony harmony = new Harmony("NoMoreFunForJester");
private static ManualLogSource Log;
private void Awake()
{
Log = ((BaseUnityPlugin)this).Logger;
Log.LogInfo((object)"Plugin NoMoreFunForJester is loaded!");
harmony.PatchAll();
}
}
[HarmonyPatch(typeof(JesterAI))]
public class JesterAIPatch
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
private static void StartPatch(JesterAI __instance)
{
__instance.popUpTimer *= 1.5f;
__instance.beginCrankingTimer *= 1.5f;
}
[HarmonyPatch("DoAIInterval")]
[HarmonyPostfix]
private static void DoAIIntervalPatch(JesterAI __instance)
{
if (((EnemyAI)__instance).currentBehaviourStateIndex == 0 || ((EnemyAI)__instance).currentBehaviourStateIndex == 2)
{
NavMeshAgent agent = ((EnemyAI)__instance).agent;
agent.speed *= 0.75f;
}
}
[HarmonyPatch("SetJesterInitialValues")]
[HarmonyPostfix]
private static void SetJesterInitialValuesPatch(JesterAI __instance)
{
__instance.popUpTimer = Random.Range(52.5f, 60f);
__instance.beginCrankingTimer = Random.Range(19.5f, 31.5f);
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "NoMoreFunForJester";
public const string PLUGIN_NAME = "JesterNerf";
public const string PLUGIN_VERSION = "1.0.0";
}