Decompiled source of 13 Downright Dastardly Ascents v1.2.1

BepInEx/plugins/13dda.dll

Decompiled a week 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.Logging;
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.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0")]
[assembly: AssemblyProduct("13dda")]
[assembly: AssemblyTitle("13 downright dastardly ascents")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.2.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace dda
{
	[HarmonyPatch(typeof(LavaRising), "Update")]
	internal static class activeKiln
	{
		internal static void Prefix(LavaRising __instance)
		{
			if (Ascents.currentAscent > 14)
			{
				__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 = "Ascent " + currentAscent;
			if (currentAscent == 0)
			{
				((TMP_Text)___text).text = "";
			}
			return false;
		}
	}
	public abstract class timerRiser
	{
		public static float timerIzer;
	}
	[HarmonyPatch(typeof(WindChillZone), "ApplyCold")]
	internal static class intenseWinds
	{
		internal static bool Prefix(WindChillZone __instance)
		{
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Invalid comparison between Unknown and I4
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Invalid comparison between Unknown and I4
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Invalid comparison between Unknown and I4
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Invalid comparison between Unknown and I4
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Invalid comparison between Unknown and I4
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Invalid comparison between Unknown and I4
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: 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_0355: Unknown result type (might be due to invalid IL or missing references)
			if (Ascents.currentAscent > 13)
			{
				__instance.windPlayerFactor = WindChillZone.GetWindIntensityAtPoint(Character.localCharacter.Center, __instance.lightVolumeSampleThreshold_lower, __instance.lightVolumeSampleThreshold_margin);
				if ((Ascents.currentAscent > 19 && ((Object)__instance).name == "SnowStorm" && Character.localCharacter.data.groundedFor > 0f) || Character.localCharacter.data.isClimbing)
				{
					__instance.windForce = 40f;
					__instance.windChillPerSecond = 0.07f;
					if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() != 2)
					{
						__instance.windForce = 15f;
						__instance.windChillPerSecond = 0.01f;
					}
				}
				else if (Ascents.currentAscent > 19 && ((Object)__instance).name == "SnowStorm")
				{
					if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() != 2)
					{
						__instance.windForce = 30f;
						__instance.windChillPerSecond = 0.01f;
					}
					else
					{
						__instance.windForce = 70f;
						__instance.windChillPerSecond = 0.07f;
					}
				}
				if (((Object)__instance).name == "SnowStorm")
				{
					if (((int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 2 && (int)Singleton<MapHandler>.Instance.GetCurrentSegment() != 3) || DayNightManager.instance.isDay < 0.5f)
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)2, __instance.windPlayerFactor * __instance.windChillPerSecond * Time.deltaTime * Mathf.Clamp01(__instance.hasBeenActiveFor * 0.2f) * 1.2f, false);
					}
					else if ((int)Singleton<MapHandler>.Instance.GetCurrentSegment() != 3)
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)8, __instance.windPlayerFactor * __instance.windChillPerSecond * Time.deltaTime * Mathf.Clamp01(__instance.hasBeenActiveFor * 0.2f), false);
					}
				}
				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.GetCurrentBiome() != 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.windChillPerSecond * Time.deltaTime * Mathf.Clamp01(__instance.hasBeenActiveFor * 0.2f), false);
				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_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: 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)
			{
				((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)
			{
				__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_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0364: Unknown result type (might be due to invalid IL or missing references)
			//IL_036e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0383: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0306: 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_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_03c7: 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);
						}
					}
					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_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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)
			if (Ascents.currentAscent > 19)
			{
				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)
			{
				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 == "Snow"))
				{
					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_014c: 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)
			//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_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Invalid comparison between Unknown and I4
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Invalid comparison between Unknown and I4
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			if (timeTillNext < 0f && PhotonNetwork.IsMasterClient && Ascents.currentAscent > 19)
			{
				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 && (int)Singleton<MapHandler>.Instance.GetCurrentBiome() != 6 && DayNightManager.instance.sun.intensity > 1f)
			{
				if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 2)
				{
					Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)2, 0.005f * Time.deltaTime, false);
				}
				else
				{
					Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)8, 0.005f * Time.deltaTime, false);
				}
			}
		}
	}
	[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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			if (Ascents.currentAscent > 11)
			{
				((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)
			{
				((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus((STATUSTYPE)1, __instance.restorationAmount * 0.5f, false);
			}
			else
			{
				((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus((STATUSTYPE)1, __instance.restorationAmount, false);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Action_GiveExtraStamina), "RunAction")]
	internal static class worseXtraStam
	{
		internal static bool Prefix(Action_GiveExtraStamina __instance)
		{
			if (Ascents.currentAscent > 11)
			{
				((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)
			{
				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)
			{
				((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)
			{
				__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_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: 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)
					{
						__instance.character.refs.afflictions.SetStatus(val, __instance.character.refs.afflictions.GetCurrentStatus(val) * 0.25f);
					}
					else
					{
						__instance.character.refs.afflictions.SetStatus(val, 0f);
					}
				}
			}
			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 && 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);
			if (applyStatus)
			{
				__instance.refs.afflictions.AddStatus((STATUSTYPE)5, 0.05f, false);
				__instance.refs.afflictions.AddStatus((STATUSTYPE)1, 0.3f, false);
			}
			else if (Ascents.currentAscent > 11)
			{
				__instance.refs.afflictions.AddStatus((STATUSTYPE)5, 0.1f, false);
				__instance.refs.afflictions.AddStatus((STATUSTYPE)1, 0.2f, false);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(RopeShooter), "OnPrimaryFinishedCast")]
	internal static class lessRope
	{
		internal static void Prefix(RopeShooter __instance)
		{
			if (Ascents.currentAscent > 11)
			{
				__instance.length *= 0.75f;
			}
		}
	}
	[HarmonyPatch(typeof(VineShooter), "Update")]
	internal static class lessChain
	{
		internal static void Prefix(VineShooter __instance)
		{
			if (Ascents.currentAscent > 11)
			{
				__instance.maxLength = 30f;
			}
		}
	}
	[HarmonyPatch(typeof(Action_ClearAllStatus), "RunAction")]
	internal static class worseCureAll
	{
		internal static bool Prefix(Action_ClearAllStatus __instance)
		{
			//IL_0019: 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_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Invalid comparison between Unknown and I4
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: 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)
					{
						((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus(val, 0.5f, false);
					}
					else
					{
						((ItemActionBase)__instance).character.refs.afflictions.SubtractStatus(val, (float)Mathf.Abs(5), false);
					}
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(Action_ModifyStatus), "RunAction")]
	internal static class worseMedkit
	{
		internal static bool Prefix(Action_ModifyStatus __instance)
		{
			if (Ascents.currentAscent > 11)
			{
				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_00af: 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_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: 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)
			//IL_008f: 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)
			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)
				{
					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)
				{
					item.refs.afflictions.AddStatus((STATUSTYPE)8, 0.5f, false);
					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)
			{
				return;
			}
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (hotShot.killFlag)
				{
					allCharacter.refs.afflictions.SetStatus((STATUSTYPE)8, 0f);
					allCharacter.refs.afflictions.AddStatus((STATUSTYPE)4, 200f, false);
					allCharacter.PassOutInstantly();
				}
			}
			hotShot.killFlag = false;
		}
	}
	[HarmonyPatch(typeof(TiedBalloon), "FixedUpdate")]
	internal static class worseBalloon
	{
		internal static void Prefix(TiedBalloon __instance)
		{
			if (Ascents.currentAscent > 11)
			{
				__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_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Invalid comparison between Unknown and I4
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Invalid comparison between Unknown and I4
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: 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_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: 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)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Invalid comparison between Unknown and I4
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: 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_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Invalid comparison between Unknown and I4
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.character.isBot)
			{
				return false;
			}
			if (__instance.character.statusesLocked)
			{
				return false;
			}
			if (amount == 0f)
			{
				return false;
			}
			if (__instance.m_inAirport)
			{
				return false;
			}
			if (__instance.character.data.isInvincible)
			{
				if (Ascents.currentAscent < 12)
				{
					return false;
				}
				amount *= 0.25f;
			}
			if ((int)statusType == 0)
			{
				Debug.Log((object)"ADD STATUS");
			}
			if ((int)statusType == 0)
			{
				Debug.Log((object)"ADD STATUS");
			}
			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);
				amount -= currentStatus;
				if (amount <= 0f)
				{
					return false;
				}
			}
			else if ((int)statusType == 8 && currentStatus2 > 0f)
			{
				__instance.SubtractStatus((STATUSTYPE)2, amount, fromRPC);
				amount -= currentStatus2;
				if (amount <= 0f)
				{
					return false;
				}
			}
			__instance.currentIncrementalStatuses[statusType] += amount;
			__instance.lastAddedIncrementalStatus[statusType] = Time.time;
			__instance.OnAddedIncrementalStatus?.Invoke(statusType, amount);
			if (__instance.currentIncrementalStatuses[statusType] >= 0.025f)
			{
				float num2 = (float)Mathf.FloorToInt(__instance.currentIncrementalStatuses[statusType] / 0.025f) * 0.025f;
				num2 = Mathf.Min(num2, num);
				__instance.currentStatuses[statusType] += num2;
				__instance.currentStatuses[statusType] = Mathf.Clamp(__instance.currentStatuses[statusType], 0f, __instance.GetStatusCap(statusType));
				__instance.OnAddedStatus?.Invoke(statusType, num2);
				__instance.currentIncrementalStatuses[statusType] = 0f;
				__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);
				}
			}
			return false;
		}
	}
	[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_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0440: Unknown result type (might be due to invalid IL or missing references)
			//IL_046b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0470: Unknown result type (might be due to invalid IL or missing references)
			//IL_049b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0500: Unknown result type (might be due to invalid IL or missing references)
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_0530: Unknown result type (might be due to invalid IL or missing references)
			//IL_0535: Unknown result type (might be due to invalid IL or missing references)
			//IL_0560: Unknown result type (might be due to invalid IL or missing references)
			//IL_0565: Unknown result type (might be due to invalid IL or missing references)
			//IL_058e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0593: Unknown result type (might be due to invalid IL or missing references)
			//IL_05be: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0611: Unknown result type (might be due to invalid IL or missing references)
			//IL_0616: Unknown result type (might be due to invalid IL or missing references)
			//IL_063a: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: 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
			{
				switch (____ascentIndex)
				{
				case 8:
					___ascentTitle.text = "Ascent 8";
					___ascentDesc.text = "FOG MOVES 2X AS FAST, STARTS INSTANTLY, AND GOES UNTIL THE KILN.";
					break;
				case 9:
					___ascentTitle.text = "Ascent 9";
					___ascentDesc.text = "ALL HAZARDS ARE NOW MORE HAZARDOUS.";
					break;
				case 10:
					___ascentTitle.text = "Ascent 10";
					___ascentDesc.text = "RULE 0 IS NOW STRICTER.";
					break;
				case 11:
					___ascentTitle.text = "Ascent 11";
					___ascentDesc.text = "LUGGAGES ARE PAINFUL.";
					break;
				case 12:
					___ascentTitle.text = "Ascent 12";
					___ascentDesc.text = "ITEMS ARE WORSE.";
					break;
				case 13:
					___ascentTitle.text = "Ascent 13";
					___ascentDesc.text = "FALLING MAKES YOU VERY SLEEPY.";
					break;
				case 14:
					___ascentTitle.text = "Ascent 14";
					___ascentDesc.text = "WEATHER IS MORE INTENSE.";
					break;
				case 15:
					___ascentTitle.text = "Ascent 15";
					___ascentDesc.text = "THE KILNS LAVA RISES SOONER AND FASTER.";
					break;
				case 16:
					___ascentTitle.text = "Ascent 16";
					___ascentDesc.text = "ALL STATUS AILMENTS HAVE UNIQUE EFFECTS.";
					break;
				case 17:
					___ascentTitle.text = "Ascent 17";
					___ascentDesc.text = "COLD, DROWSY, POISON, AND HOT APPLY MORE.";
					break;
				case 18:
					___ascentTitle.text = "Ascent 18";
					___ascentDesc.text = "HEAT HEALS 3X SLOWER IN CALDERA AND THE KILN.";
					break;
				case 19:
					___ascentTitle.text = "Ascent 19";
					___ascentDesc.text = "THE SUN IS HOT EVERYWHERE.";
					break;
				case 20:
					___ascentTitle.text = "Ascent 20";
					___ascentDesc.text = "ALL WEATHER IS PRESENT EVERYWHERE AT SLIGHTLY LESS EFFECT.";
					break;
				}
			}
			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
				{
					switch (____ascentIndex)
					{
					case 8:
						((TMP_Text)___rewardText).text = "Is it A: Money, B: Mercy, C: New Sash, or D: More Ascents";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)44, (byte)198, (byte)51, byte.MaxValue));
						break;
					case 9:
						((TMP_Text)___rewardText).text = "W Ascents?";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)251, (byte)17, byte.MaxValue));
						break;
					case 10:
						((TMP_Text)___rewardText).text = "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";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue));
						break;
					case 11:
						((TMP_Text)___rewardText).text = "MORE!";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)240, byte.MaxValue));
						break;
					case 12:
						((TMP_Text)___rewardText).text = "oooo whats it gonna be???";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)131, (byte)67, (byte)242, byte.MaxValue));
						break;
					case 13:
						((TMP_Text)___rewardText).text = "A potentially dastardly ascent";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)212, byte.MaxValue));
						break;
					case 14:
						((TMP_Text)___rewardText).text = "A downright dastardly ascent";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)200, (byte)0, (byte)0, byte.MaxValue));
						break;
					case 15:
						((TMP_Text)___rewardText).text = "Alright buddy you have 2 options here. You can play more ascents, or go outside, those are your 2 choices.";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)0, byte.MaxValue));
						break;
					case 16:
						((TMP_Text)___rewardText).text = "buttfingers fortune";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)73, (byte)34, (byte)2, byte.MaxValue));
						break;
					case 17:
						((TMP_Text)___rewardText).text = "2x murderer chance";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)155, (byte)0, (byte)0, byte.MaxValue));
						break;
					case 18:
						((TMP_Text)___rewardText).text = "Poobs life";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)0, (byte)120, (byte)0, byte.MaxValue));
						break;
					case 19:
						((TMP_Text)___rewardText).text = "You get NOTHING you LOSE.";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue));
						break;
					case 20:
						((TMP_Text)___rewardText).text = "Unreal sash";
						((Graphic)___rewardImage).color = Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue));
						break;
					}
				}
				return false;
			}
			___reward.gameObject.SetActive(false);
			return false;
		}
	}
	[HarmonyPatch(typeof(CharacterAfflictions), "AddStatus")]
	internal static class moreEffect
	{
		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_0011: Invalid comparison between Unknown and I4
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Invalid comparison between Unknown and I4
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Invalid comparison between Unknown and I4
			//IL_0025: 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_005a: Invalid comparison between Unknown and I4
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			if (Ascents.currentAscent > 16)
			{
				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;
				}
			}
			return true;
		}
	}
	[BepInPlugin("13dastardlyascents", "13 downright dastardly ascents", "1.2.0")]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Log { get; private set; }

		private void Awake()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"Plugin 13 downright dastardly ascents thing i guess is loaded!");
			Harmony val = new Harmony("dda");
			val.PatchAll();
		}
	}
	[HarmonyPatch(typeof(Scoutmaster), "VerifyTarget")]
	internal static class extraAggroHeight
	{
		internal static void Prefix(Scoutmaster __instance)
		{
			if (PlayerHandler.GetAllPlayers().Count == 1 && Ascents.currentAscent > 9)
			{
				__instance.maxAggroHeight = 100f;
			}
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "Update")]
	internal static class ruleZeroEnforce
	{
		public static float timeUntilCheck;

		internal static void Prefix(OrbFogHandler __instance)
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: 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_008d: Unknown result type (might be due to invalid IL or missing references)
			if (Ascents.currentAscent > 9 && 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) + 200f && 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)
			{
				__instance.currentTarget.refs.afflictions.AddStatus((STATUSTYPE)5, 0.04f, true);
			}
		}
	}
	[HarmonyPatch(typeof(Character), "RPCA_Die")]
	internal static class dontDie
	{
		internal static void Postfix(Character __instance)
		{
			if (Ascents.currentAscent <= 9)
			{
				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);
				}
			}
		}
	}
	[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))
			{
				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)
			{
				__instance.character.refs.afflictions.AddStatus((STATUSTYPE)6, num2, false);
			}
			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))
					{
						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)
					{
						__instance.character.refs.afflictions.AddStatus((STATUSTYPE)6, num4, false);
					}
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(OrbFogHandler), "InitNewSphere")]
	public static class uberFog
	{
		public static void Postfix(OrbFogHandler __instance)
		{
			if (Ascents.currentAscent > 7)
			{
				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_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: 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 (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)
				{
					if ((int)Singleton<MapHandler>.Instance.GetCurrentBiome() == 3 && Ascents.currentAscent > 7)
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)8, 0.0205f * Time.deltaTime, false);
					}
					else
					{
						Character.localCharacter.refs.afflictions.AddStatus((STATUSTYPE)2, 0.010500001f * Time.deltaTime, false);
					}
					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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Invalid comparison between Unknown and I4
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: 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 && (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);
				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
	{
		internal static void Prefix(CharacterAfflictions __instance)
		{
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: 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)
			if (Ascents.currentAscent <= 15 || !__instance.character.IsLocal)
			{
				return;
			}
			if (__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) > 0.02f)
			{
				float num = Random.Range(0f + __instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) * 2000f * Time.deltaTime, 2000f * Time.deltaTime);
				Debug.Log((object)(__instance.character.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) * 1000f));
				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);
			}
			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_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: 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)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: 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_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: 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)
			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)
			{
				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);
			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)
			{
				__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)
			{
				__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_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: 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_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: 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_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: 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);
						__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_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: 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_0085: 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_00d0: 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)
				//IL_00df: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0107: Unknown result type (might be due to invalid IL or missing references)
				//IL_0115: Unknown result type (might be due to invalid IL or missing references)
				//IL_011f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0125: Unknown result type (might be due to invalid IL or missing references)
				//IL_0139: Unknown result type (might be due to invalid IL or missing references)
				//IL_0143: Unknown result type (might be due to invalid IL or missing references)
				//IL_0164: 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)
				{
					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)
						{
							__instance.peopleOnBridge += 200;
						}
						else
						{
							__instance.peopleOnBridge++;
						}
					}
				}
				return false;
			}
		}

		[HarmonyPatch(typeof(Lava), "HitPlayer")]
		internal static class uberlave
		{
			internal static bool Prefix(Character item)
			{
				if (Ascents.currentAscent > 8)
				{
					item.refs.afflictions.AddStatus((STATUSTYPE)0, 1f, false);
					item.refs.afflictions.AddStatus((STATUSTYPE)8, 1f, false);
				}
				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_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_0061: 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_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a6: 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_0136: Unknown result type (might be due to invalid IL or missing references)
				//IL_0180: Unknown result type (might be due to invalid IL or missing references)
				if (Ascents.currentAscent > 19)
				{
					__instance.min.position = new Vector3(__instance.min.position.x, __instance.min.position.y, -10000f);
					__instance.max.position = new Vector3(__instance.max.position.x, __instance.max.position.y, 10000f);
				}
				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)
					{
						__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_00a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0080: 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)
				{
					character.refs.afflictions.AddStatus(__instance.statusType, __instance.statusAmount * 2f, false);
				}
				else
				{
					character.refs.afflictions.AddStatus(__instance.statusType, __instance.statusAmount, false);
				}
				__instance.lastTriggerTime = Time.time;
				return false;
			}
		}

		[HarmonyPatch(typeof(CollisionModifier), "Collide")]
		internal static class urchinsandvinesiguess
		{
			internal static bool Prefix(CollisionModifier __instance)
			{
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0061: Invalid comparison between Unknown and I4
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				//IL_007e: Invalid comparison between Unknown and I4
				if (Ascents.currentAscent > 8)
				{
					foreach (CollisionMod additionalMod in __instance.additionalMods)
					{
						additionalMod.amount = 0.05f;
						additionalMod.knockback = 5000f;
					}
					if ((int)__instance.statusType == 2)
					{
						__instance.damage = 0.02f;
					}
					else if ((int)__instance.statusType == 8)
					{
						__instance.damage = 0.02f;
					}
					else
					{
						__instance.damage = 0.5f;
					}
				}
				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_0197: 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)
				//IL_0145: 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)__instance).transform.position, __instance.radius + __instance.outerFade)
						select ((Component)hit).GetComponentInParent<CharacterAfflictions>())
					where (Object)(object)c != (Object)null
					where ((MonoBehaviourPun)c.character).photonView.IsMine
					select c)
				{
					float num = __instance.amount;
					if (__instance.outerFade > 0.01f)
					{
						float num2 = Vector3.Distance(item.character.Center, ((Component)__instance).transform.position);
						num *= Mathf.InverseLerp(__instance.radius + __instance.outerFade, num2, num2);
					}
					if (num > 0f)
					{
						if (Ascents.currentAscent > 8)
						{
							item.AddStatus(__instance.statusType, __instance.amount * __instance.timeSinceLastTick * 4f, false);
						}
						else
						{
							item.AddStatus(__instance.statusType, __instance.amount * __instance.timeSinceLastTick, false);
						}
					}
					if (num < 0f)
					{
						item.SubtractStatus(__instance.statusType, Mathf.Abs(__instance.amount * __instance.timeSinceLastTick), false);
					}
				}
				__instance.timeSinceLastTick = 0f;
				return false;
			}
		}

		internal static bool Prefix(AOE __instance)
		{
			//IL_0020: 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_0031: 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_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: 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)
			//IL_00fe: 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_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: 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_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0414: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Unknown result type (might be due to invalid IL or missing references)
			//IL_041d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0422: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_042f: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: 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)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: 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_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.range == 0f)
			{
				return false;
			}
			Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, __instance.range, LayerMask.op_Implicit(HelperFunctions.GetMask(__instance.mask)));
			List<Character> list = new List<Character>();
			for (int i = 0; i < array.Length; i++)
			{
				Character componentInParent = ((Component)array[i]).GetComponentInParent<Character>();
				Vector3 val;
				if ((Object)(object)componentInParent != (Object)null && !list.Contains(componentInParent))
				{
					float num = Vector3.Distance(((Component)__instance).transform.position, componentInParent.Center);
					if (!(num <= __instance.range))
					{
						continue;
					}
					float factor = __instance.GetFactor(num);
					if (!(factor >= __instance.minFactor))
					{
						continue;
					}
					list.Add(componentInParent);
					Vector3 zero = Vector3.zero;
					if (__instance.useSingleDirection)
					{
						zero = __instance.singleDirectionForwardTF.forward;
					}
					else
					{
						val = componentInParent.Center - ((Component)__instance).transform.position;
						zero = ((Vector3)(ref val)).normalized;
					}
					if (Mathf.Abs(__instance.statusAmount) > 0f)
					{
						if (__instance.illegalStatus != "")
						{
							componentInParent.AddIllegalStatus(__instance.illegalStatus, __instance.statusAmount * factor);
						}
						else
						{
							Debug.Log((object)$"Adding status {__instance.statusType} with amount {__instance.statusAmount * factor} to player {((Object)componentInParent).name}");
							if (Ascents.currentAscent > 8)
							{
								componentInParent.refs.afflictions.AdjustStatus(__instance.statusType, __instance.statusAmount * factor * 2f, false);
							}
							else
							{
								componentInParent.refs.afflictions.AdjustStatus(__instance.statusType, __instance.statusAmount * factor, false);
							}
						}
					}
					if (Ascents.currentAscent > 8)
					{
						componentInParent.AddForce(zero * factor * __instance.knockback, 2.1f, 5.2f);
					}
					else
					{
						componentInParent.AddForce(zero * factor * __instance.knockback, 0.7f, 1.3f);
					}
					if (__instance.fallTime > 0f && componentInParent.IsLocal)
					{
						while (componentInParent.refs.afflictions.GetCurrentStatus((STATUSTYPE)3) + componentInParent.refs.afflictions.GetCurrentStatus((STATUSTYPE)6) + componentInParent.refs.afflictions.GetCurrentStatus((STATUSTYPE)0) + componentInParent.refs.afflictions.GetCurrentStatus((STATUSTYPE)1) + componentInParent.refs.afflictions.GetCurrentStatus((STATUSTYPE)2) + componentInParent.refs.afflictions.GetCurrentStatus((STATUSTYPE)8) < 1.02f && Ascents.currentAscent > 8)
						{
							componentInParent.refs.afflictions.AddStatus((STATUSTYPE)6, 0.01f, false);
						}
						if (Ascents.currentAscent > 8)
						{
							componentInParent.Fall(factor * __instance.fallTime * 3f, 0f);
						}
						else
						{
							componentInParent.Fall(factor * __instance.fallTime, 0f);
						}
					}
				}
				else
				{
					if (!__instance.canLaunchItems)
					{
						continue;
					}
					Item componentInParent2 = ((Component)array[i]).GetComponentInParent<Item>();
					if (!((Object)(object)componentInParent2 != (Object)null) || !((MonoBehaviourPun)componentInParent2).photonView.IsMine)
					{
						continue;
					}
					float num2 = Vector3.Distance(((Component)__instance).transform.position, componentInParent2.Center());
					if (num2 <= __instance.range)
					{
						float factor2 = __instance.GetFactor(num2);
						if (factor2 >= __instance.minFactor)
						{
							val = componentInParent2.Center() - ((Component)__instance).transform.position;
							Vector3 normalized = ((Vector3)(ref val)).normalized;
							componentInParent2.rig.AddForce(normalized * factor2 * __instance.knockback * __instance.itemKnockbackMultiplier, (ForceMode)1);
						}
					}
				}
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(TumbleWeed), "Start")]
	internal static class uberWeed
	{
		internal static void Postfix(TumbleWeed __instance)
		{
			if (Ascents.currentAscent > 8)
			{
				__instance.rollForce *= Mathf.Lerp(0.5f, 1f, Mathf.Pow(Random.value, 6f));
				if (Ascents.currentAscent > 8)
				{
					__instance.powerMultiplier *= 2f;
				}
			}
		}
	}
	[HarmonyPatch(typeof(TumbleWeed), "OnCollisionEnter")]
	internal static class uberWeed2
	{
		internal static bool Prefix(TumbleWeed __instance, Collision collision)
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: 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_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			Character componentInParent = collision.gameObject.GetComponentInParent<Character>();
			if (!Object.op_Implicit((Object)(object)componentInParent))
			{
				return false;
			}
			if (!componentInParent.IsLocal)
			{
				return false;
			}
			if (__instance.ignored.Contains(componentInParent))
			{
				return false;
			}
			((MonoBehaviour)__instance).StartCoroutine(__instance.IgnoreTarget(componentInParent));
			float num = ((Component)__instance).transform.localScale.x / __instance.originalScale;
			if (__instance.originalScale == 0f)
			{
				num = 1f;
			}
			num = Mathf.Clamp01(num);
			Vector3 linearVelocity = __instance.rig.linearVelocity;
			float num2 = Mathf.Clamp01(((Vector3)(ref linearVelocity)).magnitude * num * __instance.powerMultiplier);
			if (__instance.testFullPower)
			{
				num2 = 1f;
			}
			if (num2 < 0.2f)
			{
				return false;
			}
			componentInParent.Fall(2f * num2, 0f);
			linearVelocity = __instance.rig.linearVelocity;
			componentInParent.AddForceAtPosition(((Vector3)(ref linearVelocity)).normalized * __instance.collisionForce * num2, ((ContactPoint)(ref collision.contacts[0])).point, 2f);
			if (Ascents.currentAscent > 8)