Decompiled source of Severons Perks v0.92.5

ModTest.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Severon.PerkMod;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ModTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ModTest")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5216a860-e0eb-41e2-ba19-290bf2caba7f")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[HarmonyPatch(typeof(CL_AssetManager), "Initialize")]
internal static class ChallengePerks
{
	private static Perk _noSpeed;

	private static Perk _nearlyNoSpeed;

	private static Perk _brick;

	private static Perk _rampingSpeed;

	private static Perk _noClimbing;

	private static Perk _noJumping;

	private static Perk _noStamina;

	private static Perk _foodOnly;

	private static Perk _helium;

	private static Perk _oneTap;

	private static Perk _wizardTime;

	[HarmonyPostfix]
	public static void Postfix()
	{
		//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
		WKAssetDatabase val = ScriptableObject.CreateInstance<WKAssetDatabase>();
		val.id = "severonsModPerks";
		List<Perk> list = new List<Perk>
		{
			NoSpeed(),
			NearlyNoSpeed(),
			Brick(),
			RampingSpeed(),
			NoClimbing(),
			NoJumping(),
			NoStamina(),
			FoodOnly(),
			Helium(),
			OneTap(),
			WizardTime(),
			GamePerks.TrainedSoldier(),
			GamePerks.ItemRecycling(),
			GamePerks.Scavenger(),
			GamePerks.FloatationDevice(),
			GamePerks.RunningJump(),
			GamePerks.AcrobaticLeap(),
			GamePerks.WallBounce(),
			GamePerks.MeltingBody(),
			GamePerks.GluteusMaximus(),
			GamePerks.GrubTransformation(),
			GamePerks.CrawlingLigaments(),
			GamePerks.SubservientInstinct(),
			GamePerks.RabbitLegs(),
			GamePerks.HungerMotive(),
			GamePerks.AgilityBoost(),
			GamePerks.MetaOverdrive(),
			GamePerks.Rebartender(),
			GamePerks.InsectPheromones(),
			GamePerks.ManicConviction(),
			GamePerks.YourReward(),
			GamePerks.TerribleThoughts(),
			GamePerks.GastricBypass(),
			GamePerks.adhesiveSkin(),
			GamePerks.SoulTrade(),
			GamePerks.SharedTorment(),
			GamePerks.SemisolidMuscles()
		};
		for (int i = 0; i < list.Count; i++)
		{
			Perk val2 = list[i];
			val2.spawnPool = (PerkPool)5;
			val2.tags = new List<string> { "severon" };
		}
		val.perkAssets.AddRange(list);
		CL_AssetManager.AddNewDatabase(val.id, val);
	}

	private static Perk NoSpeed()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_noSpeed != (Object)null)
		{
			return _noSpeed;
		}
		_noSpeed = ScriptableObject.CreateInstance<Perk>();
		((Object)_noSpeed).hideFlags = (HideFlags)61;
		_noSpeed.id = "severon_no_speed_perk";
		((Object)_noSpeed).name = "perk_noSpeed";
		_noSpeed.title = "No Speed";
		_noSpeed.description = "100% Less speed";
		_noSpeed.cost = 0;
		_noSpeed.canStack = true;
		_noSpeed.stackMax = 100;
		_noSpeed.useBuff = true;
		_noSpeed.buffMultiplier = 1f;
		_noSpeed.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_noSpeed.modules = new List<PerkModule>();
		_noSpeed.buff = new BuffContainer
		{
			id = "severon_no_speed_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addSpeed",
					maxAmount = -1f,
					amount = -1f
				}
			}
		};
		return _noSpeed;
	}

	private static Perk NearlyNoSpeed()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_nearlyNoSpeed != (Object)null)
		{
			return _nearlyNoSpeed;
		}
		_nearlyNoSpeed = ScriptableObject.CreateInstance<Perk>();
		((Object)_nearlyNoSpeed).hideFlags = (HideFlags)61;
		_nearlyNoSpeed.id = "severon_nearly_no_speed_perk";
		((Object)_nearlyNoSpeed).name = "perk_nearlyNoSpeed";
		_nearlyNoSpeed.title = "Nearly No Speed";
		_nearlyNoSpeed.description = "99% Less speed";
		_nearlyNoSpeed.cost = 0;
		_nearlyNoSpeed.canStack = true;
		_nearlyNoSpeed.stackMax = 100;
		_nearlyNoSpeed.useBuff = true;
		_nearlyNoSpeed.buffMultiplier = 1f;
		_nearlyNoSpeed.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_nearlyNoSpeed.modules = new List<PerkModule>();
		_nearlyNoSpeed.buff = new BuffContainer
		{
			id = "severon_nearly_no_speed_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addSpeed",
					maxAmount = -0.99f,
					amount = -0.99f
				}
			}
		};
		return _nearlyNoSpeed;
	}

	private static Perk Brick()
	{
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Expected O, but got Unknown
		if ((Object)(object)_brick != (Object)null)
		{
			return _brick;
		}
		_brick = ScriptableObject.CreateInstance<Perk>();
		((Object)_brick).hideFlags = (HideFlags)61;
		_brick.id = "severon_bricked_perk";
		((Object)_brick).name = "perk_brick";
		_brick.title = "Brick";
		_brick.description = "Brick";
		_brick.cost = 0;
		_brick.canStack = false;
		_brick.stackMax = 1;
		_brick.useBuff = false;
		_brick.buffMultiplier = 0f;
		_brick.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_brick.modules = new List<PerkModule>();
		_brick.buff = new BuffContainer();
		return _brick;
	}

	private static Perk RampingSpeed()
	{
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Expected O, but got Unknown
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: 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_011e: 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_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0146: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: 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_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0178: Expected O, but got Unknown
		//IL_0183: Expected O, but got Unknown
		if ((Object)(object)_rampingSpeed != (Object)null)
		{
			return _rampingSpeed;
		}
		_rampingSpeed = ScriptableObject.CreateInstance<Perk>();
		((Object)_rampingSpeed).hideFlags = (HideFlags)61;
		_rampingSpeed.id = "severon_ramping_speed_perk";
		((Object)_rampingSpeed).name = "perk_rampingSpeed";
		_rampingSpeed.title = "Ramping Speed";
		_rampingSpeed.description = "Speed builds up while running.";
		_rampingSpeed.cost = 0;
		_rampingSpeed.canStack = true;
		_rampingSpeed.stackMax = 1000;
		_rampingSpeed.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		PerkModule_PlayerStates val = new PerkModule_PlayerStates
		{
			playerState = (PlayerState)3,
			buffMultiplier = 1f,
			buffChangeRate = 0.1f,
			buffRaiseRateMult = 0.1f,
			buffLowerRateMult = 100f,
			persistTime = 0f,
			useHandEffectModule = false
		};
		val.buff = new BuffContainer
		{
			id = "severon_ramping_speed_buff",
			desc = "Ramping Speed Modifier",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 0f,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addSpeed",
					maxAmount = 300f,
					amount = 0f
				}
			}
		};
		_rampingSpeed.modules = new List<PerkModule> { (PerkModule)(object)val };
		return _rampingSpeed;
	}

	private static Perk NoClimbing()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_noClimbing != (Object)null)
		{
			return _noClimbing;
		}
		_noClimbing = ScriptableObject.CreateInstance<Perk>();
		((Object)_noClimbing).hideFlags = (HideFlags)61;
		_noClimbing.id = "severon_no_climbing_perk";
		((Object)_noClimbing).name = "perk_noClimbing";
		_noClimbing.title = "No Climbing";
		_noClimbing.description = "100% Less climb speed";
		_noClimbing.cost = 0;
		_noClimbing.canStack = true;
		_noClimbing.stackMax = 100;
		_noClimbing.useBuff = true;
		_noClimbing.buffMultiplier = 1f;
		_noClimbing.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_noClimbing.modules = new List<PerkModule>();
		_noClimbing.buff = new BuffContainer
		{
			id = "severon_no_climbing_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addClimb",
					maxAmount = -1f,
					amount = -1f
				}
			}
		};
		return _noClimbing;
	}

	private static Perk NoJumping()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_noJumping != (Object)null)
		{
			return _noJumping;
		}
		_noJumping = ScriptableObject.CreateInstance<Perk>();
		((Object)_noJumping).hideFlags = (HideFlags)61;
		_noJumping.id = "severon_no_jumping_perk";
		((Object)_noJumping).name = "perk_noJumping";
		_noJumping.title = "No Jumping";
		_noJumping.description = "100% Less jump height";
		_noJumping.cost = 0;
		_noJumping.canStack = true;
		_noJumping.stackMax = 100;
		_noJumping.useBuff = true;
		_noJumping.buffMultiplier = 1f;
		_noJumping.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_noJumping.modules = new List<PerkModule>();
		_noJumping.buff = new BuffContainer
		{
			id = "severon_no_jumping_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addJump",
					maxAmount = -1f,
					amount = -1f
				}
			}
		};
		return _noJumping;
	}

	private static Perk NoStamina()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_noStamina != (Object)null)
		{
			return _noStamina;
		}
		_noStamina = ScriptableObject.CreateInstance<Perk>();
		((Object)_noStamina).hideFlags = (HideFlags)61;
		_noStamina.id = "severon_no_stamina_perk";
		((Object)_noStamina).name = "perk_noStamina";
		_noStamina.title = "No Stamina";
		_noStamina.description = "100% Less max stamina";
		_noStamina.cost = 0;
		_noStamina.canStack = true;
		_noStamina.stackMax = 100;
		_noStamina.useBuff = true;
		_noStamina.buffMultiplier = 1f;
		_noStamina.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_noStamina.modules = new List<PerkModule>();
		_noStamina.buff = new BuffContainer
		{
			id = "severon_no_stamina_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addStamina",
					maxAmount = -1f,
					amount = -1f
				}
			}
		};
		return _noStamina;
	}

	private static Perk FoodOnly()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_foodOnly != (Object)null)
		{
			return _foodOnly;
		}
		_foodOnly = ScriptableObject.CreateInstance<Perk>();
		((Object)_foodOnly).hideFlags = (HideFlags)61;
		_foodOnly.id = "severon_food_only_perk";
		((Object)_foodOnly).name = "perk_foodOnly";
		_foodOnly.title = "Food Only";
		_foodOnly.description = "No natural stamina regeneration";
		_foodOnly.cost = 0;
		_foodOnly.canStack = true;
		_foodOnly.stackMax = 100;
		_foodOnly.useBuff = true;
		_foodOnly.buffMultiplier = 1f;
		_foodOnly.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_foodOnly.modules = new List<PerkModule>();
		_foodOnly.buff = new BuffContainer
		{
			id = "severon_food_only_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addStaminaRegen",
					maxAmount = -1f,
					amount = -1f
				}
			}
		};
		return _foodOnly;
	}

	private static Perk Helium()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_helium != (Object)null)
		{
			return _helium;
		}
		_helium = ScriptableObject.CreateInstance<Perk>();
		((Object)_helium).hideFlags = (HideFlags)61;
		_helium.id = "severon_helium_perk";
		((Object)_helium).name = "perk_helium";
		_helium.title = "Helium";
		_helium.description = "105% Less gravity";
		_helium.cost = 0;
		_helium.canStack = true;
		_helium.stackMax = 100;
		_helium.useBuff = true;
		_helium.buffMultiplier = 1f;
		_helium.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_helium.modules = new List<PerkModule>();
		_helium.buff = new BuffContainer
		{
			id = "severon_helium_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "addGravity",
					maxAmount = -1.05f,
					amount = -1.05f
				}
			}
		};
		return _helium;
	}

	private static Perk OneTap()
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_0169: Expected O, but got Unknown
		if ((Object)(object)_oneTap != (Object)null)
		{
			return _oneTap;
		}
		_oneTap = ScriptableObject.CreateInstance<Perk>();
		((Object)_oneTap).hideFlags = (HideFlags)61;
		_oneTap.id = "severon_one_tap_perk";
		((Object)_oneTap).name = "perk_oneTap";
		_oneTap.title = "One Tap";
		_oneTap.description = "You take 100x damage from all sources.";
		_oneTap.cost = 0;
		_oneTap.canStack = true;
		_oneTap.stackMax = 100;
		_oneTap.useBuff = true;
		_oneTap.buffMultiplier = 1f;
		_oneTap.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_oneTap.modules = new List<PerkModule>();
		_oneTap.buff = new BuffContainer
		{
			id = "severon_one_tap_buff",
			desc = "",
			loseOverTime = false,
			loseRate = 0f,
			buffTime = 1f,
			multiplier = 1f,
			loseRateEffectedByPerks = false,
			buffs = new List<Buff>
			{
				new Buff
				{
					id = "damageMult",
					maxAmount = 100f,
					amount = 100f
				}
			}
		};
		return _oneTap;
	}

	private static Perk WizardTime()
	{
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Expected O, but got Unknown
		if ((Object)(object)_wizardTime != (Object)null)
		{
			return _wizardTime;
		}
		_wizardTime = ScriptableObject.CreateInstance<Perk>();
		((Object)_wizardTime).hideFlags = (HideFlags)61;
		_wizardTime.id = "severon_wizard_perk";
		((Object)_wizardTime).name = "perk_wizardTime";
		_wizardTime.title = "Bound Warlock";
		_wizardTime.description = "In development";
		_wizardTime.cost = 0;
		_wizardTime.canStack = false;
		_wizardTime.stackMax = 1;
		_wizardTime.useBuff = false;
		_wizardTime.buffMultiplier = 1f;
		_wizardTime.multiplierCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
		_wizardTime.modules = new List<PerkModule> { (PerkModule)(object)new PerkModule_Warlock() };
		_wizardTime.buff = new BuffContainer();
		return _wizardTime;
	}
}
public class HandholdEntity : MonoBehaviour
{
	public GameObject InnerObject { get; private set; }

	public GameObject OuterObject { get; private set; }

	public void Build(bool isFloating)
	{
		//IL_004b: 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_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: 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_0179: Unknown result type (might be due to invalid IL or missing references)
		//IL_017f: Expected O, but got Unknown
		//IL_019b: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0298: 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)
		//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02db: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0302: Unknown result type (might be due to invalid IL or missing references)
		//IL_0307: Unknown result type (might be due to invalid IL or missing references)
		OuterObject = GameObject.CreatePrimitive((PrimitiveType)0);
		((Object)OuterObject).name = (isFloating ? "Floating_Handhold_Outer" : "Summoned_Handhold_Outer");
		OuterObject.transform.SetParent(((Component)this).transform);
		OuterObject.transform.localPosition = Vector3.zero;
		OuterObject.transform.localRotation = Quaternion.identity;
		OuterObject.transform.localScale = Vector3.one;
		Collider val = default(Collider);
		if (OuterObject.TryGetComponent<Collider>(ref val))
		{
			val.isTrigger = true;
		}
		InnerObject = GameObject.CreatePrimitive((PrimitiveType)0);
		((Object)InnerObject).name = (isFloating ? "Floating_Handhold" : "Summoned_Handhold");
		InnerObject.transform.SetParent(OuterObject.transform);
		InnerObject.transform.localPosition = Vector3.zero;
		InnerObject.transform.localRotation = Quaternion.identity;
		InnerObject.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
		Collider val2 = default(Collider);
		if (InnerObject.TryGetComponent<Collider>(ref val2))
		{
			val2.isTrigger = true;
		}
		Shader val3 = Shader.Find("Sprites/Default") ?? Shader.Find("UI/Default") ?? Shader.Find("Legacy Shaders/Transparent/Diffuse");
		Material val4 = new Material(val3);
		Color val5 = default(Color);
		((Color)(ref val5))..ctor(0.46f, 0.08f, 0.04f, 0.4f);
		val4.color = val5;
		if (val4.HasProperty("_Color"))
		{
			val4.SetColor("_Color", val5);
		}
		if (val4.HasProperty("_BaseColor"))
		{
			val4.SetColor("_BaseColor", val5);
		}
		val4.renderQueue = 3000;
		Renderer val6 = default(Renderer);
		if (OuterObject.TryGetComponent<Renderer>(ref val6))
		{
			val6.material = val4;
		}
		Renderer val7 = default(Renderer);
		if (InnerObject.TryGetComponent<Renderer>(ref val7))
		{
			val7.material = val4;
		}
		ObjectTagger val8 = InnerObject.GetComponent<ObjectTagger>();
		if ((Object)(object)val8 == (Object)null)
		{
			val8 = InnerObject.AddComponent<ObjectTagger>();
		}
		val8.AddTag("Handhold");
		GameObject cachedPrefab = Spells.GetCachedPrefab("Rho Particles");
		if ((Object)(object)cachedPrefab != (Object)null)
		{
			cachedPrefab.transform.SetParent(((Component)this).transform);
			cachedPrefab.transform.localPosition = Vector3.zero;
			cachedPrefab.transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
			ParticleSystem val9 = default(ParticleSystem);
			if (cachedPrefab.TryGetComponent<ParticleSystem>(ref val9))
			{
				EmissionModule emission = val9.emission;
				MinMaxCurve rateOverTime = ((EmissionModule)(ref emission)).rateOverTime;
				((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(((MinMaxCurve)(ref rateOverTime)).constant * 2f);
				MainModule main = val9.main;
				((MainModule)(ref main)).maxParticles = Mathf.CeilToInt((float)((MainModule)(ref main)).maxParticles * 2f);
				((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1;
			}
		}
	}
}
public class WerelightEntity : MonoBehaviour
{
	public CL_Lamp LampComponent { get; private set; }

	public void Initialize(float range, float intensity)
	{
		//IL_003d: 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)
		//IL_006e: 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_00be: Expected O, but got Unknown
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: 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_019f: Unknown result type (might be due to invalid IL or missing references)
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_026e: Unknown result type (might be due to invalid IL or missing references)
		//IL_028f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bc: 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_02d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
		((Object)((Component)this).gameObject).name = "Werelight";
		GameObject val = GameObject.CreatePrimitive((PrimitiveType)0);
		((Object)val).name = "Werelight_Mesh";
		val.transform.SetParent(((Component)this).transform);
		val.transform.localPosition = Vector3.zero;
		val.transform.localRotation = Quaternion.identity;
		val.transform.localScale = new Vector3(0.04f, 0.04f, 0.04f);
		Collider val2 = default(Collider);
		if (val.TryGetComponent<Collider>(ref val2))
		{
			Object.Destroy((Object)(object)val2);
		}
		Shader val3 = Shader.Find("Sprites/Default") ?? Shader.Find("UI/Default") ?? Shader.Find("Legacy Shaders/Transparent/Diffuse");
		Material val4 = new Material(val3);
		Color val5 = default(Color);
		((Color)(ref val5))..ctor(0.86f, 0.08f, 0.24f, 0.3f);
		val4.color = val5;
		if (val4.HasProperty("_Color"))
		{
			val4.SetColor("_Color", val5);
		}
		if (val4.HasProperty("_BaseColor"))
		{
			val4.SetColor("_BaseColor", val5);
		}
		val4.renderQueue = 3000;
		Renderer val6 = default(Renderer);
		if (val.TryGetComponent<Renderer>(ref val6))
		{
			val6.material = val4;
		}
		LampComponent = ((Component)this).gameObject.AddComponent<CL_Lamp>();
		LampComponent.range = range;
		LampComponent.intensity = intensity;
		Color val7 = default(Color);
		((Color)(ref val7))..ctor(0.86f, 0.5f, 0.5f, 1f);
		LampComponent.startColor = val7;
		LampComponent.color = val7;
		LampComponent.fadeStart = 0f;
		LampComponent.fadeSpeed = 1f;
		LampComponent.fadeTarget = 1f;
		LampComponent.intensity = 1.1f;
		LampComponent.anim = (Animations)1;
		LampComponent.animSpeed = 1.5f;
		LampComponent.animAmplitude = 0.3f;
		LampComponent.animOffset = Random.Range(0f, 100f);
		LampComponent.lampActive = true;
		GameObject cachedPrefab = Spells.GetCachedPrefab("Rho Particles");
		if ((Object)(object)cachedPrefab != (Object)null)
		{
			cachedPrefab.transform.SetParent(((Component)this).transform);
			cachedPrefab.transform.localPosition = Vector3.zero;
			cachedPrefab.transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
			ParticleSystem val8 = default(ParticleSystem);
			if (cachedPrefab.TryGetComponent<ParticleSystem>(ref val8))
			{
				EmissionModule emission = val8.emission;
				MinMaxCurve rateOverTime = ((EmissionModule)(ref emission)).rateOverTime;
				((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(((MinMaxCurve)(ref rateOverTime)).constant * 2f);
				MainModule main = val8.main;
				((MainModule)(ref main)).maxParticles = Mathf.CeilToInt((float)((MainModule)(ref main)).maxParticles * 2f);
				((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1;
			}
		}
	}
}
[HarmonyPatch(typeof(Projectile), "OnCollisionHit")]
public static class OnCollisionHitPatch
{
	private static void Prefix(Projectile __instance, RaycastHit hit, ObjectTagger tagger, bool hasHitThis, bool hasKilled)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		CustomProjectileEntity component = ((Component)__instance).GetComponent<CustomProjectileEntity>();
		if ((Object)(object)component != (Object)null && component.Callback != null)
		{
			component.Callback(hit);
		}
	}
}
public class CustomProjectileEntity : MonoBehaviour
{
	public Action<RaycastHit> Callback = null;

	public Projectile ProjectileComponent { get; private set; }

	public GameObject MeshObject { get; private set; }

	public TrailRenderer TrailComponent { get; private set; }

	public void Build(Color projectileColor, float speed = 20f, float damage = 1f, float radius = 0.1f, float lifetime = 5f, float gravity = 0f, bool addTrail = true, float trailTime = 0.2f, Action<RaycastHit> onHitCallback = null)
	{
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Expected O, but got Unknown
		//IL_00f6: 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_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d6: Expected O, but got Unknown
		//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f8: 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_020a: 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_021a: Unknown result type (might be due to invalid IL or missing references)
		//IL_022b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0230: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d3: Expected O, but got Unknown
		//IL_0585: Unknown result type (might be due to invalid IL or missing references)
		//IL_058a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0602: Unknown result type (might be due to invalid IL or missing references)
		//IL_0623: Unknown result type (might be due to invalid IL or missing references)
		//IL_0640: Unknown result type (might be due to invalid IL or missing references)
		//IL_0645: Unknown result type (might be due to invalid IL or missing references)
		//IL_064b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0650: Unknown result type (might be due to invalid IL or missing references)
		//IL_065f: Unknown result type (might be due to invalid IL or missing references)
		//IL_066c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0671: Unknown result type (might be due to invalid IL or missing references)
		Callback = onHitCallback;
		((Object)((Component)this).gameObject).name = "Custom_Projectile";
		MeshObject = GameObject.CreatePrimitive((PrimitiveType)0);
		Collider component = MeshObject.GetComponent<Collider>();
		if ((Object)(object)component != (Object)null)
		{
			component.enabled = false;
			Object.Destroy((Object)(object)component);
		}
		((Object)MeshObject).name = "Projectile_Mesh";
		MeshObject.transform.SetParent(((Component)this).transform);
		MeshObject.transform.localPosition = Vector3.zero;
		MeshObject.transform.localRotation = Quaternion.identity;
		float num = radius * 2f;
		MeshObject.transform.localScale = new Vector3(num, num, num);
		Shader val = Shader.Find("Sprites/Default") ?? Shader.Find("UI/Default") ?? Shader.Find("Legacy Shaders/Transparent/Diffuse");
		Material val2 = new Material(val);
		val2.color = projectileColor;
		if (val2.HasProperty("_Color"))
		{
			val2.SetColor("_Color", projectileColor);
		}
		if (val2.HasProperty("_BaseColor"))
		{
			val2.SetColor("_BaseColor", projectileColor);
		}
		if (projectileColor.a < 1f)
		{
			val2.renderQueue = 3000;
		}
		Renderer val3 = default(Renderer);
		if (MeshObject.TryGetComponent<Renderer>(ref val3))
		{
			val3.material = val2;
		}
		if (addTrail)
		{
			TrailComponent = ((Component)this).gameObject.AddComponent<TrailRenderer>();
			((Renderer)TrailComponent).material = val2;
			TrailComponent.time = trailTime;
			TrailComponent.startWidth = num;
			TrailComponent.endWidth = 0f;
			Gradient val4 = new Gradient();
			val4.SetKeys((GradientColorKey[])(object)new GradientColorKey[2]
			{
				new GradientColorKey(projectileColor, 0f),
				new GradientColorKey(projectileColor, 1f)
			}, (GradientAlphaKey[])(object)new GradientAlphaKey[2]
			{
				new GradientAlphaKey(projectileColor.a, 0f),
				new GradientAlphaKey(0f, 1f)
			});
			TrailComponent.colorGradient = val4;
			TrailComponent.minVertexDistance = 0.1f;
		}
		ProjectileComponent = ((Component)this).gameObject.AddComponent<Projectile>();
		FieldInfo[] fields = typeof(Projectile).GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
		FieldInfo[] array = fields;
		foreach (FieldInfo fieldInfo in array)
		{
			if (fieldInfo.GetValue(ProjectileComponent) == null)
			{
				if (fieldInfo.FieldType.IsGenericType && fieldInfo.FieldType.GetGenericTypeDefinition() == typeof(List<>))
				{
					Type type = typeof(List<>).MakeGenericType(fieldInfo.FieldType.GetGenericArguments());
					fieldInfo.SetValue(ProjectileComponent, Activator.CreateInstance(type));
				}
				else if (fieldInfo.FieldType.IsArray)
				{
					fieldInfo.SetValue(ProjectileComponent, Array.CreateInstance(fieldInfo.FieldType.GetElementType(), 0));
				}
				else if (typeof(UnityEventBase).IsAssignableFrom(fieldInfo.FieldType) && !fieldInfo.FieldType.IsAbstract)
				{
					fieldInfo.SetValue(ProjectileComponent, Activator.CreateInstance(fieldInfo.FieldType));
				}
			}
		}
		if (ProjectileComponent.onHitEvent == null)
		{
			ProjectileComponent.onHitEvent = new UnityEvent();
		}
		if (ProjectileComponent.customHitEffects == null)
		{
			ProjectileComponent.customHitEffects = new List<HitEffect>();
		}
		if (ProjectileComponent.damageTags == null)
		{
			ProjectileComponent.damageTags = new List<string>();
		}
		if (ProjectileComponent.spawnSound == null)
		{
			ProjectileComponent.spawnSound = new List<AudioClip>();
		}
		if (ProjectileComponent.reflectSound == null)
		{
			ProjectileComponent.reflectSound = new List<AudioClip>();
		}
		if (ProjectileComponent.hitSound == null)
		{
			ProjectileComponent.hitSound = new List<AudioClip>();
		}
		if (ProjectileComponent.pierceSound == null)
		{
			ProjectileComponent.pierceSound = new List<AudioClip>();
		}
		if (ProjectileComponent.hitDamageSounds == null)
		{
			ProjectileComponent.hitDamageSounds = new List<AudioClip>();
		}
		if (ProjectileComponent.hitKillSounds == null)
		{
			ProjectileComponent.hitKillSounds = new List<AudioClip>();
		}
		if (ProjectileComponent.hitWeakSpotSounds == null)
		{
			ProjectileComponent.hitWeakSpotSounds = new List<AudioClip>();
		}
		ProjectileComponent.speed = speed;
		ProjectileComponent.damage = damage;
		ProjectileComponent.hitRadius = radius;
		ProjectileComponent.lifetime = lifetime;
		ProjectileComponent.gravity = gravity;
		ProjectileComponent.destroyOnHit = true;
		ProjectileComponent.faceVelocity = true;
		ProjectileComponent.canRicochet = false;
		ProjectileComponent.hitMask = LayerMask.op_Implicit(19955841);
		Collider[] componentsInChildren = ((Component)this).GetComponentsInChildren<Collider>(true);
		Collider[] array2 = componentsInChildren;
		foreach (Collider val5 in array2)
		{
			val5.enabled = false;
			Object.Destroy((Object)(object)val5);
		}
		GameObject cachedPrefab = Spells.GetCachedPrefab("Rho Particles");
		if ((Object)(object)cachedPrefab != (Object)null)
		{
			cachedPrefab.transform.SetParent(((Component)this).transform);
			cachedPrefab.transform.localPosition = Vector3.zero;
			cachedPrefab.transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
			ParticleSystem val6 = default(ParticleSystem);
			if (cachedPrefab.TryGetComponent<ParticleSystem>(ref val6))
			{
				EmissionModule emission = val6.emission;
				MinMaxCurve rateOverTime = ((EmissionModule)(ref emission)).rateOverTime;
				((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(((MinMaxCurve)(ref rateOverTime)).constant * 5f);
				MainModule main = val6.main;
				((MainModule)(ref main)).maxParticles = Mathf.CeilToInt((float)((MainModule)(ref main)).maxParticles * 5f);
				((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1;
			}
		}
	}

	public void Launch(Vector3 direction, GameEntity sourceEntity = null, Item sourceItem = null)
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)ProjectileComponent == (Object)null))
		{
			ProjectileComponent.Initialize(((Vector3)(ref direction)).normalized, sourceEntity, sourceItem);
		}
	}
}
public class AxisMarkerEntity : MonoBehaviour
{
	public static List<Vector3> ObjectPositions = new List<Vector3>();

	private static List<AxisMarkerEntity> activeInstances = new List<AxisMarkerEntity>();

	public static int MaxAmount = 1;

	public GameObject SphereObject { get; private set; }

	public List<GameObject> RodObjects { get; private set; } = new List<GameObject>();

	public void Build(float sphereRadius = 0.15f, float rodThickness = 0.015f)
	{
		//IL_005a: 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_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: Expected O, but got Unknown
		//IL_00fa: 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_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0186: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Expected O, but got Unknown
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: Unknown result type (might be due to invalid IL or missing references)
		//IL_0196: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b7: 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_020b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0212: Unknown result type (might be due to invalid IL or missing references)
		//IL_0217: Unknown result type (might be due to invalid IL or missing references)
		//IL_022d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0232: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cc: 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_03f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0416: Unknown result type (might be due to invalid IL or missing references)
		//IL_0433: Unknown result type (might be due to invalid IL or missing references)
		//IL_0438: Unknown result type (might be due to invalid IL or missing references)
		//IL_043e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0443: Unknown result type (might be due to invalid IL or missing references)
		//IL_0452: Unknown result type (might be due to invalid IL or missing references)
		//IL_045f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0464: Unknown result type (might be due to invalid IL or missing references)
		((Object)((Component)this).gameObject).name = "Axis_Marker_Entity";
		float num = sphereRadius * 2f;
		SphereObject = GameObject.CreatePrimitive((PrimitiveType)0);
		((Object)SphereObject).name = "Center_Sphere";
		SphereObject.transform.SetParent(((Component)this).transform);
		SphereObject.transform.localPosition = Vector3.zero;
		SphereObject.transform.localRotation = Quaternion.identity;
		SphereObject.transform.localScale = new Vector3(num, num, num);
		Collider val = default(Collider);
		if (SphereObject.TryGetComponent<Collider>(ref val))
		{
			Object.Destroy((Object)(object)val);
		}
		Shader val2 = Shader.Find("Sprites/Default") ?? Shader.Find("UI/Default") ?? Shader.Find("Legacy Shaders/Transparent/Diffuse");
		Material val3 = new Material(val2);
		Color val4 = default(Color);
		((Color)(ref val4))..ctor(0.85f, 0f, 0f, 0.35f);
		val3.color = val4;
		if (val3.HasProperty("_Color"))
		{
			val3.SetColor("_Color", val4);
		}
		if (val3.HasProperty("_BaseColor"))
		{
			val3.SetColor("_BaseColor", val4);
		}
		val3.renderQueue = 3000;
		Renderer val5 = default(Renderer);
		if (SphereObject.TryGetComponent<Renderer>(ref val5))
		{
			val5.material = val3;
		}
		Shader val6 = Shader.Find("Standard") ?? Shader.Find("Diffuse");
		Material val7 = new Material(val6);
		Color val8 = (val7.color = Color.black);
		if (val7.HasProperty("_Color"))
		{
			val7.SetColor("_Color", val8);
		}
		if (val7.HasProperty("_BaseColor"))
		{
			val7.SetColor("_BaseColor", val8);
		}
		float num2 = sphereRadius * 3f / 2f;
		Quaternion[] array = (Quaternion[])(object)new Quaternion[3]
		{
			Quaternion.Euler(0f, 0f, 90f),
			Quaternion.identity,
			Quaternion.Euler(90f, 0f, 0f)
		};
		string[] array2 = new string[3] { "X", "Y", "Z" };
		Collider val10 = default(Collider);
		Renderer val11 = default(Renderer);
		for (int i = 0; i < 3; i++)
		{
			GameObject val9 = GameObject.CreatePrimitive((PrimitiveType)2);
			((Object)val9).name = "Rod_" + array2[i] + "_Axis";
			val9.transform.SetParent(((Component)this).transform);
			val9.transform.localPosition = Vector3.zero;
			val9.transform.localRotation = array[i];
			val9.transform.localScale = new Vector3(rodThickness, num2, rodThickness);
			if (val9.TryGetComponent<Collider>(ref val10))
			{
				Object.Destroy((Object)(object)val10);
			}
			if (val9.TryGetComponent<Renderer>(ref val11))
			{
				val11.material = val7;
			}
			RodObjects.Add(val9);
		}
		activeInstances.Add(this);
		ObjectPositions.Add(((Component)this).transform.position);
		if (activeInstances.Count > MaxAmount)
		{
			AxisMarkerEntity axisMarkerEntity = activeInstances[0];
			activeInstances.RemoveAt(0);
			ObjectPositions.RemoveAt(0);
			if ((Object)(object)axisMarkerEntity != (Object)null && (Object)(object)((Component)axisMarkerEntity).gameObject != (Object)null)
			{
				Object.Destroy((Object)(object)((Component)axisMarkerEntity).gameObject);
			}
		}
		GameObject cachedPrefab = Spells.GetCachedPrefab("Rho Particles");
		if ((Object)(object)cachedPrefab != (Object)null)
		{
			cachedPrefab.transform.SetParent(((Component)this).transform);
			cachedPrefab.transform.localPosition = Vector3.zero;
			cachedPrefab.transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
			ParticleSystem val12 = default(ParticleSystem);
			if (cachedPrefab.TryGetComponent<ParticleSystem>(ref val12))
			{
				EmissionModule emission = val12.emission;
				MinMaxCurve rateOverTime = ((EmissionModule)(ref emission)).rateOverTime;
				((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(((MinMaxCurve)(ref rateOverTime)).constant * 2f);
				MainModule main = val12.main;
				((MainModule)(ref main)).maxParticles = Mathf.CeilToInt((float)((MainModule)(ref main)).maxParticles * 2f);
				((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1;
			}
		}
	}

	private void OnDestroy()
	{
		int num = activeInstances.IndexOf(this);
		if (num >= 0)
		{
			activeInstances.RemoveAt(num);
			ObjectPositions.RemoveAt(num);
		}
	}
}
public static class Patches2
{
	[HarmonyPatch(typeof(HandItem_Shoot), "Shoot")]
	public class HandItem_Shoot_Bricked_Patch
	{
		[HarmonyPostfix]
		public static void Postfix(HandItem_Shoot __instance)
		{
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: 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_00d4: Unknown result type (might be due to invalid IL or missing references)
			ENT_Player player = ENT_Player.GetPlayer();
			if ((Object)(object)player != (Object)null && player.HasPerk("severon_bricked_perk") && (Object)(object)__instance != (Object)null && ((Object)__instance).name != null && ((Object)__instance).name.ToLower().Contains("rubble") && (Object)(object)Camera.main != (Object)null)
			{
				Inventory.instance.AddItemToInventoryCenter(CL_AssetManager.GetItemObjectPrefab("Item_Rubble", "").itemData.GetClone((Item)null, false));
				Inventory.instance.AddItemToInventoryCenter(CL_AssetManager.GetItemObjectPrefab("Item_Rubble", "").itemData.GetClone((Item)null, false));
				Vector3 val = -((Component)Camera.main).transform.forward * 7f;
				((GameEntity)player).AddForce(val, "");
			}
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "Update")]
	public class Player_WingFlight_Patch
	{
		public static bool isGliding;

		[HarmonyPostfix]
		public static void Postfix(ENT_Player __instance)
		{
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: 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_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: 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_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: 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_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: 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_0118: 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_0124: 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_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: 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_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			ENT_Player val = (((Object)(object)__instance != (Object)null) ? __instance : ENT_Player.GetPlayer());
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			if (val.IsGrounded(false) || val.IsHanging())
			{
				isGliding = false;
				return;
			}
			BuffContainer buffContainer = ((GameEntity)val).curBuffs.GetBuffContainer("TempFlight");
			bool flag = buffContainer != null && buffContainer.buffTime > 0f;
			if (val.IsGrounded(false) || val.IsHanging())
			{
				isGliding = false;
				if (flag)
				{
					buffContainer.buffTime = 0f;
				}
				return;
			}
			if (flag)
			{
				isGliding = true;
			}
			if (isGliding)
			{
				Vector3 trueVelocity = ((GameEntity)val).GetTrueVelocity();
				float magnitude = ((Vector3)(ref trueVelocity)).magnitude;
				Vector3 forward = ((Component)Camera.main).transform.forward;
				Vector3 val2 = Vector3.zero;
				if (magnitude > 0.1f)
				{
					Vector3 val3 = trueVelocity / magnitude;
					val2 += (forward - val3) * 0.003f * magnitude;
				}
				if (flag)
				{
					val2 += forward * 0.06f * val.jumpHeight * buffContainer.buffTime;
				}
				if (val2 != Vector3.zero)
				{
					((GameEntity)val).AddForce(val2, "");
				}
			}
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "GetCurrentMaxFallDistance")]
	public class Player_Flight_Fall_Damage_Patch
	{
		[HarmonyPrefix]
		public static bool Prefix(ref float __result)
		{
			if (!Player_WingFlight_Patch.isGliding)
			{
				return true;
			}
			__result = 1000000f;
			return false;
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "Jump")]
	public class Player_Jump_Flight_Patch
	{
		[HarmonyPrefix]
		public static void Prefix()
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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)
			//IL_0072: 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_0084: 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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			ENT_Player player = ENT_Player.GetPlayer();
			if ((Object)(object)player != (Object)null && player.HasPerk("severon_terrible_thoughts") && !player.IsGrounded(false) && !player.IsHanging())
			{
				BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("TempFlight");
				if (buffContainer == null)
				{
					buffContainer = new BuffContainer
					{
						id = "TempFlight",
						desc = "",
						loseOverTime = true,
						loseRate = 1f,
						buffTime = 0.7f,
						multiplier = 1f,
						buffs = new List<Buff>()
					};
					buffContainer.id = "TempFlight";
					((GameEntity)player).curBuffs.AddBuff(buffContainer);
				}
				else
				{
					BuffContainer obj = buffContainer;
					obj.buffTime += 1.4f;
				}
			}
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "Damage")]
	public class ENT_Player_Damage_Patch
	{
		[HarmonyPrefix]
		public static void Prefix(ENT_Player __instance, DamageInfo info)
		{
			float health = ((GameEntity)__instance).health;
			string text = info.type?.ToLower() ?? "";
			float num = info.amount;
			if (((GameEntity)__instance).curBuffs != null)
			{
				float buff = ((GameEntity)__instance).curBuffs.GetBuff("damageResist");
				float buff2 = ((GameEntity)__instance).curBuffs.GetBuff("damageMult");
				num /= 1f + buff;
				num *= 1f + buff2;
			}
			if (((!(text == "teeth") && !(text == "phage")) || !(health - num <= 0f)) && !info.HasTag("nonlethal"))
			{
				if (info.HasTag("dontkill"))
				{
					num = Mathf.Min(num, health - 0.1f);
				}
				if (health - num <= 0f)
				{
					OnPlayerWillDie(__instance, info);
				}
			}
		}

		private static void OnPlayerWillDie(ENT_Player player, DamageInfo info)
		{
			if (!player.HasPerk("severon_gastric_bypass_perk"))
			{
				return;
			}
			List<Item> itemsByTag = Inventory.instance.GetItemsByTag("food", true, true);
			if (itemsByTag.Count > 0)
			{
				itemsByTag[0].Destroy(true);
				((GameEntity)player).Heal(100f);
				player.OnEat("food");
				return;
			}
			itemsByTag = Inventory.instance.GetItemsByTag("brick", true, true);
			if (itemsByTag.Count > 0)
			{
				itemsByTag[0].Destroy(true);
				((GameEntity)player).Heal(100f);
				player.OnEat("food");
				return;
			}
			itemsByTag = Inventory.instance.GetItemsByTag("roach", true, true);
			if (itemsByTag.Count > 0)
			{
				itemsByTag[0].Destroy(true);
				((GameEntity)player).Heal(100f);
				player.OnEat("food");
			}
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "Revive")]
	public class ENT_Player_Revive_Patch
	{
		[HarmonyPostfix]
		public static void Postfix(ENT_Player __instance)
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_00be: Expected O, but got Unknown
			//IL_00c5: 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_00d5: 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_00f0: Expected O, but got Unknown
			//IL_00f7: 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_0107: 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_0122: Expected O, but got Unknown
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: 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_0154: Expected O, but got Unknown
			//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_016b: 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_0186: Expected O, but got Unknown
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: 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_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Expected O, but got Unknown
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: 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_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Expected O, but got Unknown
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: 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)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			if (__instance.HasPerk("severon_soul_perk"))
			{
				BuffContainer val = ((GameEntity)__instance).curBuffs.GetBuffContainer("severon_soul_stats");
				if (val == null)
				{
					val = new BuffContainer
					{
						id = "severon_soul_stats",
						desc = "",
						loseOverTime = false,
						loseRate = 0f,
						buffTime = 1f,
						multiplier = 1f,
						buffs = new List<Buff>()
					};
					((GameEntity)__instance).curBuffs.AddBuff(val);
				}
				val.buffs.Add(new Buff
				{
					id = "addStamina",
					maxAmount = 0.3f,
					amount = 0.3f
				});
				val.buffs.Add(new Buff
				{
					id = "addJump",
					maxAmount = 0.3f,
					amount = 0.3f
				});
				val.buffs.Add(new Buff
				{
					id = "addSpeed",
					maxAmount = 0.3f,
					amount = 0.3f
				});
				val.buffs.Add(new Buff
				{
					id = "addClimb",
					maxAmount = 0.3f,
					amount = 0.3f
				});
				val.buffs.Add(new Buff
				{
					id = "addReach",
					maxAmount = 0.3f,
					amount = 0.3f
				});
				val.buffs.Add(new Buff
				{
					id = "addStaminaRegen",
					maxAmount = 0.3f,
					amount = 0.3f
				});
				val.buffs.Add(new Buff
				{
					id = "addGravity",
					maxAmount = -0.3f,
					amount = -0.3f
				});
				val.buffs.Add(new Buff
				{
					id = "damageResist",
					maxAmount = 0.3f,
					amount = 0.3f
				});
			}
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "Damage")]
	public class Player_OnDamage_Patch
	{
		[HarmonyPostfix]
		public static void Postfix(ENT_Player __instance)
		{
			if ((Object)(object)__instance != (Object)null && __instance.HasPerk("severon_torment_perk"))
			{
				StatManager.sessionStats.UpdateStatistic("Kills", (object)1, (DataType)0, (ModType)1, (DisplayType)0, (ModType)1);
			}
		}
	}
}
public class PerkModule_CrouchMothSpawner : PerkModule
{
	[Header("Crouch Spawn Settings")]
	public float requiredCrouchTime = 3f;

	public string entityIdToSpawn = "Denizen_Moth";

	public float cooldownTime = 60f;

	public float spawnOffsetDistance = 2f;

	private float crouchTimer = 0f;

	private float currentCooldown = 0f;

	public override void Initialize(Perk p, bool firstTime)
	{
		((PerkModule)this).Initialize(p, firstTime);
		crouchTimer = 0f;
		currentCooldown = 0f;
	}

	public override void Update()
	{
		((PerkModule)this).Update();
		if (currentCooldown > 0f)
		{
			currentCooldown -= Time.deltaTime;
		}
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player == (Object)null)
		{
			return;
		}
		if (player.IsCrouching())
		{
			if (currentCooldown <= 0f)
			{
				crouchTimer += Time.deltaTime;
				if (crouchTimer >= requiredCrouchTime)
				{
					SpawnMoth(player);
					crouchTimer = 0f;
					currentCooldown = cooldownTime;
				}
			}
		}
		else
		{
			crouchTimer = 0f;
		}
	}

	private void SpawnMoth(ENT_Player player)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Expected O, but got Unknown
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		Vector3 position = ((Component)player).transform.position + ((Component)player).transform.forward * spawnOffsetDistance + Vector3.up;
		GameObject val = new GameObject("Temp_Moth_Spawner");
		val.transform.position = position;
		UT_SpawnEntityByID val2 = val.AddComponent<UT_SpawnEntityByID>();
		val2.idToSpawn = entityIdToSpawn;
		val2.spawnOnStart = false;
		val2.saveSpawnedObject = false;
		if (WorldLoader.initialized)
		{
			val2.customParent = ((Component)WorldLoader.instance.GetCurrentLevel().GetLevel()).transform;
		}
		val2.SpawnCustom(entityIdToSpawn);
		Object.Destroy((Object)(object)val, 5f);
	}
}
public class PerkModule_HeavyHanded : PerkModule
{
	public BuffContainer heavyHandedBuff;

	public BuffContainer reloadBuff;

	public override void Initialize(Perk p, bool firstTime)
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Expected O, but got Unknown
		//IL_006c: 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_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: 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_00a9: Expected O, but got Unknown
		((PerkModule)this).Initialize(p, firstTime);
		ENT_Player player = ENT_Player.GetPlayer();
		if (heavyHandedBuff == null)
		{
			heavyHandedBuff = new BuffContainer
			{
				id = "severon_heavyhanded_buff",
				desc = "Heavy Handed",
				loseOverTime = false,
				multiplier = 1f,
				buffs = new List<Buff>()
			};
		}
		if (reloadBuff == null)
		{
			reloadBuff = new BuffContainer
			{
				id = "reloadNeg",
				desc = "Weapon Speed",
				loseOverTime = false,
				multiplier = 0.8f,
				buffs = new List<Buff>()
			};
		}
		reloadBuff.id = "reloadNeg";
		heavyHandedBuff.id = "severon_heavyhanded_buff";
		if (((GameEntity)player).curBuffs.GetBuffContainer(heavyHandedBuff.id) == null)
		{
			((GameEntity)player).curBuffs.AddBuff(heavyHandedBuff);
		}
		if (((GameEntity)player).curBuffs.GetBuffContainer(reloadBuff.id) == null)
		{
			((GameEntity)player).curBuffs.AddBuff(reloadBuff);
		}
		((GameEntity)player).curBuffs.GetBuffContainer(reloadBuff.id).SetMultiplier(0.8f);
		((GameEntity)player).curBuffs.GetBuffContainer(reloadBuff.id).loseOverTime = false;
		((GameEntity)player).curBuffs.GetBuffContainer(heavyHandedBuff.id).loseOverTime = false;
		reloadBuff.id = "reloadNeg";
		heavyHandedBuff.id = "severon_heavyhanded_buff";
	}

	public override void OnDestroy(Perk p)
	{
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player != (Object)null && ((GameEntity)player).curBuffs != null)
		{
			BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("severon_heavyhanded_buff");
			if (buffContainer != null)
			{
				((GameEntity)player).curBuffs.RemoveBuffContainer(buffContainer);
			}
			BuffContainer buffContainer2 = ((GameEntity)player).curBuffs.GetBuffContainer("reloadNeg");
			if (buffContainer2 != null)
			{
				((GameEntity)player).curBuffs.RemoveBuffContainer(buffContainer);
			}
		}
		((PerkModule)this).OnDestroy(p);
	}
}
public class PerkModule_ItemRecycling : PerkModule
{
	public BuffContainer recycleBuff;

	public float recycleChanceMultiplier = 0.3f;

	public override void Initialize(Perk p, bool firstTime)
	{
		((PerkModule)this).Initialize(p, firstTime);
		recycleBuff.id = "itemRecycling";
		ENT_Player player = ENT_Player.GetPlayer();
		if (((GameEntity)player).curBuffs.GetBuffContainer(recycleBuff.id) == null)
		{
			((GameEntity)player).curBuffs.AddBuff(recycleBuff);
		}
		BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer(recycleBuff.id);
		buffContainer.loseOverTime = false;
		Perk perk = player.GetPerk("severon_recycle_perk");
		int num = ((!((Object)(object)perk != (Object)null)) ? 1 : perk.GetStackAmount());
		buffContainer.SetMultiplier((float)num * recycleChanceMultiplier);
	}

	public override void Update()
	{
		((PerkModule)this).Update();
		ENT_Player player = ENT_Player.GetPlayer();
		Perk perk = player.GetPerk("severon_recycle_perk");
		BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer(recycleBuff.id);
		if ((Object)(object)perk != (Object)null && buffContainer != null)
		{
			buffContainer.SetMultiplier((float)perk.GetStackAmount() * recycleChanceMultiplier);
		}
	}
}
[HarmonyPatch(typeof(HandItem_Shoot), "Update")]
public class HandItem_Shoot_Update_Patch
{
	private static void Postfix(HandItem_Shoot __instance)
	{
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)((HandItem)__instance).anim != (Object)null && ((Hand_Base)__instance).hand != null && (Object)(object)player != (Object)null && ((GameEntity)player).curBuffs.GetBuffContainer("reloadBuff") != null)
		{
			float multiplier = ((GameEntity)player).curBuffs.GetBuffContainer("reloadBuff").GetMultiplier();
			((HandItem)__instance).anim.speed = 1f + multiplier;
			if ((Object)(object)((HandItem)__instance).anim != (Object)null && ((Hand_Base)__instance).hand != null && (Object)(object)player != (Object)null && ((GameEntity)player).curBuffs.GetBuffContainer("reloadNeg") != null)
			{
				multiplier = ((GameEntity)player).curBuffs.GetBuffContainer("reloadNeg").GetMultiplier();
				Animator anim = ((HandItem)__instance).anim;
				anim.speed -= multiplier;
			}
		}
		else if ((Object)(object)((HandItem)__instance).anim != (Object)null && ((Hand_Base)__instance).hand != null && (Object)(object)player != (Object)null && ((GameEntity)player).curBuffs.GetBuffContainer("reloadNeg") != null)
		{
			float multiplier2 = ((GameEntity)player).curBuffs.GetBuffContainer("reloadNeg").GetMultiplier();
			((HandItem)__instance).anim.speed = 1f - multiplier2;
		}
	}
}
[HarmonyPatch(typeof(HandItem_Buff_Grub), "CanPet")]
public static class HandItem_Buff_Grub_CanPet_Patch
{
	[HarmonyPostfix]
	public static void Postfix(ref bool __result)
	{
		if (!__result)
		{
			ENT_Player player = ENT_Player.GetPlayer();
			if ((Object)(object)player != (Object)null && player.HasPerk("severon_grub_transformation_perk"))
			{
				__result = true;
			}
		}
	}
}
[HarmonyPatch(typeof(HandItem_Melee), "Update")]
public class HandItem_Swing_Update_Patch
{
	private static readonly AnimationCurve SlowIntensityCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[3]
	{
		new Keyframe(0f, 3f),
		new Keyframe(0.05f, 0f),
		new Keyframe(1f, 0.2f)
	});

	private static void Postfix(HandItem_Melee __instance)
	{
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		ENT_Player player = ENT_Player.GetPlayer();
		if (!((Object)(object)((HandItem)__instance).anim == (Object)null) && ((Hand_Base)__instance).hand != null && !((Object)(object)player == (Object)null) && ((GameEntity)player).curBuffs != null)
		{
			float num = 1f;
			BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("reloadBuff");
			if (buffContainer != null)
			{
				num += buffContainer.GetMultiplier();
			}
			BuffContainer buffContainer2 = ((GameEntity)player).curBuffs.GetBuffContainer("reloadNeg");
			if (buffContainer2 != null)
			{
				AnimatorStateInfo currentAnimatorStateInfo = ((HandItem)__instance).anim.GetCurrentAnimatorStateInfo(0);
				float num2 = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime % 1f;
				float num3 = SlowIntensityCurve.Evaluate(num2);
				float multiplier = buffContainer2.GetMultiplier();
				num -= multiplier * num3;
			}
			((HandItem)__instance).anim.speed = Mathf.Max(0.04f, num);
		}
	}
}
[HarmonyPatch(typeof(HandItem), "RemoveItem")]
public class Patch_HandItem_RemoveItem
{
	[HarmonyPrefix]
	public static bool Prefix(HandItem __instance)
	{
		//IL_0184: Unknown result type (might be due to invalid IL or missing references)
		//IL_018a: 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_01ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0205: Invalid comparison between Unknown and I4
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player == (Object)null || ((GameEntity)player).curBuffs == null)
		{
			return true;
		}
		BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("itemRecycling");
		if (buffContainer == null)
		{
			return true;
		}
		float multiplier = buffContainer.GetMultiplier();
		if (Random.value < multiplier)
		{
			__instance.used = false;
			Traverse val = Traverse.Create((object)__instance.item).Method("SetUsed", new object[1] { false });
			if (val.MethodExists())
			{
				val.GetValue();
			}
			string firstDataStringByType = __instance.item.GetFirstDataStringByType("uses", false);
			if (!string.IsNullOrEmpty(firstDataStringByType) && int.TryParse(firstDataStringByType, out var result) && result <= 0)
			{
				__instance.item.SetFirstDataStringsofType("uses", "1");
				Traverse val2 = Traverse.Create((object)__instance).Field("uses");
				if (val2.FieldExists())
				{
					val2.SetValue((object)3);
				}
			}
			if ((Object)(object)__instance.anim != (Object)null)
			{
				__instance.anim.Rebind();
				AnimatorControllerParameter[] parameters = __instance.anim.parameters;
				foreach (AnimatorControllerParameter val3 in parameters)
				{
					int result2;
					if (val3.name == "Empty" && (int)val3.type == 4)
					{
						__instance.anim.SetBool("Empty", false);
					}
					else if (val3.name == "Squeeze" && (int)val3.type == 4)
					{
						__instance.anim.SetBool("Squeeze", false);
					}
					else if (val3.name == "Uses" && (int)val3.type == 3 && int.TryParse(__instance.item.GetFirstDataStringByType("uses", false), out result2))
					{
						__instance.anim.SetInteger("Uses", result2);
					}
				}
				__instance.anim.Update(0f);
			}
			Hand_Takeover val4 = ((Component)__instance).GetComponent<Hand_Takeover>() ?? ((Component)__instance).GetComponentInChildren<Hand_Takeover>();
			if ((Object)(object)val4 != (Object)null)
			{
				val4.blend = 0f;
				Traverse val5 = Traverse.Create((object)val4).Field("curBlend");
				if (val5.FieldExists())
				{
					val5.SetValue((object)0f);
				}
			}
			HandItem_BlinkEye val6 = (HandItem_BlinkEye)(object)((__instance is HandItem_BlinkEye) ? __instance : null);
			if (val6 != null)
			{
				val6.CancelBlink();
				if ((Object)(object)val6.crushEffect != (Object)null)
				{
					val6.crushEffect.Stop();
				}
			}
			HandItem_Food val7 = (HandItem_Food)(object)((__instance is HandItem_Food) ? __instance : null);
			if (val7 != null)
			{
				val7.FinishEating();
			}
			__instance.Refresh();
			return false;
		}
		return true;
	}
}
[HarmonyPatch(typeof(Item), "Destroy")]
public class Patch_Item_RemoveItem
{
	[HarmonyPrefix]
	public static bool Prefix(Item __instance)
	{
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player == (Object)null || ((GameEntity)player).curBuffs == null)
		{
			return true;
		}
		BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("itemRecycling");
		if (buffContainer == null)
		{
			return true;
		}
		float num = Mathf.Clamp01(buffContainer.GetMultiplier());
		if (Random.value < num)
		{
			return false;
		}
		return true;
	}
}
[HarmonyPatch(typeof(HandItem_Shoot), "Shoot")]
public class HandItem_Shoot_Shoot_Patch
{
	[HarmonyPostfix]
	public static void Postfix()
	{
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: 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_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player != (Object)null && ((GameEntity)player).curBuffs != null)
		{
			BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("severon_heavyhanded_buff");
			if (buffContainer != null && (Object)(object)Camera.main != (Object)null)
			{
				Vector3 val = -((Component)Camera.main).transform.forward * 1f;
				((GameEntity)player).AddForce(val, "");
			}
		}
	}
}
[HarmonyPatch(typeof(HandItem_Melee), "Hit")]
public class HandItem_Melee_Hit_Patch
{
	[HarmonyPostfix]
	public static void Postfix()
	{
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: 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_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player != (Object)null && ((GameEntity)player).curBuffs != null)
		{
			BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("severon_heavyhanded_buff");
			if (buffContainer != null && (Object)(object)Camera.main != (Object)null)
			{
				Vector3 val = -((Component)Camera.main).transform.forward * 0.65f;
				((GameEntity)player).AddForce(val, "");
			}
		}
	}
}
[HarmonyPatch(typeof(HandItem_Melee), "OnChargeAttack")]
public class HandItem_Melee_Charged_Patch
{
	[HarmonyPostfix]
	public static void Postfix()
	{
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: 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_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player != (Object)null && ((GameEntity)player).curBuffs != null)
		{
			BuffContainer buffContainer = ((GameEntity)player).curBuffs.GetBuffContainer("severon_heavyhanded_buff");
			if (buffContainer != null && (Object)(object)Camera.main != (Object)null)
			{
				Vector3 val = -((Component)Camera.main).transform.forward * 1f;
				((GameEntity)player).AddForce(val, "");
			}
		}
	}
}
[HarmonyPatch(typeof(OS_Filesystem), "Initialize")]
public class OS_Filesystem_Initialize_Patch
{
	private static void Postfix(OS_Filesystem __instance, OS_Manager o)
	{
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Invalid comparison between Unknown and I4
		//IL_0069: 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_00c6: 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_00da: Expected O, but got Unknown
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: 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_013a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: Expected O, but got Unknown
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a8: Expected O, but got Unknown
		//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
		if (((Object)((Component)((Component)o.worldInterface).gameObject.transform.parent).gameObject).name != "Prop_UpgradeConsole_ScreenAndDisk Variant")
		{
			return;
		}
		App_PerkPage[] array = Resources.FindObjectsOfTypeAll<App_PerkPage>();
		App_PerkPage val = null;
		App_PerkPage[] array2 = array;
		foreach (App_PerkPage val2 in array2)
		{
			if ((int)val2.perkPageType == 0)
			{
				val = val2;
				Scene scene = ((Component)val2).gameObject.scene;
				if (!((Scene)(ref scene)).isLoaded)
				{
					break;
				}
			}
		}
		if (!((Object)(object)val == (Object)null))
		{
			GameObject val3 = Object.Instantiate<GameObject>(((Component)val).gameObject, ((Component)val).transform.parent);
			App_PerkPage component = val3.GetComponent<App_PerkPage>();
			component.perkPageType = (PerkPageType)10;
			OS_Window component2 = ((Component)component).GetComponent<OS_Window>();
			FileInfo val4 = new FileInfo();
			val4.name = "Rho Is Friend";
			val4.type = (fileType)0;
			val4.useCustomFiletype = true;
			val4.position = new Vector2(-150f, -200f);
			val4.icon = CL_AssetManager.GetSpriteAsset("Perk_Icon_Rho_Blessing_03", "");
			val4.windowAsset = component2;
			__instance.CreateFile(val4, __instance.desktop);
			val4 = new FileInfo();
			val4.name = "You Won't Hurt";
			val4.type = (fileType)0;
			val4.useCustomFiletype = true;
			val4.position = new Vector2(-300f, -160f);
			val4.icon = CL_AssetManager.GetSpriteAsset("Perk_Icon_Rho_Blessing_04", "");
			val4.windowAsset = component2;
			__instance.CreateFile(val4, __instance.desktop);
			val4 = new FileInfo();
			val4.name = "Take This Gift";
			val4.type = (fileType)0;
			val4.useCustomFiletype = true;
			val4.position = new Vector2(-40f, -80f);
			val4.icon = CL_AssetManager.GetSpriteAsset("Perk_Icon_Rho_Blessing_02", "");
			val4.windowAsset = component2;
			__instance.CreateFile(val4, __instance.desktop);
		}
	}
}
[HarmonyPatch(typeof(App_PerkPage), "OnEnable")]
public class App_PerkPage_OnEnable_Patch
{
	private static void Postfix(App_PerkPage __instance)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Invalid comparison between Unknown and I4
		if ((int)__instance.perkPageType != 10)
		{
			return;
		}
		Traverse val = Traverse.Create((object)__instance);
		OS_Manager value = val.Field("os").GetValue<OS_Manager>();
		if (!((Object)(object)value != (Object)null) || !((Object)(object)value.worldInterface != (Object)null))
		{
			return;
		}
		string text = "recieved-" + value.worldInterface.computerID + "-perk";
		if (ENT_Player.GetPlayer().HasPerk("Perk_Rho_Blessing_Overwhelm"))
		{
			CL_GameManager.SetGameFlag(text, false, "", false, false);
			val.Field("fullfilled").SetValue((object)false);
			if ((Object)(object)__instance.outOfPerksRoot != (Object)null)
			{
				__instance.outOfPerksRoot.SetActive(false);
			}
			List<App_PerkPage_Card> value2 = val.Field("cards").GetValue<List<App_PerkPage_Card>>();
			if (value2 != null && value2.Count == 0)
			{
				val.Method("GenerateCards", new object[1] { false }).GetValue();
			}
		}
	}
}
[HarmonyPatch(typeof(App_PerkPage), "Update")]
public class App_PerkPage_Update_Patch
{
	private static void Postfix(App_PerkPage __instance)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Invalid comparison between Unknown and I4
		if ((int)__instance.perkPageType == 10 && (Object)(object)__instance.purchaseButton != (Object)null)
		{
			Traverse val = Traverse.Create((object)__instance);
			if (!val.Field("fullfilled").GetValue<bool>())
			{
				bool flag = ENT_Player.GetPlayer().HasPerk("Perk_Rho_Blessing_Overwhelm");
				App_PerkPage_Card value = val.Field("selectedCard").GetValue<App_PerkPage_Card>();
				bool flag2 = (Object)(object)value != (Object)null && value.CanAfford();
				((Selectable)__instance.purchaseButton).interactable = flag && flag2;
			}
		}
	}
}
[HarmonyPatch(typeof(App_PerkPage), "PurchaseSelected")]
public class App_PerkPage_PurchaseSelected_Patch
{
	[HarmonyPrefix]
	private static bool Prefix(App_PerkPage __instance)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Invalid comparison between Unknown and I4
		if ((int)__instance.perkPageType == 10)
		{
			Traverse val = Traverse.Create((object)__instance);
			App_PerkPage_Card value = val.Field("selectedCard").GetValue<App_PerkPage_Card>();
			List<App_PerkPage_Card> value2 = val.Field("cards").GetValue<List<App_PerkPage_Card>>();
			OS_Manager value3 = val.Field("os").GetValue<OS_Manager>();
			if ((Object)(object)value == (Object)null || CL_GameManager.IsIronKnuckle())
			{
				return false;
			}
			if (!value.CanAfford())
			{
				return false;
			}
			if (!ENT_Player.GetPlayer().HasPerk("Perk_Rho_Blessing_Overwhelm"))
			{
				return false;
			}
			value3.audioClipHandler.PlaySound("perk:buy");
			CL_GameManager.gMan.localPlayer.AddPerk(Object.Instantiate<Perk>(value.perk), 1, true);
			ENT_Player.GetPlayer().RemovePerk("Perk_Rho_Blessing_Overwhelm", false);
			value.BuyCard();
			value.LockCard();
			value.UpdateCard();
			if ((Object)(object)__instance.purchaseButton != (Object)null)
			{
				((Selectable)__instance.purchaseButton).interactable = false;
			}
			val.Method("GenerateIcons", Array.Empty<object>()).GetValue();
			if (!ENT_Player.GetPlayer().HasPerk("Perk_Rho_Blessing_Overwhelm"))
			{
				val.Field("fullfilled").SetValue((object)true);
				if (value2 != null)
				{
					foreach (App_PerkPage_Card item in value2)
					{
						if ((Object)(object)item != (Object)(object)value)
						{
							item.DisableCard();
							item.LockCard();
							item.UpdateCard();
						}
					}
				}
				if ((Object)(object)value3.worldInterface != (Object)null && value3.worldInterface.computerID != "")
				{
					CL_GameManager.SetGameFlag("recieved-" + value3.worldInterface.computerID + "-perk", true, "", false, false);
				}
				if ((Object)(object)__instance.outOfPerksRoot != (Object)null)
				{
					__instance.outOfPerksRoot.SetActive(true);
				}
				if ((Object)(object)__instance.reloadSettingsRoot != (Object)null)
				{
					__instance.reloadSettingsRoot.SetActive(false);
				}
			}
			return false;
		}
		return true;
	}
}
[HarmonyPatch(typeof(App_PerkPage), "PurchaseRefresh")]
public class App_PerkPage_PurchaseRefresh_Patch
{
	[HarmonyPrefix]
	private static bool Prefix(App_PerkPage __instance)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Invalid comparison between Unknown and I4
		if ((int)__instance.perkPageType == 10)
		{
			OS_Manager value = Traverse.Create((object)__instance).Field("os").GetValue<OS_Manager>();
			if ((Object)(object)value != (Object)null && (Object)(object)value.audioClipHandler != (Object)null)
			{
				value.audioClipHandler.PlaySound("os:error");
			}
			return false;
		}
		return true;
	}
}
[HarmonyPatch(typeof(ENV_RhoAltar), "CheckItemObject")]
public class ENV_RhoAltar_MothersUpgrade_Patch
{
	[HarmonyPrefix]
	public static bool Prefix(ENV_RhoAltar __instance, Item_Object item)
	{
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Expected O, but got Unknown
		//IL_0150: 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_0160: 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_017b: Expected O, but got Unknown
		//IL_0183: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: 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_019e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ae: Expected O, but got Unknown
		//IL_01b6: 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)
		//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e1: Expected O, but got Unknown
		//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0204: Unknown result type (might be due to invalid IL or missing references)
		//IL_0214: Expected O, but got Unknown
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Expected O, but got Unknown
		//IL_0247: Unknown result type (might be due to invalid IL or missing references)
		ENT_Player player = ENT_Player.GetPlayer();
		if (player.HasPerk("Perk_MotherlyInstinct") && __instance.maxTrades <= 1)
		{
			__instance.maxTrades++;
		}
		if ((Object)(object)item == (Object)null)
		{
			return true;
		}
		if ((Object)(object)player == (Object)null)
		{
			return true;
		}
		if (player.HasPerk("severon_mothersupgrade_perk") && ((Object)item).name.Contains("Grub"))
		{
			BuffContainer val = ((GameEntity)player).curBuffs.GetBuffContainer("severon_mothersupgrade_stats");
			if (val == null)
			{
				val = new BuffContainer
				{
					id = "severon_mothersupgrade_stats",
					desc = "Mother's Upgrade Stats",
					loseOverTime = false,
					loseRate = 0f,
					buffTime = 1f,
					multiplier = 1f,
					buffs = new List<Buff>()
				};
				((GameEntity)player).curBuffs.AddBuff(val);
			}
			Debug.Log((object)"Adding Buffs for grub murder.");
			val.buffs.Add(new Buff
			{
				id = "addStamina",
				maxAmount = 0.07f,
				amount = 0.07f
			});
			val.buffs.Add(new Buff
			{
				id = "addJump",
				maxAmount = 0.07f,
				amount = 0.07f
			});
			val.buffs.Add(new Buff
			{
				id = "addSpeed",
				maxAmount = 0.07f,
				amount = 0.07f
			});
			val.buffs.Add(new Buff
			{
				id = "addClimb",
				maxAmount = 0.07f,
				amount = 0.07f
			});
			val.buffs.Add(new Buff
			{
				id = "addReach",
				maxAmount = 0.07f,
				amount = 0.07f
			});
			item.canPickup = false;
			Object.Destroy((Object)(object)((Component)item).gameObject);
			if ((Object)(object)__instance.acceptSound != (Object)null)
			{
				AudioManager.PlaySound(__instance.acceptSound, ((Component)__instance).transform.position, 1f, 1f, 1f, false, 1f, (AudioMixerGroup)null, "");
			}
			if (__instance.tradeEvent != null)
			{
				__instance.tradeEvent.Invoke();
			}
			return false;
		}
		return true;
	}
}
[HarmonyPatch(typeof(ENT_Player), "Update")]
public class ENT_Player_RabbitSpirit_Patch
{
	[HarmonyPostfix]
	public static void Postfix(ENT_Player __instance)
	{
		if (!((Object)(object)__instance == (Object)null) && __instance.HasPerk("severon_rabbit_spirit_perk") && __instance.IsHanging())
		{
			Traverse.Create((object)__instance).Field("isGrounded").SetValue((object)true);
		}
	}
}
public static class PlayerGroundedSpoofer
{
	[HarmonyPatch(typeof(ENT_Player), "Movement")]
	public static class MovementPatch
	{
		[HarmonyPrefix]
		public static void Prefix()
		{
			_isUpdatingPhysics = true;
		}

		[HarmonyPostfix]
		public static void Postfix()
		{
			_isUpdatingPhysics = false;
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "IsGrounded", new Type[] { typeof(bool) })]
	public static class IsGroundedPatch
	{
		[HarmonyPrefix]
		public static bool Prefix(ENT_Player __instance, ref bool __result)
		{
			if (_isUpdatingPhysics)
			{
				return true;
			}
			if (__instance.HasPerk("severon_rabbit_spirit_perk") && __instance.IsHanging())
			{
				__result = true;
				return false;
			}
			return true;
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "IsCrouching")]
	public static class IsCrouchingPatch
	{
		[HarmonyPrefix]
		public static bool Prefix(ENT_Player __instance, ref bool __result)
		{
			if (_isUpdatingPhysics)
			{
				return true;
			}
			if (__instance.HasPerk("severon_rabbit_spirit_perk") && __instance.IsHanging())
			{
				__result = true;
				return false;
			}
			return true;
		}
	}

	[HarmonyPatch(typeof(ENT_Player), "Jump")]
	public static class JumpPatch
	{
		private static bool _wasSpoofed;

		private static bool _realCrouching;

		private static bool _realIsGrounded;

		private static PlayerState _realPlayerState;

		[HarmonyPrefix]
		public static void Prefix(ENT_Player __instance, ref bool ___crouching, ref bool ___isGrounded, ref PlayerState ___playerState)
		{
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Invalid comparison between Unknown and I4
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.HasPerk("severon_conviction_perk") && (double)Random.value < 0.6)
			{
				ENT_Player.GetPlayer().AddExtraJumpsOneTime(1);
			}
			if (!__instance.HasPerk("severon_rabbit_spirit_perk") || !__instance.IsHanging())
			{
				return;
			}
			Hand[] hands = __instance.hands;
			foreach (Hand val in hands)
			{
				if ((int)val.interactState == 4)
				{
					__instance.StopInteraction(val.id, "jump", true);
				}
			}
			_realCrouching = ___crouching;
			_realIsGrounded = ___isGrounded;
			_realPlayerState = ___playerState;
			_wasSpoofed = true;
			___crouching = true;
			___isGrounded = true;
			___playerState = (PlayerState)0;
		}

		[HarmonyPostfix]
		public static void Postfix(ENT_Player __instance, ref bool ___crouching, ref bool ___isGrounded, ref PlayerState ___playerState)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected I4, but got Unknown
			if (_wasSpoofed)
			{
				___crouching = _realCrouching;
				___isGrounded = _realIsGrounded;
				___playerState = (PlayerState)(int)_realPlayerState;
				_wasSpoofed = false;
			}
		}
	}

	private static bool _isUpdatingPhysics;
}
[HarmonyPatch(typeof(HandItem_Food), "Eat")]
public class HandItem_Food_Eat_MetabolicOverdrive_Patch
{
	[HarmonyPostfix]
	public static void Postfix(HandItem_Food __instance)
	{
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player != (Object)null && player.HasPerk("severon_metabolic_overdrive") && __instance.buff != null)
		{
			((GameEntity)CL_GameManager.gMan.localPlayer).Buff(__instance.buff);
			((GameEntity)CL_GameManager.gMan.localPlayer).Buff(__instance.buff);
		}
	}
}
[HarmonyPatch(typeof(HandItem_Buff), "Activate")]
public class HandItem_Buff_Activate_MetabolicOverdrive_Patch
{
	[HarmonyPostfix]
	public static void Postfix(HandItem_Buff __instance)
	{
		ENT_Player player = ENT_Player.GetPlayer();
		if (!((Object)(object)player != (Object)null) || !player.HasPerk("severon_metabolic_overdrive"))
		{
			return;
		}
		if (__instance.buff != null)
		{
			((GameEntity)CL_GameManager.gMan.localPlayer).Buff(__instance.buff);
			((GameEntity)CL_GameManager.gMan.localPlayer).Buff(__instance.buff);
		}
		if (!__instance.useSecondaryBuffs || __instance.secondaryBuffs == null)
		{
			return;
		}
		foreach (BuffContainer secondaryBuff in __instance.secondaryBuffs)
		{
			if (secondaryBuff != null)
			{
				((GameEntity)CL_GameManager.gMan.localPlayer).Buff(secondaryBuff);
				((GameEntity)CL_GameManager.gMan.localPlayer).Buff(secondaryBuff);
			}
		}
	}
}
[HarmonyPatch(typeof(HandItem_Shoot), "Shoot")]
public class HandItem_Shoot_BartenderRecoil_Patch
{
	[HarmonyPostfix]
	public static void Postfix(HandItem_Shoot __instance)
	{
		//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_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		ENT_Player player = ENT_Player.GetPlayer();
		if ((Object)(object)player != (Object)null && player.HasPerk("severon_bartender_perk") && (Object)(object)__instance != (Object)null && ((Object)__instance).name != null && ((Object)__instance).name.ToLower().Contains("rebar") && (Object)(object)Camera.main != (Object)null)
		{
			Vector3 val = -((Component)Camera.main).transform.forward * 5f;
			((GameEntity)player).AddForce