Decompiled source of 2R4R v1.3.37

NewMoon.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.AI.Walker;
using EntityStates.Missions.BrotherEncounter;
using EntityStates.MoonElevator;
using HG;
using IL.RoR2;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using NewMoon.Artifacts;
using NewMoon.Components;
using NewMoon.Items;
using NewMoon.Modules;
using On.EntityStates.Missions.BrotherEncounter;
using On.RoR2;
using R2API;
using R2API.Utils;
using RainrotSharedUtils.Shelters;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.EntitlementManagement;
using RoR2.ExpansionManagement;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2BepInExPack.GameAssetPaths;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.ResourceManagement.AsyncOperations;

[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 = "")]
[assembly: AssemblyCompany("NewMoon")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NewMoon")]
[assembly: AssemblyTitle("NewMoon")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace NewMoon
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.RiskOfBrainrot.NewMoon", "NewMoon", "2.0.0")]
	public class NewMoonPlugin : BaseUnityPlugin
	{
		public static float pillarDropOffset = 2.5f;

		public static float pillarDropForce = 20f;

		public static int baseRewardCount = 1;

		public static bool scaleRewardsByPlayerCount = true;

		public static SpawnCard exploderCard = Resources.Load<SpawnCard>("spawncards/characterspawncards/cscLunarExploder");

		private List<DirectorCard> exploderCards = new List<DirectorCard>();

		public static ExploderDirector exploderDirector;

		internal static float phaseTwoRate = 0f;

		internal static float phaseThreeRate = 1f;

		public const string guid = "com.RiskOfBrainrot.NewMoon";

		public const string teamName = "RiskOfBrainrot";

		public const string modName = "NewMoon";

		public const string version = "2.0.0";

		public static NewMoonPlugin instance;

		public static ItemTierDef lunarRelicTierDef;

		public static bool DoPillarItemDrop = false;

		public static AssetBundle mainAssetBundle => CommonAssets.mainAssetBundle;

		internal static event Action onLoaded;

		private void MakePillarsFun()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//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_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			MoonBatteryMissionController.Awake += new hook_Awake(ReduceRequiredPillars);
			AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatteryBlood_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Blood);
			};
			val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatteryDesign_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Design);
			};
			val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatteryMass_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Mass);
			};
			val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatterySoul_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Soul);
			};
			static void AddPillarItemDrop(GameObject pillarPrefab, PillarItemDropper.PillarType pillarType)
			{
				PillarItemDropper pillarItemDropper = pillarPrefab.AddComponent<PillarItemDropper>();
				pillarItemDropper.pillarType = pillarType;
			}
		}

		private void ReduceRequiredPillars(orig_Awake orig, MoonBatteryMissionController self)
		{
			orig.Invoke(self);
			self._numRequiredBatteries = 2;
			GameObject[] moonBatteries = self.moonBatteries;
			foreach (GameObject val in moonBatteries)
			{
				PillarItemDropper pillarItemDropper = val.GetComponent<PillarItemDropper>();
				if (!Object.op_Implicit((Object)(object)pillarItemDropper))
				{
					pillarItemDropper = val.AddComponent<PillarItemDropper>();
					PillarItemDropper.PillarType pillarType = PillarItemDropper.PillarType.None;
					string name = ((Object)val).name;
					switch (name.Substring(11, 4))
					{
					case "Mass":
						pillarType = PillarItemDropper.PillarType.Mass;
						break;
					case "Desi":
						pillarType = PillarItemDropper.PillarType.Design;
						break;
					case "Bloo":
						pillarType = PillarItemDropper.PillarType.Blood;
						break;
					case "Soul":
						pillarType = PillarItemDropper.PillarType.Soul;
						break;
					}
					pillarItemDropper.pillarType = pillarType;
				}
				pillarItemDropper.shouldDropItem = true;
			}
		}

		private void PillarsDropItems(orig_OnBatteryCharged orig, MoonBatteryMissionController self, HoldoutZoneController holdoutZone)
		{
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			int participatingPlayerCount = Run.instance.participatingPlayerCount;
			if (participatingPlayerCount != 0)
			{
				DropPillarItemFromHoldout(holdoutZone, participatingPlayerCount);
			}
			self.Network_numChargedBatteries = self._numChargedBatteries + 1;
			if (self._numChargedBatteries < self._numRequiredBatteries || !NetworkServer.active)
			{
				return;
			}
			for (int i = 0; i < self.batteryHoldoutZones.Length; i++)
			{
				if (((Behaviour)self.batteryHoldoutZones[i]).enabled)
				{
					self.batteryHoldoutZones[i].FullyChargeHoldoutZone();
					((UnityEvent<HoldoutZoneController>)(object)self.batteryHoldoutZones[i].onCharged).RemoveListener((UnityAction<HoldoutZoneController>)self.OnBatteryCharged);
				}
			}
			for (int j = 0; j < self.elevatorStateMachines.Length; j++)
			{
				self.elevatorStateMachines[j].SetNextState((EntityState)new InactiveToReady());
			}
		}

		public static void DropPillarItemFromHoldout(HoldoutZoneController holdoutZone)
		{
			Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "3");
			DropPillarItemFromHoldout(holdoutZone, Object.op_Implicit((Object)(object)Run.instance) ? Run.instance.participatingPlayerCount : 0);
		}

		public static void DropPillarItemFromHoldout(HoldoutZoneController holdoutZone, int participatingPlayerCount)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: 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_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "4");
			if (participatingPlayerCount == 0)
			{
				return;
			}
			Vector3 val = ((Component)holdoutZone).gameObject.transform.position + Vector3.up * pillarDropOffset;
			PickupIndex pickupIndexFromPillarType = GetPickupIndexFromPillarType(((Component)holdoutZone).gameObject);
			if (pickupIndexFromPillarType != PickupIndex.none)
			{
				Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "5");
				int num = baseRewardCount;
				if (scaleRewardsByPlayerCount)
				{
					num *= participatingPlayerCount;
				}
				float num2 = 360f / (float)num;
				Vector3 val2 = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.up) * (Vector3.up * pillarDropForce + Vector3.forward * 5f);
				Quaternion val3 = Quaternion.AngleAxis(num2, Vector3.up);
				int num3 = 0;
				while (num3 < num)
				{
					Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "6");
					PickupDropletController.CreatePickupDroplet(new UniquePickup(pickupIndexFromPillarType), val, val2, false);
					num3++;
					val2 = val3 * val2;
				}
			}
		}

		public static PickupIndex GetPickupIndexFromPillarType(GameObject pillar)
		{
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			ItemBase itemBase = null;
			string name = ((Object)pillar).name;
			switch (name.Substring(11, 4))
			{
			case "Mass":
				itemBase = ItemBase<MassAnomaly>.instance;
				break;
			case "Desi":
				itemBase = ItemBase<DesignAnomaly>.instance;
				break;
			case "Bloo":
				itemBase = ItemBase<BloodAnomaly>.instance;
				break;
			case "Soul":
				itemBase = ItemBase<SoulAnomaly>.instance;
				break;
			}
			if (itemBase != null)
			{
				ItemIndex itemIndex = itemBase.ItemsDef.itemIndex;
				return PickupCatalog.FindPickupIndex(itemIndex);
			}
			Debug.Log((object)"No pickup index found!");
			return PickupIndex.none;
		}

		public void LunarExplodersDuringBrother()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//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
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			Phase1.OnEnter += new hook_OnEnter(InitializeExploderDirector);
			Phase2.OnEnter += new hook_OnEnter(DisableExploderDirector);
			Phase3.OnEnter += new hook_OnEnter(RestoreExploderDirector);
			Phase4.OnEnter += new hook_OnEnter(KillExploderDirector);
		}

		private void GetExploderCard(List<DirectorCardHolder> cardList, StageInfo currentStage)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Invalid comparison between Unknown and I4
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Invalid comparison between Unknown and I4
			Debug.Log((object)"jsd fjsn");
			if ((int)currentStage.stage != 65536)
			{
				return;
			}
			List<DirectorCardHolder> list = new List<DirectorCardHolder>();
			foreach (DirectorCardHolder card2 in cardList)
			{
				if ((int)card2.MonsterCategory == 2)
				{
					DirectorCard card = card2.Card;
					SpawnCard spawnCard = card.spawnCard;
					GameObject prefab = spawnCard.prefab;
					if (((Object)spawnCard).name == "cscLunarExploder")
					{
						exploderCards.Add(card);
					}
				}
			}
			foreach (DirectorCardHolder item in list)
			{
				cardList.Remove(item);
			}
		}

		private void InitializeExploderDirector(orig_OnEnter orig, Phase1 self)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if ((Object)(object)exploderDirector == (Object)null)
			{
				GameObject val = new GameObject("CommencementPerfected_ChimeraExploderDirector_OrTheCPCEDForShort");
				val.transform.position = new Vector3(-88f, 491.1f, 0f);
				exploderDirector = val.AddComponent<ExploderDirector>();
				exploderDirector.baseState = (BrotherEncounterBaseState)(object)self;
			}
		}

		private void DisableExploderDirector(orig_OnEnter orig, Phase2 self)
		{
			orig.Invoke(self);
			exploderDirector.SetDirectorRate(phaseTwoRate);
		}

		private void RestoreExploderDirector(orig_OnEnter orig, Phase3 self)
		{
			orig.Invoke(self);
			exploderDirector.SetDirectorRate(phaseThreeRate);
		}

		private void KillExploderDirector(orig_OnEnter orig, Phase4 self)
		{
			orig.Invoke(self);
			Object.Destroy((Object)(object)((Component)exploderDirector).gameObject);
		}

		private void Awake()
		{
			instance = this;
			Config.Init();
			Log.Init(((BaseUnityPlugin)this).Logger);
			Language.Init();
			Hooks.Init();
			CommonAssets.Init();
			EliteModule.Init();
			DoPillarItemDrop = GetConfigBool(defaultValue: true, "Global : Endgame Items", "Setting to TRUE will enable the Moon Relic items, which drop from pillars, and all features that rely on these items.");
			if (DoPillarItemDrop)
			{
				MakePillarsFun();
			}
			if (GetConfigBool(defaultValue: true, "Global : Mithrix : Lunar Exploders Spawn On Ramps", "Setting to TRUE will cause Lunar Exploders to spawn on arena ramps during the fight."))
			{
				LunarExplodersDuringBrother();
			}
			InitializeContent();
			NewMoonPlugin.onLoaded();
			Config.Save();
			new ContentPacks().Initialize();
		}

		private void InitializeContent()
		{
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			BeginInitializing<ItemBase>(types, "NewMoonItems.txt");
			BeginInitializing<ArtifactBase>(types, "NewMoonArtifacts.txt");
		}

		private void BeginInitializing<T>(Type[] allTypes, string fileName = "") where T : SharedBase
		{
			Type baseType = typeof(T);
			if (!baseType.IsAbstract)
			{
				Log.Error(Log.Combine() + "Incorrect BaseType: " + baseType.Name);
				return;
			}
			IEnumerable<Type> source = allTypes.Where((Type type) => !type.IsAbstract && type.IsSubclassOf(baseType));
			if (source.Count() <= 0)
			{
				return;
			}
			IEnumerable<SharedBase> enumerable = from objType in source
				select (T)Activator.CreateInstance(objType) into sharedBase
				orderby sharedBase.loadOrder
				select sharedBase;
			Log.Debug(Log.Combine(baseType.Name) + "Initializing");
			foreach (SharedBase item in enumerable)
			{
				string text = Log.Combine(baseType.Name, item.ConfigName);
				if (ValidateBaseType(item))
				{
					Log.Debug(text + "Validated");
					InitializeBaseType(item);
					Log.Debug(text + "Initialized");
				}
			}
			if (!string.IsNullOrEmpty(fileName))
			{
				Language.TryPrintOutput(fileName);
			}
		}

		private bool ValidateBaseType(SharedBase obj)
		{
			bool isEnabled = obj.isEnabled;
			if (obj.forcePrerequisites)
			{
				return isEnabled && obj.GetPrerequisites();
			}
			return obj.Bind(isEnabled, "Should This Content Be Enabled") && obj.GetPrerequisites();
		}

		private void InitializeBaseType(SharedBase obj)
		{
			obj.Init();
		}

		public static bool GetConfigBool(bool defaultValue, string packetTitle, string desc = "")
		{
			return ConfigManager.DualBindToConfig(packetTitle, Config.MyConfig, "Should This Content Be Enabled", defaultValue, desc);
		}

		public static Sprite TryLoadSpriteFromBundle(string path, AssetBundle assetBundle = null, bool fallBackOnWrench = false)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Sprite val = NewMoonPlugin.TryLoadFromBundle<Sprite>(path, assetBundle);
			if (Object.op_Implicit((Object)(object)val))
			{
				return val;
			}
			return Addressables.LoadAssetAsync<Sprite>((object)(fallBackOnWrench ? RoR2_Base_Core.texNullIcon_png : RoR2_Base_Common_MiscIcons.texWIPIcon_png)).WaitForCompletion();
		}

		public static T TryLoadFromBundle<T>(string path, AssetBundle assetBundle = null) where T : Object
		{
			if ((Object)(object)assetBundle == (Object)null)
			{
				assetBundle = mainAssetBundle;
			}
			if (Object.op_Implicit((Object)(object)assetBundle) && !string.IsNullOrWhiteSpace(path) && assetBundle.Contains(path))
			{
				return assetBundle.LoadAsset<T>(path);
			}
			return default(T);
		}

		public static AssetReferenceT<T> LoadAsync<T>(string guid, Action<T> callback) where T : Object
		{
			//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_0040: Unknown result type (might be due to invalid IL or missing references)
			AssetReferenceT<T> val = new AssetReferenceT<T>(guid);
			AsyncOperationHandle<T> handle2 = AssetAsyncReferenceManager<T>.LoadAsset(val, (AsyncReferenceHandleUnloadType)2);
			if (callback == null)
			{
				return val;
			}
			if (handle2.IsDone)
			{
				onCompleted(handle2);
				return val;
			}
			handle2.Completed += onCompleted;
			return val;
			void onCompleted(AsyncOperationHandle<T> handle)
			{
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Invalid comparison between Unknown and I4
				if (handle.Result == null || (int)handle.Status != 1)
				{
					Debug.LogError((object)$"Failed to load asset [{handle.DebugName}] : {handle.OperationException}");
				}
				else
				{
					callback(handle.Result);
				}
			}
		}

		public static void RemoveCraftingRecipe(string guid)
		{
			NewMoonPlugin.LoadAsync<CraftableDef>(guid, (Action<CraftableDef>)delegate(CraftableDef craftableDef)
			{
				craftableDef.recipes = (Recipe[])(object)new Recipe[0];
			});
		}

		public static void RetierItemAsync(string itemGuid, ItemTier tier = 5, Action<ItemDef> callback = null)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			AssetReferenceT<ItemDef> val = new AssetReferenceT<ItemDef>(itemGuid);
			AsyncOperationHandle<ItemDef> val2 = AssetAsyncReferenceManager<ItemDef>.LoadAsset(val, (AsyncReferenceHandleUnloadType)2);
			val2.Completed += delegate(AsyncOperationHandle<ItemDef> ctx)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				ItemDef result = ctx.Result;
				result.tier = tier;
				result.deprecatedTier = tier;
				if (callback != null)
				{
					callback(result);
				}
			};
		}

		public static void RemoveEquipmentAsync(string equipmentGuid, Action<EquipmentDef> callback = null)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			AssetReferenceT<EquipmentDef> val = new AssetReferenceT<EquipmentDef>(equipmentGuid);
			AsyncOperationHandle<EquipmentDef> val2 = AssetAsyncReferenceManager<EquipmentDef>.LoadAsset(val, (AsyncReferenceHandleUnloadType)2);
			val2.Completed += delegate(AsyncOperationHandle<EquipmentDef> ctx)
			{
				EquipmentDef result = ctx.Result;
				result.canDrop = false;
				result.canBeRandomlyTriggered = false;
				result.enigmaCompatible = false;
				result.dropOnDeathChance = 0f;
				if (callback != null)
				{
					callback(result);
				}
			};
		}
	}
	internal static class Log
	{
		public static bool enableDebugging;

		internal static ManualLogSource _logSource;

		public static void DebugBreakpoint(string methodName, int breakpointNumber = -1)
		{
			string text = "NewMoon: " + methodName + " IL hook failed!";
			if (breakpointNumber >= 0)
			{
				text += $" (breakpoint {breakpointNumber})";
			}
			Error(text);
		}

		internal static void Init(ManualLogSource logSource)
		{
			enableDebugging = ConfigManager.DualBindToConfig("Swan Song", Config.MyConfig, "Enable Debugging", defaultValue: false, "Enable debug outputs to the log for troubleshooting purposes. Enabling this will slow down the game.");
			_logSource = logSource;
		}

		internal static string Combine(params string[] parameters)
		{
			string text = "NewMoon : ";
			foreach (string text2 in parameters)
			{
				text = text + text2 + " : ";
			}
			return text;
		}

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

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

		internal static void ErrorAssetBundle(string assetName, string bundleName)
		{
			Error("failed to load asset, " + assetName + ", because it does not exist in asset bundle, " + bundleName);
		}

		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);
		}
	}
	public abstract class SharedBase
	{
		public virtual int loadOrder => 0;

		public virtual bool forcePrerequisites { get; } = false;


		public abstract string ConfigName { get; }

		public virtual bool isEnabled { get; } = true;


		public static ManualLogSource Logger => Log._logSource;

		public abstract AssetBundle assetBundle { get; }

		public abstract void Hooks();

		public abstract void Lang();

		public virtual bool GetPrerequisites()
		{
			return true;
		}

		public virtual void Init()
		{
			ConfigManager.HandleConfigAttributes(GetType(), ConfigName, Config.MyConfig);
			Hooks();
			Lang();
			NewMoonPlugin.onLoaded += PostInit;
		}

		public T Bind<T>(T defaultValue, string configName, string configDesc = "")
		{
			return ConfigManager.DualBindToConfig(ConfigName, Config.MyConfig, configName, defaultValue, configDesc);
		}

		public virtual void PostInit()
		{
		}

		public static float GetHyperbolic(float firstStack, float cap, float chance)
		{
			if (firstStack >= cap)
			{
				return cap * (chance / firstStack);
			}
			float num = chance / firstStack;
			float num2 = 100f * firstStack / (cap - firstStack);
			return cap * (1f - 100f / (num * num2 + 100f));
		}

		public static ExpansionDef SotvExpansionDef()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			return Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC1/Common/DLC1.asset").WaitForCompletion();
		}
	}
	public class ExploderDirector : MonoBehaviour
	{
		internal BrotherEncounterBaseState baseState;

		private bool isActive = false;

		private static float baseSpawnFrequency = 20f;

		private static float spawnRateModifier = 1f;

		private float spawnFrequency;

		private float exploderSpawnTimer = 0f;

		public const float rampHeight = 524.3f;

		public List<ExploderSpawnNode> SpawnNodes = new List<ExploderSpawnNode>();

		public void SetDirectorRate(float rate)
		{
			if (rate <= 0f)
			{
				exploderSpawnTimer = 0f;
				spawnRateModifier = 0f;
				isActive = false;
			}
			else
			{
				isActive = true;
				spawnRateModifier = rate;
				spawnFrequency = baseSpawnFrequency / spawnRateModifier;
			}
		}

		private void Start()
		{
			if (baseState != null)
			{
				CreateSpawnNodes();
				SetDirectorRate(1f);
				isActive = true;
			}
			else
			{
				Object.Destroy((Object)(object)this);
			}
		}

		private void CreateSpawnNodes()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Expected O, but got Unknown
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active)
			{
				Vector3[] array = (Vector3[])(object)new Vector3[4]
				{
					new Vector3(65f, 524.3f, 155f),
					new Vector3(65f, 524.3f, -145f),
					new Vector3(-240f, 524.3f, 155f),
					new Vector3(-240f, 524.3f, -145f)
				};
				for (int i = 0; i < array.Length; i++)
				{
					GameObject val = new GameObject($"CommencementPerfected_ExploderSpawnNode_{i}");
					val.transform.position = array[i];
					val.transform.parent = ((Component)this).transform;
					ExploderSpawnNode item = val.AddComponent<ExploderSpawnNode>();
					SpawnNodes.Add(item);
				}
			}
		}

		private void FixedUpdate()
		{
			if (NetworkServer.active && spawnFrequency != 0f)
			{
				exploderSpawnTimer += Time.fixedDeltaTime * spawnRateModifier;
				while (exploderSpawnTimer > spawnFrequency)
				{
					exploderSpawnTimer -= spawnFrequency;
					List<CharacterMaster> list = new List<CharacterMaster>();
					foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
					{
						if (instance.body.healthComponent.alive)
						{
							list.Add(instance.master);
						}
					}
					StartExploderWaveStacked(list.Count, list);
				}
			}
			else
			{
				Debug.Log((object)"uuu");
			}
			if (((EntityState)baseState).outer.destroying)
			{
				SetDirectorRate(0f);
				Debug.Log((object)"Destroying Exploder Director! Ahhhhhh!!!!!!");
				Object.Destroy((Object)(object)this);
			}
		}

		private void StartExploderWaveStacked(int spawnCount, List<CharacterMaster> playersList)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < playersList.Count; i++)
			{
				CharacterMaster val = playersList[i];
				Vector3 position = val.GetBody().transform.position;
				float num = float.PositiveInfinity;
				ExploderSpawnNode exploderSpawnNode = null;
				foreach (ExploderSpawnNode spawnNode in SpawnNodes)
				{
					float num2 = Vector3.Distance(((Component)spawnNode).transform.position, position);
					Vector2 zero = Vector2.zero;
					if (num2 < num)
					{
						exploderSpawnNode = spawnNode;
						num = num2;
					}
				}
				int num3 = playersList.Count - i;
				int num4 = spawnCount / num3;
				if (spawnCount % num3 != 0)
				{
					num4 = Mathf.CeilToInt((float)num4);
				}
				if ((Object)(object)exploderSpawnNode != (Object)null && num4 > 0)
				{
					exploderSpawnNode.QueueSpawns(num4);
				}
			}
		}

		private void StartExploderWaveDispersed(int spawnCount, List<CharacterMaster> playersList, Vector2 searchRange)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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_00d4: Unknown result type (might be due to invalid IL or missing references)
			if (searchRange.x >= searchRange.y && searchRange.y != 0f)
			{
				StartExploderWaveStacked(spawnCount, playersList);
				return;
			}
			for (int i = 0; i < playersList.Count; i++)
			{
				CharacterMaster val = playersList[i];
				float num = float.PositiveInfinity;
				ExploderSpawnNode exploderSpawnNode = null;
				foreach (ExploderSpawnNode spawnNode in SpawnNodes)
				{
					if ((float)spawnNode.spawnQueue <= searchRange.y)
					{
						float num2 = Vector3.Distance(((Component)spawnNode).transform.position, ((Component)val).transform.position);
						if (num2 < num)
						{
							exploderSpawnNode = spawnNode;
							num = num2;
						}
					}
					else
					{
						if (searchRange.x < (float)spawnNode.spawnQueue)
						{
							searchRange.x = searchRange.y;
						}
						searchRange.y = spawnNode.spawnQueue;
					}
				}
				int num3 = playersList.Count - i;
				int num4 = spawnCount / num3;
				if (spawnCount % num3 != 0)
				{
					num4 = Mathf.CeilToInt((float)num4);
				}
				if ((Object)(object)exploderSpawnNode != (Object)null && num4 > 0)
				{
					exploderSpawnNode.QueueSpawns(num4);
				}
			}
		}
	}
	public class ExploderSpawnNode : MonoBehaviour
	{
		internal int spawnQueue = 0;

		private static float spawnInterval = 1f;

		private float spawnTimer = 0f;

		private void Start()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			spawnQueue = 0;
			Debug.Log((object)((Component)this).transform.position);
		}

		public void QueueSpawns(int spawnCount, float delay = 0f)
		{
			spawnQueue += spawnCount;
			spawnTimer = 0f - delay;
		}

		private void FixedUpdate()
		{
			//IL_0070: 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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Expected O, but got Unknown
			if (spawnQueue > 0)
			{
				spawnTimer += Time.fixedDeltaTime;
				while (spawnTimer > spawnInterval && spawnQueue > 0)
				{
					spawnTimer -= spawnInterval;
					spawnQueue--;
					Debug.Log((object)$"Spawn {((Object)NewMoonPlugin.exploderCard).name} at position {((Component)this).transform.position}!. Remaining queue: {spawnQueue}");
					DirectorSpawnRequest val = new DirectorSpawnRequest(NewMoonPlugin.exploderCard, new DirectorPlacementRule
					{
						placementMode = (PlacementMode)1,
						minDistance = 0f,
						maxDistance = 10f,
						spawnOnTarget = ((Component)this).transform
					}, RoR2Application.rng);
					val.teamIndexOverride = (TeamIndex)2;
					val.ignoreTeamMemberLimit = true;
					DirectorCore instance = DirectorCore.instance;
					if ((Object)(object)instance == (Object)null)
					{
						break;
					}
					instance.TrySpawnObject(val);
				}
			}
			else
			{
				spawnTimer = 0f;
			}
		}
	}
	public static class Extensions
	{
		public static void AddAllRecipePermutations(this CraftableDef craftableDef, RecipeIngredient[] firstSlotIngredients, RecipeIngredient[] secondSlotIngredients)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			List<Recipe> list = new List<Recipe>();
			foreach (RecipeIngredient val in firstSlotIngredients)
			{
				foreach (RecipeIngredient val2 in secondSlotIngredients)
				{
					Recipe val3 = new Recipe();
					val3.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { val, val2 };
					list.Add(val3);
				}
			}
			if (craftableDef.recipes.Length == 0)
			{
				craftableDef.recipes = list.ToArray();
			}
			else
			{
				craftableDef.recipes = craftableDef.recipes.Concat(list).ToArray();
			}
		}

		public static bool InteractableIsPermittedForSpawn(this GameObject interactableObject, bool disallowPickups = true)
		{
			if ((Object)(object)interactableObject == (Object)null)
			{
				return false;
			}
			InteractionProcFilter val = default(InteractionProcFilter);
			if (interactableObject.TryGetComponent<InteractionProcFilter>(ref val))
			{
				return val.shouldAllowOnInteractionBeginProc;
			}
			PurchaseInteraction val2 = default(PurchaseInteraction);
			if (interactableObject.TryGetComponent<PurchaseInteraction>(ref val2))
			{
				return !val2.disableSpawnOnInteraction;
			}
			DelusionChestController val3 = default(DelusionChestController);
			if (interactableObject.TryGetComponent<DelusionChestController>(ref val3))
			{
				PickupPickerController val4 = default(PickupPickerController);
				if (interactableObject.TryGetComponent<PickupPickerController>(ref val4) && ((Behaviour)val4).enabled)
				{
					return false;
				}
				return true;
			}
			GenericPickupController val5 = default(GenericPickupController);
			if (interactableObject.TryGetComponent<GenericPickupController>(ref val5))
			{
				return disallowPickups || val5.Duplicated;
			}
			if (Object.op_Implicit((Object)(object)interactableObject.GetComponent<VehicleSeat>()))
			{
				return false;
			}
			if (Object.op_Implicit((Object)(object)interactableObject.GetComponent<NetworkUIPromptController>()))
			{
				return false;
			}
			PowerPedestal val6 = default(PowerPedestal);
			if (interactableObject.TryGetComponent<PowerPedestal>(ref val6))
			{
				return val6.CanTriggerFireworks;
			}
			AccessCodesNodeController val7 = default(AccessCodesNodeController);
			if (interactableObject.TryGetComponent<AccessCodesNodeController>(ref val7))
			{
				return val7.CheckInteractionOrder();
			}
			return true;
		}

		public static GameObject FixItemModel(this GameObject prefab)
		{
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Expected O, but got Unknown
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Expected O, but got Unknown
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: 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_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_00f9: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)prefab == (Object)null)
			{
				prefab = Resources.Load<GameObject>("prefabs/NullModel");
			}
			ModelPanelParameters val = prefab.AddComponent<ModelPanelParameters>();
			val.minDistance = 1f;
			val.maxDistance = 15f;
			Transform val2 = prefab.transform.Find("FocusPos");
			if ((Object)(object)val2 == (Object)null)
			{
				GameObject val3 = new GameObject("FocusPos");
				val2 = val3.transform;
				val2.parent = prefab.transform;
				val2.localPosition = Vector3.zero;
			}
			val.focusPointTransform = val2;
			Transform val4 = prefab.transform.Find("CameraPos");
			if ((Object)(object)val4 == (Object)null)
			{
				GameObject val5 = new GameObject("CameraPos");
				val4 = val5.transform;
				val4.parent = prefab.transform;
				val4.SetPositionAndRotation(val2.position + Vector3.forward * -7f + Vector3.right * -1f, val4.rotation);
			}
			val.cameraPositionTransform = val4;
			return prefab;
		}

		public static string AsPercent(this float d)
		{
			return d * 100f + "%";
		}

		public static void AddPersistentListener(this HoldoutZoneControllerChargedUnityEvent unityEvent, UnityAction<HoldoutZoneController> action)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls;
			PersistentCall val = new PersistentCall();
			ref Object target = ref val.m_Target;
			object? target2 = ((Delegate)(object)action).Target;
			target = (Object)((target2 is Object) ? target2 : null);
			val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName);
			val.m_MethodName = ((Delegate)(object)action).Method.Name;
			val.m_CallState = (UnityEventCallState)2;
			val.m_Mode = (PersistentListenerMode)0;
			persistentCalls.AddListener(val);
		}

		public static void AddPersistentListener(this UnityEvent<Interactor> unityEvent, UnityAction<Interactor> action)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls;
			PersistentCall val = new PersistentCall();
			ref Object target = ref val.m_Target;
			object? target2 = ((Delegate)(object)action).Target;
			target = (Object)((target2 is Object) ? target2 : null);
			val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName);
			val.m_MethodName = ((Delegate)(object)action).Method.Name;
			val.m_CallState = (UnityEventCallState)2;
			val.m_Mode = (PersistentListenerMode)0;
			persistentCalls.AddListener(val);
		}

		public static void AddPersistentListener(this UnityEvent<CharacterMaster> unityEvent, UnityAction<CharacterMaster> action)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls;
			PersistentCall val = new PersistentCall();
			ref Object target = ref val.m_Target;
			object? target2 = ((Delegate)(object)action).Target;
			target = (Object)((target2 is Object) ? target2 : null);
			val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName);
			val.m_MethodName = ((Delegate)(object)action).Method.Name;
			val.m_CallState = (UnityEventCallState)2;
			val.m_Mode = (PersistentListenerMode)0;
			persistentCalls.AddListener(val);
		}

		public static void AddPersistentListener(this UnityEvent<GameObject> unityEvent, UnityAction<GameObject> action)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls;
			PersistentCall val = new PersistentCall();
			ref Object target = ref val.m_Target;
			object? target2 = ((Delegate)(object)action).Target;
			target = (Object)((target2 is Object) ? target2 : null);
			val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName);
			val.m_MethodName = ((Delegate)(object)action).Method.Name;
			val.m_CallState = (UnityEventCallState)2;
			val.m_Mode = (PersistentListenerMode)0;
			persistentCalls.AddListener(val);
		}
	}
	public static class Tools
	{
		public static string modPrefix = string.Format("@{0}+{1}", "ArtificerExtended", "artiskillicons");

		public static AssetBundle LoadAssetBundle(byte[] resourceBytes)
		{
			if (resourceBytes == null)
			{
				throw new ArgumentNullException("resourceBytes");
			}
			return AssetBundle.LoadFromMemory(resourceBytes);
		}

		public static string GetModPrefix(this BaseUnityPlugin plugin, string bundleName)
		{
			return $"@{plugin.Info.Metadata.Name}+{bundleName}";
		}

		internal static bool isLoaded(string modguid)
		{
			foreach (KeyValuePair<string, PluginInfo> pluginInfo in Chainloader.PluginInfos)
			{
				string key = pluginInfo.Key;
				PluginInfo value = pluginInfo.Value;
				if (key == modguid)
				{
					return true;
				}
			}
			return false;
		}

		internal static string ConvertDecimal(float d)
		{
			return d * 100f + "%";
		}

		internal static void GetMaterial(GameObject model, string childObject, Color color, ref Material material, float scaleMultiplier = 1f, bool replaceAll = false)
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			Renderer[] componentsInChildren = model.GetComponentsInChildren<Renderer>();
			Renderer[] array = componentsInChildren;
			foreach (Renderer val in array)
			{
				Renderer val2 = val;
				if (string.Equals(((Object)val).name, childObject))
				{
					if (color == Color.clear)
					{
						Object.Destroy((Object)(object)val);
						break;
					}
					if ((Object)(object)material == (Object)null)
					{
						material = new Material(val.material);
						material.mainTexture = val.material.mainTexture;
						material.shader = val.material.shader;
						material.color = color;
					}
					val.material = material;
					Transform transform = ((Component)val).transform;
					transform.localScale *= scaleMultiplier;
					if (!replaceAll)
					{
						break;
					}
				}
			}
		}

		internal static void DebugMaterial(GameObject model)
		{
			Renderer[] componentsInChildren = model.GetComponentsInChildren<Renderer>();
			Renderer[] array = componentsInChildren;
			foreach (Renderer val in array)
			{
				Renderer val2 = val;
				Debug.Log((object)("Material: " + ((Object)val2).name.ToString()));
			}
		}

		internal static void GetParticle(GameObject model, string childObject, Color color, float sizeMultiplier = 1f, bool replaceAll = false)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: 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_0077: 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)
			ParticleSystem[] componentsInChildren = model.GetComponentsInChildren<ParticleSystem>();
			ParticleSystem[] array = componentsInChildren;
			foreach (ParticleSystem val in array)
			{
				ParticleSystem val2 = val;
				MainModule main = val2.main;
				ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime;
				ColorBySpeedModule colorBySpeed = val2.colorBySpeed;
				if (string.Equals(((Object)val2).name, childObject))
				{
					((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color);
					((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * sizeMultiplier;
					((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(color);
					((ColorBySpeedModule)(ref colorBySpeed)).color = MinMaxGradient.op_Implicit(color);
					if (!replaceAll)
					{
						break;
					}
				}
			}
		}

		internal static void DebugParticleSystem(GameObject model)
		{
			ParticleSystem[] components = model.GetComponents<ParticleSystem>();
			ParticleSystem[] array = components;
			foreach (ParticleSystem val in array)
			{
				ParticleSystem val2 = val;
				Debug.Log((object)("Particle: " + ((Object)val2).name.ToString()));
			}
		}

		internal static void GetLight(GameObject model, string childObject, Color color, bool replaceAll = false)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			Light[] componentsInChildren = model.GetComponentsInChildren<Light>();
			Light[] array = componentsInChildren;
			foreach (Light val in array)
			{
				Light val2 = val;
				if (string.Equals(((Object)val2).name, childObject))
				{
					val2.color = color;
					if (!replaceAll)
					{
						break;
					}
				}
			}
		}

		internal static void DebugLight(GameObject model)
		{
			Light[] componentsInChildren = model.GetComponentsInChildren<Light>();
			Light[] array = componentsInChildren;
			foreach (Light val in array)
			{
				Light val2 = val;
				Debug.Log((object)("Light: " + ((Object)val2).name.ToString()));
			}
		}

		public static void ClearDotStacksForType(this DotController dotController, DotIndex dotIndex)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			for (int num = dotController.dotStackList.Count - 1; num >= 0; num--)
			{
				if (dotController.dotStackList[num].dotIndex == dotIndex)
				{
					dotController.RemoveDotStackAtServer(num);
				}
			}
		}

		public static void ApplyCooldownScale(GenericSkill skillSlot, float cooldownScale)
		{
			if ((Object)(object)skillSlot != (Object)null)
			{
				skillSlot.cooldownScale *= cooldownScale;
			}
		}

		public static int CountOverspillTriangular(float totalValue, float incrementor = 1f)
		{
			int num = 0;
			while (totalValue > 0f)
			{
				num++;
				totalValue -= incrementor * (float)num;
			}
			return num;
		}

		public static int CountOverspillFibonacci(float totalValue, float thresholdScale = 1f, int startingIndex = 1)
		{
			int num = 1;
			int num2 = 1;
			int num3 = 0;
			while (totalValue > (float)num2 * thresholdScale)
			{
				num2 += num;
				num = num2 - num;
				if (num3 > startingIndex)
				{
					num3++;
				}
			}
			return num3;
		}

		public static RecipeIngredient[] GetAllIngredientsWithTags(ItemTag[] required, ItemTag[] forbidden, int maxTier = 3)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			List<RecipeIngredient> list = new List<RecipeIngredient>();
			for (int i = 1; i <= maxTier; i++)
			{
				ItemTier itemTier = (ItemTier)0;
				switch (i)
				{
				case 1:
					itemTier = (ItemTier)0;
					break;
				case 2:
					itemTier = (ItemTier)1;
					break;
				case 3:
					itemTier = (ItemTier)2;
					break;
				case 4:
					itemTier = (ItemTier)4;
					break;
				case 5:
					itemTier = (ItemTier)10;
					break;
				}
				RecipeIngredient val = new RecipeIngredient();
				val.requiredTags = required;
				val.forbiddenTags = forbidden;
				val.type = (IngredientTypeIndex)1;
				val.itemTier = itemTier;
				list.Add(val);
			}
			return list.ToArray();
		}
	}
}
namespace NewMoon.Modules
{
	public static class CommonAssets
	{
		private static AssetBundle _mainAssetBundle;

		public static string dropPrefabsPath = "Assets/Models/DropPrefabs";

		public static string iconsPath = "Assets/Textures/Icons/";

		public static string eliteMaterialsPath = "Assets/Textures/Materials/Elite/";

		public static AssetBundle mainAssetBundle
		{
			get
			{
				if ((Object)(object)_mainAssetBundle == (Object)null)
				{
					_mainAssetBundle = Assets.LoadAssetBundle("fruityendings");
				}
				return _mainAssetBundle;
			}
			set
			{
				_mainAssetBundle = value;
			}
		}

		public static void Init()
		{
		}
	}
	public class CustomRendererInfo
	{
		public string childName;

		public Material material = null;

		public bool dontHotpoo = false;

		public bool ignoreOverlays = false;
	}
	internal static class Assets
	{
		internal static Dictionary<string, AssetBundle> loadedBundles = new Dictionary<string, AssetBundle>();

		internal static AssetBundle LoadAssetBundle(string bundleName)
		{
			if (loadedBundles.ContainsKey(bundleName))
			{
				return loadedBundles[bundleName];
			}
			AssetBundle val = null;
			val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)NewMoonPlugin.instance).Info.Location), bundleName));
			loadedBundles[bundleName] = val;
			return val;
		}

		internal static GameObject CloneTracer(string originalTracerName, string newTracerName)
		{
			if ((Object)(object)LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName) == (Object)null)
			{
				return null;
			}
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName), newTracerName, true);
			if (!Object.op_Implicit((Object)(object)val.GetComponent<EffectComponent>()))
			{
				val.AddComponent<EffectComponent>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<VFXAttributes>()))
			{
				val.AddComponent<VFXAttributes>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<NetworkIdentity>()))
			{
				val.AddComponent<NetworkIdentity>();
			}
			val.GetComponent<Tracer>().speed = 250f;
			val.GetComponent<Tracer>().length = 50f;
			Content.CreateAndAddEffectDef(val);
			return val;
		}

		internal static void ConvertAllRenderersToHopooShader(GameObject objectToConvert)
		{
			if (!Object.op_Implicit((Object)(object)objectToConvert))
			{
				return;
			}
			MeshRenderer[] componentsInChildren = objectToConvert.GetComponentsInChildren<MeshRenderer>();
			foreach (MeshRenderer val in componentsInChildren)
			{
				if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
				{
					((Renderer)val).sharedMaterial.ConvertDefaultShaderToHopoo();
				}
			}
			SkinnedMeshRenderer[] componentsInChildren2 = objectToConvert.GetComponentsInChildren<SkinnedMeshRenderer>();
			foreach (SkinnedMeshRenderer val2 in componentsInChildren2)
			{
				if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Renderer)val2).sharedMaterial))
				{
					((Renderer)val2).sharedMaterial.ConvertDefaultShaderToHopoo();
				}
			}
		}

		internal static GameObject LoadCrosshair(string crosshairName)
		{
			GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair");
			if ((Object)(object)val == (Object)null)
			{
				Log.Error("could not load crosshair with the name " + crosshairName + ". defaulting to Standard");
				return LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/StandardCrosshair");
			}
			return val;
		}

		internal static GameObject LoadEffect(this AssetBundle assetBundle, string resourceName, bool parentToTransform)
		{
			return assetBundle.LoadEffect(resourceName, "", parentToTransform);
		}

		internal static GameObject LoadEffect(this AssetBundle assetBundle, string resourceName, string soundName = "", bool parentToTransform = false)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = assetBundle.LoadAsset<GameObject>(resourceName);
			if (!Object.op_Implicit((Object)(object)val))
			{
				Log.ErrorAssetBundle(resourceName, ((Object)assetBundle).name);
				return null;
			}
			val.AddComponent<DestroyOnTimer>().duration = 12f;
			val.AddComponent<NetworkIdentity>();
			val.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			EffectComponent val2 = val.AddComponent<EffectComponent>();
			val2.applyScale = false;
			val2.effectIndex = (EffectIndex)(-1);
			val2.parentToReferencedTransform = parentToTransform;
			val2.positionAtReferencedTransform = true;
			val2.soundName = soundName;
			Content.CreateAndAddEffectDef(val);
			return val;
		}

		internal static GameObject CreateProjectileGhostPrefab(this AssetBundle assetBundle, string ghostName)
		{
			GameObject val = assetBundle.LoadAsset<GameObject>(ghostName);
			if ((Object)(object)val == (Object)null)
			{
				Log.Error("Failed to load ghost prefab " + ghostName);
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<NetworkIdentity>()))
			{
				val.AddComponent<NetworkIdentity>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<ProjectileGhostController>()))
			{
				val.AddComponent<ProjectileGhostController>();
			}
			ConvertAllRenderersToHopooShader(val);
			return val;
		}

		internal static GameObject CreateProjectileGhostPrefab(GameObject ghostObject, string newName)
		{
			if ((Object)(object)ghostObject == (Object)null)
			{
				Log.Error("Failed to load ghost prefab " + ((Object)ghostObject).name);
			}
			GameObject val = PrefabAPI.InstantiateClone(ghostObject, newName);
			if (!Object.op_Implicit((Object)(object)val.GetComponent<NetworkIdentity>()))
			{
				val.AddComponent<NetworkIdentity>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<ProjectileGhostController>()))
			{
				val.AddComponent<ProjectileGhostController>();
			}
			return val;
		}

		internal static GameObject CloneProjectilePrefab(string prefabName, string newPrefabName)
		{
			return PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/" + prefabName), newPrefabName);
		}

		internal static GameObject LoadAndAddProjectilePrefab(this AssetBundle assetBundle, string newPrefabName)
		{
			GameObject val = assetBundle.LoadAsset<GameObject>(newPrefabName);
			if ((Object)(object)val == (Object)null)
			{
				Log.ErrorAssetBundle(newPrefabName, ((Object)assetBundle).name);
				return null;
			}
			Content.AddProjectilePrefab(val);
			return val;
		}
	}
	internal static class Prefabs
	{
		private static PhysicMaterial ragdollMaterial;

		public static GameObject CreateDisplayPrefab(AssetBundle assetBundle, string displayPrefabName, GameObject prefab)
		{
			GameObject val = assetBundle.LoadAsset<GameObject>(displayPrefabName);
			if ((Object)(object)val == (Object)null)
			{
				Log.Error("could not load display prefab " + displayPrefabName + ". Make sure this prefab exists in assetbundle " + ((Object)assetBundle).name);
				return null;
			}
			CharacterModel val2 = val.GetComponent<CharacterModel>();
			if (!Object.op_Implicit((Object)(object)val2))
			{
				val2 = val.AddComponent<CharacterModel>();
			}
			val2.baseRendererInfos = prefab.GetComponentInChildren<CharacterModel>().baseRendererInfos;
			Assets.ConvertAllRenderersToHopooShader(val);
			return val;
		}

		public static CharacterModel SetupCharacterModel(GameObject bodyPrefab, CustomRendererInfo[] customInfos = null)
		{
			CharacterModel val = ((Component)bodyPrefab.GetComponent<ModelLocator>().modelTransform).gameObject.GetComponent<CharacterModel>();
			bool flag = (Object)(object)val != (Object)null;
			if (!flag)
			{
				val = ((Component)bodyPrefab.GetComponent<ModelLocator>().modelTransform).gameObject.AddComponent<CharacterModel>();
			}
			val.body = bodyPrefab.GetComponent<CharacterBody>();
			val.autoPopulateLightInfos = true;
			val.invisibilityCount = 0;
			val.temporaryOverlays = new List<TemporaryOverlayInstance>();
			if (!flag)
			{
				SetupCustomRendererInfos(val, customInfos);
			}
			else
			{
				SetupPreAttachedRendererInfos(val);
			}
			SetupHurtboxGroup(bodyPrefab, ((Component)val).gameObject);
			SetupAimAnimator(bodyPrefab, ((Component)val).gameObject);
			SetupFootstepController(((Component)val).gameObject);
			SetupRagdoll(((Component)val).gameObject);
			return val;
		}

		public static void SetupPreAttachedRendererInfos(CharacterModel characterModel)
		{
			for (int i = 0; i < characterModel.baseRendererInfos.Length; i++)
			{
				if ((Object)(object)characterModel.baseRendererInfos[i].defaultMaterial == (Object)null)
				{
					characterModel.baseRendererInfos[i].defaultMaterial = characterModel.baseRendererInfos[i].renderer.sharedMaterial;
				}
				if ((Object)(object)characterModel.baseRendererInfos[i].defaultMaterial == (Object)null)
				{
					Log.Error($"no material for rendererinfo of this renderer: {characterModel.baseRendererInfos[i].renderer}");
				}
				characterModel.baseRendererInfos[i].defaultMaterial.ConvertDefaultShaderToHopoo();
			}
		}

		public static void SetupCustomRendererInfos(CharacterModel characterModel, CustomRendererInfo[] customInfos)
		{
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			ChildLocator component = ((Component)characterModel).GetComponent<ChildLocator>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				Log.Error("Failed CharacterModel setup: ChildLocator component does not exist on the model");
				return;
			}
			List<RendererInfo> list = new List<RendererInfo>();
			for (int i = 0; i < customInfos.Length; i++)
			{
				if (!Object.op_Implicit((Object)(object)component.FindChild(customInfos[i].childName)))
				{
					Log.Error("Trying to add a RendererInfo for a renderer that does not exist: " + customInfos[i].childName);
					continue;
				}
				Renderer component2 = ((Component)component.FindChild(customInfos[i].childName)).GetComponent<Renderer>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					Material val = customInfos[i].material;
					if ((Object)(object)val == (Object)null)
					{
						val = ((!customInfos[i].dontHotpoo) ? component2.sharedMaterial.ConvertDefaultShaderToHopoo() : component2.sharedMaterial);
					}
					list.Add(new RendererInfo
					{
						renderer = component2,
						defaultMaterial = val,
						ignoreOverlays = customInfos[i].ignoreOverlays,
						defaultShadowCastingMode = (ShadowCastingMode)1
					});
				}
			}
			characterModel.baseRendererInfos = list.ToArray();
		}

		private static void SetupHurtboxGroup(GameObject bodyPrefab, GameObject model)
		{
			SetupMainHurtboxesFromChildLocator(bodyPrefab, model);
			SetHurtboxesHealthComponents(bodyPrefab);
		}

		private static void SetupMainHurtboxesFromChildLocator(GameObject bodyPrefab, GameObject model)
		{
			//IL_011e: 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)
			if ((Object)(object)bodyPrefab.GetComponent<HurtBoxGroup>() != (Object)null)
			{
				Log.Debug("Hitboxgroup already exists on model prefab. aborting code setup");
				return;
			}
			ChildLocator component = model.GetComponent<ChildLocator>();
			if (!Object.op_Implicit((Object)(object)component.FindChild("MainHurtbox")))
			{
				Log.Error("Could not set up main hurtbox: make sure you have a transform pair in your prefab's ChildLocator called 'MainHurtbox'");
				return;
			}
			HurtBoxGroup val = model.AddComponent<HurtBoxGroup>();
			HurtBox val2 = null;
			GameObject val3 = component.FindChildGameObject("HeadHurtbox");
			if (Object.op_Implicit((Object)(object)val3))
			{
				Log.Debug("HeadHurtboxFound. Setting up");
				val2 = val3.AddComponent<HurtBox>();
				((Component)val2).gameObject.layer = LayerIndex.entityPrecise.intVal;
				val2.healthComponent = bodyPrefab.GetComponent<HealthComponent>();
				val2.isBullseye = false;
				val2.isSniperTarget = true;
				val2.damageModifier = (DamageModifier)0;
				val2.hurtBoxGroup = val;
				val2.indexInGroup = 1;
			}
			HurtBox val4 = component.FindChildGameObject("MainHurtbox").AddComponent<HurtBox>();
			((Component)val4).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val4.healthComponent = bodyPrefab.GetComponent<HealthComponent>();
			val4.isBullseye = true;
			val4.isSniperTarget = (Object)(object)val2 == (Object)null;
			val4.damageModifier = (DamageModifier)0;
			val4.hurtBoxGroup = val;
			val4.indexInGroup = 0;
			if (Object.op_Implicit((Object)(object)val2))
			{
				val.hurtBoxes = (HurtBox[])(object)new HurtBox[2] { val4, val2 };
			}
			else
			{
				val.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val4 };
			}
			val.mainHurtBox = val4;
			val.bullseyeCount = 1;
		}

		public static void SetHurtboxesHealthComponents(GameObject bodyPrefab)
		{
			HealthComponent component = bodyPrefab.GetComponent<HealthComponent>();
			HurtBoxGroup[] componentsInChildren = bodyPrefab.GetComponentsInChildren<HurtBoxGroup>();
			foreach (HurtBoxGroup val in componentsInChildren)
			{
				val.mainHurtBox.healthComponent = component;
				for (int j = 0; j < val.hurtBoxes.Length; j++)
				{
					val.hurtBoxes[j].healthComponent = component;
				}
			}
		}

		private static void SetupFootstepController(GameObject model)
		{
			FootstepHandler val = model.AddComponent<FootstepHandler>();
			val.baseFootstepString = "Play_player_footstep";
			val.sprintFootstepOverrideString = "";
			val.enableFootstepDust = true;
			val.footstepDustPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/GenericFootstepDust");
		}

		private static void SetupRagdoll(GameObject model)
		{
			RagdollController component = model.GetComponent<RagdollController>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return;
			}
			if ((Object)(object)ragdollMaterial == (Object)null)
			{
				ragdollMaterial = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren<RagdollController>().bones[1]).GetComponent<Collider>().material;
			}
			Transform[] bones = component.bones;
			foreach (Transform val in bones)
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					((Component)val).gameObject.layer = LayerIndex.ragdoll.intVal;
					Collider component2 = ((Component)val).GetComponent<Collider>();
					if (Object.op_Implicit((Object)(object)component2))
					{
						component2.sharedMaterial = ragdollMaterial;
					}
					else
					{
						Log.Error($"Ragdoll bone {((Component)val).gameObject} doesn't have a collider. Ragdoll will break.");
					}
				}
			}
		}

		private static void SetupAimAnimator(GameObject prefab, GameObject model)
		{
			AimAnimator val = model.AddComponent<AimAnimator>();
			val.directionComponent = prefab.GetComponent<CharacterDirection>();
			val.pitchRangeMax = 60f;
			val.pitchRangeMin = -60f;
			val.yawRangeMin = -80f;
			val.yawRangeMax = 80f;
			val.pitchGiveupRange = 30f;
			val.yawGiveupRange = 10f;
			val.giveupDuration = 3f;
			val.inputBank = prefab.GetComponent<InputBankTest>();
		}

		public static void CreateGenericDoppelganger(GameObject bodyPrefab, string masterName, string masterToCopy)
		{
			CloneDopplegangerMaster(bodyPrefab, masterName, masterToCopy);
		}

		public static GameObject CloneDopplegangerMaster(GameObject bodyPrefab, string masterName, string masterToCopy)
		{
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/" + masterToCopy + "MonsterMaster"), masterName, true);
			val.GetComponent<CharacterMaster>().bodyPrefab = bodyPrefab;
			Content.AddMasterPrefab(val);
			return val;
		}

		public static GameObject CreateBlankMasterPrefab(GameObject bodyPrefab, string masterName)
		{
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/CommandoMonsterMaster"), masterName, true);
			ContentPacks.masterPrefabs.Add(val);
			CharacterMaster component = val.GetComponent<CharacterMaster>();
			component.bodyPrefab = bodyPrefab;
			AISkillDriver[] components = val.GetComponents<AISkillDriver>();
			for (int i = 0; i < components.Length; i++)
			{
				Object.Destroy((Object)(object)components[i]);
			}
			return val;
		}

		public static GameObject LoadMaster(this AssetBundle assetBundle, GameObject bodyPrefab, string assetName)
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = assetBundle.LoadAsset<GameObject>(assetName);
			BaseAI val2 = val.GetComponent<BaseAI>();
			if ((Object)(object)val2 == (Object)null)
			{
				val2 = val.AddComponent<BaseAI>();
				val2.aimVectorDampTime = 0.1f;
				val2.aimVectorMaxSpeed = 360f;
			}
			val2.scanState = new SerializableEntityStateType(typeof(Wander));
			EntityStateMachine component = val.GetComponent<EntityStateMachine>();
			if ((Object)(object)component == (Object)null)
			{
				AddEntityStateMachine(val, "AI", typeof(Wander), typeof(Wander));
			}
			val2.stateMachine = component;
			CharacterMaster val3 = val.GetComponent<CharacterMaster>();
			if ((Object)(object)val3 == (Object)null)
			{
				val3 = val.AddComponent<CharacterMaster>();
			}
			val3.bodyPrefab = bodyPrefab;
			val3.teamIndex = (TeamIndex)2;
			Content.AddMasterPrefab(val);
			return val;
		}

		public static void ClearEntityStateMachines(GameObject bodyPrefab)
		{
			EntityStateMachine[] components = bodyPrefab.GetComponents<EntityStateMachine>();
			for (int num = components.Length - 1; num >= 0; num--)
			{
				Object.DestroyImmediate((Object)(object)components[num]);
			}
			NetworkStateMachine component = bodyPrefab.GetComponent<NetworkStateMachine>();
			component.stateMachines = Array.Empty<EntityStateMachine>();
			CharacterDeathBehavior component2 = bodyPrefab.GetComponent<CharacterDeathBehavior>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.idleStateMachine = Array.Empty<EntityStateMachine>();
			}
			SetStateOnHurt component3 = bodyPrefab.GetComponent<SetStateOnHurt>();
			if (Object.op_Implicit((Object)(object)component3))
			{
				component3.idleStateMachine = Array.Empty<EntityStateMachine>();
			}
		}

		public static void AddMainEntityStateMachine(GameObject bodyPrefab, string machineName = "Body", Type mainStateType = null, Type initalStateType = null)
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			EntityStateMachine val = EntityStateMachine.FindByCustomName(bodyPrefab, machineName);
			if ((Object)(object)val == (Object)null)
			{
				val = bodyPrefab.AddComponent<EntityStateMachine>();
			}
			else
			{
				Log.Message("An Entity State Machine already exists with the name " + machineName + ". replacing.");
			}
			val.customName = machineName;
			if (mainStateType == null)
			{
				mainStateType = typeof(GenericCharacterMain);
			}
			val.mainStateType = new SerializableEntityStateType(mainStateType);
			if (initalStateType == null)
			{
				initalStateType = typeof(SpawnTeleporterState);
			}
			val.initialStateType = new SerializableEntityStateType(initalStateType);
			NetworkStateMachine component = bodyPrefab.GetComponent<NetworkStateMachine>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.stateMachines = component.stateMachines.Append(val).ToArray();
			}
			CharacterDeathBehavior component2 = bodyPrefab.GetComponent<CharacterDeathBehavior>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.deathStateMachine = val;
			}
			SetStateOnHurt component3 = bodyPrefab.GetComponent<SetStateOnHurt>();
			if (Object.op_Implicit((Object)(object)component3))
			{
				component3.targetStateMachine = val;
			}
		}

		public static void AddEntityStateMachine(GameObject prefab, string machineName, Type mainStateType = null, Type initalStateType = null)
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			EntityStateMachine val = EntityStateMachine.FindByCustomName(prefab, machineName);
			if ((Object)(object)val == (Object)null)
			{
				val = prefab.AddComponent<EntityStateMachine>();
			}
			else
			{
				Log.Message("An Entity State Machine already exists with the name " + machineName + ". replacing.");
			}
			val.customName = machineName;
			if (mainStateType == null)
			{
				mainStateType = typeof(Idle);
			}
			val.mainStateType = new SerializableEntityStateType(mainStateType);
			if (initalStateType == null)
			{
				initalStateType = typeof(Idle);
			}
			val.initialStateType = new SerializableEntityStateType(initalStateType);
			NetworkStateMachine component = prefab.GetComponent<NetworkStateMachine>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.stateMachines = component.stateMachines.Append(val).ToArray();
			}
			CharacterDeathBehavior component2 = prefab.GetComponent<CharacterDeathBehavior>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.idleStateMachine = component2.idleStateMachine.Append(val).ToArray();
			}
			SetStateOnHurt component3 = prefab.GetComponent<SetStateOnHurt>();
			if (Object.op_Implicit((Object)(object)component3))
			{
				component3.idleStateMachine = component3.idleStateMachine.Append(val).ToArray();
			}
		}

		public static void SetupHitBoxGroup(GameObject modelPrefab, string hitBoxGroupName, params string[] hitboxChildNames)
		{
			ChildLocator component = modelPrefab.GetComponent<ChildLocator>();
			Transform[] array = (Transform[])(object)new Transform[hitboxChildNames.Length];
			for (int i = 0; i < hitboxChildNames.Length; i++)
			{
				array[i] = component.FindChild(hitboxChildNames[i]);
				if ((Object)(object)array[i] == (Object)null)
				{
					Log.Error("missing hitbox for " + hitboxChildNames[i]);
				}
			}
			SetupHitBoxGroup(modelPrefab, hitBoxGroupName, array);
		}

		public static void SetupHitBoxGroup(GameObject prefab, string hitBoxGroupName, params Transform[] hitBoxTransforms)
		{
			List<HitBox> list = new List<HitBox>();
			foreach (Transform val in hitBoxTransforms)
			{
				if ((Object)(object)val == (Object)null)
				{
					Log.Error("Error setting up hitboxGroup for " + hitBoxGroupName + ": hitbox transform was null");
					continue;
				}
				HitBox item = ((Component)val).gameObject.AddComponent<HitBox>();
				((Component)val).gameObject.layer = LayerIndex.projectile.intVal;
				list.Add(item);
			}
			if (list.Count == 0)
			{
				Log.Error("No hitboxes were set up. aborting setting up hitboxGroup for " + hitBoxGroupName);
				return;
			}
			HitBoxGroup val2 = prefab.AddComponent<HitBoxGroup>();
			val2.hitBoxes = list.ToArray();
			val2.groupName = hitBoxGroupName;
		}
	}
	internal static class Materials
	{
		private static List<Material> cachedMaterials = new List<Material>();

		internal static Shader hotpoo = LegacyResourcesAPI.Load<Shader>("Shaders/Deferred/HGStandard");

		public static List<Material> MaterialsWithSwappedShaders { get; } = new List<Material>();


		internal static void GetMaterial(GameObject model, string childObject, Color color, ref Material material, float scaleMultiplier = 1f, bool replaceAll = false)
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			Renderer[] componentsInChildren = model.GetComponentsInChildren<Renderer>();
			Renderer[] array = componentsInChildren;
			foreach (Renderer val in array)
			{
				Renderer val2 = val;
				if (string.Equals(((Object)val).name, childObject))
				{
					if (color == Color.clear)
					{
						Object.Destroy((Object)(object)val);
						break;
					}
					if ((Object)(object)material == (Object)null)
					{
						material = new Material(val.material);
						material.mainTexture = val.material.mainTexture;
						material.shader = val.material.shader;
						material.color = color;
					}
					val.material = material;
					Transform transform = ((Component)val).transform;
					transform.localScale *= scaleMultiplier;
					if (!replaceAll)
					{
						break;
					}
				}
			}
		}

		internal static void DebugMaterial(GameObject model)
		{
			Renderer[] componentsInChildren = model.GetComponentsInChildren<Renderer>();
			Renderer[] array = componentsInChildren;
			foreach (Renderer val in array)
			{
				Renderer val2 = val;
				Debug.Log((object)("Material: " + ((Object)val2).name.ToString()));
			}
		}

		public static void SwapShadersFromMaterialsInBundle(AssetBundle bundle)
		{
			SwapAllShaders(bundle);
		}

		internal static void SwapAllShaders(AssetBundle assetBundle)
		{
			Material[] array = assetBundle.LoadAllAssets<Material>();
			foreach (Material val in array)
			{
				Log.Debug("Trying to swap shader for " + ((Object)val).name);
				TrySwapShader(val);
			}
		}

		internal static void TrySwapShader(Material material)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			string name = ((Object)material.shader).name;
			if (name.Contains("Stubbed"))
			{
				name = name.Replace("Stubbed", string.Empty) + ".shader";
				Shader val = Addressables.LoadAssetAsync<Shader>((object)name).WaitForCompletion();
				if ((Object)(object)val != (Object)null)
				{
					material.shader = val;
				}
				else
				{
					Log.Error("Failed to load shader " + name);
				}
			}
			else if (name == "Standard")
			{
				Texture texture = material.GetTexture("_BumpMap");
				float @float = material.GetFloat("_BumpScale");
				Texture texture2 = material.GetTexture("_EmissionMap");
				material.shader = Resources.Load<Shader>("Shaders/Deferred/HGStandard");
				material.SetTexture("_NormalMap", texture);
				material.SetFloat("_NormalStrength", @float);
				material.SetTexture("_EmTex", texture2);
				material.SetColor("_EmColor", new Color(0.2f, 0.2f, 0.2f));
				material.SetFloat("_EmPower", 0.15f);
			}
		}

		private static void SwapShader(Material material)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			string text = ((Object)material.shader).name.Substring("Stubbed".Length);
			string text2 = text + ".shader";
			Shader shader = Addressables.LoadAssetAsync<Shader>((object)text2).WaitForCompletion();
			material.shader = shader;
			MaterialsWithSwappedShaders.Add(material);
		}

		public static Material LoadMaterial(this AssetBundle assetBundle, string materialName)
		{
			return assetBundle.CreateHopooMaterialFromBundle(materialName);
		}

		public static Material CreateHopooMaterialFromBundle(this AssetBundle assetBundle, string materialName)
		{
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			Material val = cachedMaterials.Find(delegate(Material mat)
			{
				materialName.Replace(" (Instance)", "");
				return ((Object)mat).name.Contains(materialName);
			});
			if (Object.op_Implicit((Object)(object)val))
			{
				Log.Debug(((Object)val).name + " has already been loaded. returning cached");
				return val;
			}
			val = assetBundle.LoadAsset<Material>(materialName);
			if (!Object.op_Implicit((Object)(object)val))
			{
				Log.ErrorAssetBundle(materialName, ((Object)assetBundle).name);
				return new Material(hotpoo);
			}
			return val.ConvertDefaultShaderToHopoo();
		}

		public static Material SetHopooMaterial(this Material tempMat)
		{
			return tempMat.ConvertDefaultShaderToHopoo();
		}

		public static Material ConvertDefaultShaderToHopoo(this Material tempMat)
		{
			//IL_007d: 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)
			if (cachedMaterials.Contains(tempMat))
			{
				Log.Debug(((Object)tempMat).name + " has already been loaded. returning cached");
				return tempMat;
			}
			float? num = null;
			Color? val = null;
			if (tempMat.IsKeywordEnabled("_NORMALMAP"))
			{
				num = tempMat.GetFloat("_BumpScale");
			}
			if (tempMat.IsKeywordEnabled("_EMISSION"))
			{
				val = tempMat.GetColor("_EmissionColor");
			}
			tempMat.shader = hotpoo;
			tempMat.SetTexture("_EmTex", tempMat.GetTexture("_EmissionMap"));
			tempMat.EnableKeyword("DITHER");
			if (num.HasValue)
			{
				tempMat.SetFloat("_NormalStrength", num.Value);
				tempMat.SetTexture("_NormalTex", tempMat.GetTexture("_BumpMap"));
			}
			if (val.HasValue)
			{
				tempMat.SetColor("_EmColor", val.Value);
				tempMat.SetFloat("_EmPower", 1f);
			}
			if (tempMat.IsKeywordEnabled("NOCULL"))
			{
				tempMat.SetInt("_Cull", 0);
			}
			if (tempMat.IsKeywordEnabled("LIMBREMOVAL"))
			{
				tempMat.SetInt("_LimbRemovalOn", 1);
			}
			cachedMaterials.Add(tempMat);
			return tempMat;
		}

		public static Material MakeUnique(this Material material)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			if (cachedMaterials.Contains(material))
			{
				return new Material(material);
			}
			return material;
		}

		public static Material SetColor(this Material material, Color color)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			material.SetColor("_Color", color);
			return material;
		}

		public static Material SetNormal(this Material material, float normalStrength = 1f)
		{
			material.SetFloat("_NormalStrength", normalStrength);
			return material;
		}

		public static Material SetEmission(this Material material)
		{
			return material.SetEmission(1f);
		}

		public static Material SetEmission(this Material material, float emission)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return material.SetEmission(emission, Color.white);
		}

		public static Material SetEmission(this Material material, float emission, Color emissionColor)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			material.SetFloat("_EmPower", emission);
			material.SetColor("_EmColor", emissionColor);
			return material;
		}

		public static Material SetCull(this Material material, bool cull = false)
		{
			material.SetInt("_Cull", cull ? 1 : 0);
			return material;
		}

		public static Material SetSpecular(this Material material, float strength)
		{
			material.SetFloat("_SpecularStrength", strength);
			return material;
		}

		public static Material SetSpecular(this Material material, float strength, float exponent)
		{
			material.SetFloat("_SpecularStrength", strength);
			material.SetFloat("SpecularExponent", exponent);
			return material;
		}
	}
	internal static class Particles
	{
		internal static void GetParticle(GameObject model, string childObject, Color color, float sizeMultiplier = 1f, bool replaceAll = false)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: 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_0077: 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)
			ParticleSystem[] componentsInChildren = model.GetComponentsInChildren<ParticleSystem>();
			ParticleSystem[] array = componentsInChildren;
			foreach (ParticleSystem val in array)
			{
				ParticleSystem val2 = val;
				MainModule main = val2.main;
				ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime;
				ColorBySpeedModule colorBySpeed = val2.colorBySpeed;
				if (string.Equals(((Object)val2).name, childObject))
				{
					((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color);
					((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * sizeMultiplier;
					((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(color);
					((ColorBySpeedModule)(ref colorBySpeed)).color = MinMaxGradient.op_Implicit(color);
					if (!replaceAll)
					{
						break;
					}
				}
			}
		}

		internal static void DebugParticleSystem(GameObject model)
		{
			ParticleSystem[] componentsInChildren = model.GetComponentsInChildren<ParticleSystem>();
			ParticleSystem[] array = componentsInChildren;
			foreach (ParticleSystem val in array)
			{
				ParticleSystem val2 = val;
				Debug.Log((object)("Particle: " + ((Object)val2).name.ToString()));
			}
		}
	}
	internal class Content
	{
		internal static void AddExpansionDef(ExpansionDef expansion)
		{
			ContentPacks.expansionDefs.Add(expansion);
		}

		internal static void AddCharacterBodyPrefab(GameObject bprefab)
		{
			ContentPacks.bodyPrefabs.Add(bprefab);
		}

		internal static void AddMasterPrefab(GameObject prefab)
		{
			ContentPacks.masterPrefabs.Add(prefab);
		}

		internal static void AddProjectilePrefab(GameObject prefab)
		{
			ContentPacks.projectilePrefabs.Add(prefab);
		}

		internal static void AddSurvivorDef(SurvivorDef survivorDef)
		{
			ContentPacks.survivorDefs.Add(survivorDef);
		}

		internal static void AddVoidItemRelationship(ItemDef itemToCorrupt, ItemDef itemThatCorrupts)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			ItemRelationshipProvider val = ScriptableObject.CreateInstance<ItemRelationshipProvider>();
			((Object)val).name = ((Object)itemThatCorrupts).name + ((Object)itemToCorrupt).name + "Relationship";
			val.relationshipType = Addressables.LoadAssetAsync<ItemRelationshipType>((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion();
			val.relationships = (Pair[])(object)new Pair[1]
			{
				new Pair
				{
					itemDef1 = itemToCorrupt,
					itemDef2 = itemThatCorrupts
				}
			};
			ContentPacks.itemRelationships.Add(val);
		}

		internal static void AddItemDef(ItemDef itemDef)
		{
			ContentPacks.itemDefs.Add(itemDef);
		}

		internal static void AddCraftableDef(CraftableDef itemDef)
		{
			ContentPacks.craftableDefs.Add(itemDef);
		}

		internal static void AddEliteDef(EliteDef eliteDef)
		{
			ContentPacks.eliteDefs.Add(eliteDef);
		}

		internal static void AddArtifactDef(ArtifactDef artifactDef)
		{
			ContentPacks.artifactDefs.Add(artifactDef);
		}

		internal static void AddNetworkedObjectPrefab(GameObject prefab)
		{
			ContentPacks.networkedObjectPrefabs.Add(prefab);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			CreateSurvivor(bodyPrefab, displayPrefab, charColor, tokenPrefix, null, 100f);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix, float sortPosition)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			CreateSurvivor(bodyPrefab, displayPrefab, charColor, tokenPrefix, null, sortPosition);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix, UnlockableDef unlockableDef)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			CreateSurvivor(bodyPrefab, displayPrefab, charColor, tokenPrefix, unlockableDef, 100f);
		}

		internal static void CreateSurvivor(GameObject bodyPrefab, GameObject displayPrefab, Color charColor, string tokenPrefix, UnlockableDef unlockableDef, float sortPosition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
			val.bodyPrefab = bodyPrefab;
			val.displayPrefab = displayPrefab;
			val.primaryColor = charColor;
			val.cachedName = ((Object)bodyPrefab).name.Replace("Body", "");
			val.displayNameToken = tokenPrefix + "NAME";
			val.descriptionToken = tokenPrefix + "DESCRIPTION";
			val.outroFlavorToken = tokenPrefix + "OUTRO_FLAVOR";
			val.mainEndingEscapeFailureFlavorToken = tokenPrefix + "OUTRO_FAILURE";
			val.desiredSortPosition = sortPosition;
			val.unlockableDef = unlockableDef;
			AddSurvivorDef(val);
		}

		internal static void AddUnlockableDef(UnlockableDef unlockableDef)
		{
			ContentPacks.unlockableDefs.Add(unlockableDef);
		}

		internal static UnlockableDef CreateAndAddUnlockbleDef(string identifier, string nameToken, Sprite achievementIcon)
		{
			UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>();
			val.cachedName = identifier;
			val.nameToken = nameToken;
			val.achievementIcon = achievementIcon;
			AddUnlockableDef(val);
			return val;
		}

		internal static void AddSkillDef(SkillDef skillDef)
		{
			ContentPacks.skillDefs.Add(skillDef);
		}

		internal static void AddSkillFamily(SkillFamily skillFamily)
		{
			ContentPacks.skillFamilies.Add(skillFamily);
		}

		internal static void AddEntityState(Type entityState)
		{
			ContentPacks.entityStates.Add(entityState);
		}

		internal static void AddBuffDef(BuffDef buffDef)
		{
			ContentPacks.buffDefs.Add(buffDef);
		}

		internal static BuffDef CreateAndAddBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, StackingDisplayMethod stackingDisplayMethod = 0)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = buffName;
			val.buffColor = buffColor;
			val.canStack = canStack;
			val.isDebuff = isDebuff;
			val.eliteDef = null;
			val.iconSprite = buffIcon;
			val.stackingDisplayMethod = stackingDisplayMethod;
			AddBuffDef(val);
			return val;
		}

		internal static void AddEffectDef(EffectDef effectDef)
		{
			ContentPacks.effectDefs.Add(effectDef);
		}

		internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			EffectDef val = new EffectDef(effectPrefab);
			AddEffectDef(val);
			return val;
		}

		internal static void AddNetworkSoundEventDef(NetworkSoundEventDef networkSoundEventDef)
		{
			ContentPacks.networkSoundEventDefs.Add(networkSoundEventDef);
		}

		internal static NetworkSoundEventDef CreateAndAddNetworkSoundEventDef(string eventName)
		{
			NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
			val.akId = AkSoundEngine.GetIDFromString(eventName);
			val.eventName = eventName;
			AddNetworkSoundEventDef(val);
			return val;
		}
	}
	internal static class Skills
	{
		public static Dictionary<string, SkillLocator> characterSkillLocators = new Dictionary<string, SkillLocator>();

		public static void CreateSkillFamilies(GameObject targetPrefab)
		{
			SkillSlot[] array = new SkillSlot[4];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			CreateSkillFamilies(targetPrefab, (SkillSlot[])(object)array);
		}

		public static void CreateSkillFamilies(GameObject targetPrefab, params SkillSlot[] slots)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: 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_002f: Expected I4, but got Unknown
			SkillLocator component = targetPrefab.GetComponent<SkillLocator>();
			foreach (SkillSlot val in slots)
			{
				SkillSlot val2 = val;
				switch (val2 - -1)
				{
				case 1:
					component.primary = CreateGenericSkillWithSkillFamily(targetPrefab, "Primary");
					break;
				case 2:
					component.secondary = CreateGenericSkillWithSkillFamily(targetPrefab, "Secondary");
					break;
				case 3:
					component.utility = CreateGenericSkillWithSkillFamily(targetPrefab, "Utility");
					break;
				case 4:
					component.special = CreateGenericSkillWithSkillFamily(targetPrefab, "Special");
					break;
				}
			}
		}

		public static void ClearGenericSkills(GameObject targetPrefab)
		{
			GenericSkill[] componentsInChildren = targetPrefab.GetComponentsInChildren<GenericSkill>();
			foreach (GenericSkill val in componentsInChildren)
			{
				Object.DestroyImmediate((Object)(object)val);
			}
		}

		public static GenericSkill CreateGenericSkillWithSkillFamily(GameObject targetPrefab, SkillSlot skillSlot, bool hidden = false)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected I4, but got Unknown
			SkillLocator component = targetPrefab.GetComponent<SkillLocator>();
			switch (skillSlot - -1)
			{
			case 1:
				return component.primary = CreateGenericSkillWithSkillFamily(targetPrefab, "Primary", hidden);
			case 2:
				return component.secondary = CreateGenericSkillWithSkillFamily(targetPrefab, "Secondary", hidden);
			case 3:
				return component.utility = CreateGenericSkillWithSkillFamily(targetPrefab, "Utility", hidden);
			case 4:
				return component.special = CreateGenericSkillWithSkillFamily(targetPrefab, "Special", hidden);
			case 0:
				Log.Error("Failed to create GenericSkill with skillslot None. If making a GenericSkill outside of the main 4, specify a familyName, and optionally a genericSkillName");
				return null;
			default:
				return null;
			}
		}

		public static GenericSkill CreateGenericSkillWithSkillFamily(GameObject targetPrefab, string familyName, bool hidden = false)
		{
			return CreateGenericSkillWithSkillFamily(targetPrefab, familyName, familyName, hidden);
		}

		public static GenericSkill CreateGenericSkillWithSkillFamily(GameObject targetPrefab, string genericSkillName, string familyName, bool hidden = false)
		{
			GenericSkill val = targetPrefab.AddComponent<GenericSkill>();
			val.skillName = genericSkillName;
			val.hideInCharacterSelect = hidden;
			SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
			((Object)val2).name = ((Object)targetPrefab).name + familyName + "Family";
			val2.variants = (Variant[])(object)new Variant[0];
			val._skillFamily = val2;
			Content.AddSkillFamily(val2);
			return val;
		}

		public static void AddSkillToFamily(SkillFamily skillFamily, SkillDef skillDef, UnlockableDef unlockableDef = null)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val = new Variant
			{
				skillDef = skillDef,
				unlockableDef = unlockableDef
			};
			((Variant)(ref val)).viewableNode = new Node(skillDef.skillNameToken, false, (Node)null);
			variants[num] = val;
		}

		public static void AddSkillsToFamily(SkillFamily skillFamily, params SkillDef[] skillDefs)
		{
			foreach (SkillDef skillDef in skillDefs)
			{
				AddSkillToFamily(skillFamily, skillDef);
			}
		}

		public static void AddPrimarySkills(GameObject targetPrefab, params SkillDef[] skillDefs)
		{
			AddSkillsToFamily(targetPrefab.GetComponent<SkillLocator>().primary.skillFamily, skillDefs);
		}

		public static void AddSecondarySkills(GameObject targetPrefab, params SkillDef[] skillDefs)
		{
			AddSkillsToFamily(targetPrefab.GetComponent<SkillLocator>().secondary.skillFamily, skillDefs);
		}

		public static void AddUtilitySkills(GameObject targetPrefab, params SkillDef[] skillDefs)
		{
			AddSkillsToFamily(targetPrefab.GetComponent<SkillLocator>().utility.skillFamily, skillDefs);
		}

		public static void AddSpecialSkills(GameObject targetPrefab, params SkillDef[] skillDefs)
		{
			AddSkillsToFamily(targetPrefab.GetComponent<SkillLocator>().special.skillFamily, skillDefs);
		}

		public static void AddUnlockablesToFamily(SkillFamily skillFamily, params UnlockableDef[] unlockableDefs)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < unlockableDefs.Length; i++)
			{
				Variant val = skillFamily.variants[i];
				val.unlockableDef = unlockableDefs[i];
				skillFamily.variants[i] = val;
			}
		}

		public static Combo ComboFromType(Type t)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown res

RiskierRain.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.BeetleQueenMonster;
using EntityStates.ClayBruiser.Weapon;
using EntityStates.GoldGat;
using EntityStates.Gup;
using EntityStates.ImpBossMonster;
using EntityStates.LunarWisp;
using EntityStates.Missions.Arena.NullWard;
using EntityStates.NullifierMonster;
using EntityStates.QuestVolatileBattery;
using EntityStates.ShrineHalcyonite;
using EntityStates.VagrantMonster;
using EntityStates.VagrantNovaItem;
using FabricatorStandalone;
using HG;
using IL.RoR2;
using IL.RoR2.Artifacts;
using IL.RoR2.Items;
using IL.RoR2.Orbs;
using IL.RoR2.Projectile;
using IL.RoR2.Skills;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using MoreStats;
using On.EntityStates.CaptainSupplyDrop;
using On.EntityStates.ClayBruiser.Weapon;
using On.EntityStates.Gup;
using On.EntityStates.LunarWisp;
using On.EntityStates.Missions.Arena.NullWard;
using On.EntityStates.NullifierMonster;
using On.EntityStates.QuestVolatileBattery;
using On.EntityStates.ShrineHalcyonite;
using On.EntityStates.VagrantMonster;
using On.EntityStates.VagrantNovaItem;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.Orbs;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RainrotSharedUtils.Difficulties;
using RainrotSharedUtils.Shelters;
using RiskierRain.Changes.Components;
using RiskierRain.Components;
using RiskierRain.CoreModules;
using RoR2;
using RoR2.ContentManagement;
using RoR2.Items;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using RoR2BepInExPack.GameAssetPathsBetter;
using SwanSongExtended;
using SwanSongExtended.Modules;
using SwanSongExtended.Storms;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.ResourceManagement.AsyncOperations;

[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 = "")]
[assembly: AssemblyCompany("RiskierRain")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RiskierRain")]
[assembly: AssemblyTitle("RiskierRain")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace RiskierRain
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.RiskOfBrainrot.RiskierRain", "RiskierRain", "1.3.9")]
	[R2APISubmoduleDependency(new string[] { "LanguageAPI", "PrefabAPI", "DirectorAPI", "ItemAPI", "RecalculateStatsAPI", "EliteAPI" })]
	internal class RiskierRainPlugin : BaseUnityPlugin
	{
		public delegate bool orig_getHasOneShotProtection(CharacterBody self);

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			public static Func<float, float> <>9__26_14;

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

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

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

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

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

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

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

			public static Func<uint> <>9__143_2;

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

			public static Action<CharacterBody> <>9__204_1;

			public static hook_OnEnter <>9__215_0;

			public static hook_OnEnter <>9__215_1;

			public static hook_OnEnter <>9__250_0;

			public static hook_OnEnter <>9__274_1;

			public static hook_OnEnter <>9__274_2;

			public static hook_OnEnter <>9__274_3;

			public static hook_OnEnter <>9__275_1;

			public static hook_OnEnter <>9__275_2;

			public static hook_OnEnter <>9__275_3;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			public static Func<int, int, CharacterBody, int> <>9__335_7;

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

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

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

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

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

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

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

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

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

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

			public static Func<int, HealthComponent, int> <>9__357_2;

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

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

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

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

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

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

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

			public static Func<float, int, float> <>9__371_4;

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

			public static Func<ChestBehavior, int, ChestBehavior> <>9__373_2;

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

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

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

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

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

			public static Func<ChestBehavior, int, int> <>9__374_8;

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

			public static Func<RouletteChestController, int, int> <>9__374_10;

			public static Action<BasicPickupDropTable> <>9__377_0;

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

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

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

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

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

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

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

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

			public static Action<GameObject> <>9__390_0;

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

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

			public static Func<float, ElusiveAntlersBehavior, float> <>9__391_2;

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

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

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

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

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

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

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

			public static Action<HealthComponent, float> <>9__405_1;

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

			public static Func<float, float> <>9__406_1;

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

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

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

			public static Func<float, GenericSkill, float> <>9__407_2;

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

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

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

			public static Func<float, int, CharacterBody, float> <>9__413_5;

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

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

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

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

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

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

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

			public static Func<float, CharacterBody, float> <>9__427_0;

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

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

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

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

			public static Func<float, SprintWispBodyBehavior, float> <>9__463_1;

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

			public static Func<Vector3, DevilOrb, Vector3> <>9__465_1;

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

			public static Func<float, DamageReport, int, float> <>9__466_1;

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

			public static Func<float, DamageReport, int, float> <>9__466_3;

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

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

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

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

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

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

			public static Func<float, int, float> <>9__467_6;

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

			public static Func<float, DamageReport, int, float> <>9__467_8;

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

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

			public static Func<float, int, float> <>9__468_3;

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

			public static Func<float, int, float> <>9__468_5;

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

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

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

			public static Func<float, int, float> <>9__469_4;

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

			public static Func<float, int, float> <>9__469_6;

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

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

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

			public static Func<float, CharacterBody, float> <>9__478_6;

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

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

			public static Func<float, CharacterBody, float> <>9__478_10;

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

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

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

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

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

			public static Func<float, CharacterBody, float> <>9__479_9;

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

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

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

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

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

			public static Func<float, CharacterBody, float> <>9__480_9;

			public static Func<GameObject, bool> <>9__483_0;

			public static Func<GameObject, bool> <>9__483_1;

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

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

			public static Action<CharacterBody, BuffDef, float, float> <>9__501_3;

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

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

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

			public static Func<float, HealthComponent, float> <>9__502_3;

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

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

			public static Func<float, float> <>9__531_2;

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

			public static Action <>9__532_1;

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

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

			public static Func<int, CharacterMaster, int> <>9__534_2;

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

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

			public static Func<float, int, float> <>9__535_3;

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

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

			public static Action <>9__536_3;

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

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

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

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

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

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

			public static Func<float, float> <>9__564_3;

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

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

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

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

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

			public static Func<float, float, float> <>9__570_5;

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

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

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

			public static Func<float, float, float> <>9__574_5;

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

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

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

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

			public static Func<DamageTypeCombo, DamageTypeCombo> <>9__589_1;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			public static Func<float, JumpDamageStrikeBodyBehavior, float> <>9__597_2;

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

			public static Func<float> <>9__598_1;

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

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

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

			public static Func<float, int, float> <>9__610_4;

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

			public static Func<float, float> <>9__610_6;

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

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

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

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

			public static Func<float, int, float> <>9__611_5;

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

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

			public static Func<float, float> <>9__611_8;

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

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

			public static Func<float, int, float> <>9__612_3;

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

			public static Func<float, float> <>9__614_1;

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

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

			public static Func<Type, bool> <>9__667_0;

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

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

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

			internal bool <DirectorCreditGainChanges>b__25_3(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

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

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

			internal bool <AmbientLevelChanges>b__26_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <AmbientLevelChanges>b__26_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Mathf>(x, "Floor");
			}

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

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

			internal bool <AmbientLevelChanges>b__26_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount");
			}

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

			internal bool <AmbientLevelChanges>b__26_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

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

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

			internal bool <AmbientLevelChanges>b__26_12(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount");
			}

			internal bool <AmbientLevelChanges>b__26_13(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<Run>(x, "ambientLevelCap");
			}

			internal float <AmbientLevelChanges>b__26_14(float levelIn)
			{
				float ambientLevelBoost = GetAmbientLevelBoost();
				return levelIn + ambientLevelBoost;
			}

			internal bool <ChangeRequiredDifficultyLevelForStats>b__62_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty");
			}

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

			internal bool <RemoveEclipseEffect>b__64_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty");
			}

			internal bool <EclipseHoldoutScale>b__66_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty");
			}

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

			internal bool <EclipseHoldoutScale>b__66_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "get_fullHealth");
			}

			internal bool <ShrineBloodReward>b__143_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ShrineBloodBehavior>(x, "goldToPaidHpRatio");
			}

			internal uint <ShrineBloodReward>b__143_2()
			{
				return (uint)Run.instance.GetDifficultyScaledCost(25, Stage.instance.entryDifficultyCoefficient);
			}

			internal bool <SoulShrineLuckBuff>b__204_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraLifeBuff");
			}

			internal void <SoulShrineLuckBuff>b__204_1(CharacterBody body)
			{
				body.AddBuff(Assets.soulShrineLuckBuff);
			}

			internal void <FixJellyNuke>b__215_0(orig_OnEnter orig, ChargeMegaNova self)
			{
				orig.Invoke(self);
				self.duration = ChargeMegaNova.baseDuration;
				if (((EntityState)self).characterBody.attackSpeed > 1.5f)
				{
					self.duration = 2f;
				}
			}

			internal void <FixJellyNuke>b__215_1(orig_OnEnter orig, ChargeState self)
			{
				orig.Invoke(self);
				self.duration = 3f;
			}

			internal void <GupChanges>b__250_0(orig_OnEnter orig, BaseSplitDeath self)
			{
				self.moneyMultiplier = 0f;
				orig.Invoke(self);
			}

			internal void <NerfTemplar>b__274_1(orig_OnEnter orig, MinigunFire self)
			{
				MinigunFire.baseFireInterval = templarFireInterval * templarBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfTemplar>b__274_2(orig_OnEnter orig, MinigunSpinUp self)
			{
				MinigunSpinUp.baseDuration = templarSpinUpDuration * templarBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfTemplar>b__274_3(orig_OnEnter orig, MinigunSpinDown self)
			{
				MinigunSpinDown.baseDuration = templarSpinDownDuration * templarBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfChimeraWisp>b__275_1(orig_OnEnter orig, FireLunarGuns self)
			{
				FireLunarGuns.baseFireInterval = 0.1f * chimeraWispBaseAttackSpeed;
				FireLunarGuns.baseDuration = 4f * chimeraWispBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfChimeraWisp>b__275_2(orig_OnEnter orig, ChargeLunarGuns self)
			{
				ChargeLunarGuns.baseDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed;
				ChargeLunarGuns.spinUpDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfChimeraWisp>b__275_3(orig_OnEnter orig, SeekingBomb self)
			{
				SeekingBomb.spinUpDuration = 2f * chimeraWispBaseAttackSpeed;
				SeekingBomb.baseDuration = 3f * chimeraWispBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal bool <GummyInheritItems>b__305_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchNewobj<DirectorSpawnRequest>(x);
			}

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

			internal bool <CapacitorNerf>b__315_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <CapacitorNerf>b__315_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<GenericDamageOrb>(x, "damageValue");
			}

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

			internal bool <CapacitorBuff>b__316_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "falloffModel");
			}

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

			internal bool <CapacitorBuff>b__316_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "radius");
			}

			internal bool <GlassesNerf>b__319_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "CritGlasses");
			}

			internal bool <GlassesNerf>b__319_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <GlassesNerf>b__319_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <RemovePauldronAttackSpeed>b__324_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseAttackSpeed");
			}

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

			internal bool <RemovePauldronAttackSpeed>b__324_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "levelAttackSpeed");
			}

			internal bool <RemovePauldronAttackSpeed>b__324_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "WarCryBuff");
			}

			internal bool <RemovePauldronAttackSpeed>b__324_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "HasBuff");
			}

			internal bool <RemovePauldronAttackSpeed>b__324_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 1f);
			}

			internal bool <MeteorFix>b__327_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "falloffModel");
			}

			internal bool <InfusionBuff>b__335_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Infusion");
			}

			internal bool <InfusionBuff>b__335_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

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

			internal bool <InfusionBuff>b__335_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal int <InfusionBuff>b__335_7(int currentInfusionCap, int infusionCount, CharacterBody body)
			{
				float num = 100 * infusionCount;
				if ((Object)(object)body != (Object)null)
				{
					float num2 = 1f + 0.3f * (body.level - 1f);
					num = newInfusionBaseHealth * num2 * (float)infusionCount;
				}
				return (int)num;
			}

			internal bool <PolyluteDamage>b__345_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ChainLightningVoid");
			}

			internal bool <PolyluteDamage>b__345_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

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

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

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

			internal bool <ModifyFireShuriken>b__351_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_damage");
			}

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

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

			internal bool <FixLostSeersDamageImmunity>b__357_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritGlassesVoid");
			}

			internal bool <FixLostSeersDamageImmunity>b__357_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal int <FixLostSeersDamageImmunity>b__357_2(int lensCount, HealthComponent hc)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				CharacterBody body = hc.body;
				if (((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2048))
				{
					return 0;
				}
				return lensCount;
			}

			internal bool <FuelCellStock>b__362_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine");
			}

			internal bool <FuelCellStock>b__362_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <FuelCellCdr>b__363_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine");
			}

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

			internal bool <StickyBombRework>b__371_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "StickyBomb");
			}

			internal bool <StickyBombRework>b__371_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <StickyBombRework>b__371_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnHitProcDamage");
			}

			internal float <StickyBombRework>b__371_4(float damageCoefficient, int itemCount)
			{
				return stickyDamageCoeffBase + stickyDamageCoeffStack * (float)(itemCount - 1);
			}

			internal bool <SaleStarItemDrop>b__373_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<ChestBehavior>(x, "Roll");
			}

			internal ChestBehavior <SaleStarItemDrop>b__373_2(ChestBehavior chest, int droppedIndex)
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				if (droppedIndex + 1 >= chest.maxDropCount && chest.maxDropCount > chest.dropCount)
				{
					chest.maxDropCount = chest.dropCount;
					chest.dropTable = Addressables.LoadAssetAsync<PickupDropTable>((object)RoR2_Base_ShrineChance.dtShrineChance_asset).WaitForCompletion();
				}
				return chest;
			}

			internal bool <SaleStarOnInteraction>b__374_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<PurchaseInteraction>(x, "saleStarCompatible");
			}

			internal bool <SaleStarOnInteraction>b__374_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Inventory/ItemTransformation/TryTransformResult", "get_totalTransformed");
			}

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

			internal bool <SaleStarOnInteraction>b__374_4(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

			internal bool <SaleStarOnInteraction>b__374_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<ChestBehavior>(x, "dropCount");
			}

			internal int <SaleStarOnInteraction>b__374_8(ChestBehavior chest, int totalTransformed)
			{
				chest.maxDropCount = chest.dropCount;
				return chest.dropCount + totalTransformed;
			}

			internal bool <SaleStarOnInteraction>b__374_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<RouletteChestController>(x, "dropCount");
			}

			internal int <SaleStarOnInteraction>b__374_10(RouletteChestController chest, int totalTransformed)
			{
				return chest.dropCount + totalTransformed;
			}

			internal void <ChanceDollChanges>b__377_0(BasicPickupDropTable dropTable)
			{
				dropTable.tier2Weight = 0.65f;
				dropTable.tier3Weight = 0.3f;
				dropTable.bossWeight = 0.05f;
			}

			internal bool <ChanceDollActivationChance>b__378_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraShrineItem");
			}

			internal bool <ChanceDollActivationChance>b__378_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

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

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

			internal bool <ChanceDollActivationChance>b__378_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchAdd(x);
			}

			internal bool <ChanceDollActivationChance>b__378_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <WarpedEchoDamageReduction>b__382_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "DelayedDamage");
			}

			internal bool <WarpedEchoDamageReduction>b__382_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 0.9f);
			}

			internal void <ElusiveAntlersChanges>b__390_0(GameObject pickupObject)
			{
				BeginRapidlyActivatingAndDeactivating val = default(BeginRapidlyActivatingAndDeactivating);
				if (pickupObject.TryGetComponent<BeginRapidlyActivatingAndDeactivating>(ref val))
				{
					val.delayBeforeBeginningBlinking = elusiveAntlersPickupDuration - 2f;
				}
			}

			internal bool <ElusiveAntlersPickupInterval>b__391_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<ElusiveAntlersBehavior>(x, "spawnTimer");
			}

			internal bool <ElusiveAntlersPickupInterval>b__391_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<ElusiveAntlersBehavior>(x, "spawnTimer");
			}

			internal float <ElusiveAntlersPickupInterval>b__391_2(float timerOld, ElusiveAntlersBehavior self)
			{
				float num = elusiveAntlersPickupInterval;
				if (Object.op_Implicit((Object)(object)((ItemBehavior)self).body.inventory))
				{
					int itemCountEffective = ((ItemBehavior)self).body.inventory.GetItemCountEffective(Items.SpeedBoostPickup);
					if (itemCountEffective > 1)
					{
						num *= Mathf.Pow(1f - elusiveAntlersPickupIntervalReductionStack, (float)itemCountEffective - 1f);
					}
				}
				return num;
			}

			internal bool <ElusiveAntlersBuffMoveSpeed>b__393_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ElusiveAntlersBuff");
			}

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

			internal bool <ChangeLuminousShotStats>b__398_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage");
			}

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

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

			internal bool <ChangeLuminousShotStats>b__398_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <ChangeEclipseLiteToHealing>b__405_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "AddBarrierAuthority");
			}

			internal void <ChangeEclipseLiteToHealing>b__405_1(HealthComponent healthComponent, float value)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				ecliteThingy = healthComponent;
				healthComponent.Heal(value, default(ProcChainMask), true);
			}

			internal bool <RemoveEclipseLiteMaxHealthScaling>b__406_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_maxHealth");
			}

			internal float <RemoveEclipseLiteMaxHealthScaling>b__406_1(float maxHealthWhichFunctionsAsAMultiplier)
			{
				return 1f;
			}

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

			internal bool <RemoveEclipseLiteRestockScaling>b__407_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 2);
			}

			internal bool <RemoveEclipseLiteRestockScaling>b__407_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal float <RemoveEclipseLiteRestockScaling>b__407_2(float restocks, GenericSkill skill)
			{
				int rechargeStock = skill.skillDef.GetRechargeStock(skill);
				if (rechargeStock > 1)
				{
					restocks /= (float)rechargeStock;
				}
				return restocks;
			}

			internal bool <TopazBroochPercentBarrier>b__413_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BarrierOnKill");
			}

			internal bool <TopazBroochPercentBarrier>b__413_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_healthComponent");
			}

			internal bool <TopazBroochPercentBarrier>b__413_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "AddBarrier");
			}

			internal float <TopazBroochPercentBarrier>b__413_5(float barrierIn, int stack, CharacterBody body)
			{
				if ((Object)(object)body == (Object)null)
				{
					return barrierIn;
				}
				float num = broochPercentBase + broochPercentStack * (float)(stack - 1);
				return barrierIn + body.healthComponent.fullCombinedHealth * num;
			}

			internal bool <IncreaseBoxOfDynamiteDamage>b__417_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<FireProjectileInfo>(x, "damage");
			}

			internal bool <IncreaseBoxOfDynamiteDamage>b__417_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<BaseItemBodyBehavior>(x, "stack");
			}

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

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

			internal bool <WarbannerRadiusStacking>b__425_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<BuffWard>(x, "set_Networkradius");
			}

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

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

			internal float <WarbannerStatsScaleWithStacks>b__427_0(float idc, CharacterBody body)
			{
				if (!Object.op_Implicit((Object)(object)body.inventory))
				{
					return warbannerSpeedBase;
				}
				int itemCountEffective = body.inventory.GetItemCountEffective(Items.WardOnLevel);
				return warbannerSpeedBase + warbannerSpeedStack * (float)Mathf.Max(0, itemCountEffective - 1);
			}

			internal bool <WarbannerStatsScaleWithStacks>b__427_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "Warbanner");
			}

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

			internal bool <NkuhanasBuff>b__462_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DevilOrb>(x, "damageValue");
			}

			internal bool <NerfDiscipleDamage>b__463_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DevilOrb>(x, "damageValue");
			}

			internal float <NerfDiscipleDamage>b__463_1(float damageIn, SprintWispBodyBehavior behavior)
			{
				return damageIn / (float)((BaseItemBodyBehavior)behavior).stack;
			}

			internal bool <BuffDevilOrb>b__465_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DamageInfo>(x, "force");
			}

			internal Vector3 <BuffDevilOrb>b__465_1(Vector3 forceIn, DevilOrb orb)
			{
				//IL_0068: 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_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Invalid comparison between Unknown and I4
				//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_011c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0121: Unknown result type (might be due to invalid IL or missing references)
				//IL_0125: Unknown result type (might be due to invalid IL or missing references)
				//IL_0131: Unknown result type (might be due to invalid IL or missing references)
				//IL_0136: Unknown result type (might be due to invalid IL or missing references)
				//IL_0137: Unknown result type (might be due to invalid IL or missing references)
				//IL_0138: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_013c: Unknown result type (might be due to invalid IL or missing references)
				HealthComponent healthComponent = ((Orb)orb).target.healthComponent;
				float num = 1f;
				if ((Object)(object)healthComponent.body.characterMotor != (Object)null)
				{
					num = healthComponent.body.characterMotor.mass;
				}
				else if ((Object)(object)healthComponent.body.rigidbody != (Object)null)
				{
					num = healthComponent.body.rigidbody.mass;
				}
				EffectType effectType = orb.effectType;
				EffectType val = effectType;
				if ((int)val != 0)
				{
					if ((int)val == 1)
					{
						if (useDiscipleKnockbackSlow)
						{
							num *= 15f;
							healthComponent.body.AddTimedBuffAuthority(Buffs.Slow50.buffIndex, 3f);
						}
						else
						{
							num *= 0f;
						}
					}
				}
				else if (useNkuhanaKnockbackSlow)
				{
					num *= 25f;
					healthComponent.body.AddTimedBuffAuthority(Buffs.Slow50.buffIndex, 3f);
				}
				else
				{
					num *= 0f;
				}
				Vector3 val2 = ((Component)((Orb)orb).target).transform.position - orb.attacker.transform.position;
				return ((Vector3)(ref val2)).normalized * (100f + num);
			}

			internal bool <GasChanges>b__466_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<InflictDotInfo>(x, "totalDamage");
			}

			internal float <GasChanges>b__466_1(float currentDamage, DamageReport damageReport, int itemCount)
			{
				return (gasBaseBurnDamage + gasStackBurnDamage * (float)(itemCount - 1)) * damageReport.attackerBody.damage;
			}

			internal bool <GasChanges>b__466_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "baseDamage");
			}

			internal float <GasChanges>b__466_3(float currentDamage, DamageReport damageReport, int itemCount)
			{
				return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage;
			}

			internal bool <GasChangesOld>b__467_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 1.5f);
			}

			internal bool <GasChangesOld>b__467_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 1.5f);
			}

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

			internal bool <GasChangesOld>b__467_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <GasChangesOld>b__467_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <GasChangesOld>b__467_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchAdd(x);
			}

			internal float <GasChangesOld>b__467_6(float currentDuration, int itemCount)
			{
				return gasBaseBurnDamage + gasStackBurnDamage * (float)(itemCount - 1);
			}

			internal bool <GasChangesOld>b__467_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "baseDamage");
			}

			internal float <GasChangesOld>b__467_8(float currentDamage, DamageReport damageReport, int itemCount)
			{
				return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage;
			}

			internal bool <WillOWispChanges>b__468_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "ExplodeOnDeath");
			}

			internal bool <WillOWispChanges>b__468_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage");
			}

			internal float <WillOWispChanges>b__468_3(float currentDamage, int itemCount)
			{
				return willowispBaseDamage * (1f + willowispScaleFraction * (float)(itemCount - 1));
			}

			internal bool <WillOWispChanges>b__468_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DelayBlast>(x, "radius");
			}

			internal float <WillOWispChanges>b__468_5(float currentRadius, int itemCount)
			{
				return willowispBaseRange + willowispStackRange * (float)itemCount;
			}

			internal bool <VoidsentFlameChanges>b__469_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ExplodeOnDeathVoid");
			}

			internal int <VoidsentFlameChanges>b__469_2(int itemCountIn)
			{
				if (itemCountIn > 0 && Util.CheckRoll(voidsentBaseChance + voidsentStackChance * (float)(itemCountIn - 1), 0f, (CharacterMaster)null))
				{
					return itemCountIn;
				}
				return 0;
			}

			internal bool <VoidsentFlameChanges>b__469_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage");
			}

			internal float <VoidsentFlameChanges>b__469_4(float currentDamage, int itemCount)
			{
				return voidsentBaseDamage * (1f + voidsentScaleFraction * (float)(itemCount - 1));
			}

			internal bool <VoidsentFlameChanges>b__469_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DelayBlast>(x, "radius");
			}

			internal float <VoidsentFlameChanges>b__469_6(float currentRadius, int itemCount)
			{
				return voidsentBaseRange + voidsentStackRange * (float)itemCount;
			}

			internal bool <CooldownBuff>b__478_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "IceRing");
			}

			internal bool <CooldownBuff>b__478_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 1);
			}

			internal bool <CooldownBuff>b__478_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal float <CooldownBuff>b__478_6(float cooldown, CharacterBody self)
			{
				float num = 1f;
				if (Object.op_Implicit((Object)(object)self.skillLocator.special))
				{
					float cooldownScale = self.skillLocator.special.cooldownScale;
					num *= cooldownScale;
					if (!(self.skillLocator.special.flatCooldownReduction < 9f))
					{
					}
				}
				return cooldown * num;
			}

			internal bool <CooldownBuff>b__478_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

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

			internal float <CooldownBuff>b__478_10(float seconds, CharacterBody self)
			{
				float num = 0f;
				if (Object.op_Implicit((Object)(object)self.skillLocator.special))
				{
				}
				return Mathf.Max(seconds - num, 1f);
			}

			internal bool <RunaldNerf>b__479_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "IceRing");
			}

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

			internal bool <RunaldNerf>b__479_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <RunaldNerf>b__479_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <RunaldNerf>b__479_8(Instruction x)
			{
				MethodReference val = default(MethodReference);
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val);
			}

			internal float <RunaldNerf>b__479_9(float damage, CharacterBody attackerBody)
			{
				float num = attackerBody.baseDamage * runaldBaseDamage;
				return damage + num;
			}

			internal bool <KjaroNerf>b__480_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "FireRing");
			}

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

			internal bool <KjaroNerf>b__480_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <KjaroNerf>b__480_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <KjaroNerf>b__480_8(Instruction x)
			{
				MethodReference val = default(MethodReference);
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val);
			}

			internal float <KjaroNerf>b__480_9(float damage, CharacterBody attackerBody)
			{
				float num = attackerBody.baseDamage * kjaroBaseDamage;
				return damage + num;
			}

			internal bool <SceneDirector_Start>b__483_0(GameObject obj)
			{
				return ((Object)obj).name == "NewtStatue" || ((Object)obj).name == "NewtStatue (1)" || ((Object)obj).name == "NewtStatue (2)" || ((Object)obj).name == "NewtStatue (3)" || ((Object)obj).name == "NewtStatue (4)";
			}

			internal bool <SceneDirector_Start>b__483_1(GameObject obj)
			{
				return ((Object)obj).name == "NewtStatue, Guarantee" || ((Object)obj).name == "NewtStatue, Guaranteed" || ((Object)obj).name == "NewtStatue (Permanent)";
			}

			internal bool <DeathMarkFix_Stacking>b__501_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark");
			}

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

			internal void <DeathMarkFix_Stacking>b__501_3(CharacterBody body, BuffDef buffDef, float duration, float itemCount)
			{
				int buffCount = body.GetBuffCount(Buffs.DeathMark);
				int num = 0;
				if (buffCount < (int)itemCount)
				{
					num = (int)itemCount - buffCount;
				}
				for (float num2 = 0f; num2 < (float)num; num2 += 1f)
				{
					body.AddTimedBuff(buffDef, duration);
				}
			}

			internal bool <DeathMarkFix_Damage>b__502_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark");
			}

			internal bool <DeathMarkFix_Damage>b__502_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "HasBuff");
			}

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

			internal float <DeathMarkFix_Damage>b__502_3(float damage, HealthComponent hc)
			{
				CharacterBody body = hc.body;
				float num = 1f;
				int buffCount = body.GetBuffCount(Buffs.DeathMark);
				num += deathMarkBonusDamage * (float)buffCount;
				Debug.Log((object)(damage + " " + num));
				return num;
			}

			internal bool <FixSacrificeDropChance>b__531_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "GetExpAdjustedDropChancePercent");
			}

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

			internal float <FixSacrificeDropChance>b__531_2(float _)
			{
				if (serverSacrificeDropTally >= GetDropCountForSacrifice() && !Util.CheckRoll(sacrificeDropRateLimited, 0f, (CharacterMaster)null))
				{
					return 0f;
				}
				return sacrificeDropRate;
			}

			internal bool <AddSacrificeDropTally>b__532_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<PickupDropletController>(x, "CreatePickupDroplet");
			}

			internal void <AddSacrificeDropTally>b__532_1()
			{
				serverSacrificeDropTally++;
			}

			internal bool <DropLimitForSonorous>b__533_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ItemDropChanceOnKill");
			}

			internal bool <DropLimitForSonorous>b__533_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal int <SonorousUseTeamItemCount>b__534_2(int oldItemCount, CharacterMaster master)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				return Util.GetItemCountForTeam(master.teamIndex, Items.ItemDropChanceOnKill.itemIndex, true, true);
			}

			internal bool <SonorousUseTeamItemCount>b__534_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <FixSonorousDropChance>b__535_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_isElite");
			}

			internal float <FixSonorousDropChance>b__535_3(float chanceIn, int stack)
			{
				if (serverSonorousDropTally >= GetDropCountForSacrifice() && !Util.CheckRoll(sonorousDropRateLimited, 0f, (CharacterMaster)null))
				{
					return 0f;
				}
				return sonorousDropRateBase + sonorousDropRateStack * (float)(stack - 1);
			}

			internal bool <AddSonorousDropTally>b__536_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_isElite");
			}

			internal bool <AddSonorousDropTally>b__536_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<PickupDropletController>(x, "CreatePickupDroplet");
			}

			internal void <AddSonorousDropTally>b__536_3()
			{
				serverSonorousDropTally++;
			}

			internal bool <RevokeShatterspleenBleedRights>b__552_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode");
			}

			internal bool <RevokeShatterspleenBleedRights>b__552_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <RevokeShatterspleenDeathRights>b__553_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode");
			}

			internal bool <RevokeShatterspleenDeathRights>b__553_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <VoidBearChanges>b__564_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "BearVoid");
			}

			internal bool <VoidBearChanges>b__564_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "AddTimedBuff");
			}

			internal float <VoidBearChanges>b__564_3(float inDuration)
			{
				float num = 15f;
				float num2 = 5f;
				return num2 + inDuration * ((num - num2) / num);
			}

			internal bool <TeddyChanges>b__566_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "bear");
			}

			internal bool <TeddyChanges>b__566_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "ConvertAmplificationPercentageIntoReductionPercentage");
			}

			internal bool <HoofNerf>b__570_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Hoof");
			}

			internal bool <HoofNerf>b__570_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

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

			internal float <HoofNerf>b__570_5(float itemCount, float speedBonus)
			{
				float result = 0f;
				if (itemCount > 0f)
				{
					result = hoofSpeedBonusBase + hoofSpeedBonusStack * (itemCount - 1f);
				}
				return result;
			}

			internal bool <DrinkNerf>b__574_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "SprintBonus");
			}

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

			internal bool <DrinkNerf>b__574_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal float <DrinkNerf>b__574_5(float speedBonus, float itemCount)
			{
				float result = 0f;
				if (itemCount > 0f)
				{
					result = drinkSpeedBonusBase + drinkSpeedBonusStack * (itemCount - 1f);
				}
				return result;
			}

			internal bool <FaradaySparks>b__587_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <FaradaySparks>b__587_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

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

			internal bool <ChangeFaradayDischargeDamageType>b__589_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "damageType");
			}

			internal DamageTypeCombo <ChangeFaradayDischargeDamageType>b__589_1(DamageTypeCombo doesntMatter)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				return new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)8);
			}

			internal bool <IncreaseFaradayDischargeDamage>b__590_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_damage");
			}

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

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

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

			internal bool <IncreaseFaradayDischargeDamage>b__590_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<BaseItemBodyBehavior>(x, "stack");
			}

			internal bool <ReduceFaradayMaxDischarge>b__591_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <ReduceFaradayMaxDischarge>b__591_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal bool <ReduceFaradayMaxDischarge>b__591_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <ReduceFaradayMaxDischarge>b__591_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<BuffDef>(x, "get_buffIndex");
			}

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

			internal bool <ReduceFaradayMaxDischarge>b__591_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "SetBuffCount");
			}

			internal int <ReduceFaradayMaxDischarge>b__591_7(int doesntMatter, int buffCount)
			{
				int num = buffCount - faradayMaxDischarge;
				if (num < 0)
				{
					return 0;
				}
				if (num == faradayRequiredCharge && faradayPreventDoubleDischarge)
				{
					return faradayRequiredCharge - 1;
				}
				return num;
			}

			internal bool <IncreaseFaradayChargeRequirement_DischargeEffects>b__592_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <IncreaseFaradayChargeRequirement_DischargeEffects>b__592_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

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

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

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

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

			internal bool <IncreaseFaradayChargeRequirement_UpdateCharge>b__595_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchClt(x);
			}

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

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

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

			internal bool <BuffFaradayChargeRate>b__597_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<JumpDamageStrikeBodyBehavior>(x, "isCharging");
			}

			internal bool <BuffFaradayChargeRate>b__597_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<JumpDamageStrikeBodyBehavior>(x, "distanceTraveled");
			}

			internal float <BuffFaradayChargeRate>b__597_2(float addedDistance, JumpDamageStrikeBodyBehavior behavior)
			{
				float num = Mathf.Pow((1f + faradayChargeIncreaseStack * (float)(((BaseItemBodyBehavior)behavior).stack - 1)) * faradayChargeIncreaseBase, 0.2f);
				return addedDistance * num;
			}

			internal bool <FixFaradayDeltaTime>b__598_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Time>(x, "get_deltaTime");
			}

			internal float <FixFaradayDeltaTime>b__598_1()
			{
				return Time.fixedDeltaTime;
			}

			internal bool <MonsterToothHealChange>b__610_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Tooth");
			}

			internal bool <MonsterToothHealChange>b__610_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <MonsterToothHealChange>b__610_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<HealthPickup>(x, "flatHealing");
			}

			internal float <MonsterToothHealChange>b__610_4(float currentHealAmt, int itemCount)
			{
				return monsterToothFlatHeal * (float)itemCount;
			}

			internal bool <MonsterToothHealChange>b__610_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<HealthPickup>(x, "fractionalHealing");
			}

			internal float <MonsterToothHealChange>b__610_6(float currentHealAmt)
			{
				return monsterToothPercentHeal;
			}

			internal bool <MedkitHealChange>b__611_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Medkit");
			}

			internal bool <MedkitHealChange>b__611_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <MedkitHealChange>b__611_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 20f);
			}

			internal bool <MedkitHealChange>b__611_4(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

			internal float <MedkitHealChange>b__611_5(float currentHealAmt, int itemCount)
			{
				return medkitFlatHeal * (float)itemCount;
			}

			internal bool <MedkitHealChange>b__611_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_maxHealth");
			}

			internal bool <MedkitHealChange>b__611_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 0.05f);
			}

			internal float <MedkitHealChange>b__611_8(float currentHealAmt)
			{
				return medkitPercentHeal;
			}

			internal bool <ScytheNerf>b__612_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "HealOnCrit");
			}

			internal bool <ScytheNerf>b__612_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "Heal");
			}

			internal float <ScytheNerf>b__612_3(float currentHealAmt, int itemCount)
			{
				return scytheBaseHeal + scytheStackHeal * (float)itemCount;
			}

			internal bool <ReduceBungusInterval>b__614_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<HealingWard>(x, "interval");
			}

			internal float <ReduceBungusInterval>b__614_1(float interval)
			{
				return fungusHealInterval;
			}

			internal bool <ReduceBungusWaitTime>b__615_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "notMovingStopwatch");
			}

			internal bool <InitializeEverything>b__651_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<SkillDef>(x, "attackSpeedBuffsRestockSpeed");
			}

			internal bool <InitializeCoreModules>b__667_0(Type type)
			{
				return !type.IsAbstract && type.IsSubclassOf(typeof(CoreModule));
			}
		}

		public static float drizzleDifficultyBoost = 0f;

		public static float rainstormDifficultyBoost = 0f;

		public static float monsoonDifficultyBoost = 3f;

		public static float eclipseDifficultyBoost = 6f;

		public static float baseScalingMultiplier = 0.8f;

		public static float difficultyIncreasePerMinutePerDifficulty = 0.01f;

		public static float difficultyIncreasePerMinuteBase = 1f;

		public static float difficultyIncreasePerStage = 0.9f;

		public static float difficultyIncreasePerLoop = 1.3f;

		public static float playerBaseDifficultyFactor = 0.2f;

		public static float playerScalingDifficultyFactor = 0.2f;

		public static float playerSpawnRateFactor = 0.5f;

		public static float difficultySpawnRateFactor = 0.4f;

		public static int ambientLevelCapDrizzle = 99;

		public static int ambientLevelCap = 999;

		public static float easyTeleParticleRadius = 1f;

		public static float normalTeleParticleRadius = 0.8f;

		public static float hardTeleParticleRadius = 0.4f;

		public static float eclipseTeleParticleRadius = 0.4f;

		public static float defaultTeleParticleRadius = 0.9f;

		public static DifficultyIndex eclipseLevelBossElite = (DifficultyIndex)3;

		public static string eclipseOneDesc = "\n<mspace=0.5em>(1)</mspace> Boss Enemies: <style=cIsHealth>Always Elite</style>";

		public static DifficultyIndex eclipseLevelEnemyMspd = (DifficultyIndex)4;

		public static float eclipseEnemyMspd = 0.3f;

		public static string eclipseTwoDesc = "\n<mspace=0.5em>(2)</mspace> Enemy Speed: <style=cIsHealth>+" + eclipseEnemyMspd.AsPercent() + "</style>";

		public static DifficultyIndex eclipseLevelSmallHoldout = (DifficultyIndex)5;

		public static DifficultyIndex eclipseLevelHoldoutLoss = (DifficultyIndex)5;

		public static float eclipseHoldoutLossRate = 0.02f;

		public static float eclipseHoldoutScale = 0.6f;

		public static string eclipseThreeDesc = "\n<mspace=0.5em>(3)</mspace> All Holdout Zones are <style=cIsHealth>Eclipsed</style>";

		public static DifficultyIndex eclipseHealingLoss = (DifficultyIndex)6;

		public static float eclipseHealingMultiplier = 0.75f;

		public static string eclipseFourDesc = "\n<mspace=0.5em>(4)</mspace> Ally Healing: <style=cIsHealth>-" + (1f - eclipseHealingMultiplier).AsPercent() + "</style>";

		public static DifficultyIndex eclipseLevelEnemyCdr = (DifficultyIndex)7;

		public static float eclipseEnemyCooldownScale = 0.6f;

		public static string eclipseFiveDesc = "\n<mspace=0.5em>(5)</mspace> Enemy Cooldowns: <style=cIsHealth>-" + (1f - eclipseEnemyCooldownScale).AsPercent() + "</style>";

		public static DifficultyIndex eclipseLevelSpiteArtifact = (DifficultyIndex)8;

		public static string eclipseSixDesc = "\n<mspace=0.5em>(6)</mspace> On Kill: <style=cIsHealth>Enemies drop exploding bombs</style>";

		public static DifficultyIndex eclipseLevelItemTax = (DifficultyIndex)9;

		public static int eclipseItemTaxCount = 2;

		public static float eclipseItemTaxPercent = 0.2f;

		public static string eclipseSevenDesc = "\n<mspace=0.5em>(7)</mspace> Item Tax: <style=cIsHealth>" + eclipseItemTaxPercent.AsPercent() + " per Stage</style>";

		public static string eclipseEightDesc = "\n<mspace=0.5em>(8)</mspace> Allies recieve <style=cIsHealth>permanent damage</style>";

		public static float voidFieldsTimeCost = 120f;

		public static float fastDirectorEliteBias = 1.2f;

		public static float fastDirectorCreditMultiplier = 0.75f;

		public static float slowDirectorEliteBias = 1.2f;

		public static float slowDirectorCreditMultiplier = 1f;

		public static float teleLesserEliteBias = 1f;

		public static float teleLesserCreditMultiplier = 0.8f;

		public static float teleBossEliteBias = 1f;

		public static float teleBossCreditMultiplier = 1f;

		public static float teleBossCreditMultiplierStage1 = 0.5f;

		private static bool pityChargeOn = false;

		private static float pityChargeShrinkDelta = 0f;

		private static float pityChargeRecolorDelta = 0f;

		private GameObject awu = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/SuperRoboBallBossBody");

		private CharacterBody awuBody;

		private float awuArmor = 40f;

		private float awuAdditionalArmor = 0f;

		private int awuAdaptiveArmorCount = 1;

		private static float costExponent = 1f;

		private static float goldRewardMultiplierGlobal = 0.35f;

		private static float expRewardMultiplierGlobal = 0.4f;

		private static float compensationForStartingLevel = 1f;

		public float interactableCreditsAdd = 125f;

		public float monsterCreditsMultiplier = 1f;

		private PurchaseInteraction smallChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest1/Chest1.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction smallCategoryChestDamage = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestDamage.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction smallCategoryChestHealing = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestHealing.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction smallCategoryChestUtility = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestUtility.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest2/Chest2.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigCategoryChestDamage = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Damage Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigCategoryChestHealing = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Healing Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigCategoryChestUtility = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Utility Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction casinoChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CasinoChest/CasinoChest.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction chanceShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChance.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction chanceShrineSnowy = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSnowy Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction chanceShrineSandy = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSandy Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private MultiShopController smallShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShop/TripleShop.prefab").WaitForCompletion().GetComponent<MultiShopController>();

		private MultiShopController bigShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShopLarge/TripleShopLarge.prefab").WaitForCompletion().GetComponent<MultiShopController>();

		private MultiShopController equipmentShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShopEquipment/TripleShopEquipment.prefab").WaitForCompletion().GetComponent<MultiShopController>();

		private string discountChestPrefix = "Bargain";

		private int smallChestTypeCost = 20;

		private int smallShopTypeCost = 35;

		private int smallCategoryChestTypeCost = 25;

		private int bigChestTypeCost = 45;

		private int bigShopTypeCost = 70;

		private int bigCategoryChestTypeCost = 50;

		private int goldChestTypeCost = 200;

		private int bigDroneTypeCost = 160;

		private int casinoChestTypeCost = 30;

		private int chanceShrineTypeCost = 15;

		private GameObject goldShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineGoldshoresAccess/ShrineGoldshoresAccess.prefab").WaitForCompletion();

		private int goldShrineCost = 5;

		private static int teamMaxHealth;

		private static int totalBloodGoldValue = 60;

		private const float totalHealthFraction = 2.18f;

		private static float chestsPerHealthBar = 2f;

		public int equipBarrelWeightS1 = 20;

		public int equipBarrelLimitS1 = 5;

		public int equipBarrelWeight = 6;

		public int equipBarrelLimit = 2;

		public int equipShopWeightS3 = 20;

		public int equipShopLimitS3 = 4;

		public int equipShopWeight = 4;

		public int equipShopLimit = 2;

		public int scrapperWeight = 1000;

		public int scrapperLimit = 3;

		public int doubleChestWeight = 15;

		public static GameObject whitePrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/Duplicator");

		public static GameObject greenPrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorLarge");

		public static GameObject redPrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorMilitary");

		public static GameObject scrapper = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/Scrapper");

		public int printerGreenWeight = 20;

		public int printerGreenLimit = 4;

		public int printerRedWeight = 4;

		public int printerRedLimit = 1;

		public int printerRedWeightS5 = 1000;

		public int printerRedLimitS5 = 2;

		public int lunarPodWeightS1 = 20;

		public int lunarPodLimitS1 = 6;

		public int lunarPodWeight = 6;

		public int lunarPodLimit = 2;

		public static int halcyoniteShrineLowGoldCost = 35;

		public static int halcyoniteShrineMidGoldCost = 75;

		public static int halcyoniteShrineMaxGoldCost = 125;

		public static float halcyoniteShrineRadius = 30f;

		public static int soulShrineLuckIncrease = 1;

		private GameObject soulShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/ShrineColossusAccess.prefab").WaitForCompletion();

		public static int Tier2EliteMinimumStageDefault = 6;

		public static int Tier2EliteMinimumStageDrizzle = 11;

		public static int Tier2EliteMinimumStageRainstorm = 6;

		public static int Tier2EliteMinimumStageMonsoon = 4;

		public static int Tier2EliteMinimumStageEclipse = 4;

		private static string Tier2EliteName = "Rare";

		private float genesisLoopBlastDamageCoefficient = 30f;

		private float vagrantBaseHealth = 1600f;

		private GameObject vagrantPrefab;

		private GameObject pestPrefab;

		private GameObject pestSpit;

		private float pestBaseHealth = 50f;

		private float pestBaseDamage = 6f;

		private float pestBaseSpeed = 4f;

		private float pestSpitVelocity = 70f;

		private GameObject queenSpitPrefab;

		private GameObject queenAcidPrefab;

		private float spitDamageCoefficient = 0.4f;

		private float acidSize = 2f;

		private float acidDamageCoefficient = 2.5f;

		private float acidDamageFrequency = 4f;

		private CharacterSpawnCard gupSpawnCard;

		private int gupCreditCost = 200;

		private GameObject gupPrefab;

		private float gupBaseHealth = 1000f;

		private float gupBaseArmor = 0f;

		private float gupBaseDamage = 12f;

		private float gupBaseSpeed = 14f;

		private float gupBaseRegen = 0f;

		private GameObject geepPrefab;

		private float geepBaseHealth = 500f;

		private float geepBaseArmor = 0f;

		private float geepBaseDamage = 8f;

		private float geepBaseSpeed = 10f;

		private float geepBaseRegen = 0f;

		private GameObject gipPrefab;

		private float gipBaseHealth = 250f;

		private float gipBaseArmor = 0f;

		private float gipBaseDamage = 5f;

		private float gipBaseSpeed = 6f;

		private float gipBaseRegen = 0f;

		private int nulliferBombCount = 10;

		private GameObject barnaclePrefab;

		private float fuckBarnacleRegen = 0f;

		private GameObject lesserWispPrefab;

		private float wispBaseDamage = 1.5f;

		private GameObject templarPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayBruiserBody");

		public static float templarBaseDamage = 9f;

		public static float templarBaseAttackSpeed = 1f;

		public static float templarFireInterval = 0.05f;

		public static float templarSpinUpDuration = 1.5f;

		public static float templarSpinDownDuration = 2f;

		private GameObject chimeraWispPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarWispBody");

		public static float chimeraWispBaseDamage = 5f;

		public static float chimeraWispBaseAttackSpeed = 1f;

		public static float chimeraWispFireInterval = 0.1f;

		public static float chimeraWispFireDuration = 4f;

		public static float chimeraWispChargeDuration = 3.33f;

		public static int solusScorcherCreditCost = 18;

		public static float solusScorcherBaseHealth = 111f;

		public static float solusScorcherBaseMovespeed = 9f;

		public static int solusProspectorCreditCost = 11;

		public static float solusProspectorBaseHealth = 110f;

		public static float solusProspectorBaseMovespeed = 11.5f;

		public static EquipmentDef[] scavBlacklistedEquips = (EquipmentDef[])(object)new EquipmentDef[3]
		{
			Equipment.PassiveHealing,
			Equipment.Fruit,
			Equipment.LifestealOnHit
		};

		public float crunderFunnyMoneyProcChance = 10f;

		public Func<ItemIndex, bool> gooboItemCopyFilter = Inventory.defaultItemCopyFilterDelegate.Invoke;

		private float gummyLifetime = 30f;

		private int gummyDamage = 0;

		private float gummyDamageMultiplier = 0.7f;

		private int gummyHealth = 20;

		private float gummyHealthMultiplier = 1f;

		public int blastShowerBuffCount = 3;

		public static float capacitorDamageCoefficient = 10f;

		public static float capacitorBlastRadius = 13f;

		public static float capacitorCooldown = 20f;

		private float glassesNewCritChance = 10f;

		private float pauldronDamageMultiplier = 1f;

		private float pauldronAspdMultiplier = 0.5f;

		private FalloffModel falloffModel = (FalloffModel)0;

		private float justiceMinDamageCoeff = 8f;

		public static float newInfusionBaseHealth = 40f;

		public float wungusRegenBase = 1.5f;

		public float wungusRegenStack = 1.5f;

		public float luteDamageCoefficient = 0.4f;

		private GameObject shurikenProjectilePrefab;

		public float shurikenBaseDamage = 0.8f;

		public float shurikenStackDamage = 0f;

		public float shurikenProcCoefficient = 2f;

		public float daisyRadiusMultiplier = 1.15f;

		public const float fuelCellCooldownMultiplier = 0.67f;

		public static string fuelCellEquipCdr = Tools.ConvertDecimal(0.32999998f);

		public static int fuelCellStock = 2;

		public const float chaosCooldownMultiplier = 0.67f;

		public static string chaosEquipCdr = Tools.ConvertDecimal(0.32999998f);

		public static float stickyDamageCoeffBase = 3.2f;

		public static float stickyDamageCoeffStack = 0.4f;

		public static int chanceDollChanceBase = 30;

		public static int chanceDollChanceStack = 30;

		public static float warpedEchoDamageReduction = 0.3f;

		public static float elusiveAntlersPickupDuration = 24f;

		public static float elusiveAntlersBuffDuration = 18f;

		public static float elusiveAntlersPickupInterval = 12f;

		public static float elusiveAntlersPickupIntervalReductionStack = 0.1f;

		public static float elusiveAntlersMoveSpeedPerBuff = 0.06f;

		public static float elusiveAntlersFreeMovespeedBase = 0.06f;

		public static float elusiveAntlersFreeMovespeedStack = 0.06f;

		public static float luminousTotalDamageBase = 1.75f;

		public static float luminousTotalDamageStack = 1f;

		public static float eclipseLiteHealPerSecondBase = 1f;

		public static float eclipseLiteHealPerSecondStack = 1f;

		private static HealthComponent ecliteThingy = null;

		public static float broochPercentBase = 0.02f;

		public static float broochPercentStack = 0f;

		public static float broochFlatBase = 15f;

		public static float broochFlatStack = 15f;

		public static float dynamiteDamageBase = 3.5f;

		public static float dynamiteDamageStack = 2.8f;

		public static float warbannerRadiusBase = 18f;

		public static float warbannerRadiusStack = 2f;

		public static float warbannerRegenBase = 1f;

		public static float warbannerRegenStack = 1f;

		public static float warbannerSpeedBase = 0.3f;

		public static float warbannerSpeedStack = 0.15f;

		private GameObject daggerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/DaggerProjectile");

		private GameObject willowispPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/WilloWispDelay");

		private GameObject voidsentPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/ExplodeOnDeathVoid/ExplodeOnDeathVoidExplosion.prefab").WaitForCompletion();

		private GameObject spleenPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/BleedOnHitAndExplodeDelay");

		private GameObject fireworkProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/FireworkProjectile");

		private GameObject resdiscProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/LaserTurbineBomb");

		private GameObject meatballProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/FireMeatBall");

		private static float willowispProcCoeff = 0.75f;

		private static float willowispBaseDamage = 3.6f;

		private static float willowispScaleFraction = 0.75f;

		private static float willowispBaseRange = 16f;

		private static float willowispStackRange = 0f;

		private static float voidsentProcCoeff = 1f;

		private static float voidsentBaseDamage = 5.6f;

		private static float voidsentScaleFraction = 0.75f;

		private static float voidsentBaseRange = 24f;

		private static float voidsentStackRange = 0f;

		private static float voidsentBaseChance = 33f;

		private static float voidsentStackChance = 0f;

		private static float gasBaseDamage = 0.5f;

		private static float gasStackDamage = 0f;

		private static float gasBaseBurnDamage = 1f;

		private static float gasStackBurnDamage = 1f;

		private float discipleDevilorbProc = 0.4f;

		private float opinionDevilorbProc = 0.75f;

		public static bool useNkuhanaKnockbackSlow = false;

		public static bool useDiscipleKnockbackSlow = false;

		private float nkuhanaNewDamageMultiplier = 3.5f;

		private static float runaldBaseDamage = 6f;

		private static float runaldTotalDamage = 1f;

		private static float kjaroBaseDamage = 6f;

		private static float kjaroTotalDamage = 1f;

		private static string runaldTotal = Tools.ConvertDecimal(runaldTotalDamage);

		private static string kjaroTotal = Tools.ConvertDecimal(kjaroTotalDamage);

		public static float newtAltarChance = 0.3f;

		public static float deathMarkBonusDamage = 0.3f;

		private float elephantBuffDuration = 10f;

		private int elephantArmor = 200;

		public static float tarSlowAspdReduction = 0.3f;

		public static float kitSlowAspdReduction = 0.3f;

		public static float chronoSlowAspdReduction = 0.5f;

		public static float chillSlowAspdReduction = 0.6f;

		private float critHudDamageMul = 1f;

		private GameObject healPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/HealPack");

		private float toothDuration = 15f;

		private GameObject ammoPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/AmmoPack");

		private GameObject moneyPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/BonusMoneyPack");

		public static int sacrificeDropCount = 12;

		public static int sacrificeDropCountRestricted = 5;

		public static float sacrificeDropRate = 8f;

		public static float sacrificeDropRateLimited = 20f;

		public static int sonorousDropCountBase = 4;

		public static int sonorousDropCountStack = 2;

		public static int sonorousDropCountRestrictedBase = 5;

		public static int sonorousDropCountRestrictedStack = 1;

		public static float sonorousDropRateBase = 5f;

		public static float sonorousDropRateStack = 5f;

		public static float sonorousDropRateLimited = 20f;

		private static int serverSacrificeDropTally = 0;

		private static int serverSonorousDropTally = 0;

		public static int minSpikes = 3;

		public static int maxSpikes = 4;

		public static int baseSpikesPerBuff = 2;

		public static int stackSpikesPerBuff = 1;

		public static float minDamageCoefficient = 5f;

		public static float releaseSpeed = 2f;

		public static float spikeDamageCoefficient = 0.3f;

		public static float spikeProcCoefficient = 1f;

		public static int shatterspleenBleedChance = 20;

		public static GameObject impBleedSpikePrefab;

		public static int rapFreeArmor = 2;

		public static int knurlFreeArmor = 15;

		public static int bucklerFreeArmor = 10;

		public static float voidBearNewMaxCooldown = 15f;

		public static float voidBearNewMinCooldown = 5f;

		public static float teddyNewMaxValue = 0.5f;

		public static float hoofSpeedBonusBase = 0.14f;

		public static float hoofSpeedBonusStack = 0.14f;

		public static float drinkSpeedBonusBase = 0.2f;

		public static float drinkSpeedBonusStack = 0.15f;

		public static float faradayMaxMoveSpeed = 1f;

		public static float faradayMaxJumpStrength = 1.5f;

		public static float faradayChargeIncreaseBase = 1.5f;

		public static float faradayChargeIncreaseStack = 0.5f;

		public static float faradayDamageBase = 8f;

		public static float faradayDamageStack = 5f;

		public static int faradayRequiredCharge = 34;

		public static int faradayMaxDischarge = 66;

		public static bool faradayPreventDoubleDischarge = true;

		public static float scytheBaseHeal = 0f;

		public static float scytheStackHeal = 5f;

		public static float monsterToothFlatHeal = 10f;

		public static float monsterToothPercentHeal = 0f;

		public static float medkitFlatHeal = 40f;

		public static float medkitPercentHeal = 0f;

		public static float notMovingRequirement = 0.1f;

		public static float fungusHealInterval = 0.125f;

		public const string guid = "com.RiskOfBrainrot.RiskierRain";

		public const string teamName = "RiskOfBrainrot";

		public const string modName = "RiskierRain";

		public const string version = "1.3.9";

		public static bool isAELoaded = Tools.isLoaded("com.Borbo.ArtificerExtended");

		public static bool isHBULoaded = Tools.isLoaded("com.Borbo.HuntressBuffULTIMATE");

		public static bool isScepterLoaded = Tools.isLoaded("com.DestroyedClone.AncientScepter");

		public static bool autosprintLoaded = Tools.isLoaded("com.johnedwa.RTAutoSprintEx");

		public static bool acridLungeLoaded = Tools.isLoaded("Withor.AcridBiteLunge");

		public static bool ucrLoaded = Tools.isLoaded("HIFU.UltimateCustomRun");

		public static string drizzleDesc = "Simplifies difficulty for players new to the game. Weeping and gnashing is replaced by laughter and tickles.<style=cStack>\n\n>Player Health Regeneration: <style=cIsHealing>+50%</style> \n>Difficulty Scaling: <style=cIsHealing>-50%</style> \n>Player Damage Reduction: <style=cIsHealing>+38%</style>";

		public static string rainstormDesc = "This is the way the game is meant to be played! Test your abilities and skills against formidable foes.<style=cStack>\n\n>Player Health Regeneration: +0% \n>Difficulty Scaling: +0% ";

		public static string monsoonDesc = "For hardcore players. Every bend introduces pain and horrors of the planet. You will die.<style=cStack>\n\n>Player Health Regeneration: <style=cIsHealth>-40%</style> \n>Difficulty Scaling: <style=cIsHealth>+50%</style>";

		private GameObject meatballNapalmPool;

		private static float faradayChargeIncreaseStackInverse => faradayChargeIncreaseStack / (1f + faradayChargeIncreaseStack);

		public static PluginInfo PInfo { get; private set; }

		public static string dropPrefabsPath => Assets.dropPrefabsPath;

		public static string iconsPath => Assets.iconsPath;

		public static string eliteMaterialsPath => Assets.eliteMaterialsPath;

		internal static ConfigFile CustomConfigFile { get; set; }

		public static ConfigEntry<bool> EnableConfig { get; set; }

		internal static float GetAmbientLevelBoost()
		{
			return DifficultyUtilsModule.GetAmbientLevelBoost();
		}

		private void FreezeTimeScalingOnFinalLevels()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Run.ShouldUpdateRunStopwatch += new hook_ShouldUpdateRunStopwatch(ModifyShouldUpdateRunStopwatch);
		}

		private bool ModifyShouldUpdateRunStopwatch(orig_ShouldUpdateRunStopwatch orig, Run self)
		{
			bool flag = orig.Invoke(self);
			if (!flag)
			{
				return flag;
			}
			return !SceneCatalog.mostRecentSceneDef.isFinalStage;
		}

		private void ChangeDifficultyCoefficientCalculation()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			Run.ambientLevelCap = ambientLevelCap;
			Run.RecalculateDifficultyCoefficentInternal += new hook_RecalculateDifficultyCoefficentInternal(DifficultyCoefficientChanges);
			DirectorMoneyWave.Update += new Manipulator(DirectorCreditGainChanges);
			drizzleDesc = drizzleDesc + "\n>Starting Difficulty: <style=cIsHealing>Easy</style>" + $"\n>Max Enemy Level: <style=cIsHealing>{ambientLevelCapDrizzle - ambientLevelCap}</style> " + $"\n>{Tier2EliteName} Elites: <style=cIsHealing>Stage {Tier2EliteMinimumStageDrizzle}</style>" + "\n>Teleporter Visuals: <style=cIsHealing>+" + Tools.ConvertDecimal(easyTeleParticleRadius / normalTeleParticleRadius - 1f) + "</style> ";
			rainstormDesc = rainstormDesc + "\n>Starting Difficulty: Medium" + $"\n>{Tier2EliteName} Elites: Stage {Tier2EliteMinimumStageRainstorm}" + "\n>Teleporter Visuals: +" + Tools.ConvertDecimal(normalTeleParticleRadius / normalTeleParticleRadius - 1f) + " ";
			monsoonDesc = monsoonDesc + "\n>Starting Difficulty: <style=cIsHealth>Hard</style>" + $"\n>{Tier2EliteName} Elites: <style=cIsHealth>Stage {Tier2EliteMinimumStageMonsoon}</style>" + "\n>Teleporter Visuals: <style=cIsHealth>" + Tools.ConvertDecimal(1f - hardTeleParticleRadius / normalTeleParticleRadius) + "</style> ";
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(AddDifficultyStats));
		}

		private void AddDifficultyStats()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected I4, but got Unknown
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 11; i++)
			{
				DifficultyIndex val = (DifficultyIndex)i;
				DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(val);
				StartingDifficulty val2 = (StartingDifficulty)0;
				float num = 0f;
				float startingDifficultyCoefficientBoost = difficultyDef.scalingValue - 1f;
				int num2 = ambientLevelCap;
				int num3 = 5;
				float num4 = 1f;
				DifficultyIndex val3 = val;
				DifficultyIndex val4 = val3;
				switch ((int)val4)
				{
				case 0:
					val2 = (StartingDifficulty)0;
					num = drizzleDifficultyBoost;
					num3 = Tier2EliteMinimumStageDrizzle;
					num4 = easyTeleParticleRadius;
					num2 = ambientLevelCapDrizzle;
					break;
				case 1:
					val2 = (StartingDifficulty)3;
					num = rainstormDifficultyBoost;
					num3 = Tier2EliteMinimumStageRainstorm;
					num4 = normalTeleParticleRadius;
					break;
				case 2:
					val2 = (StartingDifficulty)6;
					num = monsoonDifficultyBoost;
					num3 = Tier2EliteMinimumStageMonsoon;
					num4 = hardTeleParticleRadius;
					break;
				default:
					val2 = (StartingDifficulty)6;
					num = monsoonDifficultyBoost;
					num3 = Tier2EliteMinimumStageMonsoon;
					num4 = hardTeleParticleRadius;
					break;
				}
				MoreDifficultyStats moreDifficultyStats = DifficultyUtilsModule.GetMoreDifficultyStats(val);
				moreDifficultyStats.startingDifficultyDisplay = (float)val2;
				moreDifficultyStats.startingLevelBoost = num;
				moreDifficultyStats.startingDifficultyCoefficientBoost = startingDifficultyCoefficientBoost;
				moreDifficultyStats.ambientLevelCap = num2;
				moreDifficultyStats.tier2EliteStage = num3;
				moreDifficultyStats.teleporterParticleRangeMultiplier = num4;
				DifficultyUtilsModule.difficultyCustomStats[val] = moreDifficultyStats;
			}
		}

		private void DirectorCreditGainChanges(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			float num5 = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num5)
			});
			int index = val.Index;
			val.Index = index - 1;
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, 1f - playerSpawnRateFactor);
			float num4 = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4)
			});
			index = val.Index;
			val.Index = index - 1;
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, playerSpawnRateFactor);
			float num3 = default(float);
			int num2 = default(int);
			float num = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num3),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num)
			});
			index = val.Index;
			val.Index = index - 1;
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, difficultySpawnRateFactor);
		}

		private void AmbientLevelChanges(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int timeLoc = 2;
			int num = 2;
			float num5 = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref timeLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num5),
				(Instruction x) => ILPatternMatchingExt.MatchMul(x),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Mathf>(x, "Floor")
			});
			int index = val.Index;
			val.Index = index - 1;
			val.Emit(OpCodes.Ldc_R4, baseScalingMultiplier);
			val.Emit(OpCodes.Mul);
			float num4 = default(float);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount")
			});
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, difficultyIncreasePerSt

SwanSongExtended.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using BetterSoulCost;
using BossDropRework;
using EntityStates;
using EntityStates.AI.Walker;
using EntityStates.Bandit2;
using EntityStates.BrotherMonster.Weapon;
using EntityStates.Captain.Weapon;
using EntityStates.CaptainSupplyDrop;
using EntityStates.GrandParent;
using EntityStates.LaserTurbine;
using EntityStates.Mage.Weapon;
using EntityStates.NullifierMonster;
using EntityStates.TeleporterHealNovaController;
using HG;
using HG.BlendableTypes;
using HG.Reflection;
using HarmonyLib;
using IL.RoR2;
using IL.RoR2.Items;
using IL.RoR2.Orbs;
using KinematicCharacterController;
using MissileRework;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using MoreStats;
using On.EntityStates;
using On.EntityStates.LaserTurbine;
using On.EntityStates.TeleporterHealNovaController;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.Orbs;
using R2API;
using R2API.Utils;
using RainrotSharedUtils;
using RainrotSharedUtils.Components;
using RainrotSharedUtils.Difficulties;
using RainrotSharedUtils.Shelters;
using RainrotSharedUtils.Status;
using RoR2;
using RoR2.Achievements;
using RoR2.Artifacts;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.EntitlementManagement;
using RoR2.ExpansionManagement;
using RoR2.Hologram;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2BepInExPack.GameAssetPaths;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using RoR2BepInExPack.GameAssetPathsBetter;
using SwanSongExtended.Artifacts;
using SwanSongExtended.Characters;
using SwanSongExtended.Components;
using SwanSongExtended.Elites;
using SwanSongExtended.Equipment;
using SwanSongExtended.Equipment.Zapinator;
using SwanSongExtended.Interactables;
using SwanSongExtended.Items;
using SwanSongExtended.Modules;
using SwanSongExtended.Scavengers;
using SwanSongExtended.Skills;
using SwanSongExtended.States;
using SwanSongExtended.Storms;
using ThreeEyedGames;
using Unity;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("SwanSongExtended")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SwanSongExtended")]
[assembly: AssemblyTitle("SwanSongExtended")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace RiskierRainContent.Interactables
{
	internal static class CombatEncounterHelper
	{
		public enum CustomDirectorType
		{
			GalleryDirector = 1,
			ConstructDirector
		}

		public static GameObject MethodOne(PurchaseInteraction purchaseInteraction, Interactor activator, int credits, CustomDirectorType directorType)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			Vector3 val = Vector3.zero;
			Quaternion rotation = Quaternion.identity;
			Transform transform = ((Component)purchaseInteraction).gameObject.transform;
			if (Object.op_Implicit((Object)(object)transform))
			{
				val = transform.position;
				rotation = transform.rotation;
			}
			GameObject val2 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Encounters/MonstersOnShrineUseEncounter");
			if ((Object)(object)val2 == (Object)null)
			{
				return null;
			}
			GameObject val3 = Object.Instantiate<GameObject>(val2, val, Quaternion.identity);
			NetworkServer.Spawn(val3);
			CombatDirector component = val3.GetComponent<CombatDirector>();
			ParseDirectorType(((Component)component).gameObject, directorType);
			if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)Stage.instance))
			{
				return null;
			}
			float num = (float)credits * Stage.instance.entryDifficultyCoefficient;
			DirectorCard val4 = component.SelectMonsterCardForCombatShrine(num);
			if (val4 != null)
			{
				component.CombatShrineActivation(activator, num, val4);
				EffectData val5 = new EffectData
				{
					origin = val,
					rotation = rotation
				};
				if (directorType == CustomDirectorType.ConstructDirector)
				{
					GameObject val6 = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MonstersOnShrineUse");
					EffectManager.SpawnEffect(val6, val5, true);
				}
			}
			return val3;
		}

		public static void ParseDirectorType(GameObject obj, CustomDirectorType value)
		{
			switch (value)
			{
			case CustomDirectorType.GalleryDirector:
				obj.AddComponent<GalleryDirector>();
				break;
			case CustomDirectorType.ConstructDirector:
				obj.AddComponent<ConstructDirector>();
				break;
			default:
				obj.AddComponent<GalleryDirector>();
				break;
			}
		}
	}
	internal class GalleryDirector : MonoBehaviour
	{
	}
	internal class ConstructDirector : MonoBehaviour
	{
	}
}
namespace SwanSongExtended
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[R2APISubmoduleDependency(new string[] { "LanguageAPI", "PrefabAPI", "RecalculateStatsAPI", "DotAPI" })]
	[BepInPlugin("com.RiskOfBrainrot.SwanSongExtended", "SwanSongExtended", "0.1.0")]
	public class SwanSongPlugin : BaseUnityPlugin
	{
		public delegate void orig_idc(LaserTurbineController self);

		private class ResDiscContext
		{
			public LaserTurbineController laserTurbineController;

			public ResDiscContext(LaserTurbineController passive)
			{
				laserTurbineController = passive;
			}
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

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

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

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

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

			public static Action<PayCostContext> <>9__38_0;

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

			public static Func<Inventory, int> <>9__44_1;

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

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

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

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

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

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

			public static Func<float, float> <>9__57_1;

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

			public static Func<int, EquipmentSlot, int> <>9__64_1;

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

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

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

			public static Func<int, Inventory, int> <>9__65_3;

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

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

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

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

			public static Action<EquipmentSlot> <>9__72_2;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			public static Func<float, int, float> <>9__85_11;

			public static Func<int, int, CharacterBody, int> <>9__85_12;

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

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

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

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

			public static Func<bool, DamageInfo, bool> <>9__99_2;

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

			public static hook_TrackBeadExperience <>9__111_1;

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

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

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

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

			public static Action<int, CharacterBody> <>9__115_7;

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

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

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

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

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

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

			public static Func<HealthComponent, LightningOrb, HealthComponent> <>9__129_3;

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

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

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

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

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

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

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

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

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

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

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

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

			public static Action<CraftableDef> <>9__203_0;

			internal bool <RemoveAegisOverheal>b__15_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "barrierOnOverHeal");
			}

			internal bool <RemoveCrownReward>b__35_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GoldOnHit");
			}

			internal bool <RemoveCrownReward>b__35_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <RemoveCrownPenalty>b__36_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "goldOnHit");
			}

			internal void <PatchMoneyCostForBrittleCrown>b__38_0(PayCostContext ctx)
			{
				CharacterBody activatorBody = ctx.activatorBody;
				if (Object.op_Implicit((Object)(object)activatorBody) && Object.op_Implicit((Object)(object)ctx.activatorMaster) && ctx.activatorMaster.money < ctx.cost)
				{
					ctx.cost = 0;
				}
			}

			internal bool <FreezeCard>b__44_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "get_currentEquipmentIndex");
			}

			internal int <FreezeCard>b__44_1(Inventory inv)
			{
				return -1;
			}

			internal bool <FoconUpdate>b__54_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "cap");
			}

			internal int <FoconUpdate>b__54_1(int cap)
			{
				return foconMaxStack;
			}

			internal bool <FoconApplyRadius>b__56_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor");
			}

			internal bool <FoconApplyRadius>b__56_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor");
			}

			internal bool <FoconApplyRadius>b__56_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchStindR4(x);
			}

			internal bool <FoconApplyRate>b__57_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceChargeRateBonus");
			}

			internal float <FoconApplyRate>b__57_1(float chargeBonus)
			{
				return foconChargeBonus;
			}

			internal bool <AllowGestureUndercast>b__64_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<EquipmentSlot>(x, "get_stock");
			}

			internal int <AllowGestureUndercast>b__64_1(int stock, EquipmentSlot slot)
			{
				if (stock > 0)
				{
					return stock;
				}
				if (slot.inventory.GetItemCountEffective(Items.AutoCastEquipment) > 0)
				{
					return 1;
				}
				return 0;
			}

			internal bool <FixMaxStock>b__65_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine");
			}

			internal bool <FixMaxStock>b__65_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <FixMaxStock>b__65_2(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

			internal int <FixMaxStock>b__65_3(int stock, Inventory inv)
			{
				stock += GetGestureStockFromInventory(inv);
				return stock;
			}

			internal bool <RemoveGestureCdr>b__69_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment");
			}

			internal bool <RemoveGestureCdr>b__69_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <AddPreonAccumulatorBreak>b__72_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 0f);
			}

			internal bool <AddPreonAccumulatorBreak>b__72_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<EquipmentSlot>(x, "bfgChargeTimer");
			}

			internal void <AddPreonAccumulatorBreak>b__72_2(EquipmentSlot self)
			{
				TryGestureEquipmentBreak(self);
			}

			internal bool <RemoveGestureAutocast>b__74_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment");
			}

			internal bool <RemoveGestureAutocast>b__74_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <RevokeHappiestMaskRights>b__82_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GhostOnKill");
			}

			internal bool <RevokeHappiestMaskRights>b__82_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

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

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

			internal bool <ChangeMoveSpeed>b__84_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed");
			}

			internal bool <ChangeMoveSpeed>b__84_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal int <ChangeMoveSpeed>b__84_4(int buffCount)
			{
				if (buffCount > 0)
				{
					return 1;
				}
				return 0;
			}

			internal bool <ChangeDuration>b__85_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill");
			}

			internal bool <ChangeDuration>b__85_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <ChangeDuration>b__85_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 5);
			}

			internal bool <ChangeDuration>b__85_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed");
			}

			internal bool <ChangeDuration>b__85_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "ClearTimedBuffs");
			}

			internal bool <ChangeDuration>b__85_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "AddTimedBuff");
			}

			internal float <ChangeDuration>b__85_11(float baseBuffDuration, int iterator)
			{
				return iterator + 1;
			}

			internal int <ChangeDuration>b__85_12(int vanillaBuffCount, int itemCount, CharacterBody attackerBody)
			{
				if (itemCount > 25)
				{
					return itemCount;
				}
				int buffCount = attackerBody.GetBuffCount(Buffs.KillMoveSpeed);
				return Mathf.Min(25, buffCount + itemCount);
			}

			internal bool <RevokeScopeRights>b__93_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritDamage");
			}

			internal bool <RevokeScopeRights>b__93_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <FuckLeechingSeed>b__99_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 6);
			}

			internal bool <FuckLeechingSeed>b__99_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.ProcChainMask", "HasProc");
			}

			internal bool <FuckLeechingSeed>b__99_2(bool cantProc, DamageInfo damageInfo)
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_001e: Invalid comparison between Unknown and I4
				return cantProc || (!((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased && (int)damageInfo.damageType.damageSource != 64);
			}

			internal bool <FuckPlanula>b__106_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "parentEgg");
			}

			internal void <PrayerBeadsRework>b__111_1(orig_TrackBeadExperience orig, CharacterMaster self, ulong idk)
			{
			}

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

			internal bool <ChangeBeadAppliedStats>b__115_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountPermanent");
			}

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

			internal bool <ChangeBeadAppliedStats>b__115_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCount_CachedLastApplied");
			}

			internal void <ChangeBeadAppliedStats>b__115_7(int itemCount, CharacterBody self)
			{
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				int num = self.extraStatsOnLevelUpCount_CachedLastApplied - itemCount;
				self.extraStatsOnLevelUpCount_CachedLastApplied = itemCount;
				Inventory inventory = self.inventory;
				inventory.beadAppliedHealth += (float)num;
				Inventory inventory2 = self.inventory;
				inventory2.beadAppliedShield += (float)num;
				Inventory inventory3 = self.inventory;
				inventory3.beadAppliedRegen += (float)num;
				Inventory inventory4 = self.inventory;
				inventory4.beadAppliedDamage += (float)num;
				self.SetBuffCount(Buffs.ExtraStatsOnLevelUpBuff.buffIndex, (int)self.inventory.beadAppliedHealth);
			}

			internal bool <ChangeBeadAppliedStats>b__115_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraStatsOnLevelUpBuff");
			}

			internal bool <ChangeBeadAppliedStats>b__115_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal int <ChangeBeadAppliedStats>b__115_10(int buffCount)
			{
				return 0;
			}

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

			internal bool <ChangeBeadAppliedStats>b__115_18(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBleUn(x, ref val);
			}

			internal bool <RazorwireArrival>b__129_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<HurtBox>(x, "healthComponent");
			}

			internal HealthComponent <RazorwireArrival>b__129_3(HealthComponent hc, LightningOrb orb)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				if ((int)orb.lightningType == 6 && (Object)(object)hc != (Object)null)
				{
					for (int i = 0; (float)i < orb.procCoefficient; i++)
					{
						DotController.InflictDot(((Component)hc).gameObject, orb.attacker, hc.body.mainHurtBox, (DotIndex)0, razorwireBleedDuration, orb.damageValue, (uint?)null);
					}
					return null;
				}
				return hc;
			}

			internal bool <RazorwireBegin>b__130_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts");
			}

			internal bool <RazorwireBegin>b__130_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns");
			}

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

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

			internal bool <RazorwireBegin>b__130_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts");
			}

			internal bool <RazorwireBegin>b__130_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns");
			}

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

			internal bool <RazorwireBegin>b__130_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts");
			}

			internal bool <RazorwireBegin>b__130_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns");
			}

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

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

			internal bool <RazorwireBegin>b__130_12(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<OrbManager>(x, "AddOrb");
			}

			internal void <RemoveCraftingRecipe>b__203_0(CraftableDef craftableDef)
			{
				craftableDef.recipes = (Recipe[])(object)new Recipe[0];
			}
		}

		public static int ignitionTankBurnChance = 15;

		public float ignitionBurnDamage = 2f;

		public float ignitionBurnDuration = 2f;

		private bool shouldIgnitionDamageAndDurationCompound = false;

		public static int stacheBurnChance = 25;

		public static int brandBurnChance = 30;

		public static float _aegisBarrierFlat = 40f;

		public static float _aegisBarrierPercent = 10f;

		public static BuffDef aegisDecayBuff;

		public static int brittleCrownStealCountBase = 2;

		public static int brittleCrownStealCountStack = 1;

		public static float crownCommonStealSoulCost = 0.25f;

		public static float crownUncommonStealSoulCost = 0.5f;

		public static float crownRareStealSoulCost = 0.8f;

		private string common = Tools.ConvertDecimal(crownCommonStealSoulCost);

		private string uncommon = Tools.ConvertDecimal(crownUncommonStealSoulCost);

		private string rare = Tools.ConvertDecimal(crownRareStealSoulCost);

		public static float cooldown = 90f;

		public static float secondsPerCost = 0.5f;

		public static float foconMinRadius = 8f;

		public static float foconRadiusMultiplier = 0.5f;

		public static float foconChargeBonus = 1f;

		public static int foconMaxStack = 5;

		public static float gestureEquipBreakChance = 40f;

		public static int gestureStockBase = 4;

		public static int gestureStockStack = 2;

		public static float gestureCdiBase = 1f;

		public static float gestureCdiStack = 0.5f;

		public static float hauntExecutionThreshold = 0.25f;

		private float ghostSpawnChanceOnExecute = 100f;

		private float ghostDurationPerStack = 6.66f;

		public int scopeBaseCrit = 5;

		public int scopeStackCrit = 0;

		public int scopeBaseStationaryCrit = 40;

		public int scopeStackStationaryCrit = 0;

		public static ItemDef seedItemDef;

		public static float seedRegenDurationBase = 0.25f;

		public static float seedRegenDurationStack = 0.25f;

		public static float sunDurationBase = 10f;

		public static float sunDurationStack = 5f;

		public static float beadsPermanentStatBonus = 0.07f;

		private static float razorwireArmorBase = 8f;

		private static float razorwireArmorStack = 8f;

		private static float razorwireRangeBase = 40f;

		private static float razorwireRangeStack = 0f;

		private static float razorwireTargetsBase = 5f;

		private static float razorwireTargetsStack = 2f;

		private static float razorwireBleedDuration = 5f;

		private static float razorwireDamage = 3.6f;

		private static float razorwireProcCoeff = 0.2f;

		private static float razorwireCooldown = 1f;

		public static GameObject laserTurbineControllerPrefab;

		private readonly Dictionary<EntityState, ResDiscContext> resDiscStateContext = new Dictionary<EntityState, ResDiscContext>();

		public const string guid = "com.RiskOfBrainrot.SwanSongExtended";

		public const string teamName = "RiskOfBrainrot";

		public const string modName = "SwanSongExtended";

		public const string version = "0.1.0";

		public const string expansionName = "Swan Song";

		public const string expansionName2 = "Secrets of the Scug";

		public const string expansionToken = "EXPANSION2R4R";

		public const string expansionToken2 = "EXPANSIONSOTS";

		public const string DEVELOPER_PREFIX = "FRUIT";

		public static SwanSongPlugin instance;

		public static ExpansionDef expansionDefSS2;

		public static ExpansionDef expansionDefSOTS;

		public const string iconsPath = "";

		private BuffDef brittleCrownBuff => CommonAssets.brittleCrownCursePurchase;

		private static float minSpin => LaserTurbineController.minSpin;

		private static float maxSpin => LaserTurbineController.maxSpin;

		private static float spinPerKill => LaserTurbineController.spinGeneratedOnKill;

		private static float spinDecayRate => LaserTurbineController.spinDecayPerSecondAfterRefresh;

		private GameObject meatballNapalmPool => CommonAssets.meatballNapalmPool;

		public static AssetBundle mainAssetBundle => CommonAssets.mainAssetBundle;

		public static AssetBundle retierAssetBundle => CommonAssets.retierAssetBundle;

		public static bool iabMissilesLoaded => ModLoaded("com.HouseOfFruits.IAmBecomeMissiles");

		public static bool isAELoaded => ModLoaded("com.Borbo.ArtificerExtended");

		public static bool is2R4RLoaded => ModLoaded("com.HouseOfFruits.RiskierRain");

		public static bool isHBULoaded => ModLoaded("com.Borbo.HuntressBuffULTIMATE");

		public static bool isScepterLoaded => ModLoaded("com.DestroyedClone.AncientScepter");

		public static bool autosprintLoaded => ModLoaded("com.johnedwa.RTAutoSprintEx");

		public static bool acridLungeLoaded => ModLoaded("Withor.AcridBiteLunge");

		public static bool ucrLoaded => ModLoaded("HIFU.UltimateCustomRun");

		private void BurnReworks()
		{
			IgnitionTankRework();
		}

		private void IgnitionTankRework()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(IgniTankBurnChance);
			StrengthenBurnUtils.CheckDotForUpgrade += new hook_CheckDotForUpgrade(OverrideIgnitionBurn);
			LanguageAPI.Add("ITEM_STRENGTHENBURN_PICKUP", "Your ignite effects deal triple damage.");
			LanguageAPI.Add("ITEM_STRENGTHENBURN_DESC", $"Gain <style=cIsDamage>{ignitionTankBurnChance}% ignite chance</style>. " + "All ignition effects deal <style=cIsDamage>+" + Tools.ConvertDecimal(ignitionBurnDamage) + "</style> <style=cStack>(+" + Tools.ConvertDecimal(ignitionBurnDamage) + " per stack)</style> more damage and last <style=cIsUtility>+" + Tools.ConvertDecimal(ignitionBurnDuration) + "</style> <style=cStack>(+" + Tools.ConvertDecimal(ignitionBurnDuration) + " per stack)</style> longer.");
		}

		private void IgniTankBurnChance(CharacterBody sender, MoreStatHookEventArgs args)
		{
			Inventory inventory = sender.inventory;
			if (Object.op_Implicit((Object)(object)inventory) && inventory.GetItemCountEffective(Items.StrengthenBurn) > 0)
			{
				args.burnChanceOnHit += (float)ignitionTankBurnChance;
			}
		}

		private void OverrideIgnitionBurn(orig_CheckDotForUpgrade orig, Inventory inventory, ref InflictDotInfo dotInfo)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between Unknown and I4
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			if ((int)dotInfo.dotIndex != 1 && (int)dotInfo.dotIndex != 2)
			{
				return;
			}
			int itemCountEffective = inventory.GetItemCountEffective(Items.StrengthenBurn);
			if (itemCountEffective > 0)
			{
				dotInfo.preUpgradeDotIndex = dotInfo.dotIndex;
				dotInfo.dotIndex = (DotIndex)7;
				float num = 1f + ignitionBurnDamage * (float)itemCountEffective;
				float num2 = 1f + ignitionBurnDuration * (float)itemCountEffective;
				if (shouldIgnitionDamageAndDurationCompound)
				{
					dotInfo.totalDamage *= num * num2;
					dotInfo.damageMultiplier *= num;
				}
				else
				{
					dotInfo.totalDamage *= num;
					dotInfo.damageMultiplier *= num / num2;
				}
			}
		}

		public static int GetBurnCount(CharacterBody victimBody)
		{
			return victimBody.GetBuffCount(Buffs.OnFire) + victimBody.GetBuffCount(Buffs.StrongerBurn);
		}

		public void ReworkAegis()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			CreateBuff();
			Hooks();
			HealthComponent.Heal += new Manipulator(RemoveAegisOverheal);
			LanguageAPI.Add("ITEM_BARRIERONOVERHEAL_PICKUP", "Gain barrier on any interaction. While out of danger, barrier stops decaying.");
			LanguageAPI.Add("ITEM_BARRIERONOVERHEAL_DESC", "Using any interactable grants a <style=cIsHealing>temporary barrier</style> " + $"for <style=cIsHealing>{_aegisBarrierFlat} health</style> <style=cStack>(+{_aegisBarrierFlat} per stack)</style> " + "plus an additional " + $"<style=cIsHealing>{_aegisBarrierPercent}%</style> <style=cStack>(+{_aegisBarrierPercent}% per stack)</style> " + "of <style=cIsHealing>maximum health</style>. While outside of danger, <style=cIsUtility>barrier will not decay</style>.");
		}

		private void RemoveAegisOverheal(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "barrierOnOverHeal")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4_0);
		}

		private void CreateBuff()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			aegisDecayBuff = ScriptableObject.CreateInstance<BuffDef>();
			((Object)aegisDecayBuff).name = "AegisDecayFreeze";
			aegisDecayBuff.buffColor = new Color(0.95f, 0.85f, 0.08f);
			aegisDecayBuff.canStack = false;
			aegisDecayBuff.isDebuff = false;
			aegisDecayBuff.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/texBuffGenericShield.tif").WaitForCompletion();
			ContentAddition.AddBuffDef(aegisDecayBuff);
		}

		public void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//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
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			MultiShopCardUtils.OnMoneyPurchase += new hook_OnMoneyPurchase(OnMoneyPurchase);
			MultiShopCardUtils.OnNonMoneyPurchase += new hook_OnNonMoneyPurchase(OnNonMoneyPurchase);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddItemBehavior);
			StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(AegisDecayFreeze);
		}

		private void AegisDecayFreeze(CharacterBody body, MoreStatHookEventArgs args)
		{
			if (body.HasBuff(aegisDecayBuff))
			{
				args.barrierFreezeCount++;
			}
		}

		private void OnNonMoneyPurchase(orig_OnNonMoneyPurchase orig, PayCostContext context)
		{
			AegisBarrierGrant(context);
			orig.Invoke(context);
		}

		private void OnMoneyPurchase(orig_OnMoneyPurchase orig, PayCostContext context)
		{
			AegisBarrierGrant(context);
			orig.Invoke(context);
		}

		private void AddItemBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				self.AddItemBehavior<AegisDecayBehavior>(self.inventory.GetItemCountEffective(Items.BarrierOnOverHeal));
			}
		}

		private void AegisBarrierGrant(PayCostContext context)
		{
			CharacterMaster activatorMaster = context.activatorMaster;
			CharacterBody val = ((activatorMaster != null) ? activatorMaster.GetBody() : null);
			if (Object.op_Implicit((Object)(object)val))
			{
				int itemCountEffective = val.inventory.GetItemCountEffective(Items.BarrierOnOverHeal);
				HealthComponent healthComponent = val.healthComponent;
				if (itemCountEffective > 0 && (Object)(object)healthComponent != (Object)null)
				{
					float num = Util.ConvertAmplificationPercentageIntoReductionNormalized(_aegisBarrierPercent * 0.01f) * healthComponent.fullCombinedHealth;
					float num2 = (float)itemCountEffective * _aegisBarrierFlat;
					healthComponent.AddBarrierAuthority(num + num2);
				}
			}
		}

		public void BrittleCrownChanges()
		{
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Expected O, but got Unknown
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Expected O, but got Unknown
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Expected O, but got Unknown
			LanguageAPI.Add("ITEM_GOLDONHIT_NAME", "Sunken Crown");
			LanguageAPI.Add("ITEM_GOLDONHIT_PICKUP", "Steal from chests... " + Language.Styling.HealthColor("at the cost of health."));
			LanguageAPI.Add("ITEM_GOLDONHIT_DESC", "Allows interacting with chests without the ability to afford them, opening the chest " + Language.Styling.UtilityColor("without spending ANY money") + ". Stealing from chests costs " + Language.Styling.HealthColor("[ " + common + " / " + uncommon + " / " + rare + " ]") + " of your " + Language.Styling.HealthColor("maximum health") + ", depending on the size of the chest. " + $"Can steal up to {brittleCrownStealCountBase} {Language.Styling.StackText($"+{brittleCrownStealCountStack}")} times per stage.");
			HealthComponent.TakeDamageProcess += new Manipulator(RemoveCrownPenalty);
			GlobalEventManager.ProcessHitEnemy += new Manipulator(RemoveCrownReward);
			PurchaseInteraction.CanBeAffordedByInteractor += new hook_CanBeAffordedByInteractor(PurchaseInteraction_CanBeAffordedByInteractor);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddBrittleCrownBehavior);
		}

		private void AddBrittleCrownBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				self.AddItemBehavior<BrittleCrownBehavior>(self.inventory.GetItemCountEffective(Items.GoldOnHit));
			}
		}

		private void RemoveCrownReward(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: 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)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GoldOnHit"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		private void RemoveCrownPenalty(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "goldOnHit")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		private void CTCInit(orig_Init orig)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			orig.Invoke();
			CostTypeDef costTypeDef = CostTypeCatalog.GetCostTypeDef((CostTypeIndex)1);
			MethodInfo method = ((Delegate)(object)costTypeDef.payCost).Method;
			ILHook val = new ILHook((MethodBase)method, new Manipulator(PatchMoneyCostForBrittleCrown));
		}

		private void PatchMoneyCostForBrittleCrown(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.Emit(OpCodes.Ldarg_1);
			val.EmitDelegate<Action<PayCostContext>>((Action<PayCostContext>)delegate(PayCostContext ctx)
			{
				CharacterBody activatorBody = ctx.activatorBody;
				if (Object.op_Implicit((Object)(object)activatorBody) && Object.op_Implicit((Object)(object)ctx.activatorMaster) && ctx.activatorMaster.money < ctx.cost)
				{
					ctx.cost = 0;
				}
			});
		}

		private bool PurchaseInteraction_CanBeAffordedByInteractor(orig_CanBeAffordedByInteractor orig, PurchaseInteraction self, Interactor activator)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Invalid comparison between Unknown and I4
			bool flag = orig.Invoke(self, activator);
			if (flag)
			{
				return flag;
			}
			CharacterBody val = null;
			if ((int)self.costType == 1 && self.saleStarCompatible && ((Component)activator).gameObject.TryGetComponent<CharacterBody>(ref val) && val.HasBuff(brittleCrownBuff) && val.master.money < self.cost)
			{
				int num = 1;
				int difficultyScaledCost = Run.instance.GetDifficultyScaledCost(45, Stage.instance.entryDifficultyCoefficient);
				int difficultyScaledCost2 = Run.instance.GetDifficultyScaledCost(245, Stage.instance.entryDifficultyCoefficient);
				if (self.cost >= num && self.cost < difficultyScaledCost)
				{
					CounterfeitCalculations(val, crownCommonStealSoulCost);
				}
				else if (self.cost >= difficultyScaledCost && self.cost < difficultyScaledCost2)
				{
					CounterfeitCalculations(val, crownUncommonStealSoulCost);
				}
				else
				{
					CounterfeitCalculations(val, crownRareStealSoulCost);
				}
				flag = true;
			}
			return flag;
		}

		public void CounterfeitCalculations(CharacterBody activator, float soulCost)
		{
			SoulCostPlugin.AddSoulCostToBody(activator, soulCost);
			Util.PlaySound("sfx_lunarmoney_start", ((Component)activator).gameObject);
			if (NetworkServer.active)
			{
				activator.AddBuff(Buffs.FreeUnlocks);
				activator.RemoveBuff(brittleCrownBuff);
			}
		}

		public void ExecutiveCardChanges()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/MultiShopCard/MultiShopCard.asset").WaitForCompletion();
			val.cooldown = cooldown;
			LanguageAPI.Add("EQUIPMENT_MULTISHOPCARD_PICKUP", "Hack a targeted interactable. Hacked Multishops remain open.");
			LanguageAPI.Add("EQUIPMENT_MULTISHOPCARD_DESC", "Target an interactable to <style=cIsUtility>hack</style> it, unlocking its contents for <style=cIsUtility>free</style>. If the target is a <style=cIsUtility>multishop</style> terminal, the other terminals will <style=cIsUtility>remain open</style>.");
			MultiShopCardUtils.OnPurchase += new Manipulator(FreezeCard);
			EquipmentSlot.UpdateTargets += new hook_UpdateTargets(CardTargetInteractables);
			EquipmentSlot.PerformEquipmentAction += new hook_PerformEquipmentAction(PerformEquipmentAction);
		}

		private void FreezeCard(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);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "get_currentEquipmentIndex")
			});
			val.Remove();
			val.EmitDelegate<Func<Inventory, int>>((Func<Inventory, int>)((Inventory inv) => -1));
		}

		private bool PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
		{
			if ((Object)(object)equipmentDef == (Object)(object)Equipment.MultiShopCard)
			{
				return ActivateEquipment(self);
			}
			return orig.Invoke(self, equipmentDef);
			static bool ActivateEquipment(EquipmentSlot slot)
			{
				bool result = false;
				GameObject rootObject = slot.currentTarget.rootObject;
				if ((Object)(object)rootObject != (Object)null)
				{
					PurchaseInteraction component = rootObject.GetComponent<PurchaseInteraction>();
					if ((Object)(object)component != (Object)null && HackingMainState.PurchaseInteractionIsValidTarget(component))
					{
						component.Networkcost = 0;
						ShopTerminalBehavior val = default(ShopTerminalBehavior);
						if (rootObject.TryGetComponent<ShopTerminalBehavior>(ref val) && Object.op_Implicit((Object)(object)val.serverMultiShopController))
						{
							val.serverMultiShopController.SetCloseOnTerminalPurchase(component, false);
						}
						DroneVendorTerminalBehavior val2 = default(DroneVendorTerminalBehavior);
						if (rootObject.TryGetComponent<DroneVendorTerminalBehavior>(ref val2) && Object.op_Implicit((Object)(object)val2.serverMultiShopController))
						{
							val2.serverMultiShopController.SetCloseOnTerminalPurchase(component, false);
						}
						Interactor val3 = default(Interactor);
						if ((Object)(object)slot.characterBody != (Object)null && ((Component)slot.characterBody).TryGetComponent<Interactor>(ref val3))
						{
							val3.AttemptInteraction(rootObject);
						}
						slot.InvalidateCurrentTarget();
						result = true;
					}
				}
				return result;
			}
		}

		private void CardTargetInteractables(orig_UpdateTargets orig, EquipmentSlot self, EquipmentIndex targetingEquipmentIndex, bool userShouldAnticipateTarget)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			if (targetingEquipmentIndex != Equipment.MultiShopCard.equipmentIndex || !userShouldAnticipateTarget)
			{
				orig.Invoke(self, targetingEquipmentIndex, userShouldAnticipateTarget);
				return;
			}
			float num = 150f;
			float num2 = 10f;
			float num3 = Mathf.Cos(Mathf.Clamp(num2, 0f, 180f) * MathF.PI / 180f);
			float num4 = default(float);
			Ray val = CameraRigController.ModifyAimRayIfApplicable(self.GetAimRay(), ((Component)self.characterBody).gameObject, ref num4);
			Collider[] array = Physics.OverlapSphere(((Ray)(ref val)).origin, num + num4, -1, (QueryTriggerInteraction)2);
			bool flag = false;
			GameObject rootObject = self.currentTarget.rootObject;
			Vector3 val3;
			if ((Object)(object)rootObject != (Object)null)
			{
				PurchaseInteraction val2 = ((rootObject != null) ? rootObject.GetComponent<PurchaseInteraction>() : null);
				if ((Object)(object)val2 != (Object)null)
				{
					flag = HackingMainState.PurchaseInteractionIsValidTarget(val2) && val2.available;
				}
				Vector3 origin = ((Ray)(ref val)).origin;
				Vector3 position = rootObject.transform.position;
				if (flag)
				{
					val3 = position - origin;
					if (!(((Vector3)(ref val3)).sqrMagnitude > num * num))
					{
						Vector3 direction = ((Ray)(ref val)).direction;
						val3 = position - origin;
						if (!(Vector3.Dot(direction, ((Vector3)(ref val3)).normalized) < num3))
						{
							goto IL_0146;
						}
					}
				}
				self.InvalidateCurrentTarget();
			}
			goto IL_0146;
			IL_0146:
			bool flag2 = false;
			PurchaseInteraction val4 = null;
			Collider[] array2 = array;
			foreach (Collider val5 in array2)
			{
				Vector3 direction2 = ((Ray)(ref val)).direction;
				val3 = ((Component)val5).transform.position - ((Ray)(ref val)).origin;
				float num5 = Vector3.Dot(direction2, ((Vector3)(ref val3)).normalized);
				if (num5 < num3)
				{
					continue;
				}
				Vector3 origin2 = ((Ray)(ref val)).origin;
				Vector3 position2 = ((Component)val5).transform.position;
				if (!HasLos(origin2, position2))
				{
					continue;
				}
				EntityLocator component = ((Component)val5).GetComponent<EntityLocator>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					continue;
				}
				PurchaseInteraction component2 = component.entity.GetComponent<PurchaseInteraction>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					flag2 = HackingMainState.PurchaseInteractionIsValidTarget(component2);
					if (flag2)
					{
						flag2 = true;
						val4 = component2;
						break;
					}
					if ((Object)(object)val4 == (Object)null && component2.available)
					{
						val4 = component2;
					}
				}
			}
			if ((Object)(object)val4 != (Object)null)
			{
				if (flag2 && userShouldAnticipateTarget)
				{
					self.targetIndicator.visualizerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerIndicator");
				}
				else
				{
					self.targetIndicator.visualizerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerBadIndicator");
				}
				self.currentTarget = new UserTargetInfo
				{
					transformToIndicateAt = ((Component)val4).gameObject.transform,
					pickupController = null,
					hurtBox = null,
					rootObject = ((Component)val4).gameObject
				};
				self.targetIndicator.active = true;
				self.targetIndicator.targetTransform = self.currentTarget.transformToIndicateAt;
			}
			else
			{
				self.InvalidateCurrentTarget();
				self.targetIndicator.active = false;
			}
		}

		public bool HasLos(Vector3 origin, Vector3 targetPosition)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = targetPosition - origin;
			RaycastHit val2 = default(RaycastHit);
			return !Physics.Raycast(origin, val, ref val2, ((Vector3)(ref val)).magnitude - 1f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1);
		}

		private void FreezeCardf(orig_OnPurchase orig, PayCostContext context, int moneyCost)
		{
		}

		public void FocusedConvergenceChanges()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//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
			FocusConvergenceController.ApplyRadius += new hook_ApplyRadius(FoconNewRadius);
			FocusConvergenceController.ApplyRate += new Manipulator(FoconApplyRate);
			FocusConvergenceController.DoUpdate += new Manipulator(FoconUpdate);
			LanguageAPI.Add("ITEM_FOCUSEDCONVERGENCE_PICKUP", $"Increase the speed Holdout Zones charge... <color=#FF7F7F>BUT reduce the size of the zone</color>. Max of {foconMaxStack}.");
			LanguageAPI.Add("ITEM_FOCUSEDCONVERGENCE_DESC", "Holdout Zones charge <style=cIsUtility>" + Tools.ConvertDecimal(foconChargeBonus) + " <style=cStack>(+" + Tools.ConvertDecimal(foconChargeBonus) + " per stack)</style> faster</style>, but are <style=cIsHealth>" + Tools.ConvertDecimal(1f - foconRadiusMultiplier) + " smaller</style> <style=cStack>(-" + Tools.ConvertDecimal(1f - foconRadiusMultiplier) + " per stack)</style>. " + $"Max of {foconMaxStack}.");
		}

		private void FoconUpdate(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);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "cap")
			});
			val.EmitDelegate<Func<int, int>>((Func<int, int>)((int cap) => foconMaxStack));
		}

		private void FoconNewRadius(orig_ApplyRadius orig, MonoBehaviour self, ref float radius)
		{
			FocusConvergenceController val = (FocusConvergenceController)(object)((self is FocusConvergenceController) ? self : null);
			if (val.currentFocusConvergenceCount > 0)
			{
				radius -= foconMinRadius;
				radius *= Mathf.Pow(foconRadiusMultiplier, (float)val.currentFocusConvergenceCount);
				radius += foconMinRadius;
			}
		}

		private void FoconApplyRadius(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor")
			});
			val.Emit(OpCodes.Ldc_R4, foconMinRadius);
			val.Emit(OpCodes.Sub);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor")
			});
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, 2);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStindR4(x)
			});
			val.Emit(OpCodes.Ldc_R4, foconMinRadius);
			val.Emit(OpCodes.Add);
		}

		private void FoconApplyRate(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);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceChargeRateBonus")
			});
			val.EmitDelegate<Func<float, float>>((Func<float, float>)((float chargeBonus) => foconChargeBonus));
		}

		public void GestureChanges()
		{
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Expected O, but got Unknown
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Expected O, but got Unknown
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Expected O, but got Unknown
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Expected O, but got Unknown
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Expected O, but got Unknown
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Expected O, but got Unknown
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Expected O, but got Unknown
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Expected O, but got Unknown
			LanguageAPI.Add("ITEM_AUTOCASTEQUIPMENT_PICKUP", "Greatly increase equipment stock... " + Language.Styling.HealthColor("BUT greatly increase equipment cooldown.") + " Equipments can be activated during their cooldown, " + Language.Styling.HealthColor("with a chance to break."));
			LanguageAPI.Add("ITEM_AUTOCASTEQUIPMENT_DESC", "Hold " + Language.Styling.UtilityColor($"{gestureStockBase} additional equipment charges") + " " + Language.Styling.StackText($"+{gestureStockStack}") + "... " + Language.Styling.HealthColor("BUT increase equipment cooldown by +" + Tools.ConvertDecimal(gestureCdiBase)) + " " + Language.Styling.StackText("+" + Tools.ConvertDecimal(gestureCdiStack)) + ". Using your equipment without charges " + Language.Styling.UtilityColor("under-casts") + " it, allowing it to be used " + Language.Styling.HealthColor($"with a {gestureEquipBreakChance}% chance to break") + ". " + Language.Styling.UtilityColor("Unaffected by luck."));
			EquipmentSlot.MyFixedUpdate += new Manipulator(RemoveGestureAutocast);
			Inventory.CalculateEquipmentCooldownScale += new Manipulator(RemoveGestureCdr);
			EquipmentSlot.ExecuteIfReady += new Manipulator(AllowGestureUndercast);
			EquipmentSlot.OnEquipmentExecuted += new hook_OnEquipmentExecuted(AddGestureUndercast);
			Inventory.CalculateEquipmentCooldownScale += new hook_CalculateEquipmentCooldownScale(AddGestureCdi);
			Inventory.GetEquipmentSlotMaxCharges += new hook_GetEquipmentSlotMaxCharges(AddGestureStock);
			EquipmentSlot.MyFixedUpdate += new hook_MyFixedUpdate(AddGestureBreak);
			Inventory.UpdateEquipment += new Manipulator(FixMaxStock);
		}

		private void AllowGestureUndercast(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<EquipmentSlot>(x, "get_stock")
			});
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<int, EquipmentSlot, int>>((Func<int, EquipmentSlot, int>)delegate(int stock, EquipmentSlot slot)
			{
				if (stock > 0)
				{
					return stock;
				}
				return (slot.inventory.GetItemCountEffective(Items.AutoCastEquipment) > 0) ? 1 : 0;
			});
		}

		private void FixMaxStock(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			int num = default(int);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num)
			});
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<int, Inventory, int>>((Func<int, Inventory, int>)delegate(int stock, Inventory inv)
			{
				stock += GetGestureStockFromInventory(inv);
				return stock;
			});
		}

		private int AddGestureStock(orig_GetEquipmentSlotMaxCharges orig, Inventory self)
		{
			int num = orig.Invoke(self);
			return num + GetGestureStockFromInventory(self);
		}

		public static int GetGestureStockFromInventory(Inventory inv)
		{
			int itemCountEffective = inv.GetItemCountEffective(Items.AutoCastEquipment);
			if (itemCountEffective > 0)
			{
				return 4 + 2 * (itemCountEffective - 1);
			}
			return 0;
		}

		private float AddGestureCdi(orig_CalculateEquipmentCooldownScale orig, Inventory self)
		{
			float num = orig.Invoke(self);
			int itemCountEffective = self.GetItemCountEffective(Items.AutoCastEquipment);
			if (itemCountEffective > 0)
			{
				num *= 1f + gestureCdiBase + gestureCdiStack * (float)(itemCountEffective - 1);
			}
			return num;
		}

		private void RemoveGestureCdr(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: 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)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		private void AddGestureUndercast(orig_OnEquipmentExecuted orig, EquipmentSlot self)
		{
			bool flag = false;
			if (NetworkServer.active && self.stock <= 0 && self.inventory.GetItemCountEffective(Items.AutoCastEquipment) > 0)
			{
				self.inventory.RestockEquipmentCharges(self.activeEquipmentSlot, 1);
				flag = true;
			}
			orig.Invoke(self);
			if (NetworkServer.active && flag)
			{
				self.characterBody.AddBuff(CommonAssets.gestureQueueEquipBreak);
				if (self.subcooldownTimer <= 0f)
				{
					TryGestureEquipmentBreak(self);
				}
			}
		}

		private void AddGestureBreak(orig_MyFixedUpdate orig, EquipmentSlot self, float deltaTime)
		{
			orig.Invoke(self, deltaTime);
			if (NetworkServer.active && self.subcooldownTimer <= 0f)
			{
				TryGestureEquipmentBreak(self);
			}
		}

		private void AddPreonAccumulatorBreak(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f),
				(Instruction x) => ILPatternMatchingExt.MatchStfld<EquipmentSlot>(x, "bfgChargeTimer")
			});
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Action<EquipmentSlot>>((Action<EquipmentSlot>)delegate(EquipmentSlot self)
			{
				TryGestureEquipmentBreak(self);
			});
		}

		public static void TryGestureEquipmentBreak(EquipmentSlot self)
		{
			if (NetworkServer.active && self.characterBody.HasBuff(CommonAssets.gestureQueueEquipBreak))
			{
				if (Util.CheckRoll(gestureEquipBreakChance, 0f, (CharacterMaster)null))
				{
					self.inventory.SetEquipmentIndex((EquipmentIndex)(-1));
				}
				self.characterBody.RemoveBuff(CommonAssets.gestureQueueEquipBreak);
			}
		}

		private void RemoveGestureAutocast(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: 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)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		public void HappiestMaskRework()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: 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
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(MaskExecution);
			GlobalEventManager.onServerCharacterExecuted += HappiestMaskGhostSpawn;
			GlobalEventManager.OnCharacterDeath += new Manipulator(RevokeHappiestMaskRights);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddMaskBehavior);
			LanguageAPI.Add("ITEM_GHOSTONKILL_PICKUP", "Haunt nearby enemies, marking them for execution. Executing enemies summons a ghost.");
			LanguageAPI.Add("ITEM_GHOSTONKILL_DESC", $"Once every <style=cIsDamage>{HappiestMaskBehavior.baseHauntInterval}</style> seconds, " + "<style=cIsDamage>Haunt</style> a nearby non-boss enemy, marking them for Execution below <style=cIsHealth>" + Tools.ConvertDecimal(hauntExecutionThreshold) + "</style> health. Execution <style=cIsDamage>spawns a ghost</style> of the killed enemy with <style=cIsDamage>1500%</style> damage, " + $"lasting for <style=cIsDamage>{ghostDurationPerStack}s</style> <style=cStack>(+{ghostDurationPerStack}s per stack)</style> " + Language.Styling.UtilityColor("(double for Haunted enemies)") + ".");
			LanguageAPI.Add("ITEM_GHOSTONKILL_LORE", "<style=cMono>\r\n//--AUTO-TRANSCRIPTION FROM RALLYPOINT DELTA --//</style>\r\n\r\n“Sir, the ghosts are back.”\r\n\r\nThe man sighed. After a routine expedition, one of the crew members – a simple soldier - had recovered an artifact thought to have been aboard the Contact Light – a simple mask, adorned with a painfully happy grin. \r\n\r\n“I’ll take care of it.” The man trudged down the hall towards the barracks. The Lemurians he had killed earlier that day walked down the hall by him, barely earning a second glance from the man. This had become so commonplace that most of the crew members in this block had grown accustomed to having a ghostly room-mate.\r\n\r\nBut enough was enough. Stepping through the ghost of an Imp, the man slammed the door open. The lights were off, and in the corner sat the soldier.\r\n\r\n“Alright, we’ve had enough fun playing with the dead. Fork it over.”\r\n\r\nNo response. The man grunted and hoisted the soldier to his feet, giving him a few rough shakes. “Hey, can you hear me!? I said hand over the mask! I’m tired of waking up next to Beetles, so give it a rest already--”\r\n\r\nThe soldier’s limp body moved. Slowly, the soldier raised his finger – pointing directly at the man.\r\n\r\n“What are you...?” With a sense of dread, the man turned and saw the Lemurians he had killed earlier step into the room. Their mouths began to glow with an otherworldly light.\r\n\r\nThe man cursed under his breath as he loaded his shotgun. “This planet, I tell you...”");
		}

		private void MaskExecution(CharacterBody sender, MoreStatHookEventArgs args)
		{
			bool flag = sender.HasBuff(CommonAssets.hauntDebuff);
			args.ModifyBaseExecutionThreshold(hauntExecutionThreshold, flag);
		}

		private void AddMaskBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			int itemCountEffective = self.inventory.GetItemCountEffective(Items.GhostOnKill);
			self.AddItemBehavior<HappiestMaskBehavior>(itemCountEffective);
		}

		private void HappiestMaskGhostSpawn(DamageReport damageReport, float executionHealthLost)
		{
			CharacterBody victimBody = damageReport.victimBody;
			CharacterBody attackerBody = damageReport.attackerBody;
			if (!Object.op_Implicit((Object)(object)victimBody) || !Object.op_Implicit((Object)(object)attackerBody))
			{
				return;
			}
			Inventory inventory = attackerBody.inventory;
			if (!Object.op_Implicit((Object)(object)inventory))
			{
				return;
			}
			int num = inventory.GetItemCountEffective(Items.GhostOnKill);
			if (num > 0 && Object.op_Implicit((Object)(object)victimBody) && Util.CheckRoll(ghostSpawnChanceOnExecute, attackerBody.master))
			{
				if (victimBody.HasBuff(CommonAssets.hauntDebuff))
				{
					num *= 2;
				}
				Util.TryToCreateGhost(victimBody, attackerBody, Mathf.CeilToInt((float)num * ghostDurationPerStack));
			}
		}

		private void RevokeHappiestMaskRights(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: 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)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GhostOnKill"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Ldc_I4, 0);
			val.Emit(OpCodes.Mul);
		}

		public void HuntersHarpoonRework()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new Manipulator(ChangeMoveSpeed);
			GlobalEventManager.OnCharacterDeath += new Manipulator(ChangeDuration);
			LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", "Killing an enemy increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>125%</style> for <style=cIsUtility>1</style> <style=cStack>(+1 per stack)</style> seconds. Consecutive kills increase buff duration to up to 25 seconds.");
		}

		public static void ChangeMoveSpeed(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);
			float num = default(float);
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount")
			}))
			{
				Log.DebugBreakpoint("ChangeMoveSpeed");
				return;
			}
			val.Next.Operand = 1.25f;
			val.Index += 4;
			val.EmitDelegate<Func<int, int>>((Func<int, int>)((int buffCount) => (buffCount > 0) ? 1 : 0));
		}

		private void ChangeDuration(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int attackerBodyLoc = 16;
			int itemCountLoc = 54;
			int buffCountLoc = 86;
			int iteratorLoc = 91;
			ILLabel val2 = val.DefineLabel();
			ILLabel val3 = val.DefineLabel();
			if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective"),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref itemCountLoc)
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 1);
				return;
			}
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 5),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref buffCountLoc)
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 2);
				return;
			}
			int index = val.Index;
			val.Index = index + 1;
			val2 = val.MarkLabel();
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref attackerBodyLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "ClearTimedBuffs")
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 3);
				return;
			}
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "AddTimedBuff")
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 4);
				return;
			}
			val3 = val.MarkLabel();
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref iteratorLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, buffCountLoc)
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 5);
				return;
			}
			val.GotoLabel(val3, (MoveType)1, false);
			val.Emit(OpCodes.Ldloc, iteratorLoc);
			val.EmitDelegate<Func<float, int, float>>((Func<float, int, float>)((float baseBuffDuration, int iterator) => iterator + 1));
			val.GotoLabel(val2, (MoveType)1, false);
			val.Emit(OpCodes.Ldloc, itemCountLoc);
			val.Emit(OpCodes.Ldloc, attackerBodyLoc);
			val.EmitDelegate<Func<int, int, CharacterBody, int>>((Func<int, int, CharacterBody, int>)delegate(int vanillaBuffCount, int itemCount, CharacterBody attackerBody)
			{
				if (itemCount > 25)
				{
					return itemCount;
				}
				int buffCount = attackerBody.GetBuffCount(Buffs.KillMoveSpeed);
				return Mathf.Min(25, buffCount + itemCount);
			});
		}

		public void ReworkLaserScope()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			ItemDef val = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/CritDamage/CritDamage.asset").WaitForCompletion();
			RetierItemAsync(RoR2_DLC1_CritDamage.CritDamage_asset, (ItemTier)1, FixIcon);
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ScopeCritChance);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddScopeItemBehavior);
			LanguageAPI.Add("ITEM_CRITDAMAGE_NAME", "Combat Telescope");
			LanguageAPI.Add("ITEM_CRITDAMAGE_PICKUP", "Increases 'Critical Strike' chance and damage while stationary.");
			LanguageAPI.Add("ITEM_CRITDAMAGE_DESC", "<style=cIsDamage>Critical Strikes</style> deal an additional <style=cIsDamage>100% damage</style> <style=cStack>(+100% per stack)</style>. " + $"Gain <style=cIsDamage>{scopeBaseCrit}% critical chance</style>, " + $"or <style=cIsDamage>{scopeBaseStationaryCrit}%</style> after standing still " + $"for <style=cIsUtility>{CombatTelescopeBehavior.combatTelescopeWaitTime}</style> seconds.");
			static void FixIcon(ItemDef itemDef)
			{
				Sprite val2 = retierAssetBundle.LoadAsset<Sprite>("Assets/Icons/Laser_Scope.png");
				if (Object.op_Implicit((Object)(object)val2))
				{
					itemDef.pickupIconSprite = val2;
				}
			}
		}

		private void AddScopeItemBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			self.AddItemBehavior<CombatTelescopeBehavior>(self.inventory.GetItemCountEffective(Items.CritDamage));
		}

		private void ScopeCritChance(CharacterBody sender, StatHookEventArgs args)
		{
			if (!Object.op_Implicit((Object)(object)sender.inventory))
			{
				return;
			}
			int itemCountEffective = sender.inventory.GetItemCountEffective(Items.CritDamage);
			if (itemCountEffective > 0)
			{
				int num = scopeBaseCrit;
				int buffCount = sender.GetBuffCount(CommonAssets.combatTelescopeCritChance);
				if (buffCount > 0)
				{
					num = scopeBaseStationaryCrit;
				}
				args.critAdd += (float)num;
			}
		}

		private void RevokeScopeRights(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: 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)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritDamage"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Ldc_I4, 0);
			val.Emit(OpCodes.Mul);
		}

		public void ReworkLeechingSeed()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			RetierItemAsync(RoR2_Base_Seed.Seed_asset, (ItemTier)0, FixIcon);
			GlobalEventManager.ProcessHitEnemy += new Manipulator(FuckLeechingSeed);
			static void FixIcon(ItemDef itemDef)
			{
				Sprite val = retierAssetBundle.LoadAsset<Sprite>("Assets/Icons/Leeching_Seed.png");
				if (Object.op_Implicit((Object)(object)val))
				{
					itemDef.pickupIconSprite = val;
				}
			}
		}

		private void NewSeedBehavior(CharacterBody body, DamageInfo damageInfo, CharacterBody victimBody)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			if (((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)6))
			{
				return;
			}
			Inventory inventory = body.inventory;
			if ((Object)(object)inventory != (Object)null)
			{
				int itemCountEffective = inventory.GetItemCountEffective(seedItemDef);
				if (itemCountEffective > 0)
				{
					ProcChainMask procChainMask = damageInfo.procChainMask;
					((ProcChainMask)(ref procChainMask)).AddProc((ProcType)6);
					body.AddTimedBuff(Buffs.MeatRegenBoost, (seedRegenDurationBase + seedRegenDurationStack * (float)(itemCountEffective - 1)) * damageInfo.procCoefficient);
				}
			}
		}

		private void FuckLeechingSeed(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 6),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.ProcChainMask", "HasProc")
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool cantProc, DamageInfo damageInfo) => cantProc || (!((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased && (int)damageInfo.damageType.damageSource != 64)));
			}
		}

		public void ReworkFreshMeat()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			ChangeBuffStacking("MeatRegenBoost", canStack: true);
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(LetMeatActuallyStack);
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(MeatRegen);
			LanguageAPI.Add("ITEM_FLATHEALTH_PICKUP", "Regenerate health after killing an enemy.");
			LanguageAPI.Add("ITEM_FLATHEALTH_DESC", "Increases <style=cIsHealing>base health regeneration</style> by <style=cIsHealing>+2 hp/s</style> for <style=cIsUtility>3s</style> <style=cStack>(+3s per stack)</style> after killing an enemy.");
		}

		private void MeatRegen(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody attackerBody = damageReport.attackerBody;
			if ((Object)(object)attackerBody != (Object)null && (Object)(object)attackerBody.inventory != (Object)null)
			{
				Inventory inventory = attackerBody.inventory;
				int itemCountEffective = inventory.GetItemCountEffective(Items.FlatHealth);
				if (itemCountEffective > 0)
				{
					attackerBody.AddTimedBuffAuthority(Buffs.MeatRegenBoost.buffIndex, (float)(3 * itemCountEffective));
				}
			}
			orig.Invoke(self, damageReport);
		}

		private void LetMeatActuallyStack(CharacterBody sender, StatHookEventArgs args)
		{
			int buffCount = sender.GetBuffCount(Buffs.MeatRegenBoost);
			if (buffCount > 1)
			{
				args.baseRegenAdd += 2f * (1f + 0.2f * (sender.level - 1f)) * (float)(buffCount - 1);
			}
			Inventory inventory = sender.inventory;
			if ((Object)(object)inventory != (Object)null)
			{
				args.baseHealthAdd -= (float)(inventory.GetItemCountEffective(Items.FlatHealth) * 25);
			}
		}

		private void PlanulaChanges()
		{
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Expected O, but got Unknown
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Expected O, but got Unknown
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Expected O, but got Unknown
			LanguageAPI.Add("ITEM_PARENTEGG_PICKUP", "The unmatched power of the sun!");
			LanguageAPI.Add("ITEM_PARENTEGG_DESC", "After beginning the teleporter event, " + Language.Styling.DamageColor("summon a sun overhead") + " that lasts for " + Language.Styling.DamageColor(sunDurationBase.ToString()) + " seconds " + Language.Styling.StackText($"+{sunDurationStack}") + ". " + Language.Styling.HealthColor("All enemies and allies burn near the sun") + ".");
			HealthComponent.TakeDamageProcess += new Manipulator(FuckPlanula);
			IdleToChargingState.OnEnter += new hook_OnEnter(OnTeleporterEventPreStart);
			ChargingState.OnEnter += new hook_OnEnter(OnTeleporterEventStart);
			ChargingState.FixedUpdate += new hook_FixedUpdate(OnTeleporterEventUpdate);
		}

		private void FuckPlanula(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "parentEgg")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4_0);
		}

		private void OnTeleporterEventPreStart(orig_OnEnter orig, IdleToChargingState self)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!NetworkServer.active)
			{
				return;
			}
			int itemCountForTeam = Util.GetItemCountForTeam((TeamIndex)1, Items.ParentEgg.itemIndex, false, false);
			if (itemCountForTeam <= 0)
			{
				return;
			}
			TeleporterInteraction teleporterInteraction = ((BaseTeleporterState)self).teleporterInteraction;
			GameObject chargeActivatorServer = teleporterInteraction.chargeActivatorServer;
			PlanulaSunController planulaSunController = ((Component)teleporterInteraction).gameObject.AddComponent<PlanulaSunController>();
			Debug.Log((object)((Object)(object)planulaSunController != (Object)null));
			if ((Object)(object)planulaSunController != (Object)null)
			{
				planulaSunController.holdoutZoneController = teleporterInteraction.holdoutZoneController;
				Transform val = ((EntityState)self).transform.Find("FireworkOrigin");
				if ((Object)(object)val == (Object)null)
				{
					val = ((Component)teleporterInteraction).transform;
				}
				planulaSunController.activator = chargeActivatorServer;
				planulaSunController.CreateBeamEffect(val);
				planulaSunController.SetSunDuration(itemCountForTeam);
			}
		}

		private void OnTeleporterEventStart(orig_OnEnter orig, ChargingState self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				PlanulaSunController component = ((EntityState)self).gameObject.GetComponent<PlanulaSunController>();
				if ((Object)(object)component != (Object)null)
				{
					component.EndBeamEffect();
					component.CreateSun();
				}
			}
		}

		private void OnTeleporterEventUpdate(orig_FixedUpdate orig, ChargingState self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
			}
		}

		public void PrayerBeadsRework()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			RetierItemAsync(RoR2_DLC2_Items_ExtraStatsOnLevelUp.ExtraStatsOnLevelUp_asset, (ItemTier)1, ChangeTags);
			CharacterMaster.OnBodyStart += new hook_OnBodyStart(InitializeBeadBuff);
			object obj = <>c.<>9__111_1;
			if (obj == null)
			{
				hook_TrackBeadExperience val = delegate
				{
				};
				<>c.<>9__111_1 = val;
				obj = (object)val;
			}
			CharacterMaster.TrackBeadExperience += (hook_TrackBeadExperience)obj;
			CharacterBody.RecalculateStats += new Manipulator(ChangeBeadAppliedStats);
			ExperienceManager.AwardExperience += new hook_AwardExperience(BeadExperience);
			StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(BeadScrapCount);
			LanguageAPI.Add("ITEM_EXTRASTATSONLEVELUP_PICKUP", "Prioritized when used with <style=cIsHealing>Uncommon</style> 3D Printers. Permanently increase ALL stats after removal.");
			LanguageAPI.Add("ITEM_EXTRASTATSONLEVELUP_DESC", "Prioritized when used with <style=cIsHealing>Uncommon</style> 3D Printers. After removal, permanently grants a " + Language.Styling.ConvertDecimal(beadsPermanentStatBonus) + " increase to <style=cIsUtility>experience gain</style>, <style=cIsHealing>health</style>, <style=cIsHealing>shield</style>, <style=cIsHealing>regeneration</style>, and <style=cIsDamage>damage</style>.");
			static void ChangeTags(ItemDef itemDef)
			{
				ItemTag[] array = new ItemTag[6];
				RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
				itemDef.tags = (ItemTag[])(object)array;
			}
		}

		private void BeadScrapCount(CharacterBody sender, MoreStatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender.inventory))
			{
				args.scrapGreenCountAdd += sender.inventory.GetItemCountEffective(Items.ExtraStatsOnLevelUp);
			}
		}

		private void BeadExperience(orig_AwardExperience orig, ExperienceManager self, Vector3 origin, CharacterBody body, ulong amount)
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)body.master != (Object)null && (Object)(object)body.inventory != (Object)null)
			{
				float num = 1f + body.inventory.beadAppliedHealth * beadsPermanentStatBonus;
				amount += (ulong)((float)amount * num);
			}
			orig.Invoke(self, origin, body, amount);
		}

		private void InitializeBeadBuff(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, body);
			Inventory inventory = body.inventory;
			if (!((Object)(object)inventory == (Object)null) && !(inventory.beadAppliedHealth <= 0f))
			{
				body.SetBuffCount(Buffs.ExtraStatsOnLevelUpBuff.buffIndex, (int)inventory.beadAppliedHealth);
			}
		}

		private void ChangeBeadAppliedStats(ILContext il)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			//IL_013b: 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)
			ILCursor c = new ILCursor(il);
			int itemCountLoc = 69;
			ILLabel label = null;
			if (!c.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountPermanent"),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref itemCountLoc)
			}))
			{
				Log.DebugBreakpoint("ChangeBeadAppliedStats", 1);
				return;
			}
			if (!c.TryGotoNext((MoveType)2, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, itemCountLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCount_CachedLastApplied"),
				(Instruction x) => ILPatternMatchingExt.MatchBge(x, ref label)
			}))
			{
				Log.DebugBreakpoint("ChangeBeadAppliedStats", 2);
				return;
			}
			c.Emit(OpCodes.Ldloc, itemCountLoc);
			c.Emit(OpCodes.Ldarg_0);
			c.EmitDelegate<Action<int, CharacterBody>>((Action<int, CharacterBody>)delegate(int itemCount, CharacterBody self)
			{
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				int num6 = self.extraStatsOnLevelUpCount_CachedLastApplied - itemCount;
				self.extraStatsOnLevelUpCount_CachedLastApplied = itemCount;
				Inventory inventory = self.inventory;
				inventory.beadAppliedHealth += (float)num6;
				Inventory inventory2 = self.inventory;
				inventory2.beadAppliedShield += (float)num6;
				Inventory inventory3 = self.inventory;
				inventory3.beadAppliedRegen += (float)num6;
				Inventory inventory4 = self.inventory;
				inventory4.beadAppliedDamage += (float)num6;
				self.SetBuffCount(Buffs.ExtraStatsOnLevelUpBuff.buffIndex, (int)self.inventory.beadAppliedHealth);
			});
			if (!c.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraStatsOnLevelUpBuff"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount")
			}))
			{
				Log.DebugBreakpoint("ChangeBeadAppliedStats", 3);
				return;
			}
			c.EmitDelegate<Func<int, int>>((Func<int, int>)((int buffCount) => 0));
			c.GotoLabel(label, (MoveType)1, false);
			ChangeBeadStat("beadAppliedHealth", ChangeBeadHealthBonus);
			ChangeBeadStat("beadAppliedShield", ChangeBeadShieldBonus);
			ChangeBeadStat("beadAppliedRegen", ChangeBeadRegenBonus);
			ChangeBeadStat("beadAppliedDamage", ChangeBeadDamageBonus);
			static float ChangeBeadDamageBonus(float beadBonusStacks, CharacterBody self, float level)
			{
				float num = self.baseDamage + self.levelDamage * level;
				return num * beadsPermanentStatBonus * beadBonusStacks;
			}
			static float ChangeBeadHealthBonus(float beadBonusStacks, CharacterBody self, float level)
			{
				float num5 = self.baseMaxHealth + self.levelMaxHealth * level;
				return num5 * beadsPermanentStatBonus * beadBonusStacks;
			}
			static float ChangeBeadRegenBonus(float beadBonusStacks, CharacterBody self, float level)
			{
				float num2 = Mathf.Abs(self.baseRegen + self.levelRegen * level);
				return num2 * beadsPermanentStatBonus * beadBonusStacks;
			}
			static float ChangeBeadShieldBonus(float beadBonusStacks, CharacterBody self, float level)
			{
				float num3 = self.baseMaxHealth + self.levelMaxHealth * level;
				return num3 * beadsPermanentStatBonus * beadBonusStacks;
			}
			void ChangeBeadStat(string beadStatName, Func<float, CharacterBody, float, float> callback)
			{
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				float num4 = default(float);
				ILLabel val = default(ILLabel);
				if (!c.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<Inventory>(x, beadStatName),
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4),
					(Instruction x) => ILPatternMatchingExt.MatchBleUn(x, ref val)
				}) || !c.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<Inventory>(x, beadStatName)
				}))
				{
					Log.DebugBreakpoint("ChangeBeadStat:" + beadStatName, 3);
				}
				else
				{
					c.Emit(OpCodes.Ldarg_0);
					c.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float beadBonus, CharacterBody self)
					{
						float arg = self.level - 1f;
						return callback(beadBonus, self, arg);
					});
				}
			}
		}

		public void RazorwireRework()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//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
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RazorwireArmor);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddRazorBehavior);
			HealthComponent.TakeDamageProcess += new Manipulator(RazorwireBegin);
			LightningOrb.OnArrival += new Manipulator(RazorwireArrival);
			LanguageAPI.Add("ITEM_THORNS_PICKUP", "Retaliate in a burst of bleeding razors on taking damage. Recharges over time.");
			LanguageAPI.Add("ITEM_THORNS_DESC", $"Increase <style=cIsHealing>armor</style> by <style=cIsHealing>{razorwireArmorBase}</style> <style=cStack>(+{razorwireArmorStack} per stack)</stack>" + "Getting hit causes you to explode in a burst of razors, " + $"<style=cIsDamage>bleeding</style> up to <style=cIsDamage>{razorwireTargetsBase}</style> " + $"<style=cStack>(+{razorwireTargetsStack} per stack)</style> nearby enemies " + "for <style=cIsDamage>" + Tools.ConvertDecimal(razorwireBleedDuration * 0.8f) + "</style> base damage per <style=cIsDamage>razor charge</style> expelled. " + $"You can hold up to {RazorwireBehavior.baseRazors} <style=cStack>(+{RazorwireBehavior.stackRazors} per stack)</style> " + $"razor charges, all reloading over <style=cIsUtility>{RazorwireBehavior.rechargeTime}</style> seconds.");
		}

		private void RazorwireArmor(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender.inventory))
			{
				int itemCountEffective = sender.inventory.GetItemCountEffective(Items.Thorns);
				if (itemCountEffective > 0)
				{
					args.armorAdd += razorwireArmorBase + razorwireArmorStack * (float)(itemCountEffective - 1);
				}
			}
		}

		private void AddRazorBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			int itemCountEffective = self.inventory.GetItemCountEffective(Items.Thorns);
			self.AddItemBehavior<RazorwireBehavior>(itemCountEffective);
		}

		private void RazorwireArrival(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int healthComponentLoc = 0;
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<HurtBox>(x, "healthComponent"),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref healthComponentLoc)
			});
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, healthComponentLoc)
			});
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<HealthComponent, LightningOrb, HealthComponent>>((Func<HealthComponent, LightningOrb, HealthComponent>)delegate(HealthComponent hc, LightningOrb orb)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				if ((int)orb.lightningType == 6 && (Object)(object)hc != (Object)null)
				{
					for (int i = 0; (float)i < orb.procCoefficient; i++)
					{
						DotController.InflictDot(((Component)hc).gameObject, orb.attacker, hc.body.mainHurtBox, (DotIndex)0, razorwireBleedDuration, orb.damageValue, (uint?)null);
					}
					return null;
				}
				return hc;
			});
		}

		private void RazorwireBegin(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_