Decompiled source of LittleGameplayTweaks v3.3.2

LittleGameplayTweaks.dll

Decompiled a week ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.AffixEarthHealer;
using EntityStates.BeetleQueenMonster;
using EntityStates.Commando;
using EntityStates.Croco;
using EntityStates.Duplicator;
using EntityStates.Huntress;
using EntityStates.Interactables.MSObelisk;
using EntityStates.LemurianBruiserMonster;
using EntityStates.LunarTeleporter;
using EntityStates.Merc;
using EntityStates.Merc.Weapon;
using EntityStates.Missions.Arena.NullWard;
using EntityStates.ScavMonster;
using EntityStates.VoidSurvivor.CorruptMode;
using HG;
using IL.EntityStates.LemurianBruiserMonster;
using IL.RoR2;
using LittleGameplayTweaks.Properties;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.AffixEarthHealer;
using On.EntityStates.BeetleQueenMonster;
using On.EntityStates.Commando;
using On.EntityStates.Croco;
using On.EntityStates.Duplicator;
using On.EntityStates.Huntress;
using On.EntityStates.Interactables.MSObelisk;
using On.EntityStates.LunarTeleporter;
using On.EntityStates.Merc;
using On.EntityStates.Merc.Weapon;
using On.EntityStates.Missions.Arena.NullWard;
using On.EntityStates.ScavMonster;
using On.EntityStates.VoidSurvivor.CorruptMode;
using On.RoR2;
using On.RoR2.UI;
using On.RoR2.UI.MainMenu;
using R2API;
using R2API.Utils;
using Rewired;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CharacterAI;
using RoR2.EntitlementManagement;
using RoR2.EntityLogic;
using RoR2.ExpansionManagement;
using RoR2.Hologram;
using RoR2.Navigation;
using RoR2.Skills;
using RoR2.UI;
using RoR2.UI.MainMenu;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LittleGameplayTweaks")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+99fbf36eab41e48d0b9a5ef12ef5ac1498ef78f3")]
[assembly: AssemblyProduct("LittleGameplayTweaks")]
[assembly: AssemblyTitle("LittleGameplayTweaks")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace LittleGameplayTweaks
{
	internal static class Assets
	{
		public static AssetBundle Bundle;

		public static PluginInfo PluginInfo;

		public static string Folder = "GameplayTweaks\\";

		internal static string assemblyDir => Path.GetDirectoryName(PluginInfo.Location);

		internal static void Init(PluginInfo info)
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			PluginInfo = info;
			if (!Directory.Exists(GetPathToFile("GameplayTweaks")))
			{
				Folder = "";
			}
			if (Directory.Exists(GetPathToFile(Folder + "Languages")))
			{
				Language.SetFolders += new hook_SetFolders(SetFolders);
			}
			else
			{
				Debug.LogWarning((object)"COULD NOT FIND LANGUAGES FOLDER");
			}
		}

		private static void SetFolders(orig_SetFolders orig, Language self, IEnumerable<string> newFolders)
		{
			IEnumerable<string> second = Directory.EnumerateDirectories(Path.Combine(GetPathToFile(Folder + "Languages")), self.name);
			orig.Invoke(self, newFolders.Union(second));
		}

		internal static string GetPathToFile(string folderName)
		{
			return Path.Combine(assemblyDir, folderName);
		}

		internal static string GetPathToFile(string folderName, string fileName)
		{
			return Path.Combine(assemblyDir, folderName, fileName);
		}
	}
	public class WConfig
	{
		public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Little_Gameplay_Tweaks.cfg", true);

		public static ConfigEntry<bool> EclipseAllowVoid;

		public static ConfigEntry<bool> EclipseAllowTwisted;

		public static ConfigEntry<bool> EclipseAllowArtifactWorld;

		public static ConfigEntry<bool> EclipseAllowChoiceArtifacts;

		public static ConfigEntry<bool> EclipseAllowChoiceWeirdArtifacts;

		public static ConfigEntry<bool> PrismElites;

		public static ConfigEntry<bool> PrismAllowChoiceArtifacts;

		public static ConfigEntry<bool> LevelMaximum;

		public static ConfigEntry<int> LevelMaximumFinalBoss;

		public static ConfigEntry<bool> cheaperTier2;

		public static ConfigEntry<bool> disableNewContent;

		public static ConfigEntry<bool> onlyUpdateMostRecentSpawnPools;

		public static ConfigEntry<bool> portalAfterLimbo;

		public static ConfigEntry<bool> SulfurPoolsSkin;

		public static ConfigEntry<bool> DCCSEnemyChanges;

		public static ConfigEntry<bool> DCCSEnemyChangesLooping;

		public static ConfigEntry<bool> DCCSEnemyNewFamilies;

		public static ConfigEntry<bool> FamiliesStage1;

		public static ConfigEntry<float> DCCSEnemyFamilyChance;

		public static ConfigEntry<bool> DCCSInteractableChanges;

		public static ConfigEntry<bool> DCCSCategoryChest;

		public static ConfigEntry<bool> DCCSInteractableCostChanges;

		public static ConfigEntry<bool> DccsAddCategoryToSots;

		public static ConfigEntry<float> InteractablesMountainMultiplier;

		public static ConfigEntry<bool> DCCSInteractablesStageCredits;

		public static ConfigEntry<bool> cfgVoidStagesNoTime;

		public static ConfigEntry<bool> cfgGoldShoresCredits;

		public static ConfigEntry<bool> FasterPrinter;

		public static ConfigEntry<bool> FasterScrapper;

		public static ConfigEntry<bool> FasterShrines;

		public static ConfigEntry<int> FasterDeepVoidSignal;

		public static ConfigEntry<bool> FasterArenaCells;

		public static ConfigEntry<bool> RegenArenaCells;

		public static ConfigEntry<bool> InteractableNoLunarCost;

		public static ConfigEntry<bool> InteractableHealingShrine;

		public static ConfigEntry<bool> InteractableBloodShrineMoreGold;

		public static ConfigEntry<bool> InteractableBloodShrineLessCost;

		public static ConfigEntry<bool> InteractablesCombatShrineHP;

		public static ConfigEntry<bool> InteractableFastHalcyShrine;

		public static ConfigEntry<bool> InteractableHalcShrineNerf;

		public static ConfigEntry<bool> InteractableHalcyShrineHalcy;

		public static ConfigEntry<int> InteractableRedSoupAmount;

		public static ConfigEntry<int> MegaDroneCost;

		public static ConfigEntry<int> TurretDroneCost;

		public static ConfigEntry<bool> CharactersCaptainKeepInHiddemRealm;

		public static ConfigEntry<bool> CharactersHuntressLysateCell;

		public static ConfigEntry<bool> CharactersCommandoInvul;

		public static ConfigEntry<bool> CharactersVoidFiendEquip;

		public static ConfigEntry<bool> BuffMegaDroneStats;

		public static ConfigEntry<bool> cscGreaterWispCredits;

		public static ConfigEntry<bool> cfgScavBossItem;

		public static ConfigEntry<bool> cfgScavMoreItemsElites;

		public static ConfigEntry<bool> cfgScavNewTwisted;

		public static ConfigEntry<bool> cfgScavTwistedScaling;

		public static ConfigEntry<bool> cfgMendingCoreBuff;

		public static ConfigEntry<bool> cfgElderLemurianBands;

		public static ConfigEntry<bool> VoidPortalChance;

		public static ConfigEntry<float> ShopChancePercentage;

		public static ConfigEntry<float> YellowPercentage;

		public static ConfigEntry<float> BonusAspectDropRate;

		public static ConfigEntry<bool> CelestialStage10;

		public static ConfigEntry<bool> ThirdLunarSeer;

		public static ConfigEntry<bool> EclipseDifficultyAlways;

		public static void InitConfig()
		{
			EclipseAllowVoid = ConfigFileUNSORTED.Bind<bool>("Gamemodes", "Eclipse allow Moment Whole", true, "Allows Celestial Portal to spawn so you can use Twisted Scav as an alternate final boss in Eclipse. The obelisk will always take you to Moment Whole even if you do not have Beads.");
			EclipseAllowTwisted = ConfigFileUNSORTED.Bind<bool>("Gamemodes", "Eclipse allow Void Locus", true, "Allows Void Portals to spawn so you can use Voidling as an alternate final boss in Eclipse.");
			EclipseAllowArtifactWorld = ConfigFileUNSORTED.Bind<bool>("Gamemodes", "Eclipse allow Bulwarks Ambry", false, "Allows computer. For artifact");
			EclipseAllowChoiceArtifacts = ConfigFileUNSORTED.Bind<bool>("Gamemodes", "Eclipse choose some Artifacts", true, "Allows the choice of often considered challenge or variety artifacts.\n\nDeath, Chaos, Honor, Evolution, Spite, Soul, Vengence, Dissonance");
			PrismAllowChoiceArtifacts = ConfigFileUNSORTED.Bind<bool>("Gamemodes", "Prismatic choose Artifacts", true, "Choose what artifacts you want to enable in Prismatic runs instead of random ones.");
			LevelMaximum = ConfigFileUNSORTED.Bind<bool>("!Main", "999 Maximum Level", false, "Makes enemy level go up to level 999. This will make looping a lot more dangerous.\n\nWill update mid-run");
			LevelMaximumFinalBoss = ConfigFileUNSORTED.Bind<int>("!Main", "Level Maximum for Final Bosses", 200, "Final bosses get bonus stats because of the 99 level limit. So both higher level and bonus stats can make them far too tanky.");
			LevelMaximum.SettingChanged += LevelMaximum_SettingChanged;
			cheaperTier2 = ConfigFileUNSORTED.Bind<bool>("!Main", "Cheaper Tier 2 Elites", true, "Makes Tier 2 Elites cost 30x instead of 36x.\n\nWill update mid-run if changed");
			cheaperTier2.SettingChanged += CheaperTier2_SettingChanged;
			disableNewContent = ConfigFileUNSORTED.Bind<bool>("!Main", "Disable New Content", false, "Disable new content added by mod. This needs to be done if you are using this mod as a client/host with people who do not have the mod.");
			onlyUpdateMostRecentSpawnPools = ConfigFileUNSORTED.Bind<bool>("!Main", "Only update one set of spawn pools", true, "Auto detects what DLC you have and picks and appropriate one.");
			DCCSEnemyChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Enemy Spawn Pools (Pre Loop)", true, "Adds and changes some enemy variety");
			SulfurPoolsSkin = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Sulfur Pool Beetles Skin", true, "ReImplement the unused Sulfur Pools skin");
			DCCSEnemyChangesLooping = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Enemy Spawn Pools (Loop)", true, "All stages will have enemies that will only appear after looping");
			DCCSEnemyNewFamilies = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Family event additions and changes", true, "Add new family events and reorganizes existing ones");
			FamiliesStage1 = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Stage 1 Family Events", true, "Allow most family events to happen on stage 1");
			DCCSEnemyFamilyChance = ConfigFileUNSORTED.Bind<float>("Spawnpool - Enemy", "Family event weight", 2.22f, "Weight for family event. Vanilla is 2");
			DCCSInteractableChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Interactable Spawn Pools", true, "Mountain Shrine on Sulfur Pools, No Gunner Turret on Stage 4 & 5, Rare Printers and Cleansing Pools are a bit more common.");
			DccsAddCategoryToSots = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Large Category Chests on Sots Stages", true, "Seekers of the Storm changes do not have Large Category Chests in the pool by default");
			DCCSCategoryChest = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Category Chest limitation", false, "Only one type of Category chest per stage. This feature was cut from the mod, but config for people who still want it.");
			DCCSInteractableCostChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Cheaper Interactable Credits", true, "TC280 costs 35 instead of 40.\nShrine of Order costs 5 instead of 30.\nCombat/Blood shrines 15 instead of 20.");
			InteractablesMountainMultiplier = ConfigFileUNSORTED.Bind<float>("Spawnpool - Interactables", "Mountain Shrine multiplier", 2f, "Multiply Mountain Shrine weight compared to other shrines");
			DCCSInteractablesStageCredits = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Makes certain stages have more credits", true, "Plains & Roost & Aquaduct get +20, Sirens & Grove get +30.");
			cfgVoidStagesNoTime = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Make all 3 Void Stages untimed stages", true, "Untimed but counts as stage completed");
			cfgGoldShoresCredits = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Gilded Coast gets interactables", true, "Mostly combat shrines");
			CelestialStage10 = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Celestial Portal Stage 10", true, "An additional celestial portal will spawn on the last stage of a loop");
			FasterPrinter = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Printers", true, "Slighty faster interactables");
			FasterScrapper = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Scrappers", true, "Slighty faster interactables");
			FasterShrines = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Shrines", true, "Slighty faster interactables");
			FasterDeepVoidSignal = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Faster Deep Void Signal", 45, "Vanilla is 60.");
			FasterArenaCells = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Void Fields Cells - Faster early cells", true, "30s for the first 4, 45s for the next 4, 60s for the last. ");
			RegenArenaCells = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Void Fields Cells - Regen", true, "Cells give regeneration before actvating so you can heal faster.");
			InteractableBloodShrineMoreGold = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Blood Shrine reward scale with Difficulty", true, "Normally Blood Shrines Reward is only based on HP quickly making them a bad source of money");
			InteractableBloodShrineLessCost = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Blood Shrine 50 70 90", true, "Less cost because 75 blood cost breaks items.");
			InteractableFastHalcyShrine = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Halcy Shrine suck gold faster", true, "Suck gold at rate of 3 instead of 1");
			InteractableHalcShrineNerf = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Halcy Shrine - Less Monsters", true, "Halcyon Shrines get 300 credits for monsters, which is a lot. A Void Seed as a whole is 120 Credits.\nThis setting takes it down to 80 per wave 240 Total");
			InteractableHalcyShrineHalcy = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Halcy Shrine - Spawn Halcyonites", true, "Have a chance to spawn Halcyonties instead of Golems");
			InteractablesCombatShrineHP = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Combat Shrine HP scaling in multiplayer", false, "Enemies spawned by combat shrines have multiplied hp per player in vanilla.");
			InteractableRedSoupAmount = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "RedToWhite Cauldron extra item amount", 1, "This is in addition to the 3 that Vanilla pays out with\nie If you want 5 items total, set it to 2.  Set to 0 to disable.");
			InteractableNoLunarCost = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Cost - Free Lunars", false, "Everything that costs Lunar Coins will cost 0");
			MegaDroneCost = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Cost - TC-280 Prototype", 300, "Vanilla is 350");
			BuffMegaDroneStats = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "TC-280 Prototype buff stats", true, "Give Tc280 20 armor and resistance to aoe attacks like Empathy Cores have");
			TurretDroneCost = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Cost - Gunner Turret", 25, "Vanilla is 35");
			InteractableHealingShrine = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Cost - Shrine of Woods", true, "Make Shrine of Woods cost significantly less");
			CharactersCaptainKeepInHiddemRealm = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Captain Hidden Realms", true, "Should Captain be allowed to have fun in Hidden and Void realms.");
			CharactersHuntressLysateCell = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Huntress Balista Lysate Cell", true, "Lysate Cell will combined 2 casts of Ballista if you have the stock available.");
			CharactersCommandoInvul = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Commando Invulnerable Tactical Dive", true, "Tactical Dive will make you Invulnerable like in RoRR");
			CharactersVoidFiendEquip = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Void Fiend 2 Equipment", false, "Void Fiend gets two equipment slots switching between them as he switches modes\nMade this as a joke idk how this would be helpful");
			cfgScavBossItem = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Scavs as proper Bosses", true, "Scavs are allowed to spawn as a boss under normal conditions and gain a Boss item");
			cfgScavMoreItemsElites = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Boss and Elite scavs get more items", true, "Boss Scavs get a small amount more items while Elite scavs get a lot more.");
			cfgScavNewTwisted = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "New Twisted Scavengers", true, "Adds new Twisted Scavengers");
			cfgScavTwistedScaling = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Fix Twisted Scavengers not scaling harder in Multiplayer", true, "Mithrix and Voidling gets more of a HP boost in Multiplayer, Twisteds do not due to a bug.");
			cfgMendingCoreBuff = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Mending Healing Orb buff", true, "Healing Core heals more and with some invulnerability so you don't instantly kill it.");
			cfgElderLemurianBands = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Aquaduct Elder Lemurian Buff", true, "They will be able to activate their bands and scale with level.");
			cscGreaterWispCredits = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Cheaper Greater Wisps", true, "Greater Wisps cost a lot for being not much of a threat, this makes them more common");
			EclipseDifficultyAlways = ConfigFileUNSORTED.Bind<bool>("!Main", "Eclipse 8 Difficulty always available", false, "Allows you to choose 8 Eclipse in normal lobbies.");
			EclipseDifficultyAlways.SettingChanged += EclipseDifficultyAlways_SettingChanged;
			ThirdLunarSeer = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Bazaar : Third Lunar Seer", true, "Future proofing for when they add more stage without really making the bazaar more powerful.");
			YellowPercentage = ConfigFileUNSORTED.Bind<float>("Rates", "Boss Item TP Percent", 20f, "Percent for a yellow item to replace a green from a teleporter. Vanilla is 15");
			BonusAspectDropRate = ConfigFileUNSORTED.Bind<float>("Rates", "Aspect Drop Rate", 0.067f, "Percent Drop rate for Aspects. Vanilla is 0.025 or 1/4000. Does not need to be changed if ZetAspects is changed.");
			ShopChancePercentage = ConfigFileUNSORTED.Bind<float>("Rates", "Natural Bazaar Portal Chance", 15f, "Vanilla is 5%");
			VoidPortalChance = ConfigFileUNSORTED.Bind<bool>("Rates", "More Void Portals", true, "Guaranteed Void Portal on Primordial Teleporters with 20% chance on normal teleporters starting stage 4. Vanilla would be 10% after stage 7.");
			RiskConfig();
		}

		private static void EclipseDifficultyAlways_SettingChanged(object sender, EventArgs e)
		{
			RuleChoiceDef val = RuleCatalog.FindChoiceDef("Difficulty.Eclipse8");
			if (val != null)
			{
				val.excludeByDefault = !EclipseDifficultyAlways.Value;
			}
		}

		private static void CheaperTier2_SettingChanged(object sender, EventArgs e)
		{
			if (CombatDirector.eliteTiers.Length > 1)
			{
				if (cheaperTier2.Value)
				{
					CombatDirector.eliteTiers[LittleGameplayTweaks.FindTier2Elite()].costMultiplier = CombatDirector.baseEliteCostMultiplier * 5f;
				}
				else
				{
					CombatDirector.eliteTiers[LittleGameplayTweaks.FindTier2Elite()].costMultiplier = CombatDirector.baseEliteCostMultiplier * 6f;
				}
			}
		}

		private static void LevelMaximum_SettingChanged(object sender, EventArgs e)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			if (LevelMaximum.Value)
			{
				Run.ambientLevelCap = 999;
				LevelUpEffectManager.OnCharacterLevelUp += new hook_OnCharacterLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnCharacterLevelUp);
				LevelUpEffectManager.OnRunAmbientLevelUp += new hook_OnRunAmbientLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnRunAmbientLevelUp);
			}
			else
			{
				Run.ambientLevelCap = 99;
				LevelUpEffectManager.OnCharacterLevelUp -= new hook_OnCharacterLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnCharacterLevelUp);
				LevelUpEffectManager.OnRunAmbientLevelUp -= new hook_OnRunAmbientLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnRunAmbientLevelUp);
			}
		}

		public static void RiskConfig()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Expected O, but got Unknown
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Expected O, but got Unknown
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Expected O, but got Unknown
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Expected O, but got Unknown
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Expected O, but got Unknown
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Expected O, but got Unknown
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Expected O, but got Unknown
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Expected O, but got Unknown
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: 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_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Expected O, but got Unknown
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Expected O, but got Unknown
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Expected O, but got Unknown
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Expected O, but got Unknown
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Expected O, but got Unknown
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Expected O, but got Unknown
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Expected O, but got Unknown
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Expected O, but got Unknown
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Expected O, but got Unknown
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Expected O, but got Unknown
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Expected O, but got Unknown
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Expected O, but got Unknown
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Expected O, but got Unknown
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Expected O, but got Unknown
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Expected O, but got Unknown
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Expected O, but got Unknown
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Expected O, but got Unknown
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Expected O, but got Unknown
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b3: Expected O, but got Unknown
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Expected O, but got Unknown
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d5: Expected O, but got Unknown
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e6: Expected O, but got Unknown
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Expected O, but got Unknown
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Expected O, but got Unknown
			ModSettingsManager.SetModDescription("Mostly spawn pool tweaks");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(LevelMaximum, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cheaperTier2, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(disableNewContent, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EclipseDifficultyAlways, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EclipseAllowVoid, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EclipseAllowTwisted, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EclipseAllowArtifactWorld, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EclipseAllowChoiceArtifacts, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(PrismAllowChoiceArtifacts, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterPrinter, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterScrapper, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterShrines, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterArenaCells, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(RegenArenaCells, true));
			ModSettingsManager.AddOption((BaseOption)new IntFieldOption(InteractableRedSoupAmount, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableNoLunarCost, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableHealingShrine, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableBloodShrineMoreGold, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableBloodShrineLessCost, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractablesCombatShrineHP, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableHalcShrineNerf, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSInteractablesStageCredits, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgVoidStagesNoTime, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgGoldShoresCredits, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ThirdLunarSeer, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CelestialStage10, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgMendingCoreBuff, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgElderLemurianBands, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgScavBossItem, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgScavMoreItemsElites, false));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cscGreaterWispCredits, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(BuffMegaDroneStats, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CharactersCaptainKeepInHiddemRealm, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CharactersHuntressLysateCell, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CharactersCommandoInvul, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSEnemyChanges, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSEnemyChangesLooping, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSEnemyNewFamilies, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FamiliesStage1, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SulfurPoolsSkin, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSInteractableChanges, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSInteractableCostChanges, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DccsAddCategoryToSots, true));
			ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(InteractablesMountainMultiplier, true));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(onlyUpdateMostRecentSpawnPools, true));
		}
	}
	public class ConfigStages
	{
		public static ConfigFile ConfigFileSTAGES = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Little_Gameplay_Tweaks.Stage_Specific_SpawnPool_Disable.cfg", true);

		public static ConfigEntry<bool> Stage_1_Golem;

		public static ConfigEntry<bool> Stage_1_Roost;

		public static ConfigEntry<bool> Stage_1_Snow;

		public static ConfigEntry<bool> Stage_1_Lake;

		public static ConfigEntry<bool> Stage_1_Village;

		public static ConfigEntry<bool> Stage_2_Goolake;

		public static ConfigEntry<bool> Stage_2_Swamp;

		public static ConfigEntry<bool> Stage_2_Ancient;

		public static ConfigEntry<bool> Stage_2_Temple;

		public static ConfigEntry<bool> Stage_3_Frozen;

		public static ConfigEntry<bool> Stage_3_Wisp;

		public static ConfigEntry<bool> Stage_3_Sulfur;

		public static ConfigEntry<bool> Stage_3_Tree;

		public static ConfigEntry<bool> Stage_4_Damp_Abyss;

		public static ConfigEntry<bool> Stage_4_Ship;

		public static ConfigEntry<bool> Stage_4_Root_Jungle;

		public static ConfigEntry<bool> Stage_5_Sky;

		public static ConfigEntry<bool> Stage_5_Helminth;

		public static ConfigEntry<bool> Stage_F_Moon;

		public static ConfigEntry<bool> Stage_F_Meridian;

		public static ConfigEntry<bool> Stage_X_Arena_Void;

		public static ConfigEntry<bool> Stage_X_Void_Seed;

		public static ConfigEntry<bool> Stage_X_GoldShores;

		public static ConfigEntry<bool> Stage_X_HalcShrine;

		public static void InitConfig()
		{
			Stage_1_Golem = ConfigFileSTAGES.Bind<bool>("Stage 1", "Golem Plains", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_1_Roost = ConfigFileSTAGES.Bind<bool>("Stage 1", "Distant Roost", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_1_Snow = ConfigFileSTAGES.Bind<bool>("Stage 1", "Snowy Forest", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_1_Lake = ConfigFileSTAGES.Bind<bool>("Stage 1", "Verdan Falls", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_1_Village = ConfigFileSTAGES.Bind<bool>("Stage 1", "Shattered Abodes", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_2_Goolake = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aquaduct", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_2_Swamp = ConfigFileSTAGES.Bind<bool>("Stage 2", "Wetlands", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_2_Ancient = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aphelian Sanctuary", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_2_Temple = ConfigFileSTAGES.Bind<bool>("Stage 2", "Reformed Altar", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_3_Frozen = ConfigFileSTAGES.Bind<bool>("Stage 3", "Rally Point", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_3_Wisp = ConfigFileSTAGES.Bind<bool>("Stage 3", "Scorched Acres", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_3_Sulfur = ConfigFileSTAGES.Bind<bool>("Stage 3", "Sulfur Pool", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_3_Tree = ConfigFileSTAGES.Bind<bool>("Stage 3", "Treeborn", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_4_Damp_Abyss = ConfigFileSTAGES.Bind<bool>("Stage 4", "Abyssal Depths", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_4_Ship = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sirens Call", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_4_Root_Jungle = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sundered Grove", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_5_Sky = ConfigFileSTAGES.Bind<bool>("Stage 5", "Sky Meadow", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_5_Helminth = ConfigFileSTAGES.Bind<bool>("Stage 5", "Helminth", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_F_Moon = ConfigFileSTAGES.Bind<bool>("Stage Final", "Commencement", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_F_Meridian = ConfigFileSTAGES.Bind<bool>("Stage Final", "Prime Meridian", true, "Stage specific changes as described on the mod pages wiki section");
			Stage_X_Arena_Void = ConfigFileSTAGES.Bind<bool>("Other", "Void Fields", true, "Stage specific changes as described on the mod pages wiki section");
		}
	}
	public static class ArrayUtil
	{
		public static T[] Add<T>(this T[] array, params T[] items)
		{
			return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray();
		}

		public static T[] Remove<T>(this T[] array, params T[] items)
		{
			return (array ?? Enumerable.Empty<T>()).Except(items).ToArray();
		}
	}
	public class WRect
	{
		public static readonly Random random = new Random();

		public static Rect recnothing = new Rect(0f, 0f, 0f, 0f);

		public static Rect recwide = new Rect(0f, 0f, 384f, 256f);

		public static Rect rechalftall = new Rect(0f, 0f, 256f, 320f);

		public static Rect rechalfwide = new Rect(0f, 0f, 320f, 256f);

		public static Rect rectall = new Rect(0f, 0f, 256f, 384f);

		public static Rect rec512 = new Rect(0f, 0f, 512f, 512f);

		public static Rect rec320 = new Rect(0f, 0f, 320f, 320f);

		public static Rect rec256 = new Rect(0f, 0f, 256f, 256f);

		public static Rect rec192 = new Rect(0f, 0f, 192f, 192f);

		public static Rect rec128 = new Rect(0f, 0f, 128f, 128f);

		public static Rect rec106 = new Rect(0f, 0f, 106f, 106f);

		public static Rect rec64 = new Rect(0f, 0f, 64f, 64f);

		public static Vector2 half = new Vector2(0.5f, 0.5f);
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Wolfo.LittleGameplayTweaks", "LittleGameplayTweaks", "3.3.0")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class LittleGameplayTweaks : BaseUnityPlugin
	{
		public class ItemOrbPhysicsChanger : MonoBehaviour
		{
			public Rigidbody body;

			public void Awake()
			{
				body = ((Component)this).GetComponent<Rigidbody>();
			}

			public void FixedUpdate()
			{
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				if (Object.op_Implicit((Object)(object)body) && body.velocity.y < -30f)
				{
					((Component)this).gameObject.layer = 8;
					Object.Destroy((Object)(object)this);
				}
			}
		}

		private static readonly Random random = new Random();

		public static List<ExplicitPickupDropTable> AllScavCompatibleBossItems = new List<ExplicitPickupDropTable>();

		public void Awake()
		{
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: 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_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Expected O, but got Unknown
			Assets.Init(((BaseUnityPlugin)this).Info);
			WConfig.InitConfig();
			ConfigStages.InitConfig();
			((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)EquipmentBonusRate);
			ChangesCharacters.Start();
			ChangesInteractables.Start();
			ChangesStages.Start();
			DCCSEnemies.Start();
			DCCSInteractables.Start();
			Prismatic.Start();
			Eclipse.Start();
			if (!WConfig.disableNewContent.Value)
			{
				TwistedScavs.Start();
			}
			((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)ModSupport);
			MainMenuController.Start += new hook_Start(OneTimeOnlyLateRunner);
			SceneDirector.Start += new hook_Start(GameplayQoL_SceneDirector_Start);
			ClassicStageInfo.Awake += new hook_Awake(ClassicStageInfoMethod);
			SceneDef val = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/Base/rootjungle/rootjungle.asset").WaitForCompletion();
			MusicTrackDef bossTrack = Addressables.LoadAssetAsync<MusicTrackDef>((object)"RoR2/DLC1/Common/muBossfightDLC1_12.asset").WaitForCompletion();
			val.bossTrack = bossTrack;
			GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/PickupDroplet.prefab").WaitForCompletion();
			val2.AddComponent<ItemOrbPhysicsChanger>();
			MapZone.TryZoneStart += new hook_TryZoneStart(PickupTeleportHook);
			LocalUserManager.AddUser += new hook_AddUser(LocalUserManager_AddUser);
		}

		private void LocalUserManager_AddUser(orig_AddUser orig, Player inputPlayer, UserProfile userProfile)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_0036: 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_0053: 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)
			orig.Invoke(inputPlayer, userProfile);
			LocalUserManager.AddUser -= new hook_AddUser(LocalUserManager_AddUser);
			if (EntitlementManager.localUserEntitlementTracker == null)
			{
				return;
			}
			bool flag = ((BaseUserEntitlementTracker<LocalUser>)(object)EntitlementManager.localUserEntitlementTracker).AnyUserHasEntitlement(Addressables.LoadAssetAsync<EntitlementDef>((object)"RoR2/DLC1/Common/entitlementDLC1.asset").WaitForCompletion());
			bool flag2 = ((BaseUserEntitlementTracker<LocalUser>)(object)EntitlementManager.localUserEntitlementTracker).AnyUserHasEntitlement(Addressables.LoadAssetAsync<EntitlementDef>((object)"RoR2/DLC1/Common/entitlementDLC2.asset").WaitForCompletion());
			if (WConfig.onlyUpdateMostRecentSpawnPools.Value)
			{
				if (flag2)
				{
					DoDCCSChanges(2);
				}
				else if (flag)
				{
					DoDCCSChanges(1);
				}
				else
				{
					DoDCCSChanges(0);
				}
			}
			else
			{
				DoDCCSChanges(-1);
			}
			Debug.Log((object)(userProfile.name + " has DLC1 : " + flag));
			Debug.Log((object)(userProfile.name + " has DLC2 : " + flag2));
			if (flag && WConfig.cfgScavNewTwisted.Value)
			{
				MultiCharacterSpawnCard val = LegacyResourcesAPI.Load<MultiCharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScavLunar");
				val.masterPrefabs = val.masterPrefabs.Add(TwistedScavs.ScavLunarWGoomanMaster, TwistedScavs.ScavLunarWSpeedMaster, TwistedScavs.ScavLunarWTankMaster);
			}
		}

		public static void DoDCCSChanges(int changeNum)
		{
			Debug.Log((object)("Doing Spawn Pools for DLC " + changeNum));
			if (WConfig.DCCSEnemyChanges.Value)
			{
				switch (changeNum)
				{
				case 0:
					DCCSEnemies.EnemiesPreLoop_NoDLC();
					break;
				case 1:
					DCCSEnemies.EnemiesPreLoop_DLC1();
					break;
				case 2:
					DCCSEnemies.EnemiesPreLoop_DLC2();
					break;
				default:
					DCCSEnemies.EnemiesPreLoop_NoDLC();
					DCCSEnemies.EnemiesPreLoop_DLC1();
					DCCSEnemies.EnemiesPreLoop_DLC2();
					break;
				}
			}
			if (WConfig.DCCSEnemyChangesLooping.Value)
			{
				switch (changeNum)
				{
				case 1:
					DCCSEnemies.EnemiesPostLoop_DLC1();
					break;
				case 2:
					DCCSEnemies.EnemiesPostLoop_DLC2();
					break;
				default:
					DCCSEnemies.EnemiesPostLoop_DLC1();
					DCCSEnemies.EnemiesPostLoop_DLC2();
					break;
				case 0:
					break;
				}
			}
			if (WConfig.DCCSInteractableChanges.Value)
			{
				switch (changeNum)
				{
				case 0:
					DCCSInteractables.DCCSThings_NoDLC();
					return;
				case 1:
					DCCSInteractables.DCCSThings_DLC1();
					return;
				case 2:
					DCCSInteractables.DCCSThings_DLC2();
					return;
				}
				DCCSInteractables.DCCSThings_NoDLC();
				DCCSInteractables.DCCSThings_DLC1();
				DCCSInteractables.DCCSThings_DLC2();
			}
		}

		private void CharacterBody_OnSkillActivated(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill)
		{
			orig.Invoke(self, skill);
			if ((Object)(object)self.skillLocator.utility == (Object)(object)skill && Object.op_Implicit((Object)(object)self.characterMotor))
			{
				self.characterMotor.disableAirControlUntilCollision = false;
			}
		}

		public static void LevelUpEffectManager_OnRunAmbientLevelUp(orig_OnRunAmbientLevelUp orig, Run run)
		{
			if (run.ambientLevel < 200f)
			{
				orig.Invoke(run);
			}
		}

		public static void LevelUpEffectManager_OnCharacterLevelUp(orig_OnCharacterLevelUp orig, CharacterBody characterBody)
		{
			if (characterBody.level < 200f)
			{
				orig.Invoke(characterBody);
			}
		}

		public static int FindTier2Elite()
		{
			for (int i = 0; i < CombatDirector.eliteTiers.Length; i++)
			{
				for (int j = 0; j < CombatDirector.eliteTiers[i].eliteTypes.Length; j++)
				{
					if ((Object)(object)CombatDirector.eliteTiers[i].eliteTypes[j] == (Object)(object)Elites.Poison)
					{
						Debug.Log((object)("Tier2 Elite Tier at " + i));
						return i;
					}
				}
			}
			Debug.LogWarning((object)"Could not find Tier2 Elite Tier");
			return 111;
		}

		internal static void ModSupport()
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			if (WConfig.cheaperTier2.Value)
			{
				try
				{
					CombatDirector.eliteTiers[FindTier2Elite()].costMultiplier = CombatDirector.baseEliteCostMultiplier * 5f;
				}
				catch
				{
				}
			}
			if (WConfig.LevelMaximum.Value)
			{
				Run.ambientLevelCap = 999;
				LevelUpEffectManager.OnCharacterLevelUp += new hook_OnCharacterLevelUp(LevelUpEffectManager_OnCharacterLevelUp);
				LevelUpEffectManager.OnRunAmbientLevelUp += new hook_OnRunAmbientLevelUp(LevelUpEffectManager_OnRunAmbientLevelUp);
			}
			FamilyEvents.ModSupport();
			ChangesInteractables.ModSupport();
			GameModeCatalog.FindGameModePrefabComponent("WeeklyRun").startingScenes = GameModeCatalog.FindGameModePrefabComponent("ClassicRun").startingScenes;
			Items.BonusGoldPackOnKill.tags = Items.BonusGoldPackOnKill.tags.Add((ItemTag)4);
			Items.Infusion.tags = Items.Infusion.tags.Add((ItemTag)4);
			Items.GoldOnHit.tags = Items.GoldOnHit.tags.Add((ItemTag)4);
			Items.RegeneratingScrap.tags = Items.RegeneratingScrap.tags.Add((ItemTag)4);
			Items.NovaOnHeal.tags = Items.NovaOnHeal.tags.Add((ItemTag)4);
			Items.ShockNearby.tags = Items.ShockNearby.tags.Add((ItemTag)23);
			Items.CritDamage.tags = Items.CritDamage.tags.Add((ItemTag)4);
			Items.DroneWeapons.tags = Items.DroneWeapons.tags.Add((ItemTag)4);
			Items.RoboBallBuddy.tags = Items.RoboBallBuddy.tags.Add((ItemTag)4);
			Items.MinorConstructOnKill.tags = Items.MinorConstructOnKill.tags.Add((ItemTag)4);
			Items.CaptainDefenseMatrix.tags = Items.CaptainDefenseMatrix.tags.Add((ItemTag)12);
			Items.BearVoid.tags = Items.BearVoid.tags.Add((ItemTag)11);
			if (WConfig.EclipseDifficultyAlways.Value)
			{
				RuleChoiceDef val = RuleCatalog.FindChoiceDef("Difficulty.Eclipse8");
				if (val != null)
				{
					val.excludeByDefault = false;
				}
			}
			if (WConfig.cfgMendingCoreBuff.Value)
			{
				Heal.healCoefficient *= 4f;
			}
		}

		public static void GameplayQoL_SceneDirector_Start(orig_Start orig, SceneDirector self)
		{
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)SceneInfo.instance))
			{
				orig.Invoke(self);
				return;
			}
			switch (SceneInfo.instance.sceneDef.baseSceneName)
			{
			case "blackbeach":
			{
				GameObject val3 = GameObject.Find("/HOLDER: Preplaced Objects");
				if (!((Object)(object)val3 != (Object)null))
				{
					break;
				}
				UnlockableGranter[] componentsInChildren = val3.GetComponentsInChildren<UnlockableGranter>(true);
				int num2 = 0;
				for (int j = 0; j < componentsInChildren.Length; j++)
				{
					if (!((Component)componentsInChildren[j]).gameObject.activeSelf)
					{
						num2++;
					}
					if (num2 == 3)
					{
						((Component)componentsInChildren[1]).gameObject.SetActive(true);
					}
				}
				componentsInChildren = null;
				GC.Collect();
				break;
			}
			case "goolake":
			{
				if (!WConfig.cfgElderLemurianBands.Value)
				{
					break;
				}
				Inventory[] array2 = Object.FindObjectsOfType(typeof(Inventory)) as Inventory[];
				for (int k = 0; k < array2.Length; k++)
				{
					if (NetworkServer.active && (((Object)array2[k]).name.StartsWith("LemurianBruiserFireMaster") || ((Object)array2[k]).name.StartsWith("LemurianBruiserIceMaster")))
					{
						array2[k].GiveItem(Items.UseAmbientLevel, 1);
						array2[k].GiveItem(ChangesCharacters.MarriageLemurianIdentifier, 1);
					}
				}
				break;
			}
			case "moon2":
			{
				ShopTerminalBehavior[] array = Object.FindObjectsOfType(typeof(ShopTerminalBehavior)) as ShopTerminalBehavior[];
				int num = 0;
				Transform val = null;
				Transform val2 = null;
				for (int i = 0; i < array.Length; i++)
				{
					if (((Object)array[i]).name.StartsWith("LunarCauldron,"))
					{
						if (num == 0)
						{
							val2 = ((Component)array[i]).gameObject.transform;
							val = ((Component)array[i]).gameObject.transform.parent;
						}
						num++;
						if (((Object)array[i]).name.StartsWith("LunarCauldron, RedToWhite"))
						{
							num = 10;
							((Component)array[i]).gameObject.GetComponent<ShopTerminalBehavior>().dropVelocity = new Vector3(5f, 10f, 5f);
						}
					}
				}
				break;
			}
			}
			orig.Invoke(self);
		}

		public void OneTimeOnlyLateRunner(orig_Start orig, MainMenuController self)
		{
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: 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_008a: Invalid comparison between Unknown and I4
			orig.Invoke(self);
			Items.RegeneratingScrapConsumed.canRemove = false;
			ExplicitPickupDropTable[] array = Resources.FindObjectsOfTypeAll(typeof(ExplicitPickupDropTable)) as ExplicitPickupDropTable[];
			for (int i = 0; i < array.Length; i++)
			{
				((PickupDropTable)array[i]).canDropBeReplaced = false;
				if (!((Object)array[i]).name.StartsWith("dtBoss"))
				{
					continue;
				}
				PickupDefEntry[] pickupEntries = array[i].pickupEntries;
				foreach (PickupDefEntry val in pickupEntries)
				{
					Object pickupDef = val.pickupDef;
					ItemDef val2 = (ItemDef)(object)((pickupDef is ItemDef) ? pickupDef : null);
					if (Object.op_Implicit((Object)(object)val2) && (int)val2.tier == 4 && val2.DoesNotContainTag((ItemTag)9))
					{
						AllScavCompatibleBossItems.Add(array[i]);
					}
				}
			}
			MainMenuController.Start -= new hook_Start(OneTimeOnlyLateRunner);
		}

		public static void ClassicStageInfoMethod(orig_Awake orig, ClassicStageInfo self)
		{
			orig.Invoke(self);
			if (!WConfig.cfgScavBossItem.Value)
			{
				return;
			}
			ChangesCharacters.DropTableForBossScav = AllScavCompatibleBossItems[WRect.random.Next(AllScavCompatibleBossItems.Count)];
			if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.stageClearCount > 7)
			{
				int num = random.Next(10);
				if (num > 5)
				{
					LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = false;
				}
				else
				{
					LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = true;
				}
			}
		}

		public static void EquipmentBonusRate()
		{
			for (int i = 0; i < EliteCatalog.eliteDefs.Length; i++)
			{
				if (EliteCatalog.eliteDefs[i].eliteEquipmentDef.dropOnDeathChance == 0.00025f)
				{
					EliteCatalog.eliteDefs[i].eliteEquipmentDef.dropOnDeathChance = WConfig.BonusAspectDropRate.Value / 100f;
				}
			}
		}

		private static bool ColliderPickup(Collider collider)
		{
			if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<PickupDropletController>()))
			{
				return true;
			}
			if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<GenericPickupController>()))
			{
				return true;
			}
			if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<PickupPickerController>()))
			{
				return true;
			}
			return false;
		}

		private static void PickupTeleportHook(orig_TryZoneStart orig, MapZone self, Collider collider)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between Unknown and I4
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: 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_00c4: Expected O, but got Unknown
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Expected O, but got Unknown
			//IL_006b: 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)
			orig.Invoke(self, collider);
			if ((int)self.zoneType != 0 || !ColliderPickup(collider))
			{
				return;
			}
			InfiniteTowerRun component = ((Component)Run.instance).GetComponent<InfiniteTowerRun>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.safeWardController))
			{
				Debug.Log((object)"it tp item back");
				TeleportHelper.TeleportGameObject(((Component)collider).gameObject, ((Component)component.safeWardController).transform.position);
				return;
			}
			SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>();
			val.hullSize = (HullClassification)0;
			val.nodeGraphType = (GraphType)0;
			val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab");
			DirectorPlacementRule val2 = new DirectorPlacementRule
			{
				placementMode = (PlacementMode)3,
				position = ((Component)collider).transform.position
			};
			GameObject val3 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, val2, RoR2Application.rng));
			if (Object.op_Implicit((Object)(object)val3))
			{
				Debug.Log((object)"tp item back");
				TeleportHelper.TeleportGameObject(((Component)collider).gameObject, val3.transform.position);
				Object.Destroy((Object)(object)val3);
			}
			Object.Destroy((Object)(object)val);
		}
	}
	public class ChangesCharacters
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_OnEnter <>9__4_1;

			public static hook_PickupIsNonBlacklistedItem <>9__4_0;

			public static hook_OnEnter <>9__6_0;

			public static hook_OnEnter <>9__6_1;

			public static hook_OnEnter <>9__6_2;

			public static hook_OnEnter <>9__6_3;

			public static hook_OnExit <>9__6_4;

			public static hook_OnEnter <>9__6_5;

			public static hook_OnExit <>9__6_6;

			public static hook_OnEnter <>9__6_7;

			public static StatHookEventHandler <>9__9_0;

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

			public static Func<float, FireMegaFireball, float> <>9__10_0;

			internal void <Enemies>b__4_1(orig_OnEnter orig, Chargeup self)
			{
				orig.Invoke(self);
				if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody))
				{
					((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 2f);
				}
			}

			internal bool <Enemies>b__4_0(orig_PickupIsNonBlacklistedItem orig, FindItem self, PickupIndex pickupIndex)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				bool flag = orig.Invoke(self, pickupIndex);
				if (flag)
				{
					PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex);
					ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex);
					return !((Object)(object)itemDef == (Object)null) && itemDef.DoesNotContainTag((ItemTag)8) && itemDef.DoesNotContainTag((ItemTag)20);
				}
				return flag;
			}

			internal void <Characters>b__6_0(orig_OnEnter orig, GroundLight2 self)
			{
				if (self.isComboFinisher)
				{
					((BasicMeleeAttack)self).ignoreAttackSpeed = true;
				}
				orig.Invoke(self);
			}

			internal void <Characters>b__6_1(orig_OnEnter orig, Uppercut self)
			{
				orig.Invoke(self);
				if (self.duration < 0.15f)
				{
					self.duration = 0.15f;
				}
			}

			internal void <Characters>b__6_2(orig_OnEnter orig, AimArrowSnipe self)
			{
				orig.Invoke(self);
				int num = ((EntityState)self).skillLocator.special.stock;
				int baseMaxStock = self.primarySkillSlot.skillDef.baseMaxStock;
				if (num > 1)
				{
					num = 1;
				}
				else if ((double)((EntityState)self).skillLocator.special.finalRechargeInterval == 0.5)
				{
					num--;
				}
				int stock = baseMaxStock * (num + 1);
				if (num >= 0)
				{
					((EntityState)self).skillLocator.special.DeductStock(num);
				}
				((EntityState)self).skillLocator.primary.stock = stock;
			}

			internal void <Characters>b__6_3(orig_OnEnter orig, Spawn self)
			{
				orig.Invoke(self);
				if (NetworkServer.active)
				{
					((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility);
				}
			}

			internal void <Characters>b__6_4(orig_OnExit orig, Spawn self)
			{
				orig.Invoke(self);
				if (NetworkServer.active)
				{
					((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
					((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f);
				}
			}

			internal void <Characters>b__6_5(orig_OnEnter orig, DodgeState self)
			{
				orig.Invoke(self);
				if (NetworkServer.active)
				{
					((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility);
				}
			}

			internal void <Characters>b__6_6(orig_OnExit orig, DodgeState self)
			{
				orig.Invoke(self);
				if (NetworkServer.active)
				{
					((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
				}
			}

			internal void <Characters>b__6_7(orig_OnEnter orig, CorruptModeBase self)
			{
				orig.Invoke(self);
				if (self is CorruptMode)
				{
					((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)1);
				}
				else
				{
					((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)0);
				}
			}

			internal void <MarriedEldersBands>b__9_0(CharacterBody sender, StatHookEventArgs args)
			{
				if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(MarriageLemurianIdentifier) > 0)
				{
					args.damageMultAdd += -0.5f;
					args.healthMultAdd += -0.5f;
				}
			}

			internal bool <MarriedLemurianBandActivator>b__10_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "EntityStates.LemurianBruiserMonster.FireMegaFireball", "damageCoefficient");
			}

			internal float <MarriedLemurianBandActivator>b__10_0(float damageCoeff, FireMegaFireball entityState)
			{
				if (((EntityState)entityState).characterBody.inventory.GetItemCount(MarriageLemurianIdentifier) == 1)
				{
					return 4f;
				}
				return damageCoeff;
			}
		}

		public static ItemDef MarriageLemurianIdentifier = ScriptableObject.CreateInstance<ItemDef>();

		public static ExplicitPickupDropTable DropTableForBossScav = null;

		public static void Start()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			Enemies();
			Characters();
			if (!WConfig.disableNewContent.Value)
			{
				MarriedEldersBands();
			}
			if (WConfig.LevelMaximumFinalBoss.Value > 98)
			{
				ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(VoidlingLevelLimit);
			}
		}

		private static void VoidlingLevelLimit(orig_BeginEncounter orig, ScriptedCombatEncounter self)
		{
			orig.Invoke(self);
			if (self.grantUniqueBonusScaling && Run.instance.ambientLevelFloor > WConfig.LevelMaximumFinalBoss.Value)
			{
				for (int i = 0; i < self.combatSquad.membersList.Count; i++)
				{
					self.combatSquad.membersList[i].inventory.RemoveItem(Items.UseAmbientLevel, 1);
					self.combatSquad.membersList[i].inventory.GiveItem(Items.LevelBonus, WConfig.LevelMaximumFinalBoss.Value);
				}
			}
		}

		public static void Enemies()
		{
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: 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)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Expected O, but got Unknown
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Expected O, but got Unknown
			//IL_018d: 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)
			//IL_0037: 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_0053: 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_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Expected O, but got Unknown
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Expected O, but got Unknown
			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
			if (WConfig.cfgMendingCoreBuff.Value)
			{
				GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteEarth/AffixEarthHealerMaster.prefab").WaitForCompletion();
				val.AddComponent<GivePickupsOnStart>().itemInfos = (ItemInfo[])(object)new ItemInfo[1]
				{
					new ItemInfo
					{
						itemString = "UseAmbientLevel",
						count = 1
					}
				};
				CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteEarth/AffixEarthHealerBody.prefab").WaitForCompletion().GetComponent<CharacterBody>();
				component.baseArmor += 300f;
				component.baseMaxHealth *= 3f;
				component.levelMaxHealth *= 3f;
				component.baseDamage *= 0.5f;
				component.levelDamage += component.baseDamage;
				object obj = <>c.<>9__4_1;
				if (obj == null)
				{
					hook_OnEnter val2 = delegate(orig_OnEnter orig, Chargeup self)
					{
						orig.Invoke(self);
						if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody))
						{
							((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 2f);
						}
					};
					<>c.<>9__4_1 = val2;
					obj = (object)val2;
				}
				Chargeup.OnEnter += (hook_OnEnter)obj;
			}
			GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBody.prefab").WaitForCompletion();
			val3.GetComponent<SetStateOnHurt>().canBeFrozen = true;
			val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBodyLunarShard.prefab").WaitForCompletion();
			val3.GetComponent<SetStateOnHurt>().canBeFrozen = true;
			val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBodyBrokenLunarShard.prefab").WaitForCompletion();
			val3.GetComponent<SetStateOnHurt>().canBeFrozen = true;
			ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(FalseSonAdaptive);
			ScavengerItemGranter.Start += new hook_Start(GiveScavMoreItems);
			((SpawnCard)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav")).requiredFlags = (NodeFlags)0;
			object obj2 = <>c.<>9__4_0;
			if (obj2 == null)
			{
				hook_PickupIsNonBlacklistedItem val4 = delegate(orig_PickupIsNonBlacklistedItem orig, FindItem self, PickupIndex pickupIndex)
				{
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					//IL_0010: Unknown result type (might be due to invalid IL or missing references)
					//IL_0018: Unknown result type (might be due to invalid IL or missing references)
					bool flag = orig.Invoke(self, pickupIndex);
					if (flag)
					{
						PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex);
						ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex);
						return !((Object)(object)itemDef == (Object)null) && itemDef.DoesNotContainTag((ItemTag)8) && itemDef.DoesNotContainTag((ItemTag)20);
					}
					return flag;
				};
				<>c.<>9__4_0 = val4;
				obj2 = (object)val4;
			}
			FindItem.PickupIsNonBlacklistedItem += (hook_PickupIsNonBlacklistedItem)obj2;
			LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar1Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
			LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar2Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
			LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar3Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
			LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar4Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
			AISkillDriver[] components = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/ScavMaster").GetComponents<AISkillDriver>();
			components[1].maxUserHealthFraction = 1f;
			components[1].minUserHealthFraction = 0.3f;
			components[1].selectionRequiresOnGround = false;
			components[1].maxDistance = 1000f;
			components[1].minDistance = 60f;
			components = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/EngiWalkerTurretMaster").GetComponents<AISkillDriver>();
			components[0].shouldSprint = true;
			if (components[0].minDistance == 110f)
			{
				components[0].minDistance = 50f;
			}
			components = LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/EquipmentDroneMaster").GetComponents<AISkillDriver>();
			components[0].shouldFireEquipment = true;
			components[2].shouldFireEquipment = true;
			components[5].shouldFireEquipment = true;
			components[6].shouldFireEquipment = true;
			components = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MegaConstructMaster.prefab").WaitForCompletion().GetComponents<AISkillDriver>();
			if (components.Length > 6)
			{
				((Behaviour)components[6]).enabled = false;
			}
		}

		private static void FalseSonAdaptive(orig_BeginEncounter orig, ScriptedCombatEncounter self)
		{
			orig.Invoke(self);
			if (Run.instance.stageClearCount <= 4 || self.spawns.Length == 0 || !((Object)self.spawns[0].spawnCard).name.StartsWith("cscFalse"))
			{
				return;
			}
			for (int i = 0; i < self.combatSquad.membersList.Count; i++)
			{
				Inventory inventory = self.combatSquad.membersList[i].inventory;
				if (inventory.GetItemCount(Items.AdaptiveArmor) == 0)
				{
					inventory.GiveItem(Items.AdaptiveArmor, 1);
				}
			}
		}

		public static void Characters()
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Expected O, but got Unknown
			//IL_00ff: 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_010a: Expected O, but got Unknown
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Expected O, but got Unknown
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Expected O, but got Unknown
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Expected O, but got Unknown
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Expected O, but got Unknown
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Expected O, but got Unknown
			if (WConfig.BuffMegaDroneStats.Value)
			{
				GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Drones/MegaDroneBody.prefab").WaitForCompletion();
				val.GetComponent<CharacterBody>().baseArmor = 20f;
				CharacterBody component = val.GetComponent<CharacterBody>();
				component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x40);
			}
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Commando/CommandoBodyFireFMJ.asset").WaitForCompletion().mustKeyPress = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Croco/CrocoSpit.asset").WaitForCompletion().mustKeyPress = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/LunarSkillReplacements/LunarSecondaryReplacement.asset").WaitForCompletion().mustKeyPress = true;
			object obj = <>c.<>9__6_0;
			if (obj == null)
			{
				hook_OnEnter val2 = delegate(orig_OnEnter orig, GroundLight2 self)
				{
					if (self.isComboFinisher)
					{
						((BasicMeleeAttack)self).ignoreAttackSpeed = true;
					}
					orig.Invoke(self);
				};
				<>c.<>9__6_0 = val2;
				obj = (object)val2;
			}
			GroundLight2.OnEnter += (hook_OnEnter)obj;
			object obj2 = <>c.<>9__6_1;
			if (obj2 == null)
			{
				hook_OnEnter val3 = delegate(orig_OnEnter orig, Uppercut self)
				{
					orig.Invoke(self);
					if (self.duration < 0.15f)
					{
						self.duration = 0.15f;
					}
				};
				<>c.<>9__6_1 = val3;
				obj2 = (object)val3;
			}
			Uppercut.OnEnter += (hook_OnEnter)obj2;
			if (WConfig.CharactersHuntressLysateCell.Value)
			{
				object obj3 = <>c.<>9__6_2;
				if (obj3 == null)
				{
					hook_OnEnter val4 = delegate(orig_OnEnter orig, AimArrowSnipe self)
					{
						orig.Invoke(self);
						int num = ((EntityState)self).skillLocator.special.stock;
						int baseMaxStock = self.primarySkillSlot.skillDef.baseMaxStock;
						if (num > 1)
						{
							num = 1;
						}
						else if ((double)((EntityState)self).skillLocator.special.finalRechargeInterval == 0.5)
						{
							num--;
						}
						int stock = baseMaxStock * (num + 1);
						if (num >= 0)
						{
							((EntityState)self).skillLocator.special.DeductStock(num);
						}
						((EntityState)self).skillLocator.primary.stock = stock;
					};
					<>c.<>9__6_2 = val4;
					obj3 = (object)val4;
				}
				AimArrowSnipe.OnEnter += (hook_OnEnter)obj3;
			}
			if (WConfig.CharactersCaptainKeepInHiddemRealm.Value)
			{
				((ResourceAvailability)(ref SceneCatalog.availability)).CallWhenAvailable((Action)NoOrbitalStrikeBlocking);
			}
			object obj4 = <>c.<>9__6_3;
			if (obj4 == null)
			{
				hook_OnEnter val5 = delegate(orig_OnEnter orig, Spawn self)
				{
					orig.Invoke(self);
					if (NetworkServer.active)
					{
						((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility);
					}
				};
				<>c.<>9__6_3 = val5;
				obj4 = (object)val5;
			}
			Spawn.OnEnter += (hook_OnEnter)obj4;
			object obj5 = <>c.<>9__6_4;
			if (obj5 == null)
			{
				hook_OnExit val6 = delegate(orig_OnExit orig, Spawn self)
				{
					orig.Invoke(self);
					if (NetworkServer.active)
					{
						((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
						((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f);
					}
				};
				<>c.<>9__6_4 = val6;
				obj5 = (object)val6;
			}
			Spawn.OnExit += (hook_OnExit)obj5;
			if (WConfig.CharactersCommandoInvul.Value)
			{
				object obj6 = <>c.<>9__6_5;
				if (obj6 == null)
				{
					hook_OnEnter val7 = delegate(orig_OnEnter orig, DodgeState self)
					{
						orig.Invoke(self);
						if (NetworkServer.active)
						{
							((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility);
						}
					};
					<>c.<>9__6_5 = val7;
					obj6 = (object)val7;
				}
				DodgeState.OnEnter += (hook_OnEnter)obj6;
				object obj7 = <>c.<>9__6_6;
				if (obj7 == null)
				{
					hook_OnExit val8 = delegate(orig_OnExit orig, DodgeState self)
					{
						orig.Invoke(self);
						if (NetworkServer.active)
						{
							((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
						}
					};
					<>c.<>9__6_6 = val8;
					obj7 = (object)val8;
				}
				DodgeState.OnExit += (hook_OnExit)obj7;
				LanguageAPI.Add("COMMANDO_UTILITY_DESCRIPTION", "<style=cIsUtility>Roll</style> a short distance. You <style=cIsUtility>cannot be hit</style> while rolling.");
			}
			if (!WConfig.CharactersVoidFiendEquip.Value)
			{
				return;
			}
			object obj8 = <>c.<>9__6_7;
			if (obj8 == null)
			{
				hook_OnEnter val9 = delegate(orig_OnEnter orig, CorruptModeBase self)
				{
					orig.Invoke(self);
					if (self is CorruptMode)
					{
						((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)1);
					}
					else
					{
						((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)0);
					}
				};
				<>c.<>9__6_7 = val9;
				obj8 = (object)val9;
			}
			CorruptModeBase.OnEnter += (hook_OnEnter)obj8;
		}

		private static void GiveScavMoreItems(orig_Start orig, ScavengerItemGranter self)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Invalid comparison between Unknown and I4
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Expected O, but got Unknown
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Invalid comparison between Unknown and I4
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_031f: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)((Component)self).GetComponent<CharacterMaster>()))
			{
				orig.Invoke(self);
				return;
			}
			if (WConfig.cfgScavMoreItemsElites.Value && NetworkServer.active)
			{
				CharacterBody body = ((Component)self).GetComponent<CharacterMaster>().GetBody();
				Inventory component = ((Component)self).GetComponent<Inventory>();
				bool flag = (int)component.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)component.currentEquipmentState.equipmentDef.passiveBuffDef) && component.currentEquipmentState.equipmentDef.passiveBuffDef.isElite;
				if (self.stackRollDataList.Length == 3 && flag)
				{
					bool flag2 = (float)component.GetItemCount(Items.BoostHp) >= component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient * 10f - 10f;
					bool flag3 = flag2 && component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient > 10f;
					if (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.EliteOnly))
					{
						flag2 = component.GetItemCount(Items.BoostHp) > 80;
						flag3 = false;
					}
					if (flag3)
					{
						self.stackRollDataList[0].stacks = 7;
						self.stackRollDataList[0].numRolls = 7;
						self.stackRollDataList[1].stacks = 5;
						self.stackRollDataList[1].numRolls = 5;
						self.stackRollDataList[2].stacks = 2;
						self.stackRollDataList[2].numRolls = 3;
					}
					else if (flag2)
					{
						self.stackRollDataList[0].stacks = 5;
						self.stackRollDataList[0].numRolls = 5;
						self.stackRollDataList[1].stacks = 3;
						self.stackRollDataList[1].numRolls = 4;
						self.stackRollDataList[2].stacks = 2;
						self.stackRollDataList[2].numRolls = 2;
					}
					else if (Object.op_Implicit((Object)(object)body) && body.isBoss)
					{
						self.stackRollDataList[2].numRolls++;
					}
				}
			}
			orig.Invoke(self);
			if (!WConfig.cfgScavBossItem.Value)
			{
				return;
			}
			CharacterBody body2 = ((Component)self).GetComponent<CharacterMaster>().GetBody();
			Inventory component2 = ((Component)self).GetComponent<Inventory>();
			if (Object.op_Implicit((Object)(object)body2) && body2.isBoss)
			{
				DeathRewards component3 = ((Component)body2).GetComponent<DeathRewards>();
				if (Object.op_Implicit((Object)(object)component3))
				{
					component3.bossDropTable = (PickupDropTable)(object)DropTableForBossScav;
				}
				ItemDef val = (ItemDef)DropTableForBossScav.pickupEntries[0].pickupDef;
				int num = 2;
				if ((int)component2.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)component2.currentEquipmentState.equipmentDef.passiveBuffDef) && component2.currentEquipmentState.equipmentDef.passiveBuffDef.isElite)
				{
					num = 3;
				}
				else
				{
					component2.GiveItem(Items.BoostHp, 5);
				}
				if (val.DoesNotContainTag((ItemTag)4) && val.DoesNotContainTag((ItemTag)8))
				{
					Debug.Log((object)("Giving Boss Scav " + (object)val));
					component2.GiveItem(val, num);
				}
				else
				{
					Debug.Log((object)(((object)val)?.ToString() + " is Blacklisted for Scavs, resorting to ShinyPearl"));
					component2.GiveItem(Items.ShinyPearl, num);
				}
			}
		}

		public unsafe static void NoOrbitalStrikeBlocking()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: 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_000b: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < SceneCatalog.allSceneDefs.Length; i++)
			{
				((SceneDef)Unsafe.Read<object>((void*)SceneCatalog.allSceneDefs[i])).blockOrbitalSkills = false;
			}
		}

		public static void MarriedEldersBands()
		{
			//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_0046: 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_00f4: Expected O, but got Unknown
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Expected O, but got Unknown
			FireMegaFireball.FixedUpdate += new Manipulator(MarriedLemurianBandActivator);
			Util.GetBestBodyName += new hook_GetBestBodyName(MarriedLemurianNameHook);
			ItemDef val = LegacyResourcesAPI.Load<ItemDef>("ItemDefs/AACannon");
			((Object)MarriageLemurianIdentifier).name = "MarriageLemurianIdentifier";
			MarriageLemurianIdentifier.deprecatedTier = (ItemTier)5;
			MarriageLemurianIdentifier._itemTierDef = val._itemTierDef;
			MarriageLemurianIdentifier.nameToken = "MarriageLemurianIdentifier";
			MarriageLemurianIdentifier.pickupToken = "MarriageLemurianIdentifier";
			MarriageLemurianIdentifier.descriptionToken = "MarriageLemurianIdentifier";
			MarriageLemurianIdentifier.hidden = false;
			MarriageLemurianIdentifier.canRemove = false;
			MarriageLemurianIdentifier.pickupIconSprite = val.pickupIconSprite;
			MarriageLemurianIdentifier.pickupModelPrefab = val.pickupModelPrefab;
			object obj = <>c.<>9__9_0;
			if (obj == null)
			{
				StatHookEventHandler val2 = delegate(CharacterBody sender, StatHookEventArgs args)
				{
					if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(MarriageLemurianIdentifier) > 0)
					{
						args.damageMultAdd += -0.5f;
						args.healthMultAdd += -0.5f;
					}
				};
				<>c.<>9__9_0 = val2;
				obj = (object)val2;
			}
			RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
			CustomItem val3 = new CustomItem(MarriageLemurianIdentifier, (ItemDisplayRule[])(object)new ItemDisplayRule[0]);
			ItemAPI.Add(val3);
		}

		public static void MarriedLemurianBandActivator(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003d: 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>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "EntityStates.LemurianBruiserMonster.FireMegaFireball", "damageCoefficient")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<float, FireMegaFireball, float>>((Func<float, FireMegaFireball, float>)((float damageCoeff, FireMegaFireball entityState) => (((EntityState)entityState).characterBody.inventory.GetItemCount(MarriageLemurianIdentifier) == 1) ? 4f : damageCoeff));
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: Buff Married Lemurians");
			}
		}

		public static string MarriedLemurianNameHook(orig_GetBestBodyName orig, GameObject bodyObject)
		{
			string result = orig.Invoke(bodyObject);
			if (Object.op_Implicit((Object)(object)bodyObject))
			{
				CharacterBody component = bodyObject.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && component.inventory.GetItemCount(MarriageLemurianIdentifier) > 0)
				{
					if (component.inventory.GetItemCount(Items.FireRing) > 0)
					{
						return "Kjaro";
					}
					if (component.inventory.GetItemCount(Items.IceRing) > 0)
					{
						return "Runald";
					}
				}
			}
			return result;
		}
	}
	public class ChangesInteractables
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

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

			public static Manipulator <>9__9_6;

			public static hook_DropDroplet <>9__9_7;

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

			public static Manipulator <>9__9_9;

			public static hook_AddShrineStack <>9__9_0;

			public static hook_AddShrineStack <>9__9_1;

			public static hook_AddShrineStack <>9__9_2;

			public static hook_AddShrineStack <>9__9_3;

			public static hook_AddShrineStack <>9__9_4;

			public static hook_AddShrineStack <>9__9_5;

			public static hook_Awake <>9__10_0;

			public static hook_AddShrineStack <>9__10_1;

			internal void <Faster>b__9_6(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);
				if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f)
				}))
				{
					val.Next.Operand = 0.75f;
				}
				else
				{
					Debug.LogWarning((object)"IL Failed: PurchaseInteraction.CreateItemTakenOrb");
				}
			}

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

			internal void <Faster>b__9_7(orig_DropDroplet orig, Duplicating self)
			{
				orig.Invoke(self);
				if (NetworkServer.active)
				{
					((Component)((EntityState)self).outer).GetComponent<PurchaseInteraction>().Networkavailable = true;
				}
			}

			internal void <Faster>b__9_9(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);
				if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f)
				}))
				{
					val.Next.Operand = 0.75f;
				}
				else
				{
					Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb");
				}
			}

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

			internal void <Faster>b__9_0(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				if (NetworkServer.active)
				{
					self.refreshTimer = 1f;
				}
			}

			internal void <Faster>b__9_1(orig_AddShrineStack orig, ShrineBossBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				if (NetworkServer.active)
				{
					self.refreshTimer = 1f;
				}
			}

			internal void <Faster>b__9_2(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				if (NetworkServer.active)
				{
					self.refreshTimer = 1f;
				}
			}

			internal void <Faster>b__9_3(orig_AddShrineStack orig, ShrineCombatBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				if (NetworkServer.active)
				{
					self.refreshTimer = 1f;
				}
			}

			internal void <Faster>b__9_4(orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				if (NetworkServer.active)
				{
					self.refreshTimer = 1f;
				}
			}

			internal void <Faster>b__9_5(orig_AddShrineStack orig, ShrineRestackBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				if (NetworkServer.active)
				{
					self.refreshTimer = 1f;
				}
			}

			internal void <StupidPriceChanger>b__10_0(orig_Awake orig, PurchaseInteraction self)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Invalid comparison between Unknown and I4
				orig.Invoke(self);
				if ((int)self.costType == 3)
				{
					self.cost = 0;
				}
			}

			internal void <StupidPriceChanger>b__10_1(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor interactor)
			{
				orig.Invoke(self, interactor);
				if (self.purchaseCount == 1)
				{
					self.costMultiplierPerPurchase = 1.75f;
				}
				else if (self.purchaseCount == 2)
				{
					self.costMultiplierPerPurchase = 1.93f;
				}
			}
		}

		public static InteractableSpawnCard RedMultiShopISC = ScriptableObject.CreateInstance<InteractableSpawnCard>();

		public static DirectorCard ADTrippleRed = new DirectorCard();

		public static readonly GameObject MiliMutliShopMain;

		public static GameObject MiliMutliShopTerminal;

		public static InteractableSpawnCard iscShrineGoldFake = Object.Instantiate<InteractableSpawnCard>(LegacyResourcesAPI.Load<InteractableSpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineGoldshoresAccess"));

		private static Material MatMiliMultiShop;

		public static void Start()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: 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_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Expected O, but got Unknown
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			if (!WConfig.disableNewContent.Value)
			{
				RedMultiShopMaker();
			}
			FakeGoldShrine();
			StupidPriceChanger();
			Faster();
			TimedChestController.PreStartClient += new hook_PreStartClient(TimedChestController_PreStartClient);
			BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/TreasureCache/dtLockbox.asset").WaitForCompletion();
			((PickupDropTable)val).canDropBeReplaced = false;
			Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest1StealthedVariant/Chest1StealthedVariant.prefab").WaitForCompletion().GetComponent<ChestBehavior>()
				.dropTable = (PickupDropTable)(object)val;
			((PickupDropTable)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/TreasureCacheVoid/dtVoidLockbox.asset").WaitForCompletion()).canDropBeReplaced = false;
			((PickupDropTable)Addressables.LoadAssetAsync<FreeChestDropTable>((object)"RoR2/DLC1/FreeChest/dtFreeChest.asset").WaitForCompletion()).canDropBeReplaced = false;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/Base/ShrineCleanse/iscShrineCleanse.asset").WaitForCompletion().maxSpawnsPerStage = 4;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/Base/ShrineCleanse/iscShrineCleanseSandy.asset").WaitForCompletion().maxSpawnsPerStage = 4;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/Base/ShrineCleanse/iscShrineCleanseSnowy.asset").WaitForCompletion().maxSpawnsPerStage = 4;
			GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/DeepVoidPortalBattery/DeepVoidPortalBattery.prefab").WaitForCompletion();
			val2.GetComponent<HoldoutZoneController>().baseChargeDuration = WConfig.FasterDeepVoidSignal.Value;
			HoldoutZoneController component = val2.GetComponent<HoldoutZoneController>();
			component.baseRadius += 5f;
			GameObject val3 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Teleporters/Teleporter1");
			GameObject val4 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Teleporters/LunarTeleporter Variant");
			val3.GetComponent<BossGroup>().bossDropChance = WConfig.YellowPercentage.Value / 100f;
			val4.GetComponent<BossGroup>().bossDropChance = WConfig.YellowPercentage.Value / 100f;
			val3.GetComponent<TeleporterInteraction>().baseShopSpawnChance = WConfig.ShopChancePercentage.Value / 100f;
			if (WConfig.VoidPortalChance.Value)
			{
				val3.GetComponent<PortalSpawner>().minStagesCleared = 4;
				val4.GetComponent<PortalSpawner>().spawnChance = 0.2f;
				val4.GetComponent<PortalSpawner>().minStagesCleared = 4;
				val4.GetComponent<PortalSpawner>().spawnChance = 1f;
			}
			if (!WConfig.InteractablesCombatShrineHP.Value)
			{
				GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombat.prefab").WaitForCompletion();
				val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false;
				val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSandy Variant.prefab").WaitForCompletion();
				val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false;
				val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSnowy Variant.prefab").WaitForCompletion();
				val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false;
			}
			LunarTeleporterBaseState.FixedUpdate += new hook_FixedUpdate(LunarTeleporterBaseState_FixedUpdate);
		}

		private static void TimedChestController_PreStartClient(orig_PreStartClient orig, TimedChestController self)
		{
			orig.Invoke(self);
			if (Run.instance.stageClearCount > 3)
			{
				float lockTime = self.lockTime / 2f * (float)Run.instance.stageClearCount;
				self.lockTime = lockTime;
			}
		}

		public static void LunarTeleporterBaseState_FixedUpdate(orig_FixedUpdate orig, LunarTeleporterBaseState self)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)self).fixedAge = ((EntityState)self).fixedAge + Time.fixedDeltaTime;
			if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance))
			{
				if (TeleporterInteraction.instance.isInFinalSequence)
				{
					self.genericInteraction.Networkinteractability = (Interactability)0;
				}
				else
				{
					self.genericInteraction.Networkinteractability = self.preferredInteractability;
				}
			}
		}

		public static void Faster()
		{
			//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_0032: Expected O, but got Unknown
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Expected O, but got Unknown
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Expected O, but got Unknown
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Expected O, but got Unknown
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Expected O, but got Unknown
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Expected O, but got Unknown
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Expected O, but got Unknown
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Expected O, but got Unknown
			if (WConfig.FasterPrinter.Value)
			{
				object obj = <>c.<>9__9_6;
				if (obj == null)
				{
					Manipulator val = delegate(ILContext il)
					{
						//IL_0002: Unknown result type (might be due to invalid IL or missing references)
						//IL_0008: Expected O, but got Unknown
						ILCursor val15 = new ILCursor(il);
						if (val15.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
						{
							(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f)
						}))
						{
							val15.Next.Operand = 0.75f;
						}
						else
						{
							Debug.LogWarning((object)"IL Failed: PurchaseInteraction.CreateItemTakenOrb");
						}
					};
					<>c.<>9__9_6 = val;
					obj = (object)val;
				}
				PurchaseInteraction.CreateItemTakenOrb += (Manipulator)obj;
				((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/Duplicator").GetComponent<DelayedEvent>()).enabled = false;
				((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorLarge").GetComponent<DelayedEvent>()).enabled = false;
				((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorMilitary").GetComponent<DelayedEvent>()).enabled = false;
				((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorWild").GetComponent<DelayedEvent>()).enabled = false;
				object obj2 = <>c.<>9__9_7;
				if (obj2 == null)
				{
					hook_DropDroplet val2 = delegate(orig_DropDroplet orig, Duplicating self)
					{
						orig.Invoke(self);
						if (NetworkServer.active)
						{
							((Component)((EntityState)self).outer).GetComponent<PurchaseInteraction>().Networkavailable = true;
						}
					};
					<>c.<>9__9_7 = val2;
					obj2 = (object)val2;
				}
				Duplicating.DropDroplet += (hook_DropDroplet)obj2;
				EntityStateConfiguration val3 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Duplicator.Duplicating");
				val3.serializedFieldsCollection.serializedFields[0].fieldValue.stringValue = "0.6";
				val3.serializedFieldsCollection.serializedFields[1].fieldValue.stringValue = "1.25";
			}
			if (WConfig.FasterScrapper.Value)
			{
				object obj3 = <>c.<>9__9_9;
				if (obj3 == null)
				{
					Manipulator val4 = delegate(ILContext il)
					{
						//IL_0002: Unknown result type (might be due to invalid IL or missing references)
						//IL_0008: Expected O, but got Unknown
						ILCursor val14 = new ILCursor(il);
						if (val14.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
						{
							(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f)
						}))
						{
							val14.Next.Operand = 0.75f;
						}
						else
						{
							Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb");
						}
					};
					<>c.<>9__9_9 = val4;
					obj3 = (object)val4;
				}
				ScrapperController.CreateItemTakenOrb += (Manipulator)obj3;
				EntityStateConfiguration val5 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Scrapper.Scrapping");
				EntityStateConfiguration val6 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConf