using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using FishNet;
using FishNet.Connection;
using FishNet.Object;
using FishNet.Serializing;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("murderminemurder, murderminer")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("euthanize the retarded")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("eugenics 2025")]
[assembly: AssemblyTitle("cure the woke mind virus")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace retardcrusher
{
[BepInPlugin("murderminemurderer.MTSGA", "MTSGA", "1.0.0")]
[BepInProcess("MageArena.exe")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class blood : BaseUnityPlugin
{
public static ManualLogSource Logger;
public static bool debug = false;
public const string guid = "murderminemurderer.MTSGA";
public static string modsync = "host";
public static Func<IEnumerator, Coroutine> bootloopingmybrain;
internal void Awake()
{
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"Make Toad Soup Great Again loaded");
if (Chainloader.PluginInfos.ContainsKey("com.magearena.modsync") || Chainloader.PluginInfos.ContainsKey("murderminemurderer.castlespawn"))
{
configman.dotheconfig(((BaseUnityPlugin)this).Config);
new Harmony("murderminemurderer.MTSGA").PatchAll();
bootloopingmybrain = ((MonoBehaviour)this).StartCoroutine;
}
}
}
public static class configman
{
public static ConfigEntry<int> licks;
public static ConfigEntry<float> waitperiod;
public static void dotheconfig(ConfigFile config)
{
string text = "magasoup";
licks = config.Bind<int>(text, "licks", 2, "licks + 1 to give when drinking toad soup");
waitperiod = config.Bind<float>(text, "waitperiod", 15.2f, "wait to re-enable toad soup, default ingame val is 15f");
}
}
[HarmonyPatch]
public class tryingtomanipulateme
{
[CompilerGenerated]
private sealed class <soupchugger2006>d__4 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public PlayerMovement __instance;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <soupchugger2006>d__4(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = waitperiod;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
__instance.RpcWriter___Observers_ObsDrinkSoup_3316948804(3);
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private static WaitForSecondsRealtime waitperiod = new WaitForSecondsRealtime(configman.waitperiod.Value);
public static Func<IEnumerator, Coroutine> StartCoroutine;
private static Dictionary<PlayerMovement, int> cry4help = new Dictionary<PlayerMovement, int>();
public static PlayerMovement? getplayerbynetwork(NetworkConnection con)
{
GameObject[] array = (GameObject[])(object)Object.FindObjectsByType(typeof(GameObject), (FindObjectsSortMode)1);
PlayerMovement val2 = default(PlayerMovement);
foreach (GameObject val in array)
{
if (((Object)val).name.Contains("Player") && val.TryGetComponent<PlayerMovement>(ref val2) && ((NetworkBehaviour)val2).Owner == con)
{
return val2;
}
}
return null;
}
[IteratorStateMachine(typeof(<soupchugger2006>d__4))]
private static IEnumerator soupchugger2006(PlayerMovement __instance)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <soupchugger2006>d__4(0)
{
__instance = __instance
};
}
[HarmonyPatch(typeof(PlayerMovement), "RpcReader___Server_FrogToungeAniServer_1934289915")]
[HarmonyPrefix]
private static void wast0iddson(PooledReader PooledReader0, NetworkConnection conn)
{
PlayerMovement val = getplayerbynetwork(conn);
if ((Object)(object)val != (Object)null && GeneralExtensions.GetValueSafe<PlayerMovement, int>(cry4help, val) > 0)
{
cry4help[val]--;
blood.bootloopingmybrain(soupchugger2006(val));
}
}
[HarmonyPatch(typeof(PlayerMovement), "StartGame")]
[HarmonyPrefix]
private static void princessarmyweddingcombat()
{
cry4help.Clear();
}
[HarmonyPatch(typeof(PlayerMovement), "ObsDrinkSoup")]
[HarmonyPostfix]
private static void i_despise_the_90percent(int stewid, ref PlayerMovement __instance)
{
if (InstanceFinder.IsHostStarted && stewid == 3)
{
cry4help[__instance] = GeneralExtensions.GetValueSafe<PlayerMovement, int>(cry4help, __instance) + configman.licks.Value;
}
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "Make Toad Soup Great Again";
public const string PLUGIN_NAME = "eugenics 2025";
public const string PLUGIN_VERSION = "1.0.0";
}
}