Decompiled source of 13 Downright Dastardly Ascents v1.4.0

BepInEx/plugins/13dda.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Peak.Afflictions;
using Photon.Pun;
using Photon.Realtime;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using Zorro.Core;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("13dda")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.3.1.0")]
[assembly: AssemblyInformationalVersion("1.3.1")]
[assembly: AssemblyProduct("13dda")]
[assembly: AssemblyTitle("13 downright dastardly ascents")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.3.1.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 dda
{
	[HarmonyPatch(typeof(LavaRising), "Update")]
	internal static class activeKiln
	{
		internal static void Prefix(LavaRising __instance)
		{
			if (Ascents.currentAscent > 14 || Plugin.Ascent15.Value)
			{
				__instance.initialWaitTime = 30f;
				__instance.travelTime = 700f;
			}
		}
	}
	[HarmonyPatch(typeof(AscentUI), "Update")]
	internal static class AscentUiFix
	{
		internal static bool Prefix(TextMeshProUGUI ___text)
		{
			int currentAscent = Ascents._currentAscent;
			((TMP_Text)___text).text = Plugin.GetText("AscentX", currentAscent);
			if (currentAscent == 0)
			{
				((TMP_Text)___text).text = "";
			}
			return false;
		}
	}
	public abstract class timerRiser
	{
		public static float timerIzer;
	}
	[HarmonyPatch(typeof(WindChillZone), "ApplyStatus")]
	internal static class intenseWinds
	{
		internal static bool Prefix(WindChillZone __instance)
		{
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Invalid comparison between Unknown and I4
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Invalid comparison between Unknown and I4
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Invalid comparison between Unknown and I4
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Invalid comparison between Unknown and I4
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Invalid comparison between Unknown and I4
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Invalid comparison between Unknown and I4
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Invalid comparison between Unknown and I4
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Invalid comparison between Unknown and I4
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Invalid comparison between Unknown and I4
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0353: Unknown result type (might be due to invalid IL or missing references)
			//IL_0359: Invalid comparison between Unknown and I4
			//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			//IL_0395: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)(((Object)__instance).name + " " + __instance.windForce));
			if (Ascents.currentAscent > 13 || Plugin.Ascent14.Value)
			{
				if (((Object)__instance).name == "WindStorm")
				{
					__instance.windForce = 30f;
					if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 7 && (int)Singleton<MapHandler>.Instance.GetCurrentSegment() == 1)
					{
						__instance.windForce = 50f;
					}
					else if ((int)Singleton<MapHandler>.Instance.GetCurrentSegment() == 4 || (int)Singleton<MapHandler>.Instance.GetCurrentSegment() == 5)
					{
						__instance.windForce = 0f;
					}
				}
				__instance.windPlayerFactor = WindChillZone.GetWindIntensityAtPoint(Character.localCharacter.Center, __instance.lightVolumeSampleThreshold_lower, __instance.lightVolumeSampleThreshold_margin);
				if ((Ascents.currentAscent > 19 || Plugin.Ascent20.Value) && ((Object)__instance).name == "SnowStorm")
				{
					if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() != 2 || (int)Singleton<MapHandler>.Instance.GetCurrentSegment() != 2)
					{
						__instance.windForce = 12f;
						__instance.statusApplicationPerSecond = 0.01f;
					}
					else
					{
						__instance.windForce = 20f;
						__instance.statusApplicationPerSecond = 0.07f;
					}
				}
				if (((Object)__instance).name == "SnowStorm")
				{
					if (((int)Singleton<MapHandler>.Instance.GetCurrentSegment() == 2 && (int)Singleton<MapHandler>.Instance.GetCurrentSegment() != 3) || DayNightManager.instance.isDay < 0.5f)
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)2, __instance.windPlayerFactor * __instance.statusApplicationPerSecond * Time.deltaTime * Mathf.Clamp01(__instance.hasBeenActiveFor * 0.2f) * 1.2f, false, true);
					}
					else if ((int)Singleton<MapHandler>.Instance.GetCurrentSegment() != 3)
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)8, __instance.windPlayerFactor * __instance.statusApplicationPerSecond * Time.deltaTime * Mathf.Clamp01(__instance.hasBeenActiveFor * 0.2f), false, true);
					}
				}
				if (((Object)__instance).name == "RainStorm")
				{
					if (Character.localCharacter.data.groundedFor > 0.5f || Character.localCharacter.data.isClimbing)
					{
						Character.localCharacter.data.slippy = Mathf.Clamp01(Mathf.Max(Character.localCharacter.data.slippy, __instance.windPlayerFactor * 200f));
					}
					else
					{
						RaycastHit val = HelperFunctions.LineCheck(Character.localCharacter.Center + new Vector3(0f, 500f, 0f), Character.localCharacter.Center, (LayerType)0, 0f, (QueryTriggerInteraction)1);
						if ((Object)(object)((RaycastHit)(ref val)).transform == (Object)null || (Object)(object)((RaycastHit)(ref val)).transform.root == (Object)(object)((Component)Character.localCharacter).transform.root)
						{
							if ((int)Singleton<MapHandler>.Instance.GetCurrentSegment() != 1)
							{
								Rigidbody rig = Character.localCharacter.GetBodypart((BodypartType)0).rig;
								rig.linearVelocity -= new Vector3(0f, 200f * Time.deltaTime, 0f);
							}
							else
							{
								Rigidbody rig2 = Character.localCharacter.GetBodypart((BodypartType)0).rig;
								rig2.linearVelocity -= new Vector3(0f, 400f * Time.deltaTime, 0f);
							}
						}
					}
				}
			}
			else
			{
				__instance.windPlayerFactor = WindChillZone.GetWindIntensityAtPoint(Character.localCharacter.Center, __instance.lightVolumeSampleThreshold_lower, __instance.lightVolumeSampleThreshold_margin);
				Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)2, __instance.windPlayerFactor * __instance.statusApplicationPerSecond * Time.deltaTime * Mathf.Clamp01(__instance.hasBeenActiveFor * 0.2f), false, true);
				if (__instance.setSlippy)
				{
					Character.localCharacter.data.slippy = Mathf.Clamp01(Mathf.Max(Character.localCharacter.data.slippy, __instance.windPlayerFactor * 10f));
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Lava), "FixedUpdate")]
	internal static class uberRise
	{
		internal static void Prefix(Lava __instance)
		{
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			if (!(((Object)__instance).name == "River"))
			{
				return;
			}
			Animator component = ((Component)__instance).GetComponent<Animator>();
			if (Ascents.currentAscent > 13 || Plugin.Ascent14.Value)
			{
				((Behaviour)component).enabled = false;
				float num = 1f;
				if (timerRiser.timerIzer > 1.75f && timerRiser.timerIzer < 1.85f)
				{
					num = 0.15f;
				}
				timerRiser.timerIzer += Time.deltaTime / 17.8f * num;
				float num2 = 787f - 8f * (float)Math.Cos(timerRiser.timerIzer * timerRiser.timerIzer);
				((Component)__instance).transform.position = new Vector3(((Component)__instance).transform.position.x, num2, ((Component)__instance).transform.position.z);
				if ((double)Math.Abs(timerRiser.timerIzer) > Math.Abs(Math.PI * 2.0 / (double)timerRiser.timerIzer))
				{
					timerRiser.timerIzer = -0.35f;
				}
			}
			else
			{
				((Behaviour)component).enabled = true;
			}
		}
	}
	[HarmonyPatch(typeof(TornadoSpawner), "Update")]
	internal static class uberTornado
	{
		internal static void Prefix(TornadoSpawner __instance)
		{
			if (Ascents.currentAscent > 13 || Plugin.Ascent14.Value)
			{
				__instance.minSpawnTime = 20f;
				__instance.maxSpawnTime = 120f;
				if (__instance.untilNext > 120f)
				{
					__instance.untilNext = 0f;
				}
			}
		}
	}
	[HarmonyPatch(typeof(Tornado), "CapturedCharacter")]
	internal static class uberTornadoPt2
	{
		internal static bool Prefix(Tornado __instance)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_0346: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			//IL_0365: Unknown result type (might be due to invalid IL or missing references)
			//IL_036f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Invalid comparison between Unknown and I4
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			foreach (Character caughtCharacter in __instance.caughtCharacters)
			{
				if (__instance.ignoredCharacters.Contains(caughtCharacter))
				{
					continue;
				}
				float num = 15f;
				Vector3 val = Vector3Extensions.Flat(caughtCharacter.Center - ((Component)__instance).transform.position);
				Vector3 val2 = ((Vector3)(ref val)).normalized * num;
				Vector3 val3 = ((Component)__instance).transform.position + val2;
				Vector3 val4 = Vector3Extensions.Flat(val3 - caughtCharacter.Center);
				val = Vector3.Cross(Vector3.up, val2);
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				if (Ascents.currentAscent > 13)
				{
					caughtCharacter.AddForce(normalized * __instance.force * 2f, 2f, 2f);
					caughtCharacter.AddForce(val4 * __instance.force * 0.2f * 2f, 2f, 2f);
					caughtCharacter.AddForce(Vector3.up * (19f + Mathf.Abs(__instance.Height(caughtCharacter))) * 2f, 2f, 2f);
				}
				else
				{
					caughtCharacter.AddForce(normalized * __instance.force, 1f, 1f);
					caughtCharacter.AddForce(val4 * __instance.force * 0.2f, 1f, 1f);
					caughtCharacter.AddForce(Vector3.up * (19f + Mathf.Abs(__instance.Height(caughtCharacter) * 1f)), 1f, 1f);
				}
				caughtCharacter.ClampSinceGrounded(0.5f);
				if (caughtCharacter.IsLocal)
				{
					if (Ascents.currentAscent > 13)
					{
						caughtCharacter.GetBodypartRig((BodypartType)2).AddTorque(Vector3.up * 200f, (ForceMode)5);
						caughtCharacter.GetBodypartRig((BodypartType)0).AddTorque(Vector3.up * 200f, (ForceMode)5);
						caughtCharacter.GetBodypartRig((BodypartType)2).AddTorque(((Vector3)(ref val2)).normalized * 100f, (ForceMode)5);
						caughtCharacter.GetBodypartRig((BodypartType)0).AddTorque(((Vector3)(ref val2)).normalized * 100f, (ForceMode)5);
						if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 6)
						{
							caughtCharacter.refs.afflictions.AddStatus((STATUSTYPE)6, 0.05f * Time.deltaTime, false, true);
						}
					}
					else
					{
						caughtCharacter.GetBodypartRig((BodypartType)2).AddTorque(Vector3.up * 200f, (ForceMode)5);
						caughtCharacter.GetBodypartRig((BodypartType)0).AddTorque(Vector3.up * 200f, (ForceMode)5);
						caughtCharacter.GetBodypartRig((BodypartType)2).AddTorque(((Vector3)(ref val2)).normalized * 100f, (ForceMode)5);
						caughtCharacter.GetBodypartRig((BodypartType)0).AddTorque(((Vector3)(ref val2)).normalized * 100f, (ForceMode)5);
					}
				}
				else
				{
					caughtCharacter.GetBodypartRig((BodypartType)2).AddTorque(Vector3.up * 500f, (ForceMode)5);
					caughtCharacter.GetBodypartRig((BodypartType)0).AddTorque(Vector3.up * 500f, (ForceMode)5);
					caughtCharacter.GetBodypartRig((BodypartType)2).AddTorque(((Vector3)(ref val2)).normalized * 500f, (ForceMode)5);
					caughtCharacter.GetBodypartRig((BodypartType)0).AddTorque(((Vector3)(ref val2)).normalized * 500f, (ForceMode)5);
				}
				caughtCharacter.refs.movement.ApplyExtraDrag(0.95f, true);
				caughtCharacter.RPCA_Fall(0.5f);
				if (caughtCharacter.IsLocal && __instance.LetTargetGo(caughtCharacter, val3))
				{
					__instance.view.RPC("RPCA_ThrowPlayer", (RpcTarget)0, new object[1] { caughtCharacter.refs.view.ViewID });
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(WindChillZone), "Awake")]
	internal static class allWeather
	{
		internal static void Prefix(WindChillZone __instance)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			if (Ascents.currentAscent > 19 || Plugin.Ascent20.Value)
			{
				ref Bounds windZoneBounds = ref __instance.windZoneBounds;
				((Bounds)(ref windZoneBounds)).size = ((Bounds)(ref windZoneBounds)).size + new Vector3(3000f, 3000f, 3000f);
				__instance.windActive = true;
				__instance.setSlippy = true;
			}
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "Awake")]
	internal static class allWind
	{
		public static void Postfix()
		{
			if (Ascents.currentAscent <= 19 && !Plugin.Ascent20.Value)
			{
				return;
			}
			GameObject val = GameObject.Find("Biome_3");
			for (int i = 0; i < val.transform.childCount; i++)
			{
				GameObject gameObject = ((Component)val.transform.GetChild(i)).gameObject;
				if (!(((Object)gameObject).name == "Alpine"))
				{
					continue;
				}
				for (int j = 0; j < gameObject.transform.childCount; j++)
				{
					if (!gameObject.activeSelf)
					{
						((Component)gameObject.transform.GetChild(j)).gameObject.SetActive(false);
					}
					if (((Object)((Component)gameObject.transform.GetChild(j)).gameObject).name == "SnowStorm")
					{
						gameObject.SetActive(true);
						((Component)gameObject.transform.GetChild(j)).gameObject.SetActive(true);
					}
				}
			}
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "Update")]
	internal static class allSun
	{
		public static float timeTillNext = 5f;

		internal static void Postfix(OrbFogHandler __instance)
		{
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Invalid comparison between Unknown and I4
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Invalid comparison between Unknown and I4
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Invalid comparison between Unknown and I4
			if (timeTillNext < 0f && PhotonNetwork.IsMasterClient && (Ascents.currentAscent > 19 || Plugin.Ascent20.Value))
			{
				timeTillNext = Random.Range(40f, 140f);
				foreach (Character allCharacter in Character.AllCharacters)
				{
					if (!allCharacter.data.dead)
					{
						GameObject val = PhotonNetwork.Instantiate("Tornado", new Vector3(allCharacter.Center.x + Random.Range(-200f, 200f), allCharacter.Center.y, allCharacter.Center.z + Random.Range(-200f, 200f)), Quaternion.identity, (byte)0, (object[])null);
						val.GetComponent<PhotonView>().RPC("RPCA_InitTornado", (RpcTarget)0, new object[1] { val.GetComponent<PhotonView>().ViewID });
						((Object)val).name = "Custom";
						break;
					}
				}
			}
			timeTillNext -= Time.deltaTime;
			Transform transform = ((Component)DayNightManager.instance.sun).transform;
			RaycastHit val2 = HelperFunctions.LineCheck(Character.localCharacter.Center + transform.forward * -1000f, Character.localCharacter.Center, (LayerType)0, 0f, (QueryTriggerInteraction)1);
			if (((Object)(object)((RaycastHit)(ref val2)).transform == (Object)null || (Object)(object)((RaycastHit)(ref val2)).transform.root == (Object)(object)((Component)Character.localCharacter).transform.root) && Application.isPlaying && (Object)(object)Character.localCharacter != (Object)null && (Ascents.currentAscent > 18 || Plugin.Ascent19.Value) && (int)Singleton<MapHandler>.Instance.GetCurrentBiome() != 6 && DayNightManager.instance.sun.intensity > 1f)
			{
				if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 2 && (int)Singleton<MapHandler>.Instance.GetCurrentSegment() == 2)
				{
					Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)2, 0.005f * Time.deltaTime, false, true);
				}
				else
				{
					Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)8, 0.005f * Time.deltaTime, false, true);
				}
			}
		}
	}
	[HarmonyPatch(typeof(Tornado), "Update")]
	internal static class customAI
	{
		public static float regetTarget = 0f;

		public static float targetDelay = 5f;

		internal static bool Prefix(Tornado __instance)
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			if (((Object)__instance).name == "Custom")
			{
				((Component)__instance).gameObject.layer = LayerMask.NameToLayer("Ignore Raycast");
				if ((Object)(object)__instance.target == (Object)null)
				{
					__instance.target = new GameObject().transform;
				}
				if (regetTarget > targetDelay)
				{
					__instance.target.position = new Vector3(((Component)__instance).transform.position.x + Random.Range(-150f, 150f), __instance.tornadoPos.y, ((Component)__instance).transform.position.z + Random.Range(-150f, 150f));
					regetTarget = 0f;
				}
				regetTarget += Time.deltaTime;
				Vector3 vel = __instance.vel;
				Vector3 val = Vector3Extensions.Flat(__instance.target.position - __instance.tornadoPos);
				__instance.vel = FRILerp.Lerp(vel, ((Vector3)(ref val)).normalized * 15f, 0.15f, true);
				__instance.tornadoPos += __instance.vel * Time.deltaTime * 0.5f;
				Vector3 groundPos = HelperFunctions.GetGroundPos(__instance.tornadoPos + new Vector3(0f, 200f, 0f), (LayerType)5, 0f);
				__instance.tornadoPos = Vector3.Lerp(__instance.tornadoPos, groundPos, 0.5f * Time.deltaTime);
				__instance.target.position = new Vector3(__instance.target.position.x, groundPos.y, __instance.target.position.z);
				((Component)__instance).transform.position = __instance.tornadoPos;
			}
			if (__instance.view.IsMine)
			{
				__instance.syncCounter += Time.deltaTime;
				if (__instance.syncCounter > 0.5f)
				{
					__instance.syncCounter = 0f;
					__instance.view.RPC("RPCA_SyncTornado", (RpcTarget)0, new object[1] { __instance.vel });
				}
			}
			if (!__instance.dying)
			{
				((Component)__instance).transform.localScale = Vector3.Lerp(((Component)__instance).transform.localScale, Vector3.one, Time.deltaTime * 0.25f);
				__instance.lifeTime -= Time.deltaTime;
				if (__instance.lifeTime < 0f && __instance.view.IsMine)
				{
					__instance.view.RPC("RPCA_TornadoDie", (RpcTarget)0, Array.Empty<object>());
				}
			}
			else
			{
				((Component)__instance).transform.localScale = Vector3.MoveTowards(((Component)__instance).transform.localScale, Vector3.zero, Time.deltaTime * 0.2f);
				__instance.tornadoSFX.SetBool("Die", true);
				if (((Component)__instance).transform.localScale.x < 0.01f && __instance.view.IsMine)
				{
					PhotonNetwork.Destroy(((Component)__instance).gameObject);
				}
			}
			if (__instance.view.IsMine)
			{
				__instance.TargetSelection();
			}
			if (((Object)__instance).name != "Custom")
			{
				__instance.Movement();
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Tornado), "TargetSelection")]
	internal static class fixItFelix
	{
		internal static bool Prefix(Tornado __instance)
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			if (((Object)__instance).name != "Custom")
			{
				__instance.selectNewTargetInSeconds -= Time.deltaTime;
				if (!Object.op_Implicit((Object)(object)__instance.target) || __instance.selectNewTargetInSeconds < 0f || (Object.op_Implicit((Object)(object)__instance.target) && HelperFunctions.FlatDistance(((Component)__instance).transform.position, __instance.target.position) < 10f))
				{
					__instance.selectNewTargetInSeconds = Random.Range(5f, 30f);
					__instance.PickTarget();
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Action_InflictPoison), "RunAction")]
	internal static class Action_InflictPoisonPatch
	{
		internal static bool Prefix(Action_InflictPoison __instance)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				((ItemActionBase)__instance).character.refs.afflictions.AddAffliction((Affliction)new Affliction_PoisonOverTime(__instance.inflictionTime * 2f, __instance.delay * 3f, __instance.poisonPerSecond * 50f), false);
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Action_RestoreHunger), "RunAction")]
	internal static class worseFood
	{
		internal static bool Prefix(Action_RestoreHunger __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus((STATUSTYPE)1, __instance.restorationAmount * 0.5f, false, false);
			}
			else
			{
				((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus((STATUSTYPE)1, __instance.restorationAmount, false, false);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Action_GiveExtraStamina), "RunAction")]
	internal static class worseXtraStam
	{
		internal static bool Prefix(Action_GiveExtraStamina __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				((ItemActionBase)__instance).character.AddExtraStamina(__instance.amount * 0.5f);
			}
			else
			{
				((ItemActionBase)__instance).character.AddExtraStamina(__instance.amount);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(CharacterAfflictions), "SubtractStatus")]
	internal static class worsePoisonAndInjuryHealing
	{
		internal static bool Prefix(CharacterAfflictions __instance, STATUSTYPE statusType, float amount, bool fromRPC = false)
		{
			//IL_0001: 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)
			//IL_0006: Invalid comparison between Unknown and I4
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Invalid comparison between Unknown and I4
			if (((int)statusType == 0 || (int)statusType == 3 || (int)statusType == 2) && (Ascents.currentAscent > 11 || Plugin.Ascent12.Value))
			{
				amount *= 0.5f;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Affliction_AdjustDrowsyOverTime), "UpdateEffect")]
	internal static class worseLollipop
	{
		internal static bool Prefix(Affliction_AdjustDrowsyOverTime __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				((Affliction)__instance).character.refs.afflictions.AdjustStatus((STATUSTYPE)6, __instance.statusPerSecond * Time.deltaTime * 3f, false);
			}
			else
			{
				((Affliction)__instance).character.refs.afflictions.AdjustStatus((STATUSTYPE)6, __instance.statusPerSecond * Time.deltaTime, false);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Affliction_FasterBoi), "OnApplied")]
	internal static class worseNRGDrink
	{
		internal static void Prefix(Affliction_FasterBoi __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				__instance.moveSpeedMod = 0.6f;
				__instance.climbSpeedMod = 0.7f;
			}
		}
	}
	[HarmonyPatch(typeof(CharacterAfflictions), "ClearAllStatus")]
	internal static class worseClearAll
	{
		internal static bool Prefix(CharacterAfflictions __instance, bool excludeCurse = true)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Invalid comparison between Unknown and I4
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Invalid comparison between Unknown and I4
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Invalid comparison between Unknown and I4
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			int num = Enum.GetNames(typeof(STATUSTYPE)).Length;
			for (int i = 0; i < num; i++)
			{
				STATUSTYPE val = (STATUSTYPE)i;
				Debug.Log((object)("Clearing status: " + ((object)(STATUSTYPE)(ref val)).ToString()));
				if ((int)val != 7 && (!excludeCurse || (int)val != 5) && (int)val != 4)
				{
					Debug.Log((object)$"Current: {val}, amount {__instance.character.refs.afflictions.GetCurrentStatus(val)}");
					Debug.Log((object)$"SetStatus status: {val}");
					if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
					{
						__instance.character.refs.afflictions.SetStatus(val, __instance.character.refs.afflictions.GetCurrentStatus(val) * 0.25f, true);
					}
					else
					{
						__instance.character.refs.afflictions.SetStatus(val, 0f, true);
					}
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Action_ReduceUses), "ReduceUsesRPC")]
	internal static class lessUse
	{
		internal static bool Prefix(Action_ReduceUses __instance)
		{
			OptionableIntItemData data = ((ItemActionBase)__instance).item.GetData<OptionableIntItemData>((DataEntryKey)2);
			if (data.HasData && data.Value > 0)
			{
				if ((Ascents.currentAscent > 11 || Plugin.Ascent12.Value) && data.Value >= 2)
				{
					data.Value--;
				}
				data.Value--;
				if (((ItemActionBase)__instance).item.totalUses > 0)
				{
					((ItemActionBase)__instance).item.SetUseRemainingPercentage((float)data.Value / (float)((ItemActionBase)__instance).item.totalUses);
				}
				if (data.Value == 0 && __instance.consumeOnFullyUsed && Object.op_Implicit((Object)(object)((ItemActionBase)__instance).character) && ((ItemActionBase)__instance).character.IsLocal && (Object)(object)((ItemActionBase)__instance).character.data.currentItem == (Object)(object)((ItemActionBase)__instance).item)
				{
					((MonoBehaviour)((ItemActionBase)__instance).item).StartCoroutine(((ItemActionBase)__instance).item.ConsumeDelayed(false));
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Character), "RPCA_Revive")]
	internal static class worseRevive
	{
		internal static bool Prefix(Character __instance, bool applyStatus)
		{
			__instance.reviveAction?.Invoke();
			__instance.data.dead = false;
			__instance.data.deathTimer = 0f;
			__instance.data.passedOut = false;
			__instance.data.fullyPassedOut = false;
			__instance.data.sinceGrounded = 0f;
			__instance.refs.afflictions.ClearAllStatus(true);
			__instance.refs.afflictions.SetStatus((STATUSTYPE)4, 0f, true);
			if (applyStatus)
			{
				__instance.refs.afflictions.AddStatus((STATUSTYPE)5, 0.05f, false, true);
				__instance.refs.afflictions.AddStatus((STATUSTYPE)1, 0.3f, false, true);
			}
			else if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				__instance.refs.afflictions.AddStatus((STATUSTYPE)5, 0.1f, false, true);
				__instance.refs.afflictions.AddStatus((STATUSTYPE)1, 0.2f, false, true);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(RopeShooter), "OnPrimaryFinishedCast")]
	internal static class lessRope
	{
		internal static void Prefix(RopeShooter __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				__instance.length *= 0.75f;
			}
		}
	}
	[HarmonyPatch(typeof(VineShooter), "Update")]
	internal static class lessChain
	{
		internal static void Prefix(VineShooter __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				__instance.maxLength = 30f;
			}
		}
	}
	[HarmonyPatch(typeof(Action_ClearAllStatus), "RunAction")]
	internal static class worseCureAll
	{
		internal static bool Prefix(Action_ClearAllStatus __instance)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Invalid comparison between Unknown and I4
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			int num = Enum.GetNames(typeof(STATUSTYPE)).Length;
			for (int i = 0; i < num; i++)
			{
				STATUSTYPE val = (STATUSTYPE)i;
				if ((!__instance.excludeCurse || (int)val != 5) && !__instance.otherExclusions.Contains(val))
				{
					if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
					{
						((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus(val, 0.5f, false, false);
					}
					else
					{
						((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus(val, (float)Mathf.Abs(5), false, false);
					}
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Action_ModifyStatus), "RunAction")]
	internal static class worseMedkit
	{
		internal static bool Prefix(Action_ModifyStatus __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				if (__instance.changeAmount > 1f)
				{
					__instance.changeAmount = 0.7f;
				}
				__instance.changeAmount *= 0.6f;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Bodypart), "ParasolDrag")]
	internal static class dastardlyParasol
	{
		internal static bool Prefix(Bodypart __instance, float drag, float xzDrag, bool ignoreRagdoll = false)
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			if (!ignoreRagdoll)
			{
				drag = Mathf.Lerp(1f, drag, __instance.character.data.currentRagdollControll);
			}
			if (__instance.rig.isKinematic)
			{
				return false;
			}
			if (__instance.rig.linearVelocity.y < 0f)
			{
				if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
				{
					Rigidbody rig = __instance.rig;
					rig.linearVelocity -= new Vector3(0f, 200f * Time.deltaTime, 0f);
				}
				else
				{
					__instance.rig.linearVelocity = new Vector3(__instance.rig.linearVelocity.x * xzDrag, __instance.rig.linearVelocity.y * drag, __instance.rig.linearVelocity.z * xzDrag);
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(ScoutCannon), "LaunchPlayers")]
	internal static class hotShot
	{
		public static bool killFlag;

		internal static bool Prefix(ScoutCannon __instance)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			killFlag = false;
			List<Character> list = new List<Character>();
			if (Object.op_Implicit((Object)(object)__instance.target))
			{
				list.Add(__instance.target);
			}
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (Vector3.Distance(allCharacter.Center, __instance.entry.position) <= 0.75f && !((Object)(object)allCharacter == (Object)(object)__instance.target))
				{
					list.Add(allCharacter);
				}
			}
			foreach (Character item in list)
			{
				__instance.view.RPC("RPCA_LaunchTarget", (RpcTarget)0, new object[1] { item.refs.view.ViewID });
				if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
				{
					item.refs.afflictions.AddStatus((STATUSTYPE)8, 0.5f, false, true);
					killFlag = true;
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(ScoutCannon), "RPCA_LaunchItem")]
	internal static class DIE
	{
		internal static void Postfix(ScoutCannon __instance, int targetID)
		{
			if (Ascents.currentAscent <= 11 && !Plugin.Ascent12.Value)
			{
				return;
			}
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (hotShot.killFlag)
				{
					allCharacter.refs.afflictions.SetStatus((STATUSTYPE)8, 0f, true);
					allCharacter.refs.afflictions.AddStatus((STATUSTYPE)4, 200f, false, true);
					allCharacter.PassOutInstantly();
				}
			}
			hotShot.killFlag = false;
		}
	}
	[HarmonyPatch(typeof(TiedBalloon), "FixedUpdate")]
	internal static class worseBalloon
	{
		internal static void Prefix(TiedBalloon __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				__instance.floatForce = 5f;
			}
		}
	}
	[HarmonyPatch(typeof(CharacterAfflictions), "AddStatus")]
	internal static class worseIdol
	{
		internal static bool Prefix(CharacterAfflictions __instance, STATUSTYPE statusType, float amount, bool fromRPC = false)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Invalid comparison between Unknown and I4
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Invalid comparison between Unknown and I4
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Invalid comparison between Unknown and I4
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Invalid comparison between Unknown and I4
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Invalid comparison between Unknown and I4
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0448: Unknown result type (might be due to invalid IL or missing references)
			//IL_0572: Unknown result type (might be due to invalid IL or missing references)
			//IL_0574: Invalid comparison between Unknown and I4
			//IL_0464: Unknown result type (might be due to invalid IL or missing references)
			//IL_048a: Unknown result type (might be due to invalid IL or missing references)
			//IL_049c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0517: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d9: Invalid comparison between Unknown and I4
			//IL_0594: Unknown result type (might be due to invalid IL or missing references)
			//IL_059a: Invalid comparison between Unknown and I4
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_0562: Unknown result type (might be due to invalid IL or missing references)
			//IL_054b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_063c: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: Invalid comparison between Unknown and I4
			//IL_05f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ff: Invalid comparison between Unknown and I4
			//IL_065f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Invalid comparison between Unknown and I4
			if (__instance.character.isZombie && !__instance.StatusAffectsZombie(statusType))
			{
				return false;
			}
			if (__instance.character.statusesLocked)
			{
				return false;
			}
			if (__instance.character.data.isSkeleton)
			{
				if (!__instance.StatusAffectsSkeleton(statusType))
				{
					if (Ascents.currentAscent <= 11 && !Plugin.Ascent12.Value)
					{
						return false;
					}
					amount *= 0.25f;
				}
				if ((int)statusType == 0)
				{
					amount *= 8f;
					if ((Ascents.currentAscent > 11 || Plugin.Ascent12.Value) && !__instance.character.data.isInFog)
					{
						amount *= 99f;
					}
				}
			}
			if (amount == 0f)
			{
				return false;
			}
			if (__instance.m_inAirport)
			{
				return false;
			}
			if (__instance.character.isScoutmaster)
			{
				return false;
			}
			if (__instance.character.data.isInvincible && (int)statusType != 5)
			{
				if (((MonoBehaviourPun)__instance).photonView.IsMine && __instance.character.data.isInvincibleMilk)
				{
					Singleton<AchievementManager>.Instance.AddStatusBlockedByMilk(amount);
				}
				if (Ascents.currentAscent < 12 && !Plugin.Ascent12.Value)
				{
					return false;
				}
				amount *= 0.25f;
			}
			float num = 2f - __instance.statusSum;
			if (!__instance.character.IsLocal && !fromRPC)
			{
				return false;
			}
			float currentStatus = __instance.GetCurrentStatus((STATUSTYPE)8);
			float currentStatus2 = __instance.GetCurrentStatus((STATUSTYPE)2);
			if ((int)statusType == 2 && currentStatus > 0f)
			{
				__instance.SubtractStatus((STATUSTYPE)8, amount, fromRPC, false);
				amount -= currentStatus;
				if (amount <= 0f)
				{
					return false;
				}
			}
			else if ((int)statusType == 8 && currentStatus2 > 0f)
			{
				__instance.SubtractStatus((STATUSTYPE)2, amount, fromRPC, false);
				amount -= currentStatus2;
				if (amount <= 0f)
				{
					return false;
				}
			}
			__instance.currentIncrementalStatuses[statusType] += amount;
			__instance.lastAddedIncrementalStatus[statusType] = Time.time;
			__instance.OnAddedIncrementalStatus?.Invoke(statusType, amount);
			if ((int)statusType == 11 && __instance.currentStatuses[statusType] == 0f)
			{
				if (__instance.character.IsLocal && __instance.character.data.fullyConscious)
				{
					((Component)GUIManager.instance.strugglePrompt).gameObject.SetActive(true);
					GUIManager.instance.strugglePrompt.alpha = 0f;
					DOTweenModuleUI.DOFade(GUIManager.instance.strugglePrompt, 1f, 1f);
				}
				foreach (MeshRenderer webWrap in __instance.webWraps)
				{
					float num2 = Random.value + 1f;
					((Component)webWrap).gameObject.SetActive(true);
					((Renderer)webWrap).material.SetFloat("_Clip", 1f);
					TweenSettingsExtensions.SetEase<TweenerCore<float, float, FloatOptions>>(ShortcutExtensions.DOFloat(((Renderer)webWrap).material, 0.25f, "_Clip", num2), (Ease)3);
					ShortcutExtensions.DOLocalRotate(((Component)webWrap).transform, new Vector3(0f, 720f, 0f), num2, (RotateMode)0);
					((Component)webWrap).transform.parent.localScale = Vector3.one * 2f;
					TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScale(((Component)webWrap).transform.parent, 1f, num2), (Ease)3);
				}
			}
			if (__instance.currentIncrementalStatuses[statusType] >= 0.025f)
			{
				float num3 = (float)Mathf.FloorToInt(__instance.currentIncrementalStatuses[statusType] / 0.025f) * 0.025f;
				num3 = Mathf.Min(num3, num);
				__instance.currentStatuses[statusType] += num3;
				__instance.currentStatuses[statusType] = Mathf.Clamp(__instance.currentStatuses[statusType], 0f, __instance.GetStatusCap(statusType));
				__instance.OnAddedStatus?.Invoke(statusType, num3);
				__instance.currentIncrementalStatuses[statusType] = 0f;
				__instance.currentStatuses[statusType] = __instance.RoundStatus(__instance.currentStatuses[statusType]);
				__instance.character.ClampStamina();
				GUIManager.instance.bar.ChangeBar();
				__instance.StatusSFX(statusType, amount);
				if (__instance.character.IsLocal && (Object)(object)__instance.character == (Object)(object)Character.observedCharacter)
				{
					GUIManager.instance.AddStatusFX(statusType, amount);
				}
				__instance.PlayParticle(statusType);
				__instance.lastAddedStatus[statusType] = Time.time;
				__instance.PushStatuses((Player)null);
			}
			if ((int)statusType == 8 && __instance.character.IsLocal && Object.op_Implicit((Object)(object)Singleton<MapHandler>.Instance) && (int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 6)
			{
				float currentStatus3 = __instance.GetCurrentStatus((STATUSTYPE)8);
				if (currentStatus3 > Singleton<AchievementManager>.Instance.GetRunBasedFloat((RUNBASEDVALUETYPE)10))
				{
					Singleton<AchievementManager>.Instance.SetRunBasedFloat((RUNBASEDVALUETYPE)10, currentStatus3);
				}
			}
			if ((int)statusType == 2 && __instance.character.IsLocal && Object.op_Implicit((Object)(object)Singleton<MapHandler>.Instance) && (int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 2)
			{
				float currentStatus4 = __instance.GetCurrentStatus((STATUSTYPE)2);
				if (currentStatus4 > Singleton<AchievementManager>.Instance.GetRunBasedFloat((RUNBASEDVALUETYPE)11))
				{
					Singleton<AchievementManager>.Instance.SetRunBasedFloat((RUNBASEDVALUETYPE)11, currentStatus4);
				}
			}
			if ((int)statusType == 10 && __instance.character.IsLocal && Object.op_Implicit((Object)(object)Singleton<MapHandler>.Instance) && (int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 7)
			{
				float currentStatus5 = __instance.GetCurrentStatus((STATUSTYPE)10);
				if (currentStatus5 > Singleton<AchievementManager>.Instance.GetRunBasedFloat((RUNBASEDVALUETYPE)12))
				{
					Singleton<AchievementManager>.Instance.SetRunBasedFloat((RUNBASEDVALUETYPE)12, currentStatus5);
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(RescueHook), "RPCA_LetGo")]
	internal static class worseHook
	{
		internal static void Prefix(RescueHook __instance)
		{
			if (Ascents.currentAscent > 11 || Plugin.Ascent12.Value)
			{
				if ((Object)(object)__instance.targetPlayer != (Object)null)
				{
					__instance.targetPlayer.Fall(2f, 0f);
					__instance.targetPlayer.refs.items.DropAllItems(true);
				}
				else
				{
					__instance.playerHoldingItem.Fall(2f, 0f);
					__instance.playerHoldingItem.refs.items.DropAllItems(true);
				}
			}
		}
	}
	[HarmonyPatch(typeof(CookingBehavior_DisableScripts), "TriggerBehaviour")]
	internal static class CookingOutPoisonPatch
	{
		internal static void Postfix(CookingBehavior_DisableScripts __instance)
		{
			if (Ascents.currentAscent <= 11 && !Plugin.Ascent12.Value)
			{
				return;
			}
			MonoBehaviour[] scriptsToDisable = __instance.scriptsToDisable;
			foreach (MonoBehaviour val in scriptsToDisable)
			{
				if ((Object)(object)val != (Object)null)
				{
					((Behaviour)val).enabled = true;
				}
			}
		}
	}
	[HarmonyPatch(typeof(BoardingPass), "UpdateAscent")]
	internal static class setAscents
	{
		internal static bool Prefix(int ___maxUnlockedAscent, int ___maxAscent, Button ___incrementAscentButton, Button ___decrementAscentButton, int ____ascentIndex, TMP_Text ___ascentTitle, TMP_Text ___ascentDesc, AscentData ___ascentData, GameObject ___reward, TextMeshProUGUI ___rewardText, Image ___rewardImage)
		{
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			___maxAscent = 20;
			if (Singleton<AchievementManager>.Instance.GetMaxAscent() < 8)
			{
				Singleton<AchievementManager>.Instance.SetSteamStat((STEAMSTATTYPE)13, 8);
			}
			if (Input.GetKey((KeyCode)117))
			{
				Singleton<AchievementManager>.Instance.SetSteamStat((STEAMSTATTYPE)13, Singleton<AchievementManager>.Instance.GetMaxAscent() + 1);
				if (Input.GetKey((KeyCode)306))
				{
					Singleton<AchievementManager>.Instance.SetSteamStat((STEAMSTATTYPE)13, 20);
				}
			}
			if (Input.GetKey((KeyCode)301))
			{
				Singleton<AchievementManager>.Instance.SetSteamStat((STEAMSTATTYPE)13, 8);
			}
			___maxUnlockedAscent = Singleton<AchievementManager>.Instance.GetMaxAscent();
			int num = Mathf.Min(___maxAscent, ___maxUnlockedAscent);
			((Selectable)___incrementAscentButton).interactable = ____ascentIndex < num;
			((Selectable)___decrementAscentButton).interactable = ____ascentIndex > -1;
			if (____ascentIndex < 8)
			{
				___ascentTitle.text = ___ascentData.ascents[____ascentIndex + 1].localizedTitle;
				___ascentDesc.text = ___ascentData.ascents[____ascentIndex + 1].localizedDescription;
			}
			else if (____ascentIndex > 7)
			{
				___ascentTitle.text = Plugin.GetText("AscentX", ____ascentIndex);
				___ascentDesc.text = Plugin.GetText("Ascent" + ____ascentIndex + "Desc", ____ascentIndex);
			}
			if (____ascentIndex >= 2)
			{
				___ascentDesc.text = ___ascentDesc.text + "\n\n<alpha=#CC><size=70%>" + LocalizedText.GetText("ANDALLOTHER", true);
			}
			if (____ascentIndex == ___maxUnlockedAscent && ____ascentIndex > -1 && ____ascentIndex < 22)
			{
				___reward.gameObject.SetActive(true);
				if (____ascentIndex < 8)
				{
					((TMP_Text)___rewardText).text = ___ascentData.ascents[____ascentIndex + 1].localizedReward;
					((Graphic)___rewardImage).color = ___ascentData.ascents[____ascentIndex + 1].color;
				}
				else if (____ascentIndex > 7)
				{
					((TMP_Text)___rewardText).text = Plugin.jokeRewards[____ascentIndex - 8];
					((Graphic)___rewardImage).color = Plugin.rewardColors[____ascentIndex - 8];
				}
				return false;
			}
			___reward.gameObject.SetActive(false);
			return false;
		}
	}
	[HarmonyPatch(typeof(EndScreen), "PromotionUnlockRoutine")]
	internal static class doNotUnlock
	{
		internal static void Prefix(EndScreen __instance)
		{
			if (Ascents.currentAscent > 7)
			{
				__instance.promotionUnlockObject = null;
				__instance.ReturnToAirport();
			}
		}
	}
	[HarmonyPatch(typeof(CharacterAfflictions), "AddStatus")]
	internal static class moreEffect
	{
		internal static bool Prefix(CharacterAfflictions __instance, STATUSTYPE statusType, float amount, bool fromRPC = false)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Invalid comparison between Unknown and I4
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Invalid comparison between Unknown and I4
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Invalid comparison between Unknown and I4
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Invalid comparison between Unknown and I4
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Invalid comparison between Unknown and I4
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			if (Ascents.currentAscent > 16 || Plugin.Ascent17.Value)
			{
				if ((int)statusType == 2 || (int)statusType == 6)
				{
					__instance.currentIncrementalStatuses[statusType] += amount * 0.3f;
				}
				if ((int)statusType == 8)
				{
					__instance.currentIncrementalStatuses[statusType] += amount * 0.5f;
				}
				if ((int)statusType == 3)
				{
					__instance.currentIncrementalStatuses[statusType] += amount * 0.75f;
				}
			}
			if ((Ascents.currentAscent > 8 || Plugin.Ascent9.Value) && (int)statusType == 10)
			{
				__instance.currentIncrementalStatuses[statusType] += amount * 0.65f;
			}
			return true;
		}
	}
	[BepInPlugin("13dastardlyascents", "13 downright dastardly ascents", "1.3.1")]
	public class Plugin : BaseUnityPlugin
	{
		public static ConfigEntry<bool> Ascent8;

		public static ConfigEntry<bool> Ascent9;

		public static ConfigEntry<bool> Ascent10;

		public static ConfigEntry<bool> Ascent11;

		public static ConfigEntry<bool> Ascent12;

		public static ConfigEntry<bool> Ascent13;

		public static ConfigEntry<bool> Ascent14;

		public static ConfigEntry<bool> Ascent15;

		public static ConfigEntry<bool> Ascent16;

		public static ConfigEntry<bool> Ascent17;

		public static ConfigEntry<bool> Ascent18;

		public static ConfigEntry<bool> Ascent19;

		public static ConfigEntry<bool> Ascent20;

		public static ConfigEntry<bool> Ascent21;

		private static Dictionary<string, List<string>> langTable = new Dictionary<string, List<string>>();

		public static List<string> jokeRewards = new List<string>
		{
			"Is it A: Money, B: Mercy, C: New Sash, or D: More Ascents", "W Ascents?", "Kid named Scoutmaster myres: FOLLOW RULE 0 FOLLOW RULE 0 FOLLOW RULE 0 FOLLOW RULE 0 FOLLOW RULE 0 FOLLOW RULE 0 FOLLOW RULE 0 FOLLOW RULE 0 FOLLOW RULE 0", "MORE!", "oooo whats it gonna be???", "A potentially dastardly ascent", "A downright dastardly ascent", "Alright buddy you have 2 options here. You can play more ascents, or go outside, those are your 2 choices.", "buttfingers fortune", "2x murderer chance",
			"Poobs life", "You get NOTHING you LOSE.", "Unreal sash", "GOD IS COMING"
		};

		public static List<Color> rewardColors = new List<Color>
		{
			Color32.op_Implicit(new Color32((byte)44, (byte)198, (byte)51, byte.MaxValue)),
			Color32.op_Implicit(new Color32(byte.MaxValue, (byte)251, (byte)17, byte.MaxValue)),
			Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)240, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)131, (byte)67, (byte)242, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)212, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)200, (byte)0, (byte)0, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)0, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)73, (byte)34, (byte)2, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)155, (byte)0, (byte)0, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)0, (byte)120, (byte)0, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue)),
			Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue)),
			Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))
		};

		internal static ManualLogSource Log { get; private set; } = null;


		private static List<string> MakeList(params (Language lang, string text)[] items)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Expected I4, but got Unknown
			List<string> list = new List<string>(new string[14]);
			for (int i = 0; i < items.Length; i++)
			{
				var (val, value) = items[i];
				list[(int)val] = value;
			}
			for (int j = 0; j < 14; j++)
			{
				if (string.IsNullOrEmpty(list[j]))
				{
					list[j] = list[0];
				}
			}
			return list;
		}

		public static string GetText(string key, params object[] args)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected I4, but got Unknown
			if (!langTable.TryGetValue(key, out List<string> value))
			{
				return (args.Length != 0) ? string.Format(key, args) : key;
			}
			string text = value[(int)LocalizedText.CURRENT_LANGUAGE];
			return (args.Length != 0) ? string.Format(text, args) : text;
		}

		private void Awake()
		{
			//IL_0582: Unknown result type (might be due to invalid IL or missing references)
			//IL_0588: Expected O, but got Unknown
			langTable.Add("AscentX", MakeList(((Language)0, "Ascent {0}"), ((Language)9, "天阶 {0}")));
			langTable.Add("Ascent8Desc", MakeList(((Language)0, "FOG MOVES 2X AS FAST, STARTS INSTANTLY, AND GOES UNTIL THE KILN."), ((Language)9, "寒雾移动速度翻倍,立即生成,且蔓延至熔炉处。")));
			langTable.Add("Ascent9Desc", MakeList(((Language)0, "ALL HAZARDS ARE NOW MORE HAZARDOUS."), ((Language)9, "所有环境危害现在都更加致命。")));
			langTable.Add("Ascent10Desc", MakeList(((Language)0, "RULE 0 IS NOW STRICTER."), ((Language)9, "规则 0 变得更加严格。")));
			langTable.Add("Ascent11Desc", MakeList(((Language)0, "LUGGAGES ARE PAINFUL."), ((Language)9, "打开行李箱会造成伤害。")));
			langTable.Add("Ascent12Desc", MakeList(((Language)0, "ITEMS ARE WORSE."), ((Language)9, "物品效果变得更差。")));
			langTable.Add("Ascent13Desc", MakeList(((Language)0, "FALLING MAKES YOU VERY SLEEPY."), ((Language)9, "坠落会让你变得非常困倦。")));
			langTable.Add("Ascent14Desc", MakeList(((Language)0, "WEATHER IS MORE INTENSE."), ((Language)9, "天气效果更加猛烈。")));
			langTable.Add("Ascent15Desc", MakeList(((Language)0, "THE KILNS LAVA RISES SOONER AND FASTER."), ((Language)9, "熔炉的岩浆上升得更早且更快。")));
			langTable.Add("Ascent16Desc", MakeList(((Language)0, "ALL STATUS AILMENTS HAVE UNIQUE EFFECTS."), ((Language)9, "所有状态异常都拥有独特效果。")));
			langTable.Add("Ascent17Desc", MakeList(((Language)0, "COLD, DROWSY, POISON, AND HOT APPLY MORE."), ((Language)9, "寒冷、困倦、中毒与炎热效果叠加得更多。")));
			langTable.Add("Ascent18Desc", MakeList(((Language)0, "HEAT HEALS 3X SLOWER IN CALDERA AND THE KILN."), ((Language)9, "在火山与熔炉中,炎热的恢复速度降低为原来的三分之一。")));
			langTable.Add("Ascent19Desc", MakeList(((Language)0, "THE SUN IS HOT EVERYWHERE."), ((Language)9, "太阳在任何地方都会造成炎热效果。")));
			langTable.Add("Ascent20Desc", MakeList(((Language)0, "ALL WEATHER IS PRESENT EVERYWHERE AT SLIGHTLY LESS EFFECT."), ((Language)9, "所有天气效果在所有区域同时存在,但强度略低。")));
			langTable.Add("Ascent21Desc", MakeList(((Language)0, "THE PEAK SEEMS FARTHER."), ((Language)9, "顶峰看起来更加遥远。")));
			Log = ((BaseUnityPlugin)this).Logger;
			Ascent8 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 8", false, "Enables ascent 8 (Fog moves faster and moves until the kiln) on any ascent");
			Ascent9 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 9", false, "Enables ascent 9 (All hazards are more dangerous) on any ascent");
			Ascent10 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 10", false, "Enables ascent 10 (Rule 0 is more strict) on any ascent");
			Ascent11 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 11", false, "Enables ascent 11 (Luggages are painful) on any ascent");
			Ascent12 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 12", false, "Enables ascent 12 (All items are worse) on any ascent");
			Ascent13 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 13", false, "Enables ascent 13 (Falling makes you sleepy) on any ascent");
			Ascent14 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 14", false, "Enables ascent 14 (Weather is more intense) on any ascent");
			Ascent15 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 15", false, "Enables ascent 15 (Kilns lava rises faster) on any ascent");
			Ascent16 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 16", false, "Enables ascent 16 (All status ailments have unique effects) on any ascent");
			Ascent17 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 17", false, "Enables ascent 17 (Drowsy, hot, cold, and poison apply more) on any ascent");
			Ascent18 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 18", false, "Enables ascent 18 (Heat heals 3x slower in the volcanic area) on any ascent");
			Ascent19 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 19", false, "Enables ascent 19 (Sun is hot everywhere) on any ascent");
			Ascent20 = ((BaseUnityPlugin)this).Config.Bind<bool>("Ascents", "Ascent 20", false, "Enables ascent 20 (All weather is present everywhere at less effect) on any ascent");
			Log.LogInfo((object)"Plugin 13 downright dastardly ascents thing i guess is loaded!");
			Harmony val = new Harmony("dda");
			val.PatchAll();
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "Update")]
	internal static class ruleZeroEnforce
	{
		public static float timeUntilCheck;

		internal static void Prefix(OrbFogHandler __instance)
		{
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			if ((Ascents.currentAscent > 9 || Plugin.Ascent10.Value) && timeUntilCheck < 0f)
			{
				timeUntilCheck = 5f;
				Scoutmaster val = default(Scoutmaster);
				foreach (Character allCharacter in Character.AllCharacters)
				{
					foreach (Character allCharacter2 in Character.AllCharacters)
					{
						if (allCharacter.Center.y + Math.Abs(allCharacter.Center.z) > allCharacter2.Center.y + Math.Abs(allCharacter2.Center.z) + 150f && Scoutmaster.AllScoutmasters.Count < 2 && (!allCharacter.data.isScoutmaster || !allCharacter2.data.isScoutmaster))
						{
							if (!PhotonNetwork.IsMasterClient)
							{
								return;
							}
							if (Scoutmaster.GetPrimaryScoutmaster(ref val))
							{
								val.SetCurrentTarget(allCharacter, 10f);
							}
						}
					}
				}
			}
			timeUntilCheck -= Time.deltaTime;
		}
	}
	[HarmonyPatch(typeof(Scoutmaster), "IThrow")]
	internal static class cursedThrow
	{
		internal static void Prefix(Scoutmaster __instance)
		{
			if (Ascents.currentAscent > 9 || Plugin.Ascent10.Value)
			{
				__instance.currentTarget.refs.afflictions.AddStatus((STATUSTYPE)5, 0.04f, true, true);
			}
		}
	}
	[HarmonyPatch(typeof(Character), "RPCA_Die")]
	internal static class dontDie
	{
		internal static void Postfix(Character __instance)
		{
			if (Ascents.currentAscent <= 9 && !Plugin.Ascent10.Value)
			{
				return;
			}
			foreach (Character allCharacter in Character.AllCharacters)
			{
				float num = 0.01f;
				if (Character.AllCharacters.Count <= 2)
				{
					num = 0.12f;
				}
				else if (Character.AllCharacters.Count <= 4)
				{
					num = 0.08f;
				}
				else if (Character.AllCharacters.Count <= 6)
				{
					num = 0.04f;
				}
				else if (Character.AllCharacters.Count >= 7)
				{
					num = 0.02f;
				}
				if (!allCharacter.data.dead)
				{
					allCharacter.refs.afflictions.AddStatus((STATUSTYPE)5, num, true, true);
				}
			}
		}
	}
	[HarmonyPatch(typeof(CharacterClimbing), "CheckFallDamage")]
	internal static class sleepyFall
	{
		internal static bool Prefix(RaycastHit hit, CharacterClimbing __instance)
		{
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.playerSlide.y > 0f)
			{
				return false;
			}
			float num = (Mathf.Abs(__instance.playerSlide.y) - 15f) * 0.035f;
			if (num < 0.15f)
			{
				return false;
			}
			num -= 0.05f;
			__instance.character.data.sinceGrounded = 0f;
			__instance.playerSlide = Vector2.zero;
			if (num > 0.3f && __instance.character.IsLocal)
			{
				__instance.character.Fall(num * 5f, 0f);
			}
			Debug.Log((object)("Damage: " + num));
			num *= Ascents.fallDamageMultiplier;
			if (__instance.character.refs.afflictions.AddStatus((STATUSTYPE)0, num, false, true))
			{
				Singleton<AchievementManager>.Instance.AddToRunBasedFloat((RUNBASEDVALUETYPE)3, num);
			}
			float num2 = 1.04f - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)6) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)0) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)1) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)2) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)8);
			if (Ascents.currentAscent > 12 || Plugin.Ascent13.Value)
			{
				__instance.character.refs.afflictions.AddStatus((STATUSTYPE)6, num2, false, true);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(CharacterMovement), "CheckFallDamage")]
	internal static class sleepyFall2
	{
		internal static bool Prefix(CharacterMovement __instance)
		{
			if (__instance.FallTime() > __instance.fallDamageTime)
			{
				float num = Mathf.Max(__instance.FallFactor(3f, 1.5f), 0.05f);
				float num2 = num;
				num = Mathf.Min(num, __instance.MaxVelDmg());
				float num3 = num / num2;
				if (num >= 0.025f)
				{
					Debug.Log((object)("Fall damage: " + (num * 100f).ToString("F0") + "%"));
					if (num > 0.3f && __instance.character.IsLocal)
					{
						__instance.character.Fall(num * 5f, 0f);
					}
					num *= Ascents.fallDamageMultiplier;
					if (__instance.character.refs.afflictions.AddStatus((STATUSTYPE)0, num, false, true))
					{
						Singleton<AchievementManager>.Instance.AddToRunBasedFloat((RUNBASEDVALUETYPE)3, num);
					}
					float num4 = 1.04f - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)6) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)0) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)1) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)2) - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)8);
					if (Ascents.currentAscent > 12 || Plugin.Ascent13.Value)
					{
						__instance.character.refs.afflictions.AddStatus((STATUSTYPE)6, num4, false, true);
					}
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "InitNewSphere")]
	public static class uberFog
	{
		public static void setFogColors()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Invalid comparison between Unknown and I4
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			BiomeType currentBiome = Singleton<MapHandler>.Instance.GetCurrentBiome();
			if ((int)currentBiome == 3)
			{
				Singleton<OrbFogHandler>.Instance.sphere.mpb.SetColor("_FogtintColor", new Color(0.3f, 0f, 0f, 0f));
			}
			else
			{
				Singleton<OrbFogHandler>.Instance.sphere.mpb.SetColor("_FogtintColor", new Color(0.5f, 0.05f, 0.5f, 0f));
			}
		}

		public static void Postfix(OrbFogHandler __instance)
		{
			if (Ascents.currentAscent > 7 || Plugin.Ascent8.Value)
			{
				if (__instance.speed <= 0.4f)
				{
					__instance.speed *= 2f;
				}
				if (!(__instance.currentStartHeight > 9999f))
				{
					__instance.currentStartHeight += -200f;
					__instance.currentStartForward += -200f;
					__instance.maxWaitTime = 30f;
				}
			}
		}
	}
	[HarmonyPatch(typeof(FogSphere), "SetSharderVars")]
	public static class sharderHot
	{
		public static bool Prefix(FogSphere __instance)
		{
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Invalid comparison between Unknown and I4
			if (__instance.mpb == null)
			{
				__instance.mpb = new MaterialPropertyBlock();
			}
			__instance.rend.GetPropertyBlock(__instance.mpb);
			__instance.mpb.SetFloat("_PADDING", __instance.PADDING);
			__instance.mpb.SetFloat("_FogDepth", __instance.currentSize);
			__instance.mpb.SetFloat("_RevealAmount", __instance.REVEAL_AMOUNT);
			__instance.mpb.SetVector("_FogCenter", Vector4.op_Implicit(__instance.fogPoint));
			Shader.SetGlobalFloat("_FogSphereSize", __instance.currentSize);
			Shader.SetGlobalVector("FogCenter", Vector4.op_Implicit(__instance.fogPoint));
			Shader.SetGlobalFloat("FogEnabled", __instance.ENABLE);
			if (Ascents.currentAscent > 13)
			{
				uberFog.setFogColors();
			}
			if (Application.isPlaying && (Object)(object)Character.localCharacter != (Object)null)
			{
				Character.localCharacter.data.isInFog = false;
				if (Mathf.Approximately(__instance.ENABLE, 1f) && (Object)(object)Character.localCharacter != (Object)null && Vector3.Distance(__instance.fogPoint, Character.localCharacter.Center) > __instance.currentSize)
				{
					float num = 0.0105f;
					if (Ascents.currentAscent > 13)
					{
						num *= 3f;
					}
					if (Character.localCharacter.data.isSkeleton)
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)0, num / 8f * Time.deltaTime, false, true);
					}
					else if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 3 && (Ascents.currentAscent > 7 || Plugin.Ascent8.Value))
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)8, num * 2f * Time.deltaTime, false, true);
					}
					else if (Ascents.currentAscent < 14)
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)2, num * Time.deltaTime, false, true);
					}
					else
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)3, num * Time.deltaTime, false, true);
					}
					Character.localCharacter.data.isInFog = true;
				}
			}
			__instance.rend.SetPropertyBlock(__instance.mpb);
			return false;
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "SetFogOrigin")]
	public static class nonStop
	{
		public static bool startedCalderaFog;

		public static bool Prefix(OrbFogHandler __instance, int id)
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Invalid comparison between Unknown and I4
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			__instance.currentID = id;
			if (__instance.currentID < __instance.origins.Length - 1)
			{
				__instance.hasArrived = false;
				((Component)__instance.sphere).gameObject.SetActive(true);
				__instance.InitNewSphere(__instance.origins[__instance.currentID]);
				startedCalderaFog = false;
				return false;
			}
			if ((Ascents.currentAscent > 7 || Plugin.Ascent8.Value) && (int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 3 && !startedCalderaFog)
			{
				Debug.Log((object)"Extra fog please!");
				__instance.hasArrived = false;
				((Component)__instance.sphere).gameObject.SetActive(true);
				__instance.sphere.fogPoint = new Vector3(-3.73f, 862.99f, 1960.66f);
				__instance.currentSize = 790f;
				__instance.currentStartHeight = 0f;
				__instance.currentStartForward = 0f;
				__instance.photonView.RPC("StartMovingRPC", (RpcTarget)0, Array.Empty<object>());
				startedCalderaFog = true;
				return false;
			}
			__instance.hasArrived = true;
			Debug.Log((object)"Last section, disabling fog sphere");
			((Component)__instance.sphere).gameObject.SetActive(false);
			return false;
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "Update")]
	public static class dontStop
	{
		public static bool Prefix(OrbFogHandler __instance)
		{
			if (!__instance.hasArrived)
			{
				bool flag = __instance.currentID >= __instance.origins.Length || (__instance.origins[__instance.currentID].disableFog && Ascents.currentAscent < 8 && !Plugin.Ascent8.Value);
				if (Ascents.fogEnabled && !flag)
				{
					if (__instance.isMoving)
					{
						__instance.Move();
					}
					else
					{
						__instance.WaitToMove();
					}
				}
			}
			if (PhotonNetwork.IsMasterClient)
			{
				__instance.Sync();
			}
			__instance.ApplyMeshEffects();
			float num = Mathf.Lerp(1f, 5f, __instance.dispelFogAmount);
			__instance.currentCloseFog = Mathf.Lerp(__instance.currentCloseFog, num, Time.deltaTime * 1f);
			Shader.SetGlobalFloat("CloseDistanceMod", __instance.currentCloseFog);
			return false;
		}
	}
	[HarmonyPatch(typeof(CharacterAfflictions), "UpdateNormalStatuses")]
	internal static class uniqueAilments
	{
		public static float longWayDown;

		internal static void Prefix(CharacterAfflictions __instance)
		{
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			if ((Ascents.currentAscent <= 15 && !Plugin.Ascent16.Value) || !__instance.character.IsLocal)
			{
				return;
			}
			if (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) > 0.02f || __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)10) > 0.02f)
			{
				float num = Random.Range(0f + (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) + __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)10)) * 2000f * Time.deltaTime, 2000f * Time.deltaTime);
				if (num > 1999f * Time.deltaTime)
				{
					__instance.character.Fall(0.1f, 0f);
				}
			}
			if (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)0) > 0.02f)
			{
				__instance.character.refs.afflictions.AddStatus((STATUSTYPE)0, 0.00033333f * Time.deltaTime, false, true);
			}
			if (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)7) > 0f && !__instance.character.data.isClimbing && __instance.character.data.groundedFor < 0.5f)
			{
				Rigidbody rig = __instance.character.GetBodypart((BodypartType)0).rig;
				rig.linearVelocity -= new Vector3(0f, __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)7) * 100f * Time.deltaTime, 0f);
			}
			if (DayNightManager.instance.isDay < 0.5f)
			{
				__instance.drowsyReductionPerSecond = 0f;
			}
			else
			{
				__instance.drowsyReductionPerSecond = 0.02f;
			}
			if (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)2) > 0f)
			{
				if (__instance.character.refs.climbing.climbSpeedMod <= 1f || __instance.character.refs.movement.movementModifier <= 1f)
				{
					__instance.character.refs.climbing.climbSpeedMod = 1f - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)2) * 0.35f;
					__instance.character.refs.movement.movementModifier = 1f - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)2) * 0.35f;
				}
			}
			else if (__instance.character.refs.climbing.climbSpeedMod <= 1f || __instance.character.refs.movement.movementModifier <= 1f)
			{
				__instance.character.refs.climbing.climbSpeedMod = 1f;
				__instance.character.refs.movement.movementModifier = 1f;
			}
			if (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)8) > 0f && (__instance.character.data.isClimbing || __instance.character.data.isSprinting))
			{
				__instance.character.AddStamina((0f - __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)8)) * 0.15f * Time.deltaTime);
			}
			if (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)8) > 0f && Ascents.currentAscent > 17 && Singleton<MapHandler>.Instance.currentSegment > 2)
			{
				__instance.hotReductionPerSecond = 0.00333333f;
			}
		}
	}
	[HarmonyPatch(typeof(SlipperyJellyfish), "Trigger")]
	internal static class xtraHazard
	{
		internal static bool Prefix(SlipperyJellyfish __instance, int targetID)
		{
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			Character component = ((Component)PhotonView.Find(targetID)).GetComponent<Character>();
			if ((Object)(object)component == (Object)null)
			{
				return false;
			}
			float num = 1f;
			float num2 = 1f;
			float num3 = 1f;
			Rigidbody bodypartRig = component.GetBodypartRig((BodypartType)16);
			Rigidbody bodypartRig2 = component.GetBodypartRig((BodypartType)13);
			Rigidbody bodypartRig3 = component.GetBodypartRig((BodypartType)0);
			Rigidbody bodypartRig4 = component.GetBodypartRig((BodypartType)4);
			if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
			{
				num = 5f;
				num2 = 3f;
				num3 = 10f;
			}
			else
			{
				num = 1f;
				num2 = 1f;
				num3 = 1f;
			}
			component.RPCA_Fall(2f * num);
			bodypartRig.AddForce((component.data.lookDirection_Flat + Vector3.up) * 200f, (ForceMode)1);
			bodypartRig2.AddForce((component.data.lookDirection_Flat + Vector3.up) * 200f, (ForceMode)1);
			bodypartRig3.AddForce(Vector3.up * 1500f * num2, (ForceMode)1);
			bodypartRig4.AddForce(component.data.lookDirection_Flat * -300f, (ForceMode)1);
			component.refs.afflictions.AddStatus((STATUSTYPE)3, 0.05f * num3, true, true);
			for (int i = 0; i < __instance.slipSFX.Length; i++)
			{
				__instance.slipSFX[i].Play(((Component)__instance).transform.position);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(StatusTrigger), "OnTriggerEnter")]
	internal static class poison
	{
		internal static bool Prefix(StatusTrigger __instance)
		{
			if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
			{
				__instance.poisonOverTimeDuration = 999f;
				__instance.statusAmount = 0.15f;
				__instance.poisonOverTimeAmountPerSecond = 0.1f;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(BeeSwarm), "Update")]
	internal static class bees
	{
		internal static bool Prefix(BeeSwarm __instance)
		{
			if (__instance.dispersing)
			{
				return false;
			}
			if (!PhotonNetwork.InRoom)
			{
				return false;
			}
			if (((MonoBehaviourPun)__instance).photonView.IsMine)
			{
				bool flag = __instance.beehiveDangerTick > 0f;
				if (__instance.beesAngry != flag)
				{
					((MonoBehaviourPun)__instance).photonView.RPC("SetBeesAngryRPC", (RpcTarget)3, new object[1] { flag });
				}
			}
			if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
			{
				__instance.stingerField.statusAmountPerSecond = (__instance.beesAngry ? __instance.poisonOverTimeAngry : __instance.poisonOverTime) * 20f;
			}
			else
			{
				__instance.stingerField.statusAmountPerSecond = (__instance.beesAngry ? __instance.poisonOverTimeAngry : __instance.poisonOverTime);
			}
			if ((Object)(object)__instance.beehive == (Object)null)
			{
				__instance.TryGetBeehive();
			}
			__instance.UpdateAggro();
			if (!((MonoBehaviourPun)__instance).photonView.IsMine)
			{
				return false;
			}
			if (__instance.beesAngry)
			{
				__instance.beehiveDangerTick = Mathf.Max(__instance.beehiveDangerTick - Time.deltaTime, 0f);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Bugfix), "LateUpdate")]
	internal static class uberTick
	{
		internal static bool Prefix(Bugfix __instance)
		{
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Expected O, but got Unknown
			__instance.counter += Time.deltaTime;
			__instance.lifeTime += Time.deltaTime;
			if (Object.op_Implicit((Object)(object)__instance.targetCharacter) && !__instance.targetCharacter.data.dead)
			{
				if ((__instance.targetCharacter.IsLocal && __instance.counter > 29f) || (__instance.counter > 0.5f && Ascents.currentAscent > 8))
				{
					__instance.targetCharacter.refs.afflictions.AddAffliction((Affliction)new Affliction_PreventPoisonHealing(30f), false);
					if (__instance.totalStatusApplied < __instance.maxStatus || __instance.targetCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) < 0.5f)
					{
						__instance.targetCharacter.refs.afflictions.AddStatus((STATUSTYPE)3, 0.05f, false, true);
						__instance.totalStatusApplied += 0.05f;
					}
					__instance.counter = 0f;
				}
				Vector3 position = __instance.leg.TransformPoint(__instance.localPos);
				((Component)__instance).transform.position = position;
				Quaternion rotation = Quaternion.LookRotation(__instance.leg.TransformDirection(__instance.forward), __instance.leg.TransformDirection(__instance.up));
				((Component)__instance).transform.rotation = rotation;
				((Component)__instance).transform.localScale = Vector3.LerpUnclamped(Vector3.zero, Vector3.one, __instance.lifeTime / 300f);
				return false;
			}
			if (__instance.photonView.IsMine)
			{
				PhotonNetwork.Destroy(((Component)__instance).gameObject);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(AOE), "Explode")]
	internal static class uberSplode
	{
		[HarmonyPatch(typeof(BananaPeel), "RPCA_TriggerBanana")]
		internal static class uberNanas
		{
			internal static bool Prefix(int viewID, BananaPeel __instance)
			{
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_007e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				//IL_0088: Unknown result type (might be due to invalid IL or missing references)
				//IL_0092: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
				//IL_0100: Unknown result type (might be due to invalid IL or missing references)
				//IL_0105: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0114: Unknown result type (might be due to invalid IL or missing references)
				//IL_0122: Unknown result type (might be due to invalid IL or missing references)
				//IL_012c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0132: Unknown result type (might be due to invalid IL or missing references)
				//IL_0146: Unknown result type (might be due to invalid IL or missing references)
				//IL_0150: Unknown result type (might be due to invalid IL or missing references)
				//IL_0171: Unknown result type (might be due to invalid IL or missing references)
				Character component = ((Component)PhotonView.Find(viewID)).GetComponent<Character>();
				if ((Object)(object)component == (Object)null)
				{
					return false;
				}
				float num = 1f;
				float num2 = 1f;
				if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
				{
					num = 5f;
					num2 = 3f;
				}
				else
				{
					num = 1f;
					num2 = 1f;
				}
				((Component)__instance).GetComponent<Rigidbody>().AddForce((component.data.lookDirection_Flat * 0.5f + Vector3.up) * 40f, (ForceMode)1);
				Rigidbody bodypartRig = component.GetBodypartRig((BodypartType)16);
				Rigidbody bodypartRig2 = component.GetBodypartRig((BodypartType)13);
				Rigidbody bodypartRig3 = component.GetBodypartRig((BodypartType)0);
				Rigidbody bodypartRig4 = component.GetBodypartRig((BodypartType)4);
				component.RPCA_Fall(2f * num);
				bodypartRig.AddForce((component.data.lookDirection_Flat + Vector3.up) * 200f, (ForceMode)1);
				bodypartRig2.AddForce((component.data.lookDirection_Flat + Vector3.up) * 200f, (ForceMode)1);
				bodypartRig3.AddForce(Vector3.up * 1500f * num2, (ForceMode)1);
				bodypartRig4.AddForce(component.data.lookDirection_Flat * -300f, (ForceMode)1);
				for (int i = 0; i < __instance.slipSFX.Length; i++)
				{
					__instance.slipSFX[i].Play(((Component)__instance).transform.position);
				}
				return false;
			}
		}

		[HarmonyPatch(typeof(BreakableBridge), "FixedUpdate")]
		internal static class dontGoBeyondTheRicketyBridge
		{
			internal static bool Prefix(BreakableBridge __instance)
			{
				__instance.peopleOnBridge = 0;
				if (__instance.debug)
				{
					Debug.Log((object)$"FixedUpdate: {Time.frameCount}, peopleOnBridge: {__instance.peopleOnBridge}");
				}
				__instance.peopleOnBridge = 0;
				foreach (Character item in __instance.peopleOnBridgeDict.Keys.ToList())
				{
					__instance.peopleOnBridgeDict[item] += Time.deltaTime;
					if (__instance.peopleOnBridgeDict[item] < 0.25f)
					{
						if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
						{
							__instance.peopleOnBridge += 200;
						}
						else
						{
							__instance.peopleOnBridge++;
						}
					}
				}
				return false;
			}
		}

		[HarmonyPatch(typeof(Lava), "HitPlayer")]
		internal static class uberlave
		{
			internal static bool Prefix(Lava __instance, Character item)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				((Bounds)(ref __instance.bounds)).size = new Vector3(0f, 0f, 0f);
				if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
				{
					item.refs.afflictions.AddStatus((STATUSTYPE)0, 1f, false, true);
					item.refs.afflictions.AddStatus((STATUSTYPE)8, 1f, false, true);
				}
				return true;
			}
		}

		[HarmonyPatch(typeof(EruptionSpawner), "Update")]
		internal static class lottaEruptions
		{
			internal static bool Prefix(EruptionSpawner __instance)
			{
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0110: Unknown result type (might be due to invalid IL or missing references)
				if (!PhotonNetwork.IsMasterClient)
				{
					return false;
				}
				if (!HelperFunctions.AnyPlayerInZRange(__instance.min.position.z, __instance.max.position.z))
				{
					return false;
				}
				__instance.counter -= Time.deltaTime;
				if (__instance.counter < 0f)
				{
					if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
					{
						__instance.counter = Random.Range(-5f, 12f);
					}
					else
					{
						__instance.counter = Random.Range(-5f, 15f);
					}
					Vector3 position = ((Component)__instance).transform.position;
					position.x += Random.Range(-155f, 155f);
					position.z += Random.Range(-140f, 140f);
					__instance.photonView.RPC("RPCA_SpawnEruption", (RpcTarget)0, new object[1] { position });
				}
				return false;
			}
		}

		[HarmonyPatch(typeof(ClimbModifierSurface), "OnClimb")]
		internal static class uberRocks
		{
			internal static bool Prefix(Character character, ClimbModifierSurface __instance)
			{
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				__instance.onClimbAction?.Invoke(character);
				if (!__instance.applyStatus)
				{
					return false;
				}
				if (!character.IsLocal)
				{
					return false;
				}
				if (Time.time < __instance.lastTriggerTime + __instance.statusCooldown)
				{
					return false;
				}
				if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
				{
					character.refs.afflictions.AddStatus(__instance.statusType, __instance.statusAmount * 2f, false, true);
				}
				else
				{
					character.refs.afflictions.AddStatus(__instance.statusType, __instance.statusAmount, false, true);
				}
				__instance.lastTriggerTime = Time.time;
				return false;
			}
		}

		[HarmonyPatch(typeof(CollisionModifier), "Collide")]
		internal static class urchinsandvinesiguess
		{
			internal static bool Prefix(CollisionModifier __instance)
			{
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Invalid comparison between Unknown and I4
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Invalid comparison between Unknown and I4
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Invalid comparison between Unknown and I4
				if (Ascents.currentAscent > 8 || Plugin.Ascent9.Value)
				{
					if ((int)__instance.statusType == 2)
					{
						__instance.damage = 0.02f;
					}
					else if ((int)__instance.statusType == 8)
					{
						__instance.damage = 0.02f;
					}
					else if ((int)__instance.statusType == 3)
					{
						__instance.damage = 0.5f;
					}
				}
				if (((Object)__instance).name == "HangBridge")
				{
					__instance.damage = 0f;
				}
				return true;
			}
		}

		[HarmonyPatch(typeof(StatusEmitter), "Update")]
		internal static class uberEmitter
		{
			internal static bool Prefix(StatusEmitter __instance)
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0178: Unknown result type (might be due to invalid IL or missing references)
				//IL_0152: Unknown result type (might be due to invalid IL or missing references)
				__instance.timeSinceLastTick += Time.deltaTime;
				if (__instance.timeSinceLastTick < __instance.tickTime)
				{
					return false;
				}
				foreach (CharacterAfflictions item in from c in new HashSet<CharacterAfflictions>(from hit in Physics.OverlapSphere(((Component)__inst