Decompiled source of LookingGlass v1.9.10

plugins/LookingGlass/LookingGlass.dll

Decompiled 5 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HG;
using LeTai.Asset.TranslucentImage;
using LookingGlass.AutoSortItems;
using LookingGlass.Base;
using LookingGlass.BuffDescriptions;
using LookingGlass.BuffTimers;
using LookingGlass.CommandItemCount;
using LookingGlass.CommandWindowBlur;
using LookingGlass.DPSMeterStuff;
using LookingGlass.EquipTimerFix;
using LookingGlass.EscapeToCloseMenu;
using LookingGlass.HiddenItems;
using LookingGlass.HidePickupNotifs;
using LookingGlass.ItemCounters;
using LookingGlass.ItemStatsNameSpace;
using LookingGlass.LookingGlassLanguage;
using LookingGlass.PickupNotifsDuration;
using LookingGlass.ResizeCommandWindow;
using LookingGlass.StatsDisplay;
using Microsoft.CodeAnalysis;
using MonoMod.RuntimeDetour;
using RiskOfOptions;
using RiskOfOptions.Components.Options;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ContentManagement;
using RoR2.Items;
using RoR2.UI;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("DropPod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.9.10.0")]
[assembly: AssemblyInformationalVersion("1.9.10+2efcb6fbf7ba8e83fefeea156aef78197f68fcf0")]
[assembly: AssemblyProduct("LookingGlass")]
[assembly: AssemblyTitle("LookingGlass")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/Wet-Boys/LookingGlass")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LookingGlass
{
	[BepInPlugin("droppod.lookingglass", "LookingGlass", "1.9.10")]
	public class BasePlugin : BaseUnityPlugin
	{
		internal static BasePlugin instance;

		internal AutoSortItemsClass autoSortItems;

		internal NoWindowBlur noWindowBlur;

		internal ButtonsToCloseMenu buttonsToCloseMenu;

		internal HidePickupNotifications hidePickupNotifications;

		internal ItemStats itemStats;

		internal CommandItemCountClass commandItemCountClass;

		internal ModifyCommandWindow resizeCommandWindowClass;

		internal StatsDisplayClass statsDisplayClass;

		internal DPSMeter dpsMeter;

		internal ItemCounter itemCounter;

		internal BuffTimersClass buffTimers;

		internal CooldownFixer equipFixer;

		internal UnHiddenItems unHiddenItems;

		internal BuffDescriptionsClass buffDescriptions;

		internal PickupNotifDurationClass pickupNotifDurationClass;

		public static byte[] logo;

		public static Sprite logo2;

		public void Awake()
		{
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			Log.Init(((BaseUnityPlugin)this).Logger);
			instance = this;
			try
			{
				string path = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "icons");
				int num = Random.Range(0, Directory.GetFiles(path).Length);
				int num2 = 0;
				string[] files = Directory.GetFiles(path);
				foreach (string path2 in files)
				{
					if (num2 == num)
					{
						logo = File.ReadAllBytes(path2);
					}
					num2++;
				}
				Texture2D val = LoadTexture(logo, 256, 256);
				logo2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0f, 0f), 100f, 1u, (SpriteMeshType)1, new Vector4(0f, 0f, 0f, 0f), true);
				ModSettingsManager.SetModIcon(logo2);
			}
			catch (Exception)
			{
			}
			autoSortItems = new AutoSortItemsClass();
			noWindowBlur = new NoWindowBlur();
			buttonsToCloseMenu = new ButtonsToCloseMenu();
			hidePickupNotifications = new HidePickupNotifications();
			commandItemCountClass = new CommandItemCountClass();
			resizeCommandWindowClass = new ModifyCommandWindow();
			statsDisplayClass = new StatsDisplayClass();
			buffTimers = new BuffTimersClass();
			dpsMeter = new DPSMeter();
			itemCounter = new ItemCounter();
			equipFixer = new CooldownFixer();
			unHiddenItems = new UnHiddenItems();
			buffDescriptions = new BuffDescriptionsClass();
			pickupNotifDurationClass = new PickupNotifDurationClass();
			((MonoBehaviour)this).StartCoroutine(CheckPlayerStats());
			((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)delegate
			{
				itemStats = new ItemStats();
			});
		}

		private void Update()
		{
			if (ButtonsToCloseMenu.buttonsToClickOnMove.Count != 0 && Input.anyKeyDown && !Input.GetMouseButtonDown(0))
			{
				ButtonsToCloseMenu.CloseMenuAfterFrame();
			}
			dpsMeter.Update();
		}

		private IEnumerator CheckPlayerStats()
		{
			yield return (object)new WaitForSeconds(StatsDisplayClass.statsDisplayUpdateInterval.Value);
			try
			{
				statsDisplayClass.CalculateStuff();
			}
			catch (Exception arg)
			{
				Debug.Log((object)$"Attempted to update stats but got exception: {arg}");
			}
			((MonoBehaviour)this).StartCoroutine(CheckPlayerStats());
		}

		public static Texture2D LoadTexture(byte[] bytes, int width, int height)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			Texture2D val = new Texture2D(width, height, (TextureFormat)5, false, false);
			ImageConversion.LoadImage(val, bytes);
			((Texture)val).filterMode = (FilterMode)0;
			return val;
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	internal class Utils
	{
		public static float CalculateChanceWithNullableMaster(float baseChance, CharacterMaster master)
		{
			if (Object.op_Implicit((Object)(object)master))
			{
				return CalculateChanceWithLuck(baseChance, master.luck);
			}
			return baseChance;
		}

		public static float CalculateChanceWithLuck(float baseChance, float luckIn)
		{
			if (ItemStats.capChancePercentage.Value)
			{
				baseChance = Mathf.Min(baseChance, 1f);
			}
			float num = Mathf.Floor(baseChance);
			float num2 = baseChance % 1f;
			int num3 = Mathf.CeilToInt(luckIn);
			if (num3 > 0)
			{
				return num + (1f - Mathf.Pow(1f - num2, (float)(num3 + 1)));
			}
			if (num3 < 0)
			{
				return num + Mathf.Pow(num2, (float)(Mathf.Abs(num3) + 1));
			}
			return baseChance;
		}

		public static float GetLuckFromCachedUserBody(CharacterBody cachedUserBody)
		{
			if (Object.op_Implicit((Object)(object)cachedUserBody) && Object.op_Implicit((Object)(object)cachedUserBody.master))
			{
				return cachedUserBody.master.luck;
			}
			return cachedUserBody.inventory.GetItemCount(Items.Clover) - cachedUserBody.inventory.GetItemCount(Items.LunarBadLuck);
		}

		public static float GetExponentialRechargeTime(float baseCooldown, float extraPercent, int count)
		{
			return baseCooldown * Mathf.Pow(1f - extraPercent, (float)(count - 1));
		}

		public static float GetExponentialStacking(float basePercent, float extraPercent, int count)
		{
			return 1f - (1f - basePercent) * Mathf.Pow(1f - extraPercent, (float)(count - 1));
		}

		public static float GetHyperbolicStacking(float basePercent, float extraPercent, int count)
		{
			return 1f - 1f / (1f + basePercent + extraPercent * (float)(count - 1));
		}

		public static float GetBandolierStacking(int count)
		{
			return 1f - 1f / Mathf.Pow(1f + (float)count, 0.33f);
		}

		public static string DictToString<TKey, TValue>(Dictionary<TKey, TValue> dict)
		{
			string text = "{\n";
			foreach (KeyValuePair<TKey, TValue> item in dict)
			{
				text += $"[{item.Key}] = {item.Value}\n";
			}
			return text + "}";
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "droppod.lookingglass";

		public const string PLUGIN_NAME = "LookingGlass";

		public const string PLUGIN_VERSION = "1.9.10";
	}
}
namespace LookingGlass.StatsDisplay
{
	internal class StatsDisplayClass : BaseThing
	{
		public static ConfigEntry<bool> statsDisplay;

		public static ConfigEntry<bool> useSecondaryStatsDisplay;

		public static ConfigEntry<string> secondaryStatsDisplayString;

		public static ConfigEntry<string> statsDisplayString;

		public static ConfigEntry<float> statsDisplaySize;

		public static ConfigEntry<float> statsDisplayUpdateInterval;

		public static ConfigEntry<bool> builtInColors;

		public static ConfigEntry<bool> statsDisplayOverrideHeight;

		public static ConfigEntry<int> statsDisplayOverrideHeightValue;

		public static ConfigEntry<int> floatPrecision;

		public static Dictionary<string, Func<CharacterBody, string>> statDictionary = new Dictionary<string, Func<CharacterBody, string>>();

		internal static CharacterBody cachedUserBody = null;

		private Transform statTracker;

		private TextMeshProUGUI textComponent;

		private GameObject textComponentGameObject;

		private LayoutElement layoutElement;

		private Image cachedImage;

		private static Hook overrideHook;

		private static Hook overrideHook2;

		private bool scoreBoardOpen;

		private const string syntaxList = " \n luck \n baseDamage \n crit \n attackSpeed \n armor \n armorDamageReduction \n regen \n speed \n availableJumps \n maxJumps \n killCount \n mountainShrines \n experience \n level \n maxHealth \n maxBarrier \n barrierDecayRate \n maxShield \n acceleration \n jumpPower \n maxJumpHeight \n damage \n critMultiplier \n bleedChance \n visionDistance \n critHeal \n cursePenalty \n hasOneShotProtection \n isGlass \n canPerformBackstab \n canReceiveBackstab \n healthPercentage \n goldPortal \n msPortal \n shopPortal \n dps \n currentCombatDamage \n remainingComboDuration \n maxCombo \n maxComboThisRun \n currentCombatKills \n maxKillCombo \n maxKillComboThisRun \n critWithLuck \n bleedChanceWithLuck \n velocity \n teddyBearBlockChance \n saferSpacesCD \n instaKillChance \n voidPortal \n difficultyCoefficient \n stage";

		private bool isRiskUI;

		private float originalFontSize = -1f;

		private VerticalLayoutGroup layoutGroup;

		public StatsDisplayClass()
		{
			Setup();
			SetupRiskOfOptions();
		}

		public void Setup()
		{
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Expected O, but got Unknown
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Expected O, but got Unknown
			statsDisplay = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "StatsDisplay", true, "Enables Stats Display");
			statsDisplayString = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<string>("Stats Display", "Stats Display String", "<size=120%>Stats</size>\nLuck: [luck]\nDamage: [damage]\nCrit Chance: [critWithLuck]\nAttack Speed: [attackSpeed]\nArmor: [armor] | [armorDamageReduction]\nRegen: [regen]\nSpeed: [speed]\nJumps: [availableJumps]/[maxJumps]\nKills: [killCount]\nMountain Shrines: [mountainShrines]\nDPS: [dps]\nCombo: [currentCombatDamage]\nCombo Timer: [remainingComboDuration]\nMax Combo: [maxCombo]", "String for the stats display. You can customize this with Unity Rich Text if you want, see \n https://docs.unity3d.com/Packages/[email protected]/manual/RichText.html for more info. \nAvailable syntax for the [] stuff is: \n luck \n baseDamage \n crit \n attackSpeed \n armor \n armorDamageReduction \n regen \n speed \n availableJumps \n maxJumps \n killCount \n mountainShrines \n experience \n level \n maxHealth \n maxBarrier \n barrierDecayRate \n maxShield \n acceleration \n jumpPower \n maxJumpHeight \n damage \n critMultiplier \n bleedChance \n visionDistance \n critHeal \n cursePenalty \n hasOneShotProtection \n isGlass \n canPerformBackstab \n canReceiveBackstab \n healthPercentage \n goldPortal \n msPortal \n shopPortal \n dps \n currentCombatDamage \n remainingComboDuration \n maxCombo \n maxComboThisRun \n currentCombatKills \n maxKillCombo \n maxKillComboThisRun \n critWithLuck \n bleedChanceWithLuck \n velocity \n teddyBearBlockChance \n saferSpacesCD \n instaKillChance \n voidPortal \n difficultyCoefficient \n stage");
			statsDisplaySize = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Stats Display", "StatsDisplay font size", -1f, "General font size of the stats display menu. If set to -1, will copy the font size from the objective panel");
			statsDisplayUpdateInterval = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Stats Display", "StatsDisplay update interval", 0.33f, "The interval at which stats display updates, in seconds. Lower values will increase responsiveness, but may potentially affect performance");
			builtInColors = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "Use default colors", true, "Uses the default styling for stats display syntax items.");
			builtInColors.SettingChanged += BuiltInColors_SettingChanged;
			statsDisplayOverrideHeight = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "Override Stats Display Height", false, "Sets a user-specified height for Stats Display (may be necessary if you get particularly creative with formatting)");
			statsDisplayOverrideHeightValue = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<int>("Stats Display", "Stats Display Height Value", 7, "Height, in lines of full-size text, for the Stats Display panel");
			floatPrecision = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<int>("Stats Display", "StatsDisplay Float Precision", 2, "How many decimal points will be used in floating point values");
			floatPrecision.SettingChanged += BuiltInColors_SettingChanged;
			useSecondaryStatsDisplay = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "Use Secondary StatsDisplay", false, "Will enable the use of the secondary stats display string. This will overwrite the stats display string whenever the scoreboard is held open.");
			secondaryStatsDisplayString = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<string>("Stats Display", "Secondary Stats Display String", "<size=120%>Stats</size>\nLuck: [luck]\nDamage: [damage]\nCrit Chance: [critWithLuck]\nBleed Chance: [bleedChanceWithLuck]\nAttack Speed: [attackSpeed]\nArmor: [armor] | [armorDamageReduction]\nRegen: [regen]\nSpeed: [speed]\nJumps: [availableJumps]/[maxJumps]\nKills: [killCount]\nMountain Shrines: [mountainShrines]\nMax Combo: [maxCombo]\n<size=120%>Portals:</size> \n<size=50%>Gold:[goldPortal] Shop:[shopPortal] Celestial:[msPortal] Void:[voidPortal]</size>", "Secondary string for the stats display. You can customize this with Unity Rich Text if you want, see \n https://docs.unity3d.com/Packages/[email protected]/manual/RichText.html for more info. \nAvailable syntax for the [] stuff is:  \n luck \n baseDamage \n crit \n attackSpeed \n armor \n armorDamageReduction \n regen \n speed \n availableJumps \n maxJumps \n killCount \n mountainShrines \n experience \n level \n maxHealth \n maxBarrier \n barrierDecayRate \n maxShield \n acceleration \n jumpPower \n maxJumpHeight \n damage \n critMultiplier \n bleedChance \n visionDistance \n critHeal \n cursePenalty \n hasOneShotProtection \n isGlass \n canPerformBackstab \n canReceiveBackstab \n healthPercentage \n goldPortal \n msPortal \n shopPortal \n dps \n currentCombatDamage \n remainingComboDuration \n maxCombo \n maxComboThisRun \n currentCombatKills \n maxKillCombo \n maxKillComboThisRun \n critWithLuck \n bleedChanceWithLuck \n velocity \n teddyBearBlockChance \n saferSpacesCD \n instaKillChance \n voidPortal \n difficultyCoefficient \n stage");
			StatsDisplayDefinitions.SetupDefs();
			MethodInfo? method = typeof(ScoreboardController).GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.NonPublic);
			MethodInfo method2 = typeof(StatsDisplayClass).GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.NonPublic);
			overrideHook = new Hook((MethodBase)method, method2, (object)this);
			MethodInfo? method3 = typeof(ScoreboardController).GetMethod("OnDisable", BindingFlags.Instance | BindingFlags.NonPublic);
			method2 = typeof(StatsDisplayClass).GetMethod("OnDisable", BindingFlags.Instance | BindingFlags.NonPublic);
			overrideHook2 = new Hook((MethodBase)method3, method2, (object)this);
		}

		private void OnEnable(Action<ScoreboardController> orig, ScoreboardController self)
		{
			scoreBoardOpen = true;
			CalculateStuff();
			orig(self);
		}

		private void OnDisable(Action<ScoreboardController> orig, ScoreboardController self)
		{
			scoreBoardOpen = false;
			CalculateStuff();
			orig(self);
		}

		private void BuiltInColors_SettingChanged(object sender, EventArgs e)
		{
			StatsDisplayDefinitions.SetupDefs();
		}

		public void SetupRiskOfOptions()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: 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_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_0077: Expected O, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Expected O, but got Unknown
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Expected O, but got Unknown
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Expected O, but got Unknown
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: 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_0113: Expected O, but got Unknown
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Expected O, but got Unknown
			//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_0129: 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_013c: Expected O, but got Unknown
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Expected O, but got Unknown
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Expected O, but got Unknown
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Expected O, but got Unknown
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: 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)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Expected O, but got Unknown
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Expected O, but got Unknown
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(statsDisplay, new CheckBoxConfig
			{
				restartRequired = false
			}));
			ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(statsDisplayString, new InputFieldConfig
			{
				restartRequired = false,
				lineType = (LineType)2,
				submitOn = (SubmitEnum)4,
				richText = false
			}));
			ModSettingsManager.AddOption((BaseOption)new SliderOption(statsDisplaySize, new SliderConfig
			{
				restartRequired = false,
				min = -1f,
				max = 100f
			}));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(builtInColors, new CheckBoxConfig
			{
				restartRequired = false
			}));
			ModSettingsManager.AddOption((BaseOption)new SliderOption(statsDisplayUpdateInterval, new SliderConfig
			{
				restartRequired = false,
				min = 0.01f,
				max = 1f,
				formatString = "{0:F2}s"
			}));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(statsDisplayOverrideHeight, new CheckBoxConfig
			{
				restartRequired = false
			}));
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(statsDisplayOverrideHeightValue, new IntSliderConfig
			{
				restartRequired = false,
				min = 0,
				max = 100
			}));
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(floatPrecision, new IntSliderConfig
			{
				restartRequired = false,
				min = 0,
				max = 5
			}));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useSecondaryStatsDisplay, new CheckBoxConfig
			{
				restartRequired = false
			}));
			ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(secondaryStatsDisplayString, new InputFieldConfig
			{
				restartRequired = false,
				lineType = (LineType)2,
				submitOn = (SubmitEnum)4,
				richText = false
			}));
		}

		public void CalculateStuff()
		{
			//IL_02cf: 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_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_031f: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)cachedUserBody))
			{
				try
				{
					cachedUserBody = LocalUserManager.GetFirstLocalUser().cachedBody;
				}
				catch (Exception)
				{
				}
			}
			if (!statsDisplay.Value || !Object.op_Implicit((Object)(object)cachedUserBody))
			{
				return;
			}
			string text = ((useSecondaryStatsDisplay.Value && scoreBoardOpen) ? secondaryStatsDisplayString.Value : statsDisplayString.Value);
			foreach (string key in statDictionary.Keys)
			{
				text = Regex.Replace(text, "(?<!\\\\)\\[" + key + "\\]", statDictionary[key](cachedUserBody));
			}
			if (!Object.op_Implicit((Object)(object)statTracker))
			{
				VerticalLayoutGroup[] componentsInChildren = Run.instance.uiInstances[0].GetComponentsInChildren<VerticalLayoutGroup>();
				foreach (VerticalLayoutGroup val in componentsInChildren)
				{
					if (!(((Object)((Component)val).gameObject).name == "RightInfoBar"))
					{
						continue;
					}
					Transform val2 = ((Component)val).transform.Find("ObjectivePanel");
					GameObject val3 = (Object.op_Implicit((Object)(object)val2.Find("Label")) ? ((Component)val2.Find("Label")).gameObject : null);
					bool active = false;
					if (Object.op_Implicit((Object)(object)val3))
					{
						active = val3.activeSelf;
						val3.SetActive(true);
					}
					GameObject val4 = Object.Instantiate<GameObject>(((Component)val2).gameObject);
					val4.transform.parent = ((Component)val2.parent).transform;
					((Object)val4).name = "PlayerStats";
					if (Object.op_Implicit((Object)(object)val3))
					{
						val3.SetActive(active);
					}
					if (Object.op_Implicit((Object)(object)val4.transform.Find("StripContainer")))
					{
						Object.Destroy((Object)(object)((Component)val4.transform.Find("StripContainer")).gameObject);
					}
					if (Object.op_Implicit((Object)(object)val4.transform.Find("Minimap")))
					{
						Object.DestroyImmediate((Object)(object)((Component)val4.transform.Find("Minimap")).gameObject);
					}
					if (Object.op_Implicit((Object)(object)val4.GetComponent<HudObjectiveTargetSetter>()))
					{
						Object.Destroy((Object)(object)val4.GetComponent<HudObjectiveTargetSetter>());
					}
					if (Object.op_Implicit((Object)(object)val4.GetComponent<ObjectivePanelController>()))
					{
						Object.Destroy((Object)(object)val4.GetComponent<ObjectivePanelController>());
					}
					RectTransform component = val4.GetComponent<RectTransform>();
					layoutGroup = val4.GetComponent<VerticalLayoutGroup>();
					textComponent = val4.GetComponentInChildren<TextMeshProUGUI>();
					layoutElement = val4.GetComponentInChildren<LayoutElement>();
					if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)layoutGroup) || !Object.op_Implicit((Object)(object)textComponent) || !Object.op_Implicit((Object)(object)layoutElement))
					{
						layoutGroup = null;
						textComponent = null;
						layoutElement = null;
						Object.DestroyImmediate((Object)(object)val4);
						break;
					}
					((Transform)component).localPosition = Vector3.zero;
					((Transform)component).localEulerAngles = Vector3.zero;
					((Transform)component).localScale = Vector3.one;
					((Behaviour)layoutGroup).enabled = false;
					((Behaviour)layoutGroup).enabled = true;
					((TMP_Text)textComponent).alignment = (TextAlignmentOptions)257;
					((Graphic)textComponent).color = Color.white;
					textComponentGameObject = ((Component)textComponent).gameObject;
					if (Object.op_Implicit((Object)(object)val4.transform.Find("Seperator")))
					{
						isRiskUI = true;
						VerticalLayoutGroup component2 = ((Component)val4.transform.Find("Seperator")).GetComponent<VerticalLayoutGroup>();
						((LayoutGroup)component2).padding.top = 0;
						((LayoutGroup)component2).childAlignment = (TextAnchor)0;
					}
					statTracker = val4.transform;
					break;
				}
			}
			if (Object.op_Implicit((Object)(object)textComponentGameObject))
			{
				textComponentGameObject.SetActive(true);
			}
			if (Object.op_Implicit((Object)(object)textComponent) && Object.op_Implicit((Object)(object)layoutElement))
			{
				((TMP_Text)textComponent).text = text;
				int num = (statsDisplayOverrideHeight.Value ? statsDisplayOverrideHeightValue.Value : text.Split('\n').Length);
				if (originalFontSize == -1f)
				{
					originalFontSize = ((TMP_Text)textComponent).fontSize;
				}
				((TMP_Text)textComponent).fontSize = ((statsDisplaySize.Value == -1f) ? originalFontSize : statsDisplaySize.Value);
				((MonoBehaviour)Run.instance).StartCoroutine(FixScaleAfterFrame(num));
				if (!Object.op_Implicit((Object)(object)cachedImage))
				{
					cachedImage = ((Component)((Component)layoutElement).transform.parent).GetComponent<Image>();
				}
				if (Object.op_Implicit((Object)(object)cachedImage))
				{
					((Behaviour)cachedImage).enabled = num != 0;
				}
				if (isRiskUI && Object.op_Implicit((Object)(object)layoutGroup))
				{
					((LayoutGroup)layoutGroup).padding.bottom = (int)((float)num / 16f * 50f);
				}
			}
			else
			{
				layoutGroup = null;
				textComponent = null;
				layoutElement = null;
				if (Object.op_Implicit((Object)(object)statTracker))
				{
					Log.Debug("Somehow statTracker [" + ((Object)((Component)statTracker).gameObject).name + "] got set but other items didn't attempting to delete it and try again.");
					Object.DestroyImmediate((Object)(object)((Component)statTracker).gameObject);
				}
			}
		}

		private IEnumerator FixScaleAfterFrame(int nlines)
		{
			yield return (object)new WaitForEndOfFrame();
			float preferredHeight = (statsDisplayOverrideHeight.Value ? (((TMP_Text)textComponent).fontSize * (float)(nlines + 1)) : ((TMP_Text)textComponent).renderedHeight);
			layoutElement.preferredHeight = preferredHeight;
		}
	}
	internal class StatsDisplayDefinitions
	{
		internal static string floatPrecision;

		internal static void SetupDefs()
		{
			string utilityString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsUtility>" : "");
			string damageString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsDamage>" : "");
			string healingString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsHealing>" : "");
			string healthString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsHealth>" : "");
			string voidString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsVoid>" : "");
			string styleString = (StatsDisplayClass.builtInColors.Value ? "</style>" : "");
			floatPrecision = "0." + new string('#', StatsDisplayClass.floatPrecision.Value);
			StatsDisplayClass.statDictionary.Clear();
			StatsDisplayClass.statDictionary.Add("luck", (CharacterBody cachedUserBody) => utilityString + Utils.GetLuckFromCachedUserBody(cachedUserBody).ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("baseDamage", (CharacterBody cachedUserBody) => damageString + cachedUserBody.baseDamage.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("crit", (CharacterBody cachedUserBody) => damageString + cachedUserBody.crit.ToString(floatPrecision) + "%" + styleString);
			StatsDisplayClass.statDictionary.Add("attackSpeed", (CharacterBody cachedUserBody) => damageString + cachedUserBody.attackSpeed.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("armor", (CharacterBody cachedUserBody) => healingString + cachedUserBody.armor.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("armorDamageReduction", (CharacterBody cachedUserBody) => healingString + (100f - 100f * (100f / (100f + cachedUserBody.armor))).ToString(floatPrecision) + "%" + styleString);
			StatsDisplayClass.statDictionary.Add("regen", (CharacterBody cachedUserBody) => healingString + cachedUserBody.regen.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("speed", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.moveSpeed.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("availableJumps", (CharacterBody cachedUserBody) => (!Object.op_Implicit((Object)(object)cachedUserBody.characterMotor)) ? (utilityString + "N/A" + styleString) : $"{utilityString}{cachedUserBody.maxJumpCount - cachedUserBody.characterMotor.jumpCount}{styleString}");
			StatsDisplayClass.statDictionary.Add("maxJumps", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.maxJumpCount}{styleString}");
			StatsDisplayClass.statDictionary.Add("killCount", (CharacterBody cachedUserBody) => $"{healthString}{cachedUserBody.killCountServer}{styleString}");
			StatsDisplayClass.statDictionary.Add("mountainShrines", (CharacterBody cachedUserBody) => string.Format("{0}{1}{2}", utilityString, (TeleporterInteraction.instance != null) ? ((object)TeleporterInteraction.instance.shrineBonusStacks) : "N/A", styleString));
			StatsDisplayClass.statDictionary.Add("experience", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.experience.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("level", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.level}{styleString}");
			StatsDisplayClass.statDictionary.Add("maxHealth", (CharacterBody cachedUserBody) => $"{healthString}{cachedUserBody.maxHealth}{styleString}");
			StatsDisplayClass.statDictionary.Add("maxBarrier", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.maxBarrier}{styleString}");
			StatsDisplayClass.statDictionary.Add("barrierDecayRate", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.barrierDecayRate.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("maxShield", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.maxShield}{styleString}");
			StatsDisplayClass.statDictionary.Add("acceleration", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.acceleration.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("jumpPower", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.jumpPower.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("maxJumpHeight", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.maxJumpHeight.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("damage", (CharacterBody cachedUserBody) => damageString + cachedUserBody.damage.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("critMultiplier", (CharacterBody cachedUserBody) => damageString + cachedUserBody.critMultiplier.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("bleedChance", (CharacterBody cachedUserBody) => damageString + cachedUserBody.bleedChance.ToString(floatPrecision) + "%" + styleString);
			StatsDisplayClass.statDictionary.Add("visionDistance", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.visionDistance.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("critHeal", (CharacterBody cachedUserBody) => healingString + cachedUserBody.critHeal.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("cursePenalty", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.cursePenalty.ToString(floatPrecision) + styleString);
			StatsDisplayClass.statDictionary.Add("hasOneShotProtection", (CharacterBody cachedUserBody) => (!Object.op_Implicit((Object)(object)cachedUserBody.healthComponent)) ? (utilityString + "N/A" + styleString) : $"{utilityString}{cachedUserBody.oneShotProtectionFraction * cachedUserBody.healthComponent.fullCombinedHealth - cachedUserBody.healthComponent.missingCombinedHealth >= 0f}{styleString}");
			StatsDisplayClass.statDictionary.Add("isGlass", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.isGlass}{styleString}");
			StatsDisplayClass.statDictionary.Add("canPerformBackstab", (CharacterBody cachedUserBody) => $"{damageString}{cachedUserBody.canPerformBackstab}{styleString}");
			StatsDisplayClass.statDictionary.Add("canReceiveBackstab", (CharacterBody cachedUserBody) => $"{damageString}{cachedUserBody.canReceiveBackstab}{styleString}");
			StatsDisplayClass.statDictionary.Add("healthPercentage", (CharacterBody cachedUserBody) => (!Object.op_Implicit((Object)(object)cachedUserBody.healthComponent)) ? (healthString + "N/A" + styleString) : (healthString + (cachedUserBody.healthComponent.combinedHealthFraction * 100f).ToString(floatPrecision) + styleString));
			StatsDisplayClass.statDictionary.Add("goldPortal", (CharacterBody cachedUserBody) => damageString + ((TeleporterInteraction.instance != null) ? TeleporterInteraction.instance.shouldAttemptToSpawnGoldshoresPortal.ToString() : "N/A") + styleString);
			StatsDisplayClass.statDictionary.Add("msPortal", (CharacterBody cachedUserBody) => utilityString + ((TeleporterInteraction.instance != null) ? TeleporterInteraction.instance.shouldAttemptToSpawnMSPortal.ToString() : "N/A") + styleString);
			StatsDisplayClass.statDictionary.Add("shopPortal", (CharacterBody cachedUserBody) => utilityString + ((TeleporterInteraction.instance != null) ? TeleporterInteraction.instance.shouldAttemptToSpawnShopPortal.ToString() : "N/A") + styleString);
			StatsDisplayClass.statDictionary.Add("voidPortal", delegate
			{
				if (TeleporterInteraction.instance == null)
				{
					return voidString + "N/A" + styleString;
				}
				PortalSpawner[] portalSpawners = TeleporterInteraction.instance.portalSpawners;
				foreach (PortalSpawner val in portalSpawners)
				{
					if (((Object)val.portalSpawnCard).name == "iscVoidPortal" && val.NetworkwillSpawn)
					{
						return voidString + "True" + styleString;
					}
				}
				return voidString + "False" + styleString;
			});
			StatsDisplayClass.statDictionary.Add("dps", (CharacterBody cachedUserBody) => $"{damageString}{(float)BasePlugin.instance.dpsMeter.damageDealtSincePeriod / 5f}{styleString}");
			StatsDisplayClass.statDictionary.Add("currentCombatDamage", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.currentCombatDamage}{styleString}");
			StatsDisplayClass.statDictionary.Add("remainingComboDuration", (CharacterBody cachedUserBody) => $"{utilityString}{(int)BasePlugin.instance.dpsMeter.timer + 1}{styleString}");
			StatsDisplayClass.statDictionary.Add("maxCombo", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxCombo}{styleString}");
			StatsDisplayClass.statDictionary.Add("maxComboThisRun", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxRunCombo}{styleString}");
			StatsDisplayClass.statDictionary.Add("currentCombatKills", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.currentComboKills}{styleString}");
			StatsDisplayClass.statDictionary.Add("maxKillCombo", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxCombo}{styleString}");
			StatsDisplayClass.statDictionary.Add("maxKillComboThisRun", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxRunCombo}{styleString}");
			StatsDisplayClass.statDictionary.Add("critWithLuck", delegate(CharacterBody cachedUserBody)
			{
				float num3 = Utils.CalculateChanceWithLuck(cachedUserBody.crit / 100f, Utils.GetLuckFromCachedUserBody(cachedUserBody)) * 100f;
				return damageString + num3.ToString(floatPrecision) + "%" + styleString;
			});
			StatsDisplayClass.statDictionary.Add("bleedChanceWithLuck", delegate(CharacterBody cachedUserBody)
			{
				float num2 = Utils.CalculateChanceWithLuck(cachedUserBody.bleedChance / 100f, Utils.GetLuckFromCachedUserBody(cachedUserBody)) * 100f;
				return damageString + num2.ToString(floatPrecision) + "%" + styleString;
			});
			StatsDisplayClass.statDictionary.Add("velocity", delegate(CharacterBody cachedUserBody)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				Rigidbody component = ((Component)cachedUserBody).GetComponent<Rigidbody>();
				if (Object.op_Implicit((Object)(object)component))
				{
					string text = utilityString;
					Vector3 velocity = component.velocity;
					return text + ((Vector3)(ref velocity)).magnitude.ToString(floatPrecision) + styleString;
				}
				return utilityString + "N/A" + styleString;
			});
			StatsDisplayClass.statDictionary.Add("teddyBearBlockChance", delegate(CharacterBody cachedUserBody)
			{
				int itemCount3 = cachedUserBody.inventory.GetItemCount(Items.Bear);
				return utilityString + (0.15f * (float)itemCount3 / (0.15f * (float)itemCount3 + 1f) * 100f).ToString(floatPrecision) + "%" + styleString;
			});
			StatsDisplayClass.statDictionary.Add("saferSpacesCD", delegate(CharacterBody cachedUserBody)
			{
				int itemCount2 = cachedUserBody.inventory.GetItemCount(Items.BearVoid);
				return (itemCount2 == 0) ? (utilityString + "N/A" + styleString) : (utilityString + (15f * Mathf.Pow(0.9f, (float)itemCount2)).ToString(floatPrecision) + styleString);
			});
			StatsDisplayClass.statDictionary.Add("instaKillChance", delegate(CharacterBody cachedUserBody)
			{
				int itemCount = cachedUserBody.inventory.GetItemCount(Items.CritGlassesVoid);
				float num = Utils.CalculateChanceWithLuck(0.005f * (float)itemCount, Utils.GetLuckFromCachedUserBody(cachedUserBody)) * 100f;
				return damageString + num.ToString(floatPrecision) + "%" + styleString;
			});
			StatsDisplayClass.statDictionary.Add("difficultyCoefficient", (CharacterBody cachedUserBody) => $"{utilityString}{Run.instance.difficultyCoefficient}{styleString}");
			StatsDisplayClass.statDictionary.Add("stage", (CharacterBody cachedUserBody) => utilityString + Language.GetString(Stage.instance.sceneDef.nameToken) + styleString);
		}
	}
}
namespace LookingGlass.ResizeCommandWindow
{
	internal class ModifyCommandWindow : BaseThing
	{
		public static ConfigEntry<bool> resize;

		public static ConfigEntry<float> opacity;

		public ModifyCommandWindow()
		{
			Setup();
		}

		public void Setup()
		{
			resize = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Command Settings", "Resize Command Window", true, "Resizes the command window to fit modded items");
			opacity = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Command Settings", "Command Window Opacity", 50f, "Changes the Opacity of the regular command window");
			SetupRiskOfOptions();
		}

		public void SetupRiskOfOptions()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(resize, new CheckBoxConfig
			{
				restartRequired = false
			}));
			ModSettingsManager.AddOption((BaseOption)new SliderOption(opacity, new SliderConfig
			{
				restartRequired = false
			}));
		}

		internal void ResizeWindow(PickupPickerController controller)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: 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_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			Transform val = controller.panelInstance.transform.Find("MainPanel");
			if (val != null)
			{
				Transform val2 = val.Find("Juice/BG");
				if (val2 != null)
				{
					Color color = ((Graphic)((Component)val2).GetComponent<Image>()).color;
					((Graphic)((Component)val2).GetComponent<Image>()).color = new Color(color.r, color.g, color.b, opacity.Value / 100f);
				}
			}
			if (resize.Value && ((Object)controller).name.StartsWith("CommandCube"))
			{
				GridLayoutGroup componentInChildren = ((Component)controller.panelInstance.transform).GetComponentInChildren<GridLayoutGroup>();
				int num = ((Component)componentInChildren).transform.childCount - 1;
				componentInChildren.constraint = (Constraint)2;
				if (val != null)
				{
					RectTransform component = ((Component)val).GetComponent<RectTransform>();
					int num2 = 12;
					int num3 = Mathf.CeilToInt(Mathf.Sqrt((float)num) + 2f);
					componentInChildren.constraintCount = Mathf.Min(num2, num3) - 2;
					float num4 = (float)Mathf.Min(num3, num2) * (component.sizeDelta.x / 8f);
					num3 = ((num3 <= num2) ? num3 : (num3 + 1 + num3 - num2));
					float num5 = (float)num3 * (component.sizeDelta.x / 8f);
					component.sizeDelta = new Vector2(num5, num4);
					((MonoBehaviour)Run.instance).StartCoroutine(FixColumnCountAndStuff(componentInChildren, controller));
				}
			}
		}

		public static IEnumerator FixColumnCountAndStuff(GridLayoutGroup gridLayoutGroup, PickupPickerController panel)
		{
			yield return (object)new WaitForEndOfFrame();
			int num = 1;
			float y = ((Component)((Component)gridLayoutGroup).transform.GetChild(1)).GetComponent<RectTransform>().anchoredPosition.y;
			for (int i = 2; i < ((Component)gridLayoutGroup).transform.childCount; i++)
			{
				if (((Component)((Component)gridLayoutGroup).transform.GetChild(i)).GetComponent<RectTransform>().anchoredPosition.y == y)
				{
					num++;
				}
			}
			panel.panelInstanceController.maxColumnCount = num;
			panel.panelInstanceController.SetPickupOptions(panel.options);
		}
	}
}
namespace LookingGlass.PickupNotifsDuration
{
	internal class PickupNotifDurationClass : BaseThing
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static IsDisabledDelegate <0>__NotificationsDisabled;
		}

		private static Hook overrideHook;

		public static ConfigEntry<float> notificationDuration;

		public PickupNotifDurationClass()
		{
			Setup();
			SetupRiskOfOptions();
		}

		public void Setup()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			MethodInfo? method = typeof(CharacterMasterNotificationQueue).GetMethod("PushNotification", BindingFlags.Instance | BindingFlags.NonPublic);
			MethodInfo method2 = typeof(PickupNotifDurationClass).GetMethod("PushNotification", BindingFlags.Instance | BindingFlags.NonPublic);
			overrideHook = new Hook((MethodBase)method, method2, (object)this);
			notificationDuration = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Misc", "Pickup Notifications Duration", 6f, "Duration of pickup notifications. 6s is the vanilla duration");
		}

		public void SetupRiskOfOptions()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			ConfigEntry<float> obj = notificationDuration;
			SliderConfig val = new SliderConfig
			{
				restartRequired = false,
				min = 0.01f,
				max = 24f,
				formatString = "{0:F1}s"
			};
			object obj2 = <>O.<0>__NotificationsDisabled;
			if (obj2 == null)
			{
				IsDisabledDelegate val2 = NotificationsDisabled;
				<>O.<0>__NotificationsDisabled = val2;
				obj2 = (object)val2;
			}
			((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj2;
			ModSettingsManager.AddOption((BaseOption)new SliderOption(obj, val));
		}

		private static bool NotificationsDisabled()
		{
			return HidePickupNotifications.disablePickupNotifications.Value;
		}

		private void PushNotification(Action<CharacterMasterNotificationQueue, NotificationInfo, float> orig, CharacterMasterNotificationQueue self, NotificationInfo info, float duration)
		{
			duration = notificationDuration.Value;
			orig(self, info, duration);
		}
	}
}
namespace LookingGlass.LookingGlassLanguage
{
	public static class LookingGlassLanguageAPI
	{
		public static void SetupToken(Language language, string token, string value)
		{
			language.stringsByToken["LG_TOKEN_" + token] = value;
		}
	}
}
namespace LookingGlass.ItemStatsNameSpace
{
	internal class ItemCooldownReduction
	{
		private static readonly Dictionary<int, int> SkillCooldownReduction;

		private static readonly Dictionary<int, int> SkillReductionValueIndex;

		public static int GetItemTargetSkill(int itemIndex)
		{
			if (!SkillCooldownReduction.TryGetValue(itemIndex, out var value))
			{
				return 0;
			}
			return value;
		}

		public static int GetReductionValueIndex(int itemIndex)
		{
			if (!SkillReductionValueIndex.TryGetValue(itemIndex, out var value))
			{
				return 0;
			}
			return value;
		}

		public static bool hasSkillCooldown(int itemIndex)
		{
			return SkillCooldownReduction.ContainsKey(itemIndex);
		}

		static ItemCooldownReduction()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected I4, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected I4, but got Unknown
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected I4, but got Unknown
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected I4, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Expected I4, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected I4, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected I4, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Expected I4, but got Unknown
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Expected I4, but got Unknown
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Expected I4, but got Unknown
			SkillCooldownReduction = new Dictionary<int, int>();
			SkillReductionValueIndex = new Dictionary<int, int>();
			SkillCooldownReduction.Add((int)Items.AlienHead.itemIndex, -1);
			SkillReductionValueIndex.Add((int)Items.AlienHead.itemIndex, 0);
			SkillCooldownReduction.Add((int)Items.UtilitySkillMagazine.itemIndex, 2);
			SkillReductionValueIndex.Add((int)Items.UtilitySkillMagazine.itemIndex, -1);
			SkillCooldownReduction.Add((int)Items.HalfAttackSpeedHalfCooldowns.itemIndex, -1);
			SkillReductionValueIndex.Add((int)Items.HalfAttackSpeedHalfCooldowns.itemIndex, 0);
			SkillCooldownReduction.Add((int)Items.LunarBadLuck.itemIndex, -1);
			SkillReductionValueIndex.Add((int)Items.LunarBadLuck.itemIndex, 0);
			SkillCooldownReduction.Add((int)Items.EquipmentMagazineVoid.itemIndex, 3);
			SkillReductionValueIndex.Add((int)Items.EquipmentMagazineVoid.itemIndex, -1);
		}
	}
	public class ItemDefinitions
	{
		public static Dictionary<int, ItemStatsDef> allItemDefinitions = new Dictionary<int, ItemStatsDef>();

		public static void RegisterItemStatsDef(ItemStatsDef itemStatsDef, ItemIndex itemIndex)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected I4, but got Unknown
			allItemDefinitions.Add((int)itemIndex, itemStatsDef);
		}

		internal static void RegisterAll()
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected I4, but got Unknown
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected I4, but got Unknown
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Expected I4, but got Unknown
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Expected I4, but got Unknown
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Expected I4, but got Unknown
			//IL_028e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Expected I4, but got Unknown
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0301: Expected I4, but got Unknown
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_0391: Expected I4, but got Unknown
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f9: Expected I4, but got Unknown
			//IL_0456: Unknown result type (might be due to invalid IL or missing references)
			//IL_0461: Expected I4, but got Unknown
			//IL_04be: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c9: Expected I4, but got Unknown
			//IL_0526: Unknown result type (might be due to invalid IL or missing references)
			//IL_0531: Expected I4, but got Unknown
			//IL_058e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0599: Expected I4, but got Unknown
			//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0601: Expected I4, but got Unknown
			//IL_06ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Expected I4, but got Unknown
			//IL_073e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0749: Expected I4, but got Unknown
			//IL_07a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b1: Expected I4, but got Unknown
			//IL_080e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0819: Expected I4, but got Unknown
			//IL_089e: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a9: Expected I4, but got Unknown
			//IL_0906: Unknown result type (might be due to invalid IL or missing references)
			//IL_0911: Expected I4, but got Unknown
			//IL_096f: Unknown result type (might be due to invalid IL or missing references)
			//IL_097a: Expected I4, but got Unknown
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e2: Expected I4, but got Unknown
			//IL_0a3f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4a: Expected I4, but got Unknown
			//IL_0aa7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab2: Expected I4, but got Unknown
			//IL_0b10: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1b: Expected I4, but got Unknown
			//IL_0b79: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b84: Expected I4, but got Unknown
			//IL_0be1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bec: Expected I4, but got Unknown
			//IL_0c49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c54: Expected I4, but got Unknown
			//IL_0cb8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc3: Expected I4, but got Unknown
			//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d39: Expected I4, but got Unknown
			//IL_0d96: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da1: Expected I4, but got Unknown
			//IL_0e05: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e10: Expected I4, but got Unknown
			//IL_0e6d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e78: Expected I4, but got Unknown
			//IL_0ed6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee1: Expected I4, but got Unknown
			//IL_0f74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f7f: Expected I4, but got Unknown
			//IL_0fdc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fe7: Expected I4, but got Unknown
			//IL_1044: Unknown result type (might be due to invalid IL or missing references)
			//IL_104f: Expected I4, but got Unknown
			//IL_10ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b8: Expected I4, but got Unknown
			//IL_1115: Unknown result type (might be due to invalid IL or missing references)
			//IL_1120: Expected I4, but got Unknown
			//IL_117d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1188: Expected I4, but got Unknown
			//IL_120d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1218: Expected I4, but got Unknown
			//IL_1275: Unknown result type (might be due to invalid IL or missing references)
			//IL_1280: Expected I4, but got Unknown
			//IL_12dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_12e8: Expected I4, but got Unknown
			//IL_1345: Unknown result type (might be due to invalid IL or missing references)
			//IL_1350: Expected I4, but got Unknown
			//IL_13ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_13b8: Expected I4, but got Unknown
			//IL_1415: Unknown result type (might be due to invalid IL or missing references)
			//IL_1420: Expected I4, but got Unknown
			//IL_14a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_14b0: Expected I4, but got Unknown
			//IL_150d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1518: Expected I4, but got Unknown
			//IL_1575: Unknown result type (might be due to invalid IL or missing references)
			//IL_1580: Expected I4, but got Unknown
			//IL_15dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_15e8: Expected I4, but got Unknown
			//IL_16e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_16f0: Expected I4, but got Unknown
			//IL_179d: Unknown result type (might be due to invalid IL or missing references)
			//IL_17a8: Expected I4, but got Unknown
			//IL_1805: Unknown result type (might be due to invalid IL or missing references)
			//IL_1810: Expected I4, but got Unknown
			//IL_186d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1878: Expected I4, but got Unknown
			//IL_18fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_1908: Expected I4, but got Unknown
			//IL_1965: Unknown result type (might be due to invalid IL or missing references)
			//IL_1970: Expected I4, but got Unknown
			//IL_19f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a00: Expected I4, but got Unknown
			//IL_1a5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a68: Expected I4, but got Unknown
			//IL_1ac5: Unknown result type (might be due to invalid IL or missing references)
			//IL_1ad0: Expected I4, but got Unknown
			//IL_1b2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1b39: Expected I4, but got Unknown
			//IL_1bbe: Unknown result type (might be due to invalid IL or missing references)
			//IL_1bc9: Expected I4, but got Unknown
			//IL_1ca5: Unknown result type (might be due to invalid IL or missing references)
			//IL_1cb0: Expected I4, but got Unknown
			//IL_1d5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1d68: Expected I4, but got Unknown
			//IL_1ded: Unknown result type (might be due to invalid IL or missing references)
			//IL_1df8: Expected I4, but got Unknown
			//IL_1e55: Unknown result type (might be due to invalid IL or missing references)
			//IL_1e60: Expected I4, but got Unknown
			//IL_1f1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1f26: Expected I4, but got Unknown
			//IL_1fab: Unknown result type (might be due to invalid IL or missing references)
			//IL_1fb6: Expected I4, but got Unknown
			//IL_2013: Unknown result type (might be due to invalid IL or missing references)
			//IL_201e: Expected I4, but got Unknown
			//IL_207b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2086: Expected I4, but got Unknown
			//IL_210b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2116: Expected I4, but got Unknown
			//IL_2173: Unknown result type (might be due to invalid IL or missing references)
			//IL_217e: Expected I4, but got Unknown
			//IL_21db: Unknown result type (might be due to invalid IL or missing references)
			//IL_21e6: Expected I4, but got Unknown
			//IL_2243: Unknown result type (might be due to invalid IL or missing references)
			//IL_224e: Expected I4, but got Unknown
			//IL_22ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_22b6: Expected I4, but got Unknown
			//IL_2313: Unknown result type (might be due to invalid IL or missing references)
			//IL_231e: Expected I4, but got Unknown
			//IL_237b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2386: Expected I4, but got Unknown
			//IL_23e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_23ee: Expected I4, but got Unknown
			//IL_244b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2456: Expected I4, but got Unknown
			//IL_24b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_24be: Expected I4, but got Unknown
			//IL_251b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2526: Expected I4, but got Unknown
			//IL_25ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_25b6: Expected I4, but got Unknown
			//IL_2613: Unknown result type (might be due to invalid IL or missing references)
			//IL_261e: Expected I4, but got Unknown
			//IL_26a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_26ae: Expected I4, but got Unknown
			//IL_270b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2716: Expected I4, but got Unknown
			//IL_279b: Unknown result type (might be due to invalid IL or missing references)
			//IL_27a6: Expected I4, but got Unknown
			//IL_2803: Unknown result type (might be due to invalid IL or missing references)
			//IL_280e: Expected I4, but got Unknown
			//IL_286b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2876: Expected I4, but got Unknown
			//IL_28d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_28de: Expected I4, but got Unknown
			//IL_293b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2946: Expected I4, but got Unknown
			//IL_29a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_29ae: Expected I4, but got Unknown
			//IL_2a0b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2a16: Expected I4, but got Unknown
			//IL_2a9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2aa6: Expected I4, but got Unknown
			//IL_2b2b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2b36: Expected I4, but got Unknown
			//IL_2bc2: Unknown result type (might be due to invalid IL or missing references)
			//IL_2bcd: Expected I4, but got Unknown
			//IL_2c2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_2c35: Expected I4, but got Unknown
			//IL_2cba: Unknown result type (might be due to invalid IL or missing references)
			//IL_2cc5: Expected I4, but got Unknown
			//IL_2d22: Unknown result type (might be due to invalid IL or missing references)
			//IL_2d2d: Expected I4, but got Unknown
			//IL_2d8a: Unknown result type (might be due to invalid IL or missing references)
			//IL_2d95: Expected I4, but got Unknown
			//IL_2df2: Unknown result type (might be due to invalid IL or missing references)
			//IL_2dfd: Expected I4, but got Unknown
			//IL_2e5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_2e65: Expected I4, but got Unknown
			//IL_2ec2: Unknown result type (might be due to invalid IL or missing references)
			//IL_2ecd: Expected I4, but got Unknown
			//IL_2f2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_2f35: Expected I4, but got Unknown
			//IL_2fc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_2fd3: Expected I4, but got Unknown
			//IL_3030: Unknown result type (might be due to invalid IL or missing references)
			//IL_303b: Expected I4, but got Unknown
			//IL_3098: Unknown result type (might be due to invalid IL or missing references)
			//IL_30a3: Expected I4, but got Unknown
			//IL_3100: Unknown result type (might be due to invalid IL or missing references)
			//IL_310b: Expected I4, but got Unknown
			//IL_3190: Unknown result type (might be due to invalid IL or missing references)
			//IL_319b: Expected I4, but got Unknown
			//IL_31f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_3203: Expected I4, but got Unknown
			//IL_3260: Unknown result type (might be due to invalid IL or missing references)
			//IL_326b: Expected I4, but got Unknown
			//IL_32c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_32d3: Expected I4, but got Unknown
			//IL_3366: Unknown result type (might be due to invalid IL or missing references)
			//IL_3371: Expected I4, but got Unknown
			//IL_33ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_33d9: Expected I4, but got Unknown
			//IL_3436: Unknown result type (might be due to invalid IL or missing references)
			//IL_3441: Expected I4, but got Unknown
			//IL_349e: Unknown result type (might be due to invalid IL or missing references)
			//IL_34a9: Expected I4, but got Unknown
			//IL_352e: Unknown result type (might be due to invalid IL or missing references)
			//IL_3539: Expected I4, but got Unknown
			//IL_35be: Unknown result type (might be due to invalid IL or missing references)
			//IL_35c9: Expected I4, but got Unknown
			//IL_3626: Unknown result type (might be due to invalid IL or missing references)
			//IL_3631: Expected I4, but got Unknown
			//IL_36b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_36c2: Expected I4, but got Unknown
			//IL_3747: Unknown result type (might be due to invalid IL or missing references)
			//IL_3752: Expected I4, but got Unknown
			//IL_37af: Unknown result type (might be due to invalid IL or missing references)
			//IL_37ba: Expected I4, but got Unknown
			//IL_383f: Unknown result type (might be due to invalid IL or missing references)
			//IL_384a: Expected I4, but got Unknown
			//IL_38cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_38da: Expected I4, but got Unknown
			//IL_3937: Unknown result type (might be due to invalid IL or missing references)
			//IL_3942: Expected I4, but got Unknown
			//IL_39c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_39d2: Expected I4, but got Unknown
			//IL_3a2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_3a3a: Expected I4, but got Unknown
			//IL_3abf: Unknown result type (might be due to invalid IL or missing references)
			//IL_3aca: Expected I4, but got Unknown
			//IL_3b4f: Unknown result type (might be due to invalid IL or missing references)
			//IL_3b5a: Expected I4, but got Unknown
			//IL_3bb7: Unknown result type (might be due to invalid IL or missing references)
			//IL_3bc2: Expected I4, but got Unknown
			//IL_3c48: Unknown result type (might be due to invalid IL or missing references)
			//IL_3c53: Expected I4, but got Unknown
			//IL_3cd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_3ce3: Expected I4, but got Unknown
			//IL_3d68: Unknown result type (might be due to invalid IL or missing references)
			//IL_3d73: Expected I4, but got Unknown
			//IL_3df8: Unknown result type (might be due to invalid IL or missing references)
			//IL_3e03: Expected I4, but got Unknown
			//IL_3e60: Unknown result type (might be due to invalid IL or missing references)
			//IL_3e6b: Expected I4, but got Unknown
			//IL_3ef0: Unknown result type (might be due to invalid IL or missing references)
			//IL_3efb: Expected I4, but got Unknown
			//IL_3f58: Unknown result type (might be due to invalid IL or missing references)
			//IL_3f63: Expected I4, but got Unknown
			//IL_3fc0: Unknown result type (might be due to invalid IL or missing references)
			//IL_3fcb: Expected I4, but got Unknown
			//IL_402f: Unknown result type (might be due to invalid IL or missing references)
			//IL_403a: Expected I4, but got Unknown
			//IL_4097: Unknown result type (might be due to invalid IL or missing references)
			//IL_40a2: Expected I4, but got Unknown
			//IL_4106: Unknown result type (might be due to invalid IL or missing references)
			//IL_4111: Expected I4, but got Unknown
			//IL_4196: Unknown result type (might be due to invalid IL or missing references)
			//IL_41a1: Expected I4, but got Unknown
			//IL_41fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_4209: Expected I4, but got Unknown
			//IL_4266: Unknown result type (might be due to invalid IL or missing references)
			//IL_4271: Expected I4, but got Unknown
			//IL_4304: Unknown result type (might be due to invalid IL or missing references)
			//IL_430f: Expected I4, but got Unknown
			//IL_4373: Unknown result type (might be due to invalid IL or missing references)
			//IL_437e: Expected I4, but got Unknown
			//IL_43db: Unknown result type (might be due to invalid IL or missing references)
			//IL_43e6: Expected I4, but got Unknown
			//IL_4479: Unknown result type (might be due to invalid IL or missing references)
			//IL_4484: Expected I4, but got Unknown
			//IL_4509: Unknown result type (might be due to invalid IL or missing references)
			//IL_4514: Expected I4, but got Unknown
			//IL_4571: Unknown result type (might be due to invalid IL or missing references)
			//IL_457c: Expected I4, but got Unknown
			ItemStatsDef itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Block Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.GetHyperbolicStacking(0.15f, 0.15f, stackCount) };
			allItemDefinitions.Add((int)Items.Bear.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Reflect Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Armor);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Reflect Amount: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				Utils.CalculateChanceWithLuck(0.5f + 0.05f * (float)(stackCount - 1), luck),
				0.1f * (float)stackCount
			};
			allItemDefinitions.Add((int)Items.NegateAttack.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f * (float)stackCount };
			allItemDefinitions.Add((int)Items.BossDamageBonus.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Skill Charges: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount };
			allItemDefinitions.Add((int)Items.SecondarySkillMagazine.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Health: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Health);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 25 * stackCount };
			allItemDefinitions.Add((int)Items.FlatHealth.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f * (float)stackCount };
			allItemDefinitions.Add((int)Items.LowerHealthHigherDamage.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Fireworks: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 4 + 4 * stackCount };
			allItemDefinitions.Add((int)Items.Firework.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Healing: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealing);
			itemStatsDef.descriptions.Add("Radius: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Meters);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				0.0225f + 0.0225f * (float)stackCount,
				1.5f + 1.5f * (float)stackCount
			};
			allItemDefinitions.Add((int)Items.Mushroom.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Healing: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealing);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 3f * (float)stackCount };
			allItemDefinitions.Add((int)Items.HealWhileSafe.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage Per 5 Enemies: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.01f + 0.05f * (float)stackCount };
			allItemDefinitions.Add((int)Items.IncreaseDamageOnMultiKill.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.75f * (float)stackCount };
			allItemDefinitions.Add((int)Items.Crowbar.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f * (float)stackCount };
			allItemDefinitions.Add((int)Items.FragileDamageBonus.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Sprint Bonus: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.25f * (float)stackCount };
			allItemDefinitions.Add((int)Items.SprintBonus.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f * (float)stackCount };
			allItemDefinitions.Add((int)Items.NearbyDamageBonus.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Total Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Burn Duration: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.descriptions.Add("Radius: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Meters);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				2.25f + 0.75f * (float)stackCount,
				1.5f + 1.5f * (float)stackCount,
				8f + 4f * (float)stackCount
			};
			allItemDefinitions.Add((int)Items.IgniteOnKill.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Knock Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Knock Height: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				Utils.GetHyperbolicStacking(0.075f, 0.075f, stackCount),
				20f + 0.1f * (float)(stackCount - 1)
			};
			allItemDefinitions.Add((int)Items.KnockBackHitEnemies.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Crit Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.CalculateChanceWithLuck(0.1f * (float)stackCount, luck) };
			allItemDefinitions.Add((int)Items.CritGlasses.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Healing: <style=cIsHealing>20</style> + ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.05f * (float)stackCount };
			allItemDefinitions.Add((int)Items.Medkit.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Attack Speed: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Movement Speed: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				0.075f * (float)stackCount,
				0.07f * (float)stackCount
			};
			allItemDefinitions.Add((int)Items.AttackSpeedAndMoveSpeed.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Healing: <style=cIsHealing>8</style> + ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.02f * (float)stackCount };
			allItemDefinitions.Add((int)Items.Tooth.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Armor: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Armor);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 100f * (float)stackCount };
			allItemDefinitions.Add((int)Items.OutOfCombatArmor.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Movement Speed: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.14f * (float)stackCount };
			allItemDefinitions.Add((int)Items.Hoof.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Shield Strength: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.08f * (float)stackCount };
			allItemDefinitions.Add((int)Items.PersonalShield.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Charges: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount };
			allItemDefinitions.Add((int)Items.HealingPotion.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Damage Reduction: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Armor);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 5 * stackCount };
			allItemDefinitions.Add((int)Items.ArmorPlate.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Gold Gained: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Gold);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { (float)(3 * stackCount) * Run.instance.difficultyCoefficient };
			allItemDefinitions.Add((int)Items.GoldOnHurt.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Charges: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount };
			allItemDefinitions.Add((int)Items.TreasureCache.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Attack Speed: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.15f * (float)stackCount };
			allItemDefinitions.Add((int)Items.Syringe.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bomb Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.hasChance = true;
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.CalculateChanceWithLuck(0.05f * (float)stackCount * procChance, luck) };
			allItemDefinitions.Add((int)Items.StickyBomb.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Stun Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.hasChance = true;
			itemStatsDef.chanceScaling = ItemStatsDef.ChanceScaling.Hyperbolic;
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.CalculateChanceWithLuck(Utils.GetHyperbolicStacking(0.05f, 0.05f, stackCount) * procChance, luck) };
			allItemDefinitions.Add((int)Items.StunChanceOnHit.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Barrier On-Kill: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 15 * stackCount };
			allItemDefinitions.Add((int)Items.BarrierOnKill.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bleed Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.hasChance = true;
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.CalculateChanceWithLuck(0.1f * (float)stackCount * procChance, luck) };
			allItemDefinitions.Add((int)Items.BleedOnHit.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Effect Radius: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Meters);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 8 + 8 * stackCount };
			allItemDefinitions.Add((int)Items.WardOnLevel.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Damage Instances: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Armor);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount };
			allItemDefinitions.Add((int)Items.DelayedDamage.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Fire Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.hasChance = true;
			itemStatsDef.chanceScaling = ItemStatsDef.ChanceScaling.DoesNotScale;
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				Utils.CalculateChanceWithLuck(0.1f * procChance, luck),
				3f * (float)stackCount
			};
			allItemDefinitions.Add((int)Items.Missile.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Drop Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.GetBandolierStacking(stackCount) };
			allItemDefinitions.Add((int)Items.Bandolier.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Buff Duration: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Seconds);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 2 + 4 * stackCount };
			allItemDefinitions.Add((int)Items.WarCryOnMultiKill.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Item Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Shrine);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.CalculateChanceWithLuck(0.3f + 0.1f * (float)stackCount, luck) };
			allItemDefinitions.Add((int)Items.ExtraShrineItem.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Slow Duration: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Seconds);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 2 * stackCount };
			allItemDefinitions.Add((int)Items.SlowOnHit.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Mark Duration: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Seconds);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 7 * stackCount };
			allItemDefinitions.Add((int)Items.DeathMark.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Extra Charges: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.descriptions.Add("Cooldown Reduction: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				stackCount,
				Utils.GetExponentialStacking(0.15f, 0.15f, stackCount)
			};
			allItemDefinitions.Add((int)Items.EquipmentMagazine.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Drop Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.CalculateChanceWithLuck(0.04f * (float)stackCount, luck) };
			allItemDefinitions.Add((int)Items.BonusGoldPackOnKill.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Healing: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 4 + 4 * stackCount };
			allItemDefinitions.Add((int)Items.HealOnCrit.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Extra Jumps: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount };
			allItemDefinitions.Add((int)Items.Feather.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Buff Duration: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Seconds);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.5f + 0.5f * (float)stackCount };
			allItemDefinitions.Add((int)Items.MoveSpeedOnKill.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 3 * stackCount };
			allItemDefinitions.Add((int)Items.StrengthenBurn.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Health On-Kill: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Health);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealth);
			itemStatsDef.descriptions.Add("Max Health: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Health);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				stackCount,
				100 * stackCount
			};
			allItemDefinitions.Add((int)Items.Infusion.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Total Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 3 * stackCount };
			allItemDefinitions.Add((int)Items.FireRing.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Healing On-Hit: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount };
			allItemDefinitions.Add((int)Items.Seed.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Healing Novas: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount };
			allItemDefinitions.Add((int)Items.TPHealingNova.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Bonus Damage per Buff: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Bonus Exp On Kill Per Buff: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Max Charges: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.descriptions.Add("Current Bonus Damage: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Current Bonus Exp On Kill: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.calculateValues = delegate(CharacterMaster master, int stackCount)
			{
				List<float> list5 = new List<float>();
				CharacterBody body3 = master.GetBody();
				int num8 = ((body3 != null) ? body3.GetBuffCount(Buffs.IncreasePrimaryDamageBuff) : 0);
				list5.Add(1.25f + 0.25f * (float)stackCount);
				list5.Add(0.1f * (float)stackCount);
				list5.Add(4 + stackCount);
				list5.Add((1.25f + 0.25f * (float)stackCount) * (float)num8);
				list5.Add(0.1f * (float)stackCount * (float)num8);
				return list5;
			};
			allItemDefinitions.Add((int)Items.IncreasePrimaryDamage.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Proc Chance: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descriptions.Add("Bleed Stacks: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.descriptions.Add("Debuff Stacks: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float>
			{
				0.25f,
				1 + stackCount,
				stackCount
			};
			allItemDefinitions.Add((int)Items.TriggerEnemyDebuffs.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Threshold: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Health);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealth);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.GetHyperbolicStacking(0.13f, 0.13f, stackCount) };
			allItemDefinitions.Add((int)Items.ExecuteLowHealthElite.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Recharge Time: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Seconds);
			itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.GetExponentialRechargeTime(30f, 0.5f, stackCount) };
			allItemDefinitions.Add((int)Items.Phasing.itemIndex, itemStatsDef);
			itemStatsDef = new ItemStatsDef();
			itemStatsDef.descriptions.Add("Percent Stored Per Level: ");
			itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility);
			itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage);
			itemStatsDef.descr