Decompiled source of 0p41 Sots ItemsReworked v0.5.0

ItemsReworked.dll

Decompiled 2 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using IL.RoR2;
using ItemsReworked.CommonItems;
using ItemsReworked.UncommonItems;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using R2API;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Orbs;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ItemsReworked")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ItemsReworked")]
[assembly: AssemblyTitle("ItemsReworked")]
[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 ItemsReworked
{
	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);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency("com.rune580.riskofoptions", "2.8.2")]
	[BepInPlugin("0p41.Sots_Items_Reworked", "Sots_Items_Reworked", "0.5.0")]
	public class MainPlugin : BaseUnityPlugin
	{
		public const string PluginGUID = "0p41.Sots_Items_Reworked";

		public const string PluginAuthor = "0p41";

		public const string PluginName = "Sots_Items_Reworked";

		public const string PluginVersion = "0.5.0";

		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			ModConfig.Init(((BaseUnityPlugin)this).Config);
			if (ModConfig.ResetValues != null)
			{
				ModConfig.ResetAllValues(ModConfig.ResetValues.Value, "0.5.0");
			}
			if (ModConfig.warpedEchoChanges.Value)
			{
				WarpedEchoChanges warpedEchoChanges = new WarpedEchoChanges();
				warpedEchoChanges.Init();
			}
			if (ModConfig.chronicExpansionChanges.Value)
			{
				ChronicExpansionChanges chronicExpansionChanges = new ChronicExpansionChanges();
				chronicExpansionChanges.Init();
			}
			if (ModConfig.knockBackFinChanges.Value)
			{
				KnockbackFinChanges knockbackFinChanges = new KnockbackFinChanges();
				knockbackFinChanges.Init();
			}
			if (ModConfig.bolsteringLanternChanges.Value)
			{
				LanternChanges lanternChanges = new LanternChanges();
				lanternChanges.Init();
			}
			if (ModConfig.antlerShieldChanges.Value)
			{
				AntlersChanges antlersChanges = new AntlersChanges();
				antlersChanges.Init();
			}
			if (ModConfig.chanceDollChanges.Value)
			{
				ChanceDollChanges chanceDollChanges = new ChanceDollChanges();
				chanceDollChanges.Init();
			}
			if (ModConfig.prayerBeadsChanges.Value)
			{
				PrayerBeadsChanges prayerBeadsChanges = new PrayerBeadsChanges();
				prayerBeadsChanges.Init();
			}
			if (ModConfig.noxiousThornChanges.Value)
			{
				NoxiousThornChanges noxiousThornChanges = new NoxiousThornChanges();
				noxiousThornChanges.Init();
			}
		}
	}
	public static class ModConfig
	{
		public static ConfigEntry<bool> ResetValues;

		public static ConfigEntry<string> lastVersion;

		public static ConfigEntry<bool> warpedEchoChanges;

		public static ConfigEntry<int> warpedEchoThreshold;

		private const int defaultEchoThreshold = 20;

		public static ConfigEntry<int> warpedEchoSplit;

		private const int defaultEchoSplit = 60;

		public static ConfigEntry<float> warpedEchoBaseDuration;

		private const float defaultEchoDuration = 4f;

		public static ConfigEntry<float> warpedEchoExtraDuration;

		private const float defaultEchoExtraDuration = 0.5f;

		public static ConfigEntry<float> warpedEchoCooldown;

		private const float defaultEchoCooldown = 10f;

		public static ConfigEntry<bool> chronicExpansionChanges;

		public static ConfigEntry<int> chronicExpansionKillPerStack;

		private const int defaultChronicKillPerStack = 5;

		public static ConfigEntry<int> chronicExpansionMaxStacks;

		private const int defaultChronicMaxStacks = 20;

		public static ConfigEntry<float> chronicExpansionBaseStackDamage;

		private const float defaultChronicBaseStackDamage = 1.25f;

		public static ConfigEntry<float> chronicExpansionExtraStackDamage;

		private const float defaultChronicExtraStackDamage = 1.25f;

		public static ConfigEntry<int> chronicExpansionEliteValue;

		private const int defaultChronicEliteValue = 5;

		public static ConfigEntry<int> chronicExpansionChampionValue;

		private const int defaultChronicChampionValue = 10;

		public static ConfigEntry<bool> knockBackFinChanges;

		public static ConfigEntry<float> knockBackFinChance;

		private const float defaultFinChance = 10f;

		public static ConfigEntry<float> knockBackFinBaseDamage;

		private const float defaultFinBaseDamage = 15f;

		public static ConfigEntry<float> knockBackFinExtraDamage;

		private const float defaultFinExtraDamage = 15f;

		public static ConfigEntry<bool> bolsteringLanternChanges;

		public static ConfigEntry<float> bolsteringLanternBaseArmor;

		private const float defaultLanternBaseArmor = 10f;

		public static ConfigEntry<float> bolsteringLanternExtraArmor;

		private const float defaultLanternExtraArmor = 5f;

		public static ConfigEntry<int> bolsteringLanternThreshold;

		private const int defaultLanternThreshold = 50;

		public static ConfigEntry<bool> antlerShieldChanges;

		public static ConfigEntry<float> antlerShieldSpeed;

		private const float defaultAntlerSpeed = 8f;

		public static ConfigEntry<float> antlerShieldShield;

		private const float defaultAntlerShield = 4f;

		public static ConfigEntry<float> antlerShieldJump;

		private const float defaultAntlerJump = 25f;

		public static ConfigEntry<bool> chanceDollChanges;

		public static ConfigEntry<float> chanceDollBaseChance;

		private const float defaultChanceDollChance = 20f;

		public static ConfigEntry<float> chanceDollExtraChance;

		private const float defaultChanceDollExtraChance = 10f;

		public static ConfigEntry<float> chanceDollCostReduction;

		private const float defaultChanceDollCostReduction = 25f;

		public static ConfigEntry<int> chanceDollTier1;

		private const int defaultChanceDollTier1 = 20;

		public static ConfigEntry<int> chanceDollTier2;

		private const int defaultChanceDollTier2 = 79;

		public static ConfigEntry<int> chanceDollTier3;

		private const int defaultChanceDollTier3 = 1;

		public static ConfigEntry<float> chanceDollBaseBossChance;

		private const float defaultChanceDollBossChance = 1f;

		public static ConfigEntry<float> chanceDollExtraBossChance;

		private const float defaultChanceDollBossExtraChance = 0.5f;

		public static ConfigEntry<bool> prayerBeadsChanges;

		public static ConfigEntry<float> prayerBeadsChance;

		private const float defaultPrayerChance = 10f;

		public static ConfigEntry<int> prayerBeadsTier2;

		private const int defaultPrayerTier2 = 40;

		public static ConfigEntry<int> prayerBeadsTier3;

		private const int defaultPrayerTier3 = 15;

		public static ConfigEntry<int> prayerBeadsBoss;

		private const int defaultPrayerBoss = 5;

		public static ConfigEntry<int> prayerBeadsVoid1;

		private const int defaultPrayerVoid1 = 10;

		public static ConfigEntry<int> prayerBeadsVoid2;

		private const int defaultPrayerVoid2 = 25;

		public static ConfigEntry<int> prayerBeadsVoid3;

		private const int defaultPrayerVoid3 = 5;

		public static ConfigEntry<bool> noxiousThornChanges;

		public static ConfigEntry<int> noxiousThornCritChance;

		private const int defaultThornCritChance = 5;

		public static ConfigEntry<float> noxiousThornProcChance;

		private const float defaultThornProcChance = 25f;

		public static ConfigEntry<float> noxiousThornDamageMult;

		private const int defaultThornDmgMult = 60;

		public static ConfigEntry<int> noxiousThornRange;

		private const int defaultThornRange = 15;

		public static ConfigEntry<int> noxiousThornThornPerProc;

		private const int defaultThornProjectileAmount = 2;

		public static ConfigEntry<int> noxiousThornExtraThornPerProc;

		private const int defaultThornExtraProjectileAmount = 1;

		public static ConfigEntry<int> noxiousThornBaseTargets;

		private const int defaultThornBaseTargets = 3;

		public static ConfigEntry<int> noxiousThornExtraTargets;

		private const int defaultThornExtraTargets = 2;

		public static ConfigEntry<float> noxiousThornCritDamage;

		private const float defaultThornCritDamage = 25f;

		public static void Init(ConfigFile config)
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Expected O, but got Unknown
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Expected O, but got Unknown
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Expected O, but got Unknown
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Expected O, but got Unknown
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Expected O, but got Unknown
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Expected O, but got Unknown
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Expected O, but got Unknown
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Expected O, but got Unknown
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Expected O, but got Unknown
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Expected O, but got Unknown
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Expected O, but got Unknown
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Expected O, but got Unknown
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Expected O, but got Unknown
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_0320: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Expected O, but got Unknown
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_033c: Expected O, but got Unknown
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0387: Unknown result type (might be due to invalid IL or missing references)
			//IL_0393: Expected O, but got Unknown
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Expected O, but got Unknown
			//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Expected O, but got Unknown
			//IL_03d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Expected O, but got Unknown
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_041a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0426: Expected O, but got Unknown
			//IL_0421: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Expected O, but got Unknown
			//IL_044d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0457: Expected O, but got Unknown
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0481: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: Expected O, but got Unknown
			//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Expected O, but got Unknown
			//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_050a: Expected O, but got Unknown
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_050f: Expected O, but got Unknown
			//IL_0534: Unknown result type (might be due to invalid IL or missing references)
			//IL_0539: Unknown result type (might be due to invalid IL or missing references)
			//IL_0544: Unknown result type (might be due to invalid IL or missing references)
			//IL_054f: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0566: Expected O, but got Unknown
			//IL_0561: Unknown result type (might be due to invalid IL or missing references)
			//IL_056b: Expected O, but got Unknown
			//IL_058d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0597: Expected O, but got Unknown
			//IL_05bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ee: Expected O, but got Unknown
			//IL_05e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f3: Expected O, but got Unknown
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_061d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0628: Unknown result type (might be due to invalid IL or missing references)
			//IL_0633: Unknown result type (might be due to invalid IL or missing references)
			//IL_063e: Unknown result type (might be due to invalid IL or missing references)
			//IL_064a: Expected O, but got Unknown
			//IL_0645: Unknown result type (might be due to invalid IL or missing references)
			//IL_064f: Expected O, but got Unknown
			//IL_0671: Unknown result type (might be due to invalid IL or missing references)
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_067d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0685: Unknown result type (might be due to invalid IL or missing references)
			//IL_0691: Expected O, but got Unknown
			//IL_068c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0696: Expected O, but got Unknown
			//IL_06b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Expected O, but got Unknown
			//IL_06e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0702: Unknown result type (might be due to invalid IL or missing references)
			//IL_070d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0719: Expected O, but got Unknown
			//IL_0714: Unknown result type (might be due to invalid IL or missing references)
			//IL_071e: Expected O, but got Unknown
			//IL_0743: Unknown result type (might be due to invalid IL or missing references)
			//IL_0748: Unknown result type (might be due to invalid IL or missing references)
			//IL_0753: Unknown result type (might be due to invalid IL or missing references)
			//IL_075e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0769: Unknown result type (might be due to invalid IL or missing references)
			//IL_0775: Expected O, but got Unknown
			//IL_0770: Unknown result type (might be due to invalid IL or missing references)
			//IL_077a: Expected O, but got Unknown
			//IL_079f: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_07af: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d1: Expected O, but got Unknown
			//IL_07cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d6: Expected O, but got Unknown
			//IL_07f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0802: Expected O, but got Unknown
			//IL_0827: Unknown result type (might be due to invalid IL or missing references)
			//IL_082c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0837: Unknown result type (might be due to invalid IL or missing references)
			//IL_0842: Unknown result type (might be due to invalid IL or missing references)
			//IL_084d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0859: Expected O, but got Unknown
			//IL_0854: Unknown result type (might be due to invalid IL or missing references)
			//IL_085e: Expected O, but got Unknown
			//IL_0883: Unknown result type (might be due to invalid IL or missing references)
			//IL_0888: Unknown result type (might be due to invalid IL or missing references)
			//IL_0893: Unknown result type (might be due to invalid IL or missing references)
			//IL_089e: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b5: Expected O, but got Unknown
			//IL_08b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ba: Expected O, but got Unknown
			//IL_08df: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0905: Unknown result type (might be due to invalid IL or missing references)
			//IL_0911: Expected O, but got Unknown
			//IL_090c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0916: Expected O, but got Unknown
			//IL_0938: Unknown result type (might be due to invalid IL or missing references)
			//IL_093d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0944: Unknown result type (might be due to invalid IL or missing references)
			//IL_094f: Unknown result type (might be due to invalid IL or missing references)
			//IL_095b: Expected O, but got Unknown
			//IL_0956: Unknown result type (might be due to invalid IL or missing references)
			//IL_0960: Expected O, but got Unknown
			//IL_0982: Unknown result type (might be due to invalid IL or missing references)
			//IL_0987: Unknown result type (might be due to invalid IL or missing references)
			//IL_098e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0999: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a5: Expected O, but got Unknown
			//IL_09a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09aa: Expected O, but got Unknown
			//IL_09cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ee: Expected O, but got Unknown
			//IL_09e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Expected O, but got Unknown
			//IL_0a18: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a33: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4a: Expected O, but got Unknown
			//IL_0a45: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4f: Expected O, but got Unknown
			//IL_0a74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a79: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa6: Expected O, but got Unknown
			//IL_0aa1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aab: Expected O, but got Unknown
			//IL_0acd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad7: Expected O, but got Unknown
			//IL_0afc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b17: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b22: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b2e: Expected O, but got Unknown
			//IL_0b29: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b33: Expected O, but got Unknown
			//IL_0b55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b6c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b78: Expected O, but got Unknown
			//IL_0b73: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b7d: Expected O, but got Unknown
			//IL_0b9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc2: Expected O, but got Unknown
			//IL_0bbd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc7: Expected O, but got Unknown
			//IL_0be8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0b: Expected O, but got Unknown
			//IL_0c06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c10: Expected O, but got Unknown
			//IL_0c32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c55: Expected O, but got Unknown
			//IL_0c50: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5a: Expected O, but got Unknown
			//IL_0c7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c81: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c93: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9f: Expected O, but got Unknown
			//IL_0c9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca4: Expected O, but got Unknown
			//IL_0cc5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cdc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce8: Expected O, but got Unknown
			//IL_0ce3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ced: Expected O, but got Unknown
			//IL_0d0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d19: Expected O, but got Unknown
			//IL_0d3a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d3f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d46: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d5a: Expected O, but got Unknown
			//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d5f: Expected O, but got Unknown
			//IL_0d84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d89: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d94: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0daa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db6: Expected O, but got Unknown
			//IL_0db1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dbb: Expected O, but got Unknown
			//IL_0de0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e12: Expected O, but got Unknown
			//IL_0e0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e17: Expected O, but got Unknown
			//IL_0e39: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e45: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e4d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e59: Expected O, but got Unknown
			//IL_0e54: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e5e: Expected O, but got Unknown
			//IL_0e7f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e93: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e9f: Expected O, but got Unknown
			//IL_0e9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea4: Expected O, but got Unknown
			//IL_0ec5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee5: Expected O, but got Unknown
			//IL_0ee0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eea: Expected O, but got Unknown
			//IL_0f0b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f10: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f17: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f2b: Expected O, but got Unknown
			//IL_0f26: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f30: Expected O, but got Unknown
			//IL_0f51: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f65: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f71: Expected O, but got Unknown
			//IL_0f6c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f76: Expected O, but got Unknown
			//IL_0f9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fa0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fb6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fcd: Expected O, but got Unknown
			//IL_0fc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fd2: Expected O, but got Unknown
			if (lastVersion == null)
			{
				lastVersion = config.Bind<string>("Last Version", "Last Version", "0.0.0", "Last version played.");
			}
			ResetValues = config.Bind<bool>("General", "Restore values to default on update", true, "If you don't delete your config file the new values may not be applied properly, with this enabled when the version changes all values will be restored to their default, disabled items stay disabled.");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ResetValues, true));
			warpedEchoChanges = config.Bind<bool>("Warped Echo Changes", "Enable Warped Echo Changes?", true, "Toggle Warped Echo changes.");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(warpedEchoChanges, true));
			warpedEchoThreshold = config.Bind<int>("Warped Echo Changes", "Warped Echo Damage Threshold", 20, "Minimum damage treshold for effect to trigger, in health %.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warpedEchoThreshold, new IntSliderConfig
			{
				min = 0,
				max = 100,
				restartRequired = true
			}));
			warpedEchoSplit = config.Bind<int>("Warped Echo Changes", "Warped Echo Damage Split", 60, "How the damage taken is split in upfront damage and gradual damage, this value determines the gradual damage which means higher value = less damage upfront, in %.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warpedEchoSplit, new IntSliderConfig
			{
				min = 0,
				max = 100,
				restartRequired = true
			}));
			warpedEchoBaseDuration = config.Bind<float>("Warped Echo Changes", "Warped Echo Base Duration", 4f, "Base duration for the damage to apply, in seconds.\nCan't be lower than 0.25 seconds, aka 1 tic of damage.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(warpedEchoBaseDuration, new StepSliderConfig
			{
				min = 0.25f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			warpedEchoExtraDuration = config.Bind<float>("Warped Echo Changes", "Warped Echo Extra Duration", 0.5f, "Extends the duration for the damage to apply per item stack, in seconds.\nKeep it at increments of 0.25 seconds, every 0.25 seconds is equal to 1 extra tick of damage.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(warpedEchoExtraDuration, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			warpedEchoCooldown = config.Bind<float>("Warped Echo Changes", "Warped Echo Cooldown", 10f, "Cooldown between effect activations, cooldown starts after all damage is dealt, in seconds.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(warpedEchoCooldown, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.1f,
				restartRequired = true
			}));
			chronicExpansionChanges = config.Bind<bool>("Chronic Expansion Changes", "Enable Chronic Expansion Changes?", true, "Toggle Chronic Expansion changes");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(chronicExpansionChanges, true));
			chronicExpansionKillPerStack = config.Bind<int>("Chronic Expansion Changes", "Chronic Expansion Kills Per Stack", 5, "How many kills do you need to get 1 damage stack.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionKillPerStack, new IntSliderConfig
			{
				min = 1,
				max = 100,
				restartRequired = true
			}));
			chronicExpansionMaxStacks = config.Bind<int>("Chronic Expansion Changes", "Chronic Expansion Max Stacks", 20, "Maximum amount of damagae stacks you can have.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionMaxStacks, new IntSliderConfig
			{
				min = 1,
				max = 100,
				restartRequired = true
			}));
			chronicExpansionBaseStackDamage = config.Bind<float>("Chronic Expansion Changes", "Chronic Expansion Base Damage Per Stack", 1.25f, "How much damage each damage stack gives you, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chronicExpansionBaseStackDamage, new StepSliderConfig
			{
				min = 0.1f,
				max = 100f,
				increment = 0.05f,
				restartRequired = true
			}));
			chronicExpansionExtraStackDamage = config.Bind<float>("Chronic Expansion Changes", "Chronic Expansion Extra Damage Per Stack", 1.25f, "How much damage each damage stack gives you per item stack, this is added to base value, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chronicExpansionExtraStackDamage, new StepSliderConfig
			{
				min = 0.1f,
				max = 100f,
				increment = 0.05f,
				restartRequired = true
			}));
			chronicExpansionEliteValue = config.Bind<int>("Chronic Expansion Changes", "Chronic Expansion Elite Kill Value", 5, "How many kills does an Elite count as.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionEliteValue, new IntSliderConfig
			{
				min = 1,
				max = 1000,
				restartRequired = true
			}));
			chronicExpansionChampionValue = config.Bind<int>("Chronic Expansion Changes", "Chronic Expansion Champion Kill Value", 10, "How many kills does a Champion count as.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionChampionValue, new IntSliderConfig
			{
				min = 1,
				max = 1000,
				restartRequired = true
			}));
			knockBackFinChanges = config.Bind<bool>("Knockback Fin Changes", "Enable Knockback Fin Changes?", true, "Toggle Knockback Fin changes");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(knockBackFinChanges, true));
			knockBackFinChance = config.Bind<float>("Knockback Fin Changes", "Knockback Fin Proc Chance", 10f, "Chance for the knockback(up) to trigger, in %.\nUses the game formula of: (1f - 100f / (100f + X)) * 100f, where X is the chance * item count");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(knockBackFinChance, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			knockBackFinBaseDamage = config.Bind<float>("Knockback Fin Changes", "Knockback Fin Base Damage", 15f, "How much damage you deal to airborne enemies, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(knockBackFinBaseDamage, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			knockBackFinExtraDamage = config.Bind<float>("Knockback Fin Changes", "Knockback Fin Extra Damage", 15f, "How much extra damage you deal to airborne enemies per item stack, added to base damage, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(knockBackFinExtraDamage, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			bolsteringLanternChanges = config.Bind<bool>("Bolstering Lantern Changes", "Enable Bolstering Lantern Changes?", true, "Toggle Bolstering Lantern changes");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(bolsteringLanternChanges, true));
			bolsteringLanternBaseArmor = config.Bind<float>("Bolstering Lantern Changes", "Bolstering Lantern Base Damage", 10f, "How much armor you get.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bolsteringLanternBaseArmor, new StepSliderConfig
			{
				min = 0f,
				max = 1000f,
				increment = 0.25f,
				restartRequired = true
			}));
			bolsteringLanternExtraArmor = config.Bind<float>("Bolstering Lantern Changes", "Bolstering Lantern Extra Armor", 5f, "How much armor you get per item stack.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bolsteringLanternExtraArmor, new StepSliderConfig
			{
				min = 0f,
				max = 1000f,
				increment = 0.25f,
				restartRequired = true
			}));
			bolsteringLanternThreshold = config.Bind<int>("Bolstering Lantern Changes", "Bolstering Lantern Health Threshold", 50, "Treshold for effect to trigger, in health %.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(bolsteringLanternThreshold, new IntSliderConfig
			{
				min = 0,
				max = 100,
				restartRequired = true
			}));
			antlerShieldChanges = config.Bind<bool>("Antler Shield Changes", "Enable Antler Shield Changes?", true, "Toggle Antler Shield changes");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(antlerShieldChanges, true));
			antlerShieldSpeed = config.Bind<float>("Antler Shield Changes", "Antler Shield Movement Speed", 8f, "How much movement speed you get per item, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(antlerShieldSpeed, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			antlerShieldShield = config.Bind<float>("Antler Shield Changes", "Antler Shield Movement Shield", 4f, "How much shield you get per item stack, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(antlerShieldShield, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.5f,
				restartRequired = true
			}));
			antlerShieldJump = config.Bind<float>("Antler Shield Changes", "Antler Shield Movement Jump Height", 25f, "How much does your jump height increases by having this item, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(antlerShieldJump, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.5f,
				restartRequired = true
			}));
			chanceDollChanges = config.Bind<bool>("Chance Doll Changes", "Enable Chance Doll Changes?", true, "Toggle Chance Doll changes");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(chanceDollChanges, true));
			chanceDollBaseChance = config.Bind<float>("Chance Doll Changes", "Chance Doll Base Chance", 20f, "Base Chance to get an extra item, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollBaseChance, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			chanceDollExtraChance = config.Bind<float>("Chance Doll Changes", "Chance Doll Extra Chance", 10f, "Extra Chance to get an extra item per item stack, this is added to the base chance, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollExtraChance, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			chanceDollCostReduction = config.Bind<float>("Chance Doll Changes", "Chance Doll Cost Ramp Up Reduction", 25f, "Reduce cost ramp up after use, the normal value is 40% increased cost per use, the cost reduction is X% of this value, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollCostReduction, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			chanceDollTier1 = config.Bind<int>("Chance Doll Changes", "Chance Doll Tier 1 (White) Drop Weight", 20, "Weight for Tier 1 items to drop from the xtra item effect.\nThis value is relative to the other drop weights, to calculate drop chance use X/(Tier1 + Tier2 + Tier3) where X is the tier you want to check the drop rate, boss item drop chance is not included in this formula.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chanceDollTier1, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			chanceDollTier2 = config.Bind<int>("Chance Doll Changes", "Chance Doll Tier 2 (Green) Drop Weight", 79, "Weight for Tier 2 items to drop from the extra item effect.\nThis value is relative to the other drop weights, to calculate drop chance use X/(Tier1 + Tier2 + Tier3) where X is the tier you want to check the drop rate, boss item drop chance is not included in this formula.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chanceDollTier2, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			chanceDollTier3 = config.Bind<int>("Chance Doll Changes", "Chance Doll Tier 3 (Red) Drop Weight", 1, "Weight for Tier 3 items to drop from the extra item effect.\nThis value is relative to the other drop weights, to calculate drop chance use X/(Tier1 + Tier2 + Tier3) where X is the tier you want to check the drop rate, boss item drop chance is not included in this formula.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chanceDollTier3, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			chanceDollBaseBossChance = config.Bind<float>("Chance Doll Changes", "Chance Doll Boss Item Chance", 1f, "Base drop chance for boss items, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollBaseBossChance, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			chanceDollExtraBossChance = config.Bind<float>("Chance Doll Changes", "Chance Doll Extra Boss Item Chance", 0.5f, "Extra drop chance for boss items per item stack, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollExtraBossChance, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			prayerBeadsChanges = config.Bind<bool>("Prayer Beads Changes", "Enable Prayer Beads Changes?", true, "Toggle Prayer Beads changes");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(prayerBeadsChanges, true));
			prayerBeadsChance = config.Bind<float>("Prayer Beads Changes", "Prayer Beads Extra Item Chance", 10f, "Base drop chance for it to transform into 2 copies of the same item, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(prayerBeadsChance, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.25f,
				restartRequired = true
			}));
			prayerBeadsTier2 = config.Bind<int>("Prayer Beads Changes", "Prayer Beads Tier 2(Green) Weight", 40, "Weight for transforming into a Tier 2 item.\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsTier2, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			prayerBeadsTier3 = config.Bind<int>("Prayer Beads Changes", "Prayer Beads Tier 3(Red) Weight", 15, "Weight for transforming into a Tier 3 item.\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsTier3, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			prayerBeadsBoss = config.Bind<int>("Prayer Beads Changes", "Prayer Beads Boss Item Weight", 5, "Weight for transforming into a Boss item.\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsBoss, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			prayerBeadsVoid1 = config.Bind<int>("Prayer Beads Changes", "Prayer Beads Void Tier 1 Weight", 10, "Weight for transforming into a Void item of Tier 1 (Whites).\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsVoid1, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			prayerBeadsVoid2 = config.Bind<int>("Prayer Beads Changes", "Prayer Beads Void Tier 2 Weight", 25, "Weight for transforming into a Void item of Tier 2 (Greens).\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsVoid2, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			prayerBeadsVoid3 = config.Bind<int>("Prayer Beads Changes", "Prayer Beads Void Tier 3 Weight", 5, "Weight for transforming into a Void item of Tier 3 (Reds).\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsVoid3, new IntSliderConfig
			{
				min = 0,
				max = 1000,
				restartRequired = true
			}));
			noxiousThornChanges = config.Bind<bool>("Noxious Thorn Changes", "Enable Noxious Thorn Changes Changes?", true, "Toggle Noxious Thorn changes");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(noxiousThornChanges, true));
			noxiousThornCritChance = config.Bind<int>("Noxious Thorn Changes", "Noxious Thorn Passive Crit Chance", 5, "Passive non stackable critical chance, in %.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornCritChance, new IntSliderConfig
			{
				min = 0,
				max = 100,
				restartRequired = true
			}));
			noxiousThornProcChance = config.Bind<float>("Noxious Thorn Changes", "Noxious Thorn Passive Proc Chance", 25f, "Chance to proc the effect, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(noxiousThornProcChance, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.5f,
				restartRequired = true
			}));
			noxiousThornDamageMult = config.Bind<float>("Noxious Thorn Changes", "Noxious Thorn TOTAL Damage", 60f, "How much each thorn will deal, relative of TOTAL damage dealt, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(noxiousThornDamageMult, new StepSliderConfig
			{
				min = 0f,
				max = 1000f,
				increment = 0.5f,
				restartRequired = true
			}));
			noxiousThornRange = config.Bind<int>("Noxious Thorn Changes", "Noxious Thorn Range", 15, "Range for effect to proc, in meters.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornRange, new IntSliderConfig
			{
				min = 1,
				max = 100,
				restartRequired = true
			}));
			noxiousThornThornPerProc = config.Bind<int>("Noxious Thorn Changes", "Noxious Thorn Thorns Per Proc", 2, "How many thorns you shoot at each enemy per proc.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornThornPerProc, new IntSliderConfig
			{
				min = 1,
				max = 100,
				restartRequired = true
			}));
			noxiousThornExtraThornPerProc = config.Bind<int>("Noxious Thorn Changes", "Noxious Thorn Extra Thorns Per Proc", 1, "How many extra thorns you shoot at each enemy per each stack.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornExtraThornPerProc, new IntSliderConfig
			{
				min = 0,
				max = 100,
				restartRequired = true
			}));
			noxiousThornBaseTargets = config.Bind<int>("Noxious Thorn Changes", "Noxious Thorn Base Target Count", 3, "How many enemies it will hit.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornBaseTargets, new IntSliderConfig
			{
				min = 1,
				max = 100,
				restartRequired = true
			}));
			noxiousThornExtraTargets = config.Bind<int>("Noxious Thorn Changes", "Noxious Thorn Extra Target Count", 2, "How many extra enemies it will hit per item stack.");
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornExtraTargets, new IntSliderConfig
			{
				min = 0,
				max = 100,
				restartRequired = true
			}));
			noxiousThornCritDamage = config.Bind<float>("Noxious Thorn Changes", "Noxious Thorn Critical Damage", 25f, "Critical Damage bonus per unique debuff of the initial target, in %.");
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(noxiousThornCritDamage, new StepSliderConfig
			{
				min = 0f,
				max = 1000f,
				increment = 0.5f,
				restartRequired = true
			}));
		}

		public static void ResetAllValues(bool reset, string currentVersion)
		{
			Log.Warning("Last version: " + lastVersion.Value);
			Log.Warning("Current version: " + currentVersion);
			if (reset && lastVersion.Value != currentVersion)
			{
				Log.Warning("Config Reset.");
				lastVersion.Value = currentVersion;
				warpedEchoThreshold.Value = 20;
				warpedEchoSplit.Value = 60;
				warpedEchoBaseDuration.Value = 4f;
				warpedEchoExtraDuration.Value = 0.5f;
				warpedEchoCooldown.Value = 10f;
				chronicExpansionKillPerStack.Value = 5;
				chronicExpansionBaseStackDamage.Value = 1.25f;
				chronicExpansionExtraStackDamage.Value = 1.25f;
				chronicExpansionMaxStacks.Value = 20;
				chronicExpansionEliteValue.Value = 5;
				chronicExpansionChampionValue.Value = 10;
				knockBackFinChance.Value = 10f;
				knockBackFinBaseDamage.Value = 15f;
				knockBackFinExtraDamage.Value = 15f;
				bolsteringLanternBaseArmor.Value = 10f;
				bolsteringLanternExtraArmor.Value = 5f;
				bolsteringLanternThreshold.Value = 50;
				antlerShieldSpeed.Value = 8f;
				antlerShieldShield.Value = 4f;
				antlerShieldJump.Value = 25f;
				chanceDollBaseChance.Value = 20f;
				chanceDollExtraChance.Value = 10f;
				chanceDollCostReduction.Value = 25f;
				chanceDollTier1.Value = 20;
				chanceDollTier2.Value = 79;
				chanceDollTier3.Value = 1;
				chanceDollBaseBossChance.Value = 1f;
				chanceDollExtraBossChance.Value = 0.5f;
				prayerBeadsChance.Value = 10f;
				prayerBeadsTier2.Value = 40;
				prayerBeadsTier3.Value = 15;
				prayerBeadsBoss.Value = 5;
				prayerBeadsVoid1.Value = 10;
				prayerBeadsVoid2.Value = 25;
				prayerBeadsTier3.Value = 15;
				noxiousThornCritChance.Value = 5;
				noxiousThornProcChance.Value = 25f;
				noxiousThornThornPerProc.Value = 2;
				noxiousThornExtraThornPerProc.Value = 1;
				noxiousThornRange.Value = 15;
				noxiousThornBaseTargets.Value = 3;
				noxiousThornExtraTargets.Value = 2;
				noxiousThornCritDamage.Value = 25f;
			}
		}
	}
}
namespace ItemsReworked.UncommonItems
{
	internal class ChanceDollChanges
	{
		public static float normalShrineCostMult;

		private float baseChance = 20f;

		private float chancePerItem = 10f;

		private float costDecrease = 0.25f;

		private float tier1Weight = 0.2f;

		private float tier2Weight = 0.79f;

		private float tier3Weight = 0.01f;

		private float baseBossChance = 1f;

		private float extraBossChance = 0.5f;

		private void LoadConfig()
		{
			baseChance = ModConfig.chanceDollBaseChance.Value;
			chancePerItem = ModConfig.chanceDollExtraChance.Value;
			costDecrease = ModConfig.chanceDollCostReduction.Value / 100f;
			tier1Weight = ModConfig.chanceDollTier1.Value;
			tier2Weight = ModConfig.chanceDollTier2.Value;
			tier3Weight = ModConfig.chanceDollTier3.Value;
			baseBossChance = ModConfig.chanceDollBaseBossChance.Value;
			extraBossChance = ModConfig.chanceDollExtraBossChance.Value;
		}

		public void Init()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: 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
			LoadConfig();
			Log.Info("Chance Doll Changes and Config Loaded.");
			ShrineChanceBehavior.Start += new hook_Start(ShrineChanceBehavior_Start);
			ShrineChanceBehavior.AddShrineStack += (Manipulator)delegate(ILContext il)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Expected O, but got Unknown
				//IL_0077: Unknown result type (might be due to invalid IL or missing references)
				//IL_0089: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ae: Expected O, but got Unknown
				//IL_0154: Unknown result type (might be due to invalid IL or missing references)
				//IL_0186: Unknown result type (might be due to invalid IL or missing references)
				//IL_018c: Expected O, but got Unknown
				//IL_0245: Unknown result type (might be due to invalid IL or missing references)
				//IL_0257: Unknown result type (might be due to invalid IL or missing references)
				//IL_0263: Unknown result type (might be due to invalid IL or missing references)
				ILCursor val = new ILCursor(il);
				int invIndex = -1;
				val.GotoNext((MoveType)2, new Func<Instruction, bool>[3]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 1),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_inventory"),
					(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref invIndex)
				});
				val.Emit(OpCodes.Ldloc, invIndex);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<Inventory, ShrineChanceBehavior>>((Action<Inventory, ShrineChanceBehavior>)delegate(Inventory inventory, ShrineChanceBehavior shrineChance)
				{
					if (Object.op_Implicit((Object)(object)inventory))
					{
						int itemCount2 = inventory.GetItemCount(Items.ExtraShrineItem);
						if (itemCount2 > 0 && shrineChance.costMultiplierPerPurchase > 1f && shrineChance.costMultiplierPerPurchase == normalShrineCostMult)
						{
							float costMultiplierPerPurchase = shrineChance.costMultiplierPerPurchase;
							costMultiplierPerPurchase -= 1f;
							costMultiplierPerPurchase *= 1f - costDecrease;
							costMultiplierPerPurchase += 1f;
							shrineChance.costMultiplierPerPurchase = costMultiplierPerPurchase;
						}
					}
				});
				ILCursor val2 = new ILCursor(il);
				ILLabel val8 = default(ILLabel);
				val2.GotoNext((MoveType)2, new Func<Instruction, bool>[4]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<ShrineChanceBehavior>(x, "dropTable"),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"),
					(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val8)
				});
				val2.Index -= 1;
				val2.Emit(OpCodes.Ldarg_0);
				val2.EmitDelegate<Func<bool, ShrineChanceBehavior, bool>>((Func<bool, ShrineChanceBehavior, bool>)delegate(bool boolean, ShrineChanceBehavior shrine)
				{
					shrine.chanceDollWin = false;
					return false;
				});
				ILCursor val3 = new ILCursor(il);
				val3.GotoNext((MoveType)2, new Func<Instruction, bool>[5]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<ShrineChanceBehavior>(x, "dropletOrigin"),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Transform", "get_forward"),
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 20f),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Vector3", "op_Multiply"),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.PickupDropletController", "CreatePickupDroplet")
				});
				val3.Emit(OpCodes.Ldloc, invIndex);
				val3.Emit(OpCodes.Ldarg_0);
				val3.Emit(OpCodes.Ldarg_1);
				val3.EmitDelegate<Action<Inventory, ShrineChanceBehavior, Interactor>>((Action<Inventory, ShrineChanceBehavior, Interactor>)delegate(Inventory inventory, ShrineChanceBehavior shrine, Interactor interactor)
				{
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_006f: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
					//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
					//IL_00df: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
					//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
					//IL_0107: Unknown result type (might be due to invalid IL or missing references)
					//IL_0117: Unknown result type (might be due to invalid IL or missing references)
					//IL_0127: Unknown result type (might be due to invalid IL or missing references)
					//IL_0142: Unknown result type (might be due to invalid IL or missing references)
					//IL_0147: Unknown result type (might be due to invalid IL or missing references)
					//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
					//IL_00af: Unknown result type (might be due to invalid IL or missing references)
					//IL_014a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0152: Unknown result type (might be due to invalid IL or missing references)
					//IL_015d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0167: Unknown result type (might be due to invalid IL or missing references)
					CharacterBody component = ((Component)interactor).GetComponent<CharacterBody>();
					if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)inventory))
					{
						int itemCount = inventory.GetItemCount(Items.ExtraShrineItem);
						if (itemCount > 0)
						{
							if (Util.CheckRoll(baseChance + (float)(itemCount - 1) * chancePerItem, 0f, component.master))
							{
								PickupIndex none = PickupIndex.none;
								if (Util.CheckRoll(baseBossChance + extraBossChance * (float)(itemCount - 1), 0f, component.master))
								{
									none = shrine.rng.NextElementUniform<PickupIndex>(Run.instance.availableBossDropList);
								}
								else
								{
									PickupIndex val4 = shrine.rng.NextElementUniform<PickupIndex>(Run.instance.availableTier1DropList);
									PickupIndex val5 = shrine.rng.NextElementUniform<PickupIndex>(Run.instance.availableTier2DropList);
									PickupIndex val6 = shrine.rng.NextElementUniform<PickupIndex>(Run.instance.availableTier3DropList);
									WeightedSelection<PickupIndex> val7 = new WeightedSelection<PickupIndex>(8);
									val7.AddChoice(val4, tier1Weight);
									val7.AddChoice(val5, tier2Weight);
									val7.AddChoice(val6, tier3Weight);
									none = val7.Evaluate(shrine.rng.nextNormalizedFloat);
								}
								PickupDropletController.CreatePickupDroplet(none, shrine.dropletOrigin.position, shrine.dropletOrigin.forward * 15f);
								shrine.chanceDollWin = true;
							}
							else
							{
								shrine.chanceDollWin = false;
							}
						}
						else
						{
							shrine.chanceDollWin = false;
						}
					}
				});
			};
			string text = "Chance to get an extra item at Shrines of Chance.";
			string text2 = $"<style=cIsUtility>{baseChance}%</style> <style=cStack>(+{chancePerItem}% per stack)</style> chance to gain an extra item on <style=cShrine>Shrine of Chance</style> payout, <style=cIsUtility>{baseBossChance}%</style> <style=cStack>(+{extraBossChance}% per stack)</style> chance for a <style=cIsDamage>Boss</style> item. Reduce cost ramp up of <style=cShrine>Shrines of Chance</style> by <style=cIsUtility>{costDecrease * 100f}%</style>.";
			LanguageAPI.Add("ITEM_EXTRASHRINEITEM_PICKUP", text);
			LanguageAPI.Add("ITEM_EXTRASHRINEITEM_DESC", text2);
		}

		private void ShrineChanceBehavior_Start(orig_Start orig, ShrineChanceBehavior self)
		{
			orig.Invoke(self);
			normalShrineCostMult = self.costMultiplierPerPurchase;
		}
	}
	internal class NoxiousThornChanges
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<Instruction, bool> <>9__10_1;

			public static Func<Instruction, bool> <>9__10_2;

			public static Func<Instruction, bool> <>9__10_4;

			public static Func<Instruction, bool> <>9__10_5;

			public static Func<Instruction, bool> <>9__10_6;

			public static Func<Instruction, bool> <>9__10_7;

			public static Func<Instruction, bool> <>9__10_8;

			public static Func<Instruction, bool> <>9__10_9;

			public static Func<Instruction, bool> <>9__10_10;

			public static Func<Instruction, bool> <>9__10_11;

			public static Func<Instruction, bool> <>9__10_12;

			public static Func<Instruction, bool> <>9__10_13;

			public static Func<Instruction, bool> <>9__10_14;

			public static Func<Instruction, bool> <>9__10_15;

			public static Func<bool, bool> <>9__10_16;

			public static Manipulator <>9__10_0;

			internal void <Init>b__10_0(ILContext il)
			{
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0015: Expected O, but got Unknown
				//IL_0076: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Expected O, but got Unknown
				<>c__DisplayClass10_0 CS$<>8__locals0 = new <>c__DisplayClass10_0
				{
					num3Index = 0
				};
				ILCursor val = new ILCursor(il);
				val.GotoNext(new Func<Instruction, bool>[3]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1),
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "damage"),
					(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref CS$<>8__locals0.num3Index)
				});
				ILCursor val2 = new ILCursor(il);
				int num3 = default(int);
				ILLabel val5 = default(ILLabel);
				ILLabel val4 = default(ILLabel);
				float num2 = default(float);
				float num = default(float);
				ILLabel val3 = default(ILLabel);
				val2.GotoNext(new Func<Instruction, bool>[12]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3),
					(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val5),
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"),
					(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "noxiousThorn"),
					(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val4),
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2),
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num),
					(Instruction x) => ILPatternMatchingExt.MatchLdnull(x),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"),
					(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3)
				});
				val2.Index += 1;
				val2.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool boolean) => true));
			}

			internal bool <Init>b__10_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 1);
			}

			internal bool <Init>b__10_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "damage");
			}

			internal bool <Init>b__10_4(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdloc(x, ref num);
			}

			internal bool <Init>b__10_5(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBrtrue(x, ref val);
			}

			internal bool <Init>b__10_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <Init>b__10_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts");
			}

			internal bool <Init>b__10_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "noxiousThorn");
			}

			internal bool <Init>b__10_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 0);
			}

			internal bool <Init>b__10_10(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBle(x, ref val);
			}

			internal bool <Init>b__10_11(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <Init>b__10_12(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <Init>b__10_13(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdnull(x);
			}

			internal bool <Init>b__10_14(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll");
			}

			internal bool <Init>b__10_15(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBrfalse(x, ref val);
			}

			internal bool <Init>b__10_16(bool boolean)
			{
				return true;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass10_0
		{
			public int num3Index;

			internal bool <Init>b__3(Instruction x)
			{
				return ILPatternMatchingExt.MatchStloc(x, ref num3Index);
			}
		}

		private float increasedCritChance = 0.05f;

		private float chanceToProc = 20f;

		private float aoeMult = 1f;

		private int baseRange = 12;

		private int thornsPerProc = 3;

		private int thornsPerStack = 1;

		private int targetsBase = 3;

		private int targetPerStack = 2;

		private float critDmgPerDebuff = 0.25f;

		private void LoadConfig()
		{
			increasedCritChance = (float)ModConfig.noxiousThornCritChance.Value / 100f;
			chanceToProc = ModConfig.noxiousThornProcChance.Value;
			aoeMult = ModConfig.noxiousThornDamageMult.Value / 100f;
			baseRange = ModConfig.noxiousThornRange.Value;
			thornsPerProc = ModConfig.noxiousThornThornPerProc.Value;
			thornsPerStack = ModConfig.noxiousThornExtraThornPerProc.Value;
			targetsBase = ModConfig.noxiousThornBaseTargets.Value;
			targetPerStack = ModConfig.noxiousThornExtraTargets.Value;
			critDmgPerDebuff = ModConfig.noxiousThornCritDamage.Value / 100f;
		}

		public void Init()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Expected O, but got Unknown
			LoadConfig();
			Log.Info("Noxious Thorn Changes and Config Loaded.");
			ItemDef val = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC2/Items/TriggerEnemyDebuffs/TriggerEnemyDebuffs.asset").WaitForCompletion();
			val.tags = (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)21,
				(ItemTag)1
			};
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
			GlobalEventManager.ProcessHitEnemy += new hook_ProcessHitEnemy(GlobalEventManager_ProcessHitEnemy);
			object obj = <>c.<>9__10_0;
			if (obj == null)
			{
				Manipulator val2 = delegate(ILContext il)
				{
					//IL_000f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0015: Expected O, but got Unknown
					//IL_0076: Unknown result type (might be due to invalid IL or missing references)
					//IL_007c: Expected O, but got Unknown
					int num3Index = 0;
					ILCursor val3 = new ILCursor(il);
					val3.GotoNext(new Func<Instruction, bool>[3]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1),
						(Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "damage"),
						(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3Index)
					});
					ILCursor val4 = new ILCursor(il);
					int num3 = default(int);
					ILLabel val7 = default(ILLabel);
					ILLabel val6 = default(ILLabel);
					float num2 = default(float);
					float num = default(float);
					ILLabel val5 = default(ILLabel);
					val4.GotoNext(new Func<Instruction, bool>[12]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3),
						(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val7),
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"),
						(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "noxiousThorn"),
						(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val6),
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2),
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num),
						(Instruction x) => ILPatternMatchingExt.MatchLdnull(x),
						(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"),
						(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val5)
					});
					val4.Index += 1;
					val4.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool boolean) => true));
				};
				<>c.<>9__10_0 = val2;
				obj = (object)val2;
			}
			HealthComponent.TakeDamageProcess += (Manipulator)obj;
			string text = "On hit, chance to fire a burst of thorns at nearby enemies.";
			string text2 = $"Gain <style=cIsDamage>{increasedCritChance * 100f}% critical chance</style>. On hit, <style=cIsDamage>{chanceToProc}%</style> chance to fire a burst of <style=cIsDamage>{thornsPerProc}</style> <style=cStack>(+{thornsPerStack} per stack)</style> thorns at <style=cIsDamage>{targetsBase}</style> <style=cStack>(+{targetPerStack} per stack)</style> enemies within <style=cIsDamage>{baseRange}m</style>, each thorn deals <style=cIsDamage>{aoeMult * 100f}%</style> of TOTAL damage and increases their own critical damage by <style=cIsDamage>{critDmgPerDebuff * 100f}%</style> per each unique <style=cIsUtility>debuff</style> the initial target had.";
			LanguageAPI.Add("ITEM_TRIGGERENEMYDEBUFFS_PICKUP", text);
			LanguageAPI.Add("ITEM_TRIGGERENEMYDEBUFFS_DESC", text2);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory))
			{
				int itemCount = sender.inventory.GetItemCount(Items.TriggerEnemyDebuffs);
				if (itemCount > 0)
				{
					args.critAdd += increasedCritChance;
				}
			}
		}

		private void GlobalEventManager_ProcessHitEnemy(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Expected O, but got Unknown
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Expected O, but got Unknown
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo, victim);
			if (!Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				return;
			}
			CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
			CharacterMaster master = component.master;
			CharacterBody component2 = victim.GetComponent<CharacterBody>();
			int itemCount = master.inventory.GetItemCount(Items.TriggerEnemyDebuffs);
			if (itemCount <= 0 || ((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)15) || !Util.CheckRoll(chanceToProc * damageInfo.procCoefficient, master))
			{
				return;
			}
			TeamIndex teamIndex = master.GetBody().teamComponent.teamIndex;
			HurtBox[] hurtBoxes = new SphereSearch
			{
				origin = victim.transform.position,
				radius = baseRange,
				mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask,
				queryTriggerInteraction = (QueryTriggerInteraction)0
			}.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamIndex)).OrderCandidatesByDistance()
				.FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes();
			if (hurtBoxes.Length > 1)
			{
				EffectManager.SpawnEffect(CommonAssets.thornExplosionEffect, new EffectData
				{
					origin = component2.coreTransform.position,
					scale = 10f,
					rotation = Quaternion.identity
				}, true);
				Util.PlaySound("Play_item_proc_triggerEnemyDebuffs", victim);
			}
			bool crit = damageInfo.crit;
			float num = Util.OnHitProcDamage(damageInfo.damage, component.damage, aoeMult);
			if (crit)
			{
				int num2 = CheckForDebuff(component2);
				if (num2 > 0)
				{
					num += num * (critDmgPerDebuff * (float)num2 / component.critMultiplier);
				}
			}
			int num3 = 0;
			int num4 = targetsBase + targetPerStack * (itemCount - 1);
			for (int i = 0; i < hurtBoxes.Length; i++)
			{
				if ((Object)(object)hurtBoxes[i].healthComponent.body == (Object)(object)component2)
				{
					continue;
				}
				if (Object.op_Implicit((Object)(object)hurtBoxes[i]) && Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent) && hurtBoxes[i].healthComponent.alive)
				{
					for (int j = 0; j < thornsPerProc + thornsPerStack * (itemCount - 1); j++)
					{
						LightningOrb val = new LightningOrb();
						val.attacker = damageInfo.attacker.gameObject;
						val.bouncedObjects = null;
						val.bouncesRemaining = 0;
						val.damageCoefficientPerBounce = 1f;
						val.damageColorIndex = (DamageColorIndex)3;
						val.damageValue = num;
						val.isCrit = crit;
						val.lightningType = (LightningType)3;
						((Orb)val).origin = damageInfo.position;
						val.procChainMask = default(ProcChainMask);
						((ProcChainMask)(ref val.procChainMask)).AddProc((ProcType)15);
						val.procCoefficient = 0.1f;
						val.range = 0f;
						val.speed = 6f;
						val.teamIndex = teamIndex;
						((Orb)val).target = hurtBoxes[i];
						OrbManager.instance.AddOrb((Orb)(object)val);
					}
					num3++;
				}
				if (num3 >= num4)
				{
					break;
				}
			}
		}

		private int CheckForDebuff(CharacterBody body)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Invalid comparison between Unknown and I4
			//IL_0053: 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_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			int num = 0;
			BuffIndex[] debuffBuffIndices = BuffCatalog.debuffBuffIndices;
			foreach (BuffIndex val in debuffBuffIndices)
			{
				if (body.HasBuff(val))
				{
					num++;
				}
			}
			DotController val2 = DotController.FindDotController(((Component)body).gameObject);
			if (Object.op_Implicit((Object)(object)val2))
			{
				for (DotIndex val3 = (DotIndex)0; (int)val3 < 10; val3 = (DotIndex)(val3 + 1))
				{
					if (val2.HasDotActive(val3))
					{
						num++;
					}
				}
			}
			return num;
		}
	}
	internal class PrayerBeadsChanges
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<Instruction, bool> <>9__12_3;

			public static Func<Instruction, bool> <>9__12_4;

			public static Func<Instruction, bool> <>9__12_5;

			public static Func<Instruction, bool> <>9__12_6;

			public static Func<Instruction, bool> <>9__12_7;

			public static Func<Instruction, bool> <>9__12_8;

			public static Func<Instruction, bool> <>9__12_9;

			public static Func<Instruction, bool> <>9__12_10;

			public static Func<Instruction, bool> <>9__12_11;

			public static Func<Instruction, bool> <>9__12_12;

			public static Func<Instruction, bool> <>9__12_13;

			public static Func<Instruction, bool> <>9__12_14;

			public static Func<Instruction, bool> <>9__12_15;

			public static Func<Instruction, bool> <>9__12_16;

			public static Func<Instruction, bool> <>9__12_17;

			public static Func<bool, bool> <>9__12_18;

			public static Manipulator <>9__12_0;

			public static Func<Instruction, bool> <>9__12_19;

			public static Func<Instruction, bool> <>9__12_20;

			public static Func<Instruction, bool> <>9__12_21;

			public static Func<Instruction, bool> <>9__12_22;

			public static Func<Instruction, bool> <>9__12_23;

			public static Func<Instruction, bool> <>9__12_24;

			public static Func<int, int> <>9__12_25;

			public static Manipulator <>9__12_1;

			public static Func<Instruction, bool> <>9__12_26;

			public static Func<Instruction, bool> <>9__12_27;

			public static Func<Instruction, bool> <>9__12_28;

			public static Func<Instruction, bool> <>9__12_29;

			public static Func<bool, bool> <>9__12_30;

			public static Manipulator <>9__12_2;

			internal void <Init>b__12_0(ILContext il)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected O, but got Unknown
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0119: Unknown result type (might be due to invalid IL or missing references)
				//IL_011f: Expected O, but got Unknown
				ILCursor val = new ILCursor(il);
				int num4 = default(int);
				ILLabel val6 = default(ILLabel);
				int num3 = default(int);
				int num2 = default(int);
				ILLabel val5 = default(ILLabel);
				val.GotoNext(new Func<Instruction, bool>[7]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4),
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCountModifier"),
					(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val6),
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3),
					(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2),
					(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val5)
				});
				val.RemoveRange(5);
				val.Emit(OpCodes.Ldc_I4, 0);
				ILCursor val2 = new ILCursor(il);
				int num = default(int);
				ILLabel val4 = default(ILLabel);
				ILLabel val3 = default(ILLabel);
				val2.GotoNext((MoveType)2, new Func<Instruction, bool>[8]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num),
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCountModifier"),
					(Instruction x) => ILPatternMatchingExt.MatchBge(x, ref val4),
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_inventory"),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"),
					(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3)
				});
				val2.Index -= 1;
				val2.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool boolean) => false));
			}

			internal bool <Init>b__12_3(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdloc(x, ref num);
			}

			internal bool <Init>b__12_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <Init>b__12_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCountModifier");
			}

			internal bool <Init>b__12_6(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBle(x, ref val);
			}

			internal bool <Init>b__12_7(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdloc(x, ref num);
			}

			internal bool <Init>b__12_8(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <Init>b__12_9(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBle(x, ref val);
			}

			internal bool <Init>b__12_10(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdloc(x, ref num);
			}

			internal bool <Init>b__12_11(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <Init>b__12_12(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCountModifier");
			}

			internal bool <Init>b__12_13(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBge(x, ref val);
			}

			internal bool <Init>b__12_14(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <Init>b__12_15(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_inventory");
			}

			internal bool <Init>b__12_16(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit");
			}

			internal bool <Init>b__12_17(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBrfalse(x, ref val);
			}

			internal bool <Init>b__12_18(bool boolean)
			{
				return false;
			}

			internal void <Init>b__12_1(ILContext il)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected O, but got Unknown
				ILCursor val = new ILCursor(il);
				int num = default(int);
				ILLabel val2 = default(ILLabel);
				val.GotoNext(new Func<Instruction, bool>[6]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"),
					(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp"),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"),
					(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num),
					(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val2)
				});
				val.Index += 4;
				val.EmitDelegate<Func<int, int>>((Func<int, int>)((int value) => 0));
			}

			internal bool <Init>b__12_19(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <Init>b__12_20(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory");
			}

			internal bool <Init>b__12_21(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp");
			}

			internal bool <Init>b__12_22(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount");
			}

			internal bool <Init>b__12_23(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <Init>b__12_24(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBle(x, ref val);
			}

			internal int <Init>b__12_25(int value)
			{
				return 0;
			}

			internal void <Init>b__12_2(ILContext il)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected O, but got Unknown
				ILCursor val = new ILCursor(il);
				ILLabel val2 = default(ILLabel);
				val.GotoNext((MoveType)2, new Func<Instruction, bool>[4]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"),
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"),
					(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2)
				});
				val.Index -= 1;
				val.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool boolean) => false));
			}

			internal bool <Init>b__12_26(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <Init>b__12_27(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory");
			}

			internal bool <Init>b__12_28(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit");
			}

			internal bool <Init>b__12_29(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBrfalse(x, ref val);
			}

			internal bool <Init>b__12_30(bool boolean)
			{
				return false;
			}
		}

		private float chanceExtraItem = 10f;

		private float greenWeight = 0.4f;

		private float redWeight = 0.15f;

		private float bossWeight = 0.05f;

		private float void1Weight = 0.1f;

		private float void2Weight = 0.25f;

		private float void3Weight = 0.05f;

		private float greenChance;

		private float redChance;

		private float bossChance;

		private float voidChance;

		private void LoadConfig()
		{
			chanceExtraItem = ModConfig.prayerBeadsChance.Value;
			greenWeight = ModConfig.prayerBeadsTier2.Value;
			redWeight = ModConfig.prayerBeadsTier3.Value;
			bossWeight = ModConfig.prayerBeadsBoss.Value;
			void1Weight = ModConfig.prayerBeadsVoid1.Value;
			void2Weight = ModConfig.prayerBeadsVoid2.Value;
			void3Weight = ModConfig.prayerBeadsVoid3.Value;
			float num = greenWeight + redWeight + bossWeight + void1Weight + void2Weight + void3Weight;
			greenChance = greenWeight / num;
			redChance = redWeight / num;
			bossChance = bossWeight / num;
			voidChance = (void1Weight + void2Weight + void3Weight) / num;
		}

		public void Init()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Expected O, but got Unknown
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Expected O, but got Unknown
			LoadConfig();
			Log.Info("Prayer Beads Changes and Config Loaded.");
			ItemDef val = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC2/Items/ExtraStatsOnLevelUp/ExtraStatsOnLevelUp.asset").WaitForCompletion();
			ItemTag[] array = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			val.tags = (ItemTag[])(object)array;
			CharacterMaster.OnServerStageBegin += new hook_OnServerStageBegin(CharacterMaster_OnServerStageBegin);
			object obj = <>c.<>9__12_0;
			if (obj == null)
			{
				Manipulator val2 = delegate(ILContext il)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Expected O, but got Unknown
					//IL_010c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0119: Unknown result type (might be due to invalid IL or missing references)
					//IL_011f: Expected O, but got Unknown
					ILCursor val9 = new ILCursor(il);
					int num5 = default(int);
					ILLabel val14 = default(ILLabel);
					int num4 = default(int);
					int num3 = default(int);
					ILLabel val13 = default(ILLabel);
					val9.GotoNext(new Func<Instruction, bool>[7]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num5),
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCountModifier"),
						(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val14),
						(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4),
						(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num3),
						(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val13)
					});
					val9.RemoveRange(5);
					val9.Emit(OpCodes.Ldc_I4, 0);
					ILCursor val10 = new ILCursor(il);
					int num2 = default(int);
					ILLabel val12 = default(ILLabel);
					ILLabel val11 = default(ILLabel);
					val10.GotoNext((MoveType)2, new Func<Instruction, bool>[8]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2),
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCountModifier"),
						(Instruction x) => ILPatternMatchingExt.MatchBge(x, ref val12),
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_inventory"),
						(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"),
						(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val11)
					});
					val10.Index -= 1;
					val10.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool boolean) => false));
				};
				<>c.<>9__12_0 = val2;
				obj = (object)val2;
			}
			CharacterBody.RecalculateStats += (Manipulator)obj;
			object obj2 = <>c.<>9__12_1;
			if (obj2 == null)
			{
				Manipulator val3 = delegate(ILContext il)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Expected O, but got Unknown
					ILCursor val7 = new ILCursor(il);
					int num = default(int);
					ILLabel val8 = default(ILLabel);
					val7.GotoNext(new Func<Instruction, bool>[6]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"),
						(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp"),
						(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"),
						(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num),
						(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val8)
					});
					val7.Index += 4;
					val7.EmitDelegate<Func<int, int>>((Func<int, int>)((int value) => 0));
				};
				<>c.<>9__12_1 = val3;
				obj2 = (object)val3;
			}
			CharacterMaster.OnBodyStart += (Manipulator)obj2;
			object obj3 = <>c.<>9__12_2;
			if (obj3 == null)
			{
				Manipulator val4 = delegate(ILContext il)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Expected O, but got Unknown
					ILCursor val5 = new ILCursor(il);
					ILLabel val6 = default(ILLabel);
					val5.GotoNext((MoveType)2, new Func<Instruction, bool>[4]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"),
						(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"),
						(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val6)
					});
					val5.Index -= 1;
					val5.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool boolean) => false));
				};
				<>c.<>9__12_2 = val4;
				obj3 = (object)val4;
			}
			CharacterMaster.TrackBeadExperience += (Manipulator)obj3;
			string text = "Transform into a copy of one of your items at the start of the stage.";
			string text2 = $"At the start of the stage this item transform into a copy of <style=cIsUtility>{1}</style> <style=cStack>(+{1} per stack)</style> of your items (<style=cIsHealing>{greenChance * 100f}%</style>/<style=cIsHealth>{redChance * 100f}%</style>/<style=cIsDamage>{bossChance * 100f}%</style>/<style=cIsVoid>{voidChance * 100f}%</style>) with a <style=cIsUtility>{chanceExtraItem}%</style> chance to transform into <style=cIsUtility>2</style> copies.\n<style=cStack>(Increase chance of high rarity with item stack.)</style>";
			Lang