Decompiled source of LittleGameplayTweaks v3.7.0

LittleGameplayTweaks.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.AffixEarthHealer;
using EntityStates.Huntress;
using EntityStates.Interactables.MSObelisk;
using EntityStates.LemurianBruiserMonster;
using EntityStates.Merc;
using EntityStates.ScavMonster;
using EntityStates.Scrapper;
using HG;
using IL.EntityStates.LemurianBruiserMonster;
using IL.RoR2;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.AffixEarthHealer;
using On.EntityStates.Huntress;
using On.EntityStates.Interactables.MSObelisk;
using On.EntityStates.Merc;
using On.EntityStates.ScavMonster;
using On.EntityStates.Scrapper;
using On.RoR2;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CharacterAI;
using RoR2.ExpansionManagement;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using WolfoLibrary;

[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+4418d2c29aa285066b35d0d3fd88f4c179582e53")]
[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)
	{
		PluginInfo = info;
		if (!Directory.Exists(GetPathToFile("GameplayTweaks")))
		{
			Folder = "";
		}
	}

	public 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 ConfigFileLGT = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Little_Gameplay_Tweaks.cfg", true);

	public static ConfigEntry<bool> cfgE1Unnerf;

	public static ConfigEntry<bool> cfgContentSourceLimit;

	public static ConfigEntry<bool> cfgOverloadingWorm;

	public static ConfigEntry<bool> VoidSeedsScale;

	public static ConfigEntry<bool> VoidSeedsMore;

	public static ConfigEntry<bool> VoidCradlesMore;

	public static ConfigEntry<bool> cfgEquipmentDroneThing;

	public static ConfigEntry<bool> cfgLoopDifficultTeleporters;

	public static ConfigEntry<bool> EclipseAllowVoid;

	public static ConfigEntry<bool> EclipseAllowEndAtSolusHeart;

	public static ConfigEntry<bool> EclipseAllowArtifactWorld;

	public static ConfigEntry<bool> EclipseAllowChoiceWeirdArtifacts;

	public static ConfigEntry<bool> EclipseAllowChoiceAllowAllArtifacts;

	public static ConfigEntry<bool> cheaperTier2;

	public static ConfigEntry<bool> cfgDccsMonster;

	public static ConfigEntry<bool> cfgDccsFamily;

	public static ConfigEntry<float> cfgFamilyChance;

	public static ConfigEntry<bool> cfgDccsInteractables;

	public static ConfigEntry<bool> cfgCredits_Interactables;

	public static ConfigEntry<bool> cfgStageCredits_Interactables;

	public static ConfigEntry<bool> cfgStageCredits_Monsters;

	public static ConfigEntry<bool> cfgMonsterCreditLoopScale;

	public static ConfigEntry<bool> cfgGoldShoresCredits;

	public static ConfigEntry<bool> FasterScrapper;

	public static ConfigEntry<bool> FasterShrines;

	public static ConfigEntry<bool> Shrine_Healing;

	public static ConfigEntry<bool> Shrine_Blood_Gold;

	public static ConfigEntry<bool> cfgHalcyon_FastDrain;

	public static ConfigEntry<bool> cfgHalcyon_ScaleHPMult;

	public static ConfigEntry<bool> cfgHalcyon_Spawnpool;

	public static ConfigEntry<bool> CharactersCaptainKeepInHiddemRealm;

	public static ConfigEntry<bool> CharactersHuntressLysateCell;

	public static ConfigEntry<bool> cfgCredits_Monsters;

	public static ConfigEntry<bool> cfgScavBoss;

	public static ConfigEntry<bool> cfgScavMoreItemsElites;

	public static ConfigEntry<bool> cfgScavTwistedScaling;

	public static ConfigEntry<bool> cfgMendingCoreBuff;

	public static ConfigEntry<bool> cfgElderLemurianBands;

	public static ConfigEntry<bool> VoidPortalStage9;

	public static ConfigEntry<int> cfgBossItemChance;

	public static ConfigEntry<int> cfgAspectDropRate;

	public static ConfigEntry<bool> ThirdLunarSeer;

	public static ConfigEntry<bool> cfgTwistedBuff;

	public static ConfigEntry<bool> cfgVoidCampScaling;

	public static ConfigEntry<bool> cfgSotV_EnemyRemovals;

	public static void InitConfig()
	{
		cfgSotV_EnemyRemovals = ConfigFileLGT.Bind<bool>("Spawnpools", "SotV enemy removals", true, "SotV replaced various enemies with new enemies.\nThis feature was removed in the new spawn pool system.");
		cfgLoopDifficultTeleporters = ConfigFileLGT.Bind<bool>("Looping", "Scale | Teleporter Bosses", true, "During Loops, Teleporters spawn more bosses and bosses get additiona health.\nThis can result in Teleporters still being a more impactful event rather than a slaughter and waiting.");
		VoidSeedsScale = ConfigFileLGT.Bind<bool>("Looping", "Scale | Void Seeds Monsters", true, "Void Seeds spawn more monsters during loops.");
		cfgMonsterCreditLoopScale = ConfigFileLGT.Bind<bool>("Looping", "Scale | Stage starting Monsters", true, "Stages start with more monsters on them during loops, to encourage more chaos and earlier big T2 elites.");
		cheaperTier2 = ConfigFileLGT.Bind<bool>("Looping", "Cheaper Tier 2 Elites", true, "Makes Tier 2 Elites cost 30x instead of 36x.\nAdds more chaos to looping.\nWill update mid-run if changed");
		VoidPortalStage9 = ConfigFileLGT.Bind<bool>("Looping", "Void Portal Stage 9", true, "Guaranteed a portal to Void Locust every Stage 4 during Looping., so it could be used as a proper alternative to Mithrix if desired.\nAlso doubles random spawn chance to 20%.\nVanilla is 10% on any stage after stage 7.");
		cheaperTier2.SettingChanged += Tier2_SettingChanged;
		cfgTwistedBuff = ConfigFileLGT.Bind<bool>("Monsters", "Twisted Elite | Buff", true, "Twisted Elites no longer need to recharge\nTwisted Projectile can no longer killed.");
		cfgScavBoss = ConfigFileLGT.Bind<bool>("Monsters", "Scavs as Bosses", true, "Scavs can spawn as a TP Boss under normal conditions but rarer than other teleporter bosses.");
		cfgScavMoreItemsElites = ConfigFileLGT.Bind<bool>("Monsters", "Boss & Elite Scavs get more items", true, "Boss Scavs get 1 Yellow\nElite Scavs get 4x4 Whites, 2x3 Greens, 2x2 Reds\nTier2 Scavs get 5x6 Whites 3x4 Greens, 2x3 Reds.\n\nThis is so that Scavengers continue to scale as a threat, with ever increasing amount of items.\nAlso because funny");
		cfgMendingCoreBuff = ConfigFileLGT.Bind<bool>("Monsters", "Mending Elite | On Death Buff", true, "Fixes Healing Cores not scaling with level, which is why they only ever healed 40.\nAlso increases their HP in general.");
		cfgScavTwistedScaling = ConfigFileLGT.Bind<bool>("Monsters", "Twisted Scav | Scaling Fix", true, "Twisted Scavengers always scale to 1 player because it thinks 0 players are alive.\nThis fixes that.\nOnly important for multiplayer hosts.");
		cfgOverloadingWorm = ConfigFileLGT.Bind<bool>("Monsters", "Overloading Worm Overloading Bomb", true, "The projectiles will be more spread out and leave behind overloading bubbles like the Elite.");
		cfgElderLemurianBands = ConfigFileLGT.Bind<bool>("Monsters", "Aquaduct Elders activate Bands", true, "They will activate their Bands on hit and scale with level at half the rate.");
		FasterScrapper = ConfigFileLGT.Bind<bool>("Interactables", "Faster Scrappers", true, "Generally a bit faster without removing the animation entirely.");
		FasterShrines = ConfigFileLGT.Bind<bool>("Interactables", "Faster Shrines", true, "Shrines have 1 second of delay instead of 2 seconds.");
		cfgHalcyon_FastDrain = ConfigFileLGT.Bind<bool>("Interactables", "Halcyon Shrine | Faster Drain", true, "Suck gold at rate of 2 instead of 1. Mostly useful in Singleplayer.");
		cfgHalcyon_ScaleHPMult = ConfigFileLGT.Bind<bool>("Interactables", "Halcyon Shrine | Multiply HP", false, "Multiply health of the Stone Golems (per player), spawned while charging.\nVanilla : True");
		VoidSeedsMore = ConfigFileLGT.Bind<bool>("Interactables", "Void Seed | More Monster", true, "Void Seeds spawn more monsters. This does still take away from the stages starting spawns.");
		VoidCradlesMore = ConfigFileLGT.Bind<bool>("Interactables", "Void Cradles | Infestors", true, "Each Void Infestor has a 70% chance to spawn instead of 50%\n\nRare to see them actually have a chance to infest anything.");
		Shrine_Blood_Gold = ConfigFileLGT.Bind<bool>("Interactables", "Blood Shrine | Scale Rward", true, "Scales Blood Shrine rewards with difficulty coefficient ^1.05.\n\nFor Comparison prices rise at ^1.25");
		Shrine_Healing = ConfigFileLGT.Bind<bool>("Interactables", "Woods Shrine | Cheaper", true, "Shrine of Woods cost 10 instead of 25. Go up 1.4x instead of 1.5x per purchase. And allows 4 purchases instead of 3.");
		cfgStageCredits_Interactables = ConfigFileLGT.Bind<bool>("Stages", "Stage Credits adjustments", true, "Stage 1,2,3 get slightly more monster spawns on start. Titanic Plains & Distant Roost get 240\nTo balance against new Stage 1s have 280 credits or more.\n\nAbandoned Aquaduct gets 240 in Solo\nIn Multiplayer, Scales as 280 credits and then flat -60 for the Band secret. (Better for 3P,4P)\nInstead of scale as 220 which would be -150 credits during 4P for the secret in Vanilla\n\nSirens Call & Sundered Grove get flat +50\nTo balance against Abyssal Depths having +160 flat credits and people generally disliking these stages more.");
		cfgStageCredits_Monsters = ConfigFileLGT.Bind<bool>("Stages", "Stage Starting Monster adjustments", true, "Most Stage 1,2,3s start with 40% more monster credits, so there's something more to do in the early game.");
		ThirdLunarSeer = ConfigFileLGT.Bind<bool>("Stages", "Bazaar | Third Lunar Seer", true, "2 Seers was fine when there were 2 stages but we have a lot of stages now");
		cfgGoldShoresCredits = ConfigFileLGT.Bind<bool>("Stages", "Gilded Coast spawns interactables", true, "Not a lot of credits. Shrines of Combat, Chance and Cleansing. Just a little more stuff I guess");
		CharactersCaptainKeepInHiddemRealm = ConfigFileLGT.Bind<bool>("Survivors", "Captain Hidden Realms", true, "Allow Captain Beacons on all stages. (Except Bazaar)");
		CharactersHuntressLysateCell = ConfigFileLGT.Bind<bool>("Survivors", "Huntress Ballista Lysate Cell", true, "With Lysate Cell, use 2 Ballista charges at once if available, for 6 shots.");
		cfgEquipmentDroneThing = ConfigFileLGT.Bind<bool>("Survivors", "Equipment Drone AI Change", true, "Equipment Drones with certain equipment, like Radar Scanner, will use their equipment a lot more often.");
		cfgDccsMonster = ConfigFileLGT.Bind<bool>("Spawnpools", "Monsters | Spawn Pools", true, "Adds and changes some enemy variety. If you wish to turn off changes on a specific stage, check the stage specific config.");
		cfgCredits_Monsters = ConfigFileLGT.Bind<bool>("Spawnpools", "Monsters | Credits Adjustment", true, "GrandParent | 1150 -> 1000\nParent | 100 -> 80\nVoid Reaver | 300 -> 260\nClay Apothecary | 150 -> 130");
		cfgDccsInteractables = ConfigFileLGT.Bind<bool>("Spawnpools", "Interactables | Spawn Pools", true, "Mili Printers, Cleansing Pools, Drone Scrappers, Drone Combiners : Increased weight slightly.");
		cfgCredits_Interactables = ConfigFileLGT.Bind<bool>("Spawnpools", "Interactables | Credits Adjustment", true, "Shrine of Woods | 15 -> 10.\nShrine of Order | 30 -> 5.5\nLunar Pod | 25 -> 20\nVoid Potential | 40 -> 30\n\nOvergrown Printer | 10 -> 15\nDrone Combiner | 1 -> 25");
		cfgHalcyon_Spawnpool = ConfigFileLGT.Bind<bool>("Spawnpools", "Halcyon Shrine | Spawnpool", true, "Adds a chance to spawn Halcyonites instead of just Stone Golems");
		cfgDccsFamily = ConfigFileLGT.Bind<bool>("Spawnpools", "Family Events Additions", true, "Add more family events to some stages\nMost notably Lunar Family event can occur instead of Void Family on some stages.");
		cfgE1Unnerf = ConfigFileLGT.Bind<bool>("Eclipse", "Eclipse 1 unnerf Squid/Mask", true, "Squid Polyp and Happiest Mask last the intended 30 seconds, instead of 15 seconds in Eclipse.\n\nThis happens because they use Health as a death timer, and starting at half health makes them last half as long.");
		EclipseAllowVoid = ConfigFileLGT.Bind<bool>("Eclipse", "Eclipse allow Void Locus", true, "Allows Void Portals to spawn so you can use Voidling as an alternate final boss in Eclipse. Does not affect the Deep Void Portal after Mithrix of course.");
		EclipseAllowEndAtSolusHeart = ConfigFileLGT.Bind<bool>("Eclipse", "Eclipse allow AC ending", true, "Allows you to end the run after completing the AC Route.");
		EclipseAllowArtifactWorld = ConfigFileLGT.Bind<bool>("Eclipse", "Eclipse allow Bulwarks Ambry", false, "Allows computer. For artifact");
		cfgFamilyChance = ConfigFileLGT.Bind<float>("Chances", "Family Event Chance", 2f, "% chance for family event. Vanilla is 2");
		cfgBossItemChance = ConfigFileLGT.Bind<int>("Chances", "Boss Item TP Percent", 20, "Percent chance for a yellow item to replace a green from a teleporter.\nVanilla is 15");
		cfgAspectDropRate = ConfigFileLGT.Bind<int>("Chances", "Elite Aspect Drop Rate", 2400, "1 in X drop chance for Elite Aspects. Vanilla is 1 in 4000.");
		cfgAspectDropRate.SettingChanged += LittleGameplayTweaks.EquipmentBonusRate;
	}

	public static void Tier2_SettingChanged(object sender, EventArgs e)
	{
		if (CombatDirector.eliteTiers.Length > 1)
		{
			EliteTierDef val = CombatDirector.eliteTiers[Looping.FindTier2Elite()];
			if (val.costMultiplier == 36f)
			{
				float costMultiplier = (cheaperTier2.Value ? 5f : 6f) * CombatDirector.baseEliteCostMultiplier;
				Debug.Log((object)("Tier 2 Elites | Cost" + costMultiplier));
				val.costMultiplier = costMultiplier;
			}
		}
	}

	public static void RiskConfig()
	{
		//IL_002c: 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_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Expected O, but got Unknown
		//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dd: Expected O, but got Unknown
		//IL_0206: Unknown result type (might be due to invalid IL or missing references)
		//IL_0210: Expected O, but got Unknown
		ModSettingsManager.SetModDescription("Mostly spawn pool tweaks");
		Texture2D val = LegacyResourcesAPI.Load<Texture2D>("Textures/BodyIcons/GravekeeperBody");
		ModSettingsManager.SetModIcon(Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f)));
		List<ConfigEntry<bool>> list = new List<ConfigEntry<bool>>
		{
			cfgDccsMonster, cfgDccsFamily, cfgDccsInteractables, cfgCredits_Monsters, cfgCredits_Interactables, FasterScrapper, FasterShrines, Shrine_Healing, cfgHalcyon_Spawnpool, CharactersCaptainKeepInHiddemRealm,
			cfgMendingCoreBuff, cfgElderLemurianBands, cfgTwistedBuff, VoidSeedsMore, VoidCradlesMore, cfgE1Unnerf
		};
		ConfigEntryBase[] configEntries = ConfigFileLGT.GetConfigEntries();
		Debug.Log((object)("Config Values Total : " + configEntries.Length));
		Debug.Log((object)("Config Values Reset : " + list.Count));
		ConfigEntryBase[] array = configEntries;
		foreach (ConfigEntryBase val2 in array)
		{
			if (val2.SettingType == typeof(bool))
			{
				ConfigEntry<bool> val3 = (ConfigEntry<bool>)(object)val2;
				ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(val3, list.Contains(val3)));
			}
			else if (val2.SettingType == typeof(int))
			{
				ConfigEntry<int> val4 = (ConfigEntry<int>)(object)val2;
				ModSettingsManager.AddOption((BaseOption)new IntFieldOption(val4, false));
			}
			else if (val2.SettingType == typeof(float))
			{
				ModSettingsManager.AddOption((BaseOption)new FloatFieldOption((ConfigEntry<float>)(object)val2, false));
			}
			else
			{
				Debug.LogWarning((object)("Could not add config " + val2.Definition.Key + " of type : " + val2.SettingType));
			}
		}
	}
}
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_2_Nest;

	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_3_Iron;

	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_4_RC;

	public static ConfigEntry<bool> Stage_4_Conduit;

	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_1_Roost = ConfigFileSTAGES.Bind<bool>("Stage 1", "Distant Roost", true, "+Loop Vultures");
		Stage_1_Snow = ConfigFileSTAGES.Bind<bool>("Stage 1", "Snowy Forest", true, "Removes Greater Wisp\nAdds Bison\nBlind Vermin now pre-loop\nBlind enemies slightly rarer\nAdds Loop Imp & Imp Overlord\n\nAdds Loop TC-280\nAdds rare Shrine of Order");
		Stage_1_Lake = ConfigFileSTAGES.Bind<bool>("Stage 1", "Verdan Falls", true, "Adds Jellyfish\nAdds Loop Solus Control Unit\nAdds Loop Vulture\n\nMakes Cleansing Pool rarer\nAdds Large Healing Chests\nAdds Large Utility Chests");
		Stage_1_Village = ConfigFileSTAGES.Bind<bool>("Stage 1", "Shattered Abodes", true, "Adds Halcyonite\nAdds Loop Lunar Chimera\nAdds Loop Alloy Vulture\n\nAdds Shrine of Order\nAdds Loop Cleansing Pool\nAdds Loop TC-280\nAdds Large Damage Chest\nAdds Large Utility chest");
		Stage_2_Goolake = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aquaduct", true, "Adds Clay Apothecary\nAdds Loop Hermit Crab");
		Stage_2_Swamp = ConfigFileSTAGES.Bind<bool>("Stage 2", "Wetlands", true, "Adds Loop Acid Larva\nAdds Loop Mushroom\n\n");
		Stage_2_Ancient = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aphelian Sanctuary", true, "Adds Loop Elder Lemurian\nAdds Loop Grovetender\n\nAdds rare Shrine of Order");
		Stage_2_Temple = ConfigFileSTAGES.Bind<bool>("Stage 2", "Reformed Altar", true, "Adds Grovetender\nAdds Loop Bison\nAdds Loop Brass Contrapion\nRemoves Blind Pest\n\nAdds Shrine of Order\nAdds all 3 Large Category Chests");
		Stage_2_Nest = ConfigFileSTAGES.Bind<bool>("Stage 2", "Pretenders Precipe", true, "+Loop Solus Control Unit\n+Loop Solus Amalgamator");
		Stage_3_Frozen = ConfigFileSTAGES.Bind<bool>("Stage 3", "Rally Point", true, "Adds Solus Control Unit\n-Removes Clay Dunestrider\nAdds Loop Solus Probe\nAdds Loop Vulture\nAdds Drone Combiner");
		Stage_3_Wisp = ConfigFileSTAGES.Bind<bool>("Stage 3", "Scorched Acres", true, "Adds Clay Apothecary\nAdds Loop Blind Vermin");
		Stage_3_Sulfur = ConfigFileSTAGES.Bind<bool>("Stage 3", "Sulfur Pool", true, "Adds Hermit Crab\nAdds Acid Larva\nAdds Loop Grandparent\nAdds Loop Parent\n\nAdds Mountain Shrine\nAdds Emergency Drone");
		Stage_3_Tree = ConfigFileSTAGES.Bind<bool>("Stage 3", "Treeborn", true, "+Loop Mushroom\n+Loop Blind Pest\n\nAdds Large Damage Chest\nAdds Large Healing Chest");
		Stage_3_Iron = ConfigFileSTAGES.Bind<bool>("Stage 3", "Iron Alluvium", true, "Adds Drone Combiner");
		Stage_4_Damp_Abyss = ConfigFileSTAGES.Bind<bool>("Stage 4", "Abyssal Depths", true, "Adds Loop Parent\nAdds Loop Grandparent\nAdds Loop Void Jailer\n");
		Stage_4_Ship = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sirens Call", true, "Adds Overloading Worm\nAdds Loop Solus Probe\nAdds Loop Alpha Construct\nAdds Loop XI Construct\n\nAdds Rare TC280");
		Stage_4_Root_Jungle = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sundered Grove", true, "Adds Grovetender\nRemoves Stone Titan\nRemoves Loop Halcyonite\nAdds Loop Blind Pest\nAdds Loop Void Jailer\n");
		Stage_4_RC = ConfigFileSTAGES.Bind<bool>("Stage 4", "Repurposed Crater", true, "");
		Stage_5_Sky = ConfigFileSTAGES.Bind<bool>("Stage 5", "Sky Meadow", true, "Adds Loop Lunar Chimera\nAdds Loop Void Devestator\n");
		Stage_5_Helminth = ConfigFileSTAGES.Bind<bool>("Stage 5", "Helminth", true, "Adds Halcyonite\nRemoves Greater Wisp\nAdds Grandparent\nAdds Hermit Crabs\nAdds all 3 Large Category Chests");
		Stage_F_Moon = ConfigFileSTAGES.Bind<bool>("Stage Other", "Commencement", true, "Allows all Void enemies to spawn during the escape sequence.");
		Stage_F_Meridian = ConfigFileSTAGES.Bind<bool>("Stage Other", "Prime Meridian", true, "Adds Loop Lunar Chimera");
		Stage_X_Arena_Void = ConfigFileSTAGES.Bind<bool>("Stage Other", "Void Fields", true, "");
		Stage_X_GoldShores = ConfigFileSTAGES.Bind<bool>("Stage Other", "Gilded Coast", true, "Adds Grandparents\nAdds Parents\nAdds Grovetenders\nAdds Brass Contraptions");
	}

	public static void RiskConfig()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Expected O, but got Unknown
		ModSettingsManager.SetModDescription("Stage specific config for DCCS / Spawnpool / Stage changes added by LittleGameplayTweaks", "LGT_SpawnPools", "Spawnpools");
		Texture2D val = Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/ArtifactShell/texUnidentifiedKillerIcon.png").WaitForCompletion();
		ModSettingsManager.SetModIcon(Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(-0.5f, -0.5f)), "LGT_SpawnPools", "Spawnpools");
		ConfigEntryBase[] configEntries = ConfigFileSTAGES.GetConfigEntries();
		ConfigEntryBase[] array = configEntries;
		foreach (ConfigEntryBase val2 in array)
		{
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption((ConfigEntry<bool>)(object)val2, true), "LGT_SpawnPools", "Spawnpools");
		}
	}
}
public class DCCS
{
	public enum Category
	{
		Damage,
		Healing,
		Utility
	}

	public static DirectorCard FindSpawnCard(DirectorCard[] insert, string LookingFor)
	{
		for (int i = 0; i < insert.Length; i++)
		{
			if (((Object)insert[i].spawnCard).name.EndsWith(LookingFor))
			{
				return insert[i];
			}
		}
		Debug.LogWarning((object)("Couldn't find " + LookingFor));
		return null;
	}

	public static void RemoveCard(DirectorCardCategorySelection dccs, int cat, int card)
	{
		ArrayUtils.ArrayRemoveAtAndResize<DirectorCard>(ref dccs.categories[cat].cards, card, 1);
	}

	public static void MatchCategoryChests(Category category, int start, int cat)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		if (category.cards.Length >= start + 2 && ((Object)category.cards[start + 1].spawnCard).name.EndsWith("tHealing") && ((Object)category.cards[start + 2].spawnCard).name.EndsWith("tUtility"))
		{
			DirectorCard val = category.cards[start + cat];
			category.cards[start] = val;
			category.cards[start + 1] = val;
			category.cards[start + 2] = val;
		}
	}

	public static void MultWholeCateory(DirectorCardCategorySelection dccs, int category, int mult)
	{
		for (int i = 0; i < dccs.categories[category].cards.Length; i++)
		{
			DirectorCard obj = dccs.categories[category].cards[i];
			obj.selectionWeight *= mult;
		}
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Wolfo.LittleGameplayTweaks", "LittleGameplayTweaks", "3.6.2")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class LittleGameplayTweaks : BaseUnityPlugin
{
	public static readonly Random random = new Random();

	public void Awake()
	{
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Expected O, but got Unknown
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Expected O, but got Unknown
		WConfig.InitConfig();
		ConfigStages.InitConfig();
		ClassicStageInfo.contentSourceMixLimitDefault = 99;
		Changes_Monsters.Start();
		Changes_Survivors.Start();
		Changes_Interactables.Start();
		Changes_Stages.Start();
		DCCS_Monsters.Start();
		DCCS_Interactables.Start();
		DCCS_Family.Start();
		DCCS_Credits.Start();
		Eclipse.Start();
		((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)LateMethod);
		SceneDirector.Start += new hook_Start(GameplayQoL_SceneDirector_Start);
		ClassicStageInfo.Awake += new hook_Awake(RollForScavBoss);
		ExtraActions.onMonsterDCCS = (Action<DirectorCardCategorySelection>)Delegate.Combine(ExtraActions.onMonsterDCCS, new Action<DirectorCardCategorySelection>(DCCS_ApplyAsNeeded.RemoveMonsterBasedOnSotVReplacement));
	}

	public void Start()
	{
		WConfig.RiskConfig();
	}

	internal static void LateMethod()
	{
		ConfigStages.RiskConfig();
		Looping.CallLate();
		Changes_Monsters.CallLate();
		EquipmentBonusRate(null, null);
		if (WConfig.cfgMendingCoreBuff.Value)
		{
			Heal.healCoefficient *= 2f;
		}
	}

	public static void GameplayQoL_SceneDirector_Start(orig_Start orig, SceneDirector self)
	{
		orig.Invoke(self);
		string baseSceneName = SceneInfo.instance.sceneDef.baseSceneName;
		string text = baseSceneName;
		if (text == "goolake" && WConfig.cfgElderLemurianBands.Value)
		{
			GameObject val = GameObject.Find("/HOLDER: Secret Ring Area Content/ApproxCenter/RingEventController/");
			CharacterMaster component = ((Component)val.transform.GetChild(1)).GetComponent<CharacterMaster>();
			CharacterMaster component2 = ((Component)val.transform.GetChild(2)).GetComponent<CharacterMaster>();
			component.inventory.GiveItem(Items.UseAmbientLevel, 1);
			component2.inventory.GiveItem(Items.UseAmbientLevel, 1);
			component.inventory.GiveItem(Items.CutHp, 1);
			component2.inventory.GiveItem(Items.CutHp, 1);
			component.onBodyStart += AquaductEldersStats;
			component2.onBodyStart += AquaductEldersStats;
		}
	}

	private static void AquaductEldersStats(CharacterBody body)
	{
		Debug.Log((object)"Aquaduct Elder Lemurian Start");
		body.baseDamage *= 0.45f;
		body.levelDamage *= 0.45f;
	}

	public static void RollForScavBoss(orig_Awake orig, ClassicStageInfo self)
	{
		orig.Invoke(self);
		if (NetworkServer.active && WConfig.cfgScavBoss.Value)
		{
			if (self.rng != null && self.rng.nextNormalizedFloat > 0.6f)
			{
				LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = false;
			}
			else
			{
				LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = true;
			}
		}
	}

	public static void EquipmentBonusRate(object sender, EventArgs e)
	{
		for (int i = 0; i < EliteCatalog.eliteDefs.Length; i++)
		{
			if (Object.op_Implicit((Object)(object)EliteCatalog.eliteDefs[i].eliteEquipmentDef) && EliteCatalog.eliteDefs[i].eliteEquipmentDef.dropOnDeathChance != 0f)
			{
				EliteCatalog.eliteDefs[i].eliteEquipmentDef.dropOnDeathChance = 1f / (float)WConfig.cfgAspectDropRate.Value;
			}
		}
	}
}
public class Changes_Monsters
{
	[Serializable]
	[CompilerGenerated]
	private sealed class <>c
	{
		public static readonly <>c <>9 = new <>c();

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

		public static Func<BuffDef, BuffDef> <>9__3_0;

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

		public static Func<BuffDef, BuffDef> <>9__3_1;

		public static hook_PickupIsNonBlacklistedItem <>9__9_0;

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

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

		internal bool <ChildAndScorchling_ArmorNotInvul>b__3_2(Instruction x)
		{
			return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "HiddenInvincibility");
		}

		internal BuffDef <ChildAndScorchling_ArmorNotInvul>b__3_0(BuffDef _)
		{
			return Buffs.ArmorBoost;
		}

		internal bool <ChildAndScorchling_ArmorNotInvul>b__3_3(Instruction x)
		{
			return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "HiddenInvincibility");
		}

		internal BuffDef <ChildAndScorchling_ArmorNotInvul>b__3_1(BuffDef _)
		{
			return Buffs.ArmorBoost;
		}

		internal bool <Enemies>b__9_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 bool <MarriedLemurianBandActivator>b__13_1(Instruction x)
		{
			return ILPatternMatchingExt.MatchLdsfld(x, "EntityStates.LemurianBruiserMonster.FireMegaFireball", "damageCoefficient");
		}

		internal float <MarriedLemurianBandActivator>b__13_0(float damageCoeff, FireMegaFireball entityState)
		{
			if (((EntityState)entityState).characterBody.inventory.GetItemCount(Items.Clover) >= 20)
			{
				return 4f;
			}
			return damageCoeff;
		}
	}

	public static BasicPickupDropTable DropTableForBossScav = ScriptableObject.CreateInstance<BasicPickupDropTable>();

	public static void CallLate()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ElitePoison/UrchinTurretMaster.prefab").WaitForCompletion();
		val.AddComponent<GivePickupsOnStart>().itemDefInfos = (ItemDefInfo[])(object)new ItemDefInfo[1]
		{
			new ItemDefInfo
			{
				itemDef = Items.UseAmbientLevel,
				count = 1
			}
		};
		ItemDefInfo[] itemDefInfos = (ItemDefInfo[])(object)new ItemDefInfo[1]
		{
			new ItemDefInfo
			{
				itemDef = Items.TeleportWhenOob,
				count = 1
			}
		};
		GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/MagmaWorm/MagmaWormMaster.prefab").WaitForCompletion();
		val2.AddComponent<GivePickupsOnStart>().itemDefInfos = itemDefInfos;
		GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ElectricWorm/ElectricWormMaster.prefab").WaitForCompletion();
		val3.AddComponent<GivePickupsOnStart>().itemDefInfos = itemDefInfos;
	}

	public static void Start()
	{
		//IL_0092: 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_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Expected O, but got Unknown
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Expected O, but got Unknown
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Expected O, but got Unknown
		Enemies();
		if (WConfig.cfgElderLemurianBands.Value)
		{
			FireMegaFireball.FixedUpdate += new Manipulator(MarriedLemurianBandActivator);
		}
		((Object)DropTableForBossScav).name = "dtScavRandomBoss";
		DropTableForBossScav.tier1Weight = 0f;
		DropTableForBossScav.tier2Weight = 0f;
		DropTableForBossScav.tier3Weight = 0f;
		DropTableForBossScav.bossWeight = 1f;
		DropTableForBossScav.bannedItemTags = (ItemTag[])(object)new ItemTag[2]
		{
			(ItemTag)4,
			(ItemTag)8
		};
		GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Elites/EliteBead/BeadProjectileTrackingBomb.prefab").WaitForCompletion();
		if (WConfig.cfgTwistedBuff.Value)
		{
			AffixBeadAttachment.Initialize += new hook_Initialize(AffixBeadAttachment_Initialize);
			Object.Destroy((Object)(object)((Component)val.transform.GetChild(0)).GetComponent<HurtBoxGroup>());
			Object.Destroy((Object)(object)((Component)val.transform.GetChild(0).GetChild(0)).GetComponent<HurtBox>());
		}
		ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(ScalingChanges);
		KillableProjectileScaling();
	}

	private static void ChildAndScorchling_ArmorNotInvul(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)2, new Func<Instruction, bool>[1]
		{
			(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "HiddenInvincibility")
		}))
		{
			val.EmitDelegate<Func<BuffDef, BuffDef>>((Func<BuffDef, BuffDef>)((BuffDef _) => Buffs.ArmorBoost));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: Scorchling_ArmorNotInvul");
		}
		if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
		{
			(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "HiddenInvincibility")
		}))
		{
			val.EmitDelegate<Func<BuffDef, BuffDef>>((Func<BuffDef, BuffDef>)((BuffDef _) => Buffs.ArmorBoost));
		}
	}

	private static void AffixBeadAttachment_Initialize(orig_Initialize orig, AffixBeadAttachment self)
	{
		orig.Invoke(self);
		self.trackedBodies.Add(((Component)self.networkedBodyAttachment.attachedBody).gameObject);
		self.cooldownAfterFiring = 1f;
	}

	public static void KillableProjectileScaling()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: 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_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: 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_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		CharacterBody val = null;
		val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Vagrant/VagrantTrackingBomb.prefab").WaitForCompletion().GetComponent<CharacterBody>();
		CharacterBody obj = val;
		obj.bodyFlags = (BodyFlags)(obj.bodyFlags | 0x20000000);
		val.levelMaxHealth = 0f;
		val.levelArmor = 30f;
		val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarWisp/LunarWispTrackingBomb.prefab").WaitForCompletion().GetComponent<CharacterBody>();
		CharacterBody obj2 = val;
		obj2.bodyFlags = (BodyFlags)(obj2.bodyFlags | 0x20000000);
		val.levelMaxHealth = 0f;
		val.levelArmor = 30f;
		val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperTrackingFireball.prefab").WaitForCompletion().GetComponent<CharacterBody>();
		CharacterBody obj3 = val;
		obj3.bodyFlags = (BodyFlags)(obj3.bodyFlags | 0x20000000);
		val.levelMaxHealth = 0f;
		val.levelArmor = 30f;
		val = Addressables.LoadAssetAsync<GameObject>((object)"de83659161b919844b1309bc9aaa3c71").WaitForCompletion().GetComponent<CharacterBody>();
		CharacterBody obj4 = val;
		obj4.bodyFlags = (BodyFlags)(obj4.bodyFlags | 0x20000000);
		val.levelMaxHealth = 0f;
		val.levelArmor = 30f;
		val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Scorchling/ScorchlingBombProjectile.prefab").WaitForCompletion().GetComponent<CharacterBody>();
		CharacterBody obj5 = val;
		obj5.bodyFlags = (BodyFlags)(obj5.bodyFlags | 0x20000000);
		val.levelMaxHealth = 0f;
		val.levelArmor = 30f;
	}

	private static void VoidRaidGauntletController_Start(orig_Start orig, VoidRaidGauntletController self)
	{
		orig.Invoke(self);
		if (NetworkServer.active && self.phaseEncounters.Length != 3)
		{
		}
	}

	public static void ScalingChanges(orig_BeginEncounter orig, ScriptedCombatEncounter self)
	{
		orig.Invoke(self);
		if (!Object.op_Implicit((Object)(object)SceneInfo.instance) && Run.instance.livingPlayerCount == 0 && ((Object)self).name.StartsWith("ScavLunar") && WConfig.cfgScavTwistedScaling.Value)
		{
			float num = 1f;
			num += Run.instance.difficultyCoefficient / 2.5f;
			float num2 = Mathf.Max(1f, (float)Run.instance.participatingPlayerCount * 0.9f);
			num *= Mathf.Pow(num2, 0.5f);
			Debug.Log((object)("Replacing previous HP bonus with: currentBoostHpCoefficient=" + num));
			for (int i = 0; i < self.combatSquad.membersList.Count; i++)
			{
				Inventory inventory = self.combatSquad.membersList[i].inventory;
				inventory.RemoveItemPermanent(Items.BoostHp, inventory.GetItemCountPermanent(Items.BoostHp));
				inventory.GiveItemPermanent(Items.BoostHp, Mathf.RoundToInt((num - 1f) * 10f));
			}
		}
	}

	public static void AffixBeadAttachment_OnEnable(orig_OnEnable orig, AffixBeadAttachment self)
	{
		orig.Invoke(self);
		self.trackedBodies.Add(((Component)self.networkedBodyAttachment.attachedBody).gameObject);
		self.damageCooldown = 0.05f;
		self.cooldownAfterFiring = 0.1f;
		self.fireDelayTimer = 1f;
	}

	public static void Enemies()
	{
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Expected O, but got Unknown
		//IL_00b9: 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_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: 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
		//IL_0229: Unknown result type (might be due to invalid IL or missing references)
		//IL_022e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0247: Unknown result type (might be due to invalid IL or missing references)
		//IL_024c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_017f: 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/AffixEarthHealerBody.prefab").WaitForCompletion();
			CharacterBody component = val.GetComponent<CharacterBody>();
			component.baseArmor = 100f;
			component.levelArmor = 60f;
			component.baseDamage = 25f;
			component.levelDamage = 5f;
			HurtBox component2 = ((Component)val.transform.GetChild(0).GetChild(0).GetChild(2)).GetComponent<HurtBox>();
			component2.isSniperTarget = false;
			component2.isBullseye = false;
			Chargeup.OnEnter += new hook_OnEnter(AffixEarthHealthInvulThing);
		}
		ScavengerItemGranter.Start += new hook_Start(GiveScavMoreItems);
		((SpawnCard)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav")).requiredFlags = (NodeFlags)0;
		object obj = <>c.<>9__9_0;
		if (obj == null)
		{
			hook_PickupIsNonBlacklistedItem val2 = 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__9_0 = val2;
			obj = (object)val2;
		}
		FindItem.PickupIsNonBlacklistedItem += (hook_PickupIsNonBlacklistedItem)obj;
		AISkillDriver val3 = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/ScavMaster").GetComponents<AISkillDriver>()[1];
		val3.maxUserHealthFraction = 0.999f;
		val3.minUserHealthFraction = 0.4f;
		val3.minTargetHealthFraction = 0.4f;
		val3.selectionRequiresOnGround = false;
		if (WConfig.cfgOverloadingWorm.Value)
		{
			GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ElectricWorm/ElectricWormBody.prefab").WaitForCompletion();
			WormBodyPositions2 component3 = val4.GetComponent<WormBodyPositions2>();
			component3.blastAttackForce *= 2f;
			component3.meatballForce *= 2f;
			GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ElectricWorm/ElectricOrbProjectile.prefab").WaitForCompletion();
			ProjectileImpactExplosion component4 = val5.GetComponent<ProjectileImpactExplosion>();
			((ProjectileExplosion)component4).useChildRotation = false;
			((ProjectileExplosion)component4).childrenCount = 2;
			((ProjectileExplosion)component4).childrenDamageCoefficient = 0.5f;
			((ProjectileExplosion)component4).minPitchDegrees = 90f;
			((ProjectileExplosion)component4).rangePitchDegrees = 90f;
			((ProjectileExplosion)component4).rangeYawDegrees = 360f;
			GameObject childrenProjectilePrefab = ((ProjectileExplosion)component4).childrenProjectilePrefab;
			childrenProjectilePrefab.GetComponent<ProjectileSimple>().desiredForwardSpeed = 30f;
			ProjectileImpactExplosion component5 = childrenProjectilePrefab.GetComponent<ProjectileImpactExplosion>();
			((ProjectileExplosion)component5).childrenCount = 1;
			((ProjectileExplosion)component5).childrenDamageCoefficient = 0.5f;
			((ProjectileExplosion)component5).fireChildren = true;
			((ProjectileExplosion)component5).childrenProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/LightningStake");
		}
		Addressables.LoadAssetAsync<GameObject>((object)"097b0e271757ce24581d4a8983d2c941").WaitForCompletion().GetComponent<SetStateOnHurt>()
			.canBeFrozen = false;
		Addressables.LoadAssetAsync<GameObject>((object)"645c6efa053511c488c3993881e2884a").WaitForCompletion().GetComponent<BaseAI>()
			.ignoreFliers = true;
	}

	private static bool ItemStealController_ExtractorUnitItemStealFilter(orig_ExtractorUnitItemStealFilter orig, ItemIndex itemIndex)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		return orig.Invoke(itemIndex) && !ItemStealController.ExtractorUnitItemShareFilter(itemIndex);
	}

	private static void AffixEarthHealthInvulThing(orig_OnEnter orig, Chargeup self)
	{
		orig.Invoke(self);
		if (NetworkServer.active)
		{
			((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 0.4f);
		}
	}

	public static void GiveScavMoreItems(orig_Start orig, ScavengerItemGranter self)
	{
		//IL_0284: Unknown result type (might be due to invalid IL or missing references)
		//IL_0289: Unknown result type (might be due to invalid IL or missing references)
		//IL_028a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0290: Unknown result type (might be due to invalid IL or missing references)
		//IL_0297: Unknown result type (might be due to invalid IL or missing references)
		//IL_029d: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Invalid comparison between Unknown and I4
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0253: Unknown result type (might be due to invalid IL or missing references)
		//IL_0263: Unknown result type (might be due to invalid IL or missing references)
		//IL_010e: 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 (NetworkServer.active && WConfig.cfgScavMoreItemsElites.Value)
		{
			CharacterBody body = ((Component)self).GetComponent<CharacterMaster>().GetBody();
			Inventory component = ((Component)self).GetComponent<Inventory>();
			bool flag = Object.op_Implicit((Object)(object)body) && body.isBoss;
			bool flag2 = (int)component.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)component.currentEquipmentState.equipmentDef.passiveBuffDef) && component.currentEquipmentState.equipmentDef.passiveBuffDef.isElite;
			if (self.stackRollDataList.Length == 3)
			{
				int num = 1;
				if (flag2)
				{
					bool flag3 = (float)component.GetItemCount(Items.BoostHp) >= component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient * 10f - 10f;
					bool flag4 = flag3 && component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient > 10f;
					if (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.EliteOnly))
					{
						flag3 = flag4;
						flag4 = false;
					}
					if (flag4)
					{
						self.stackRollDataList[0].stacks = 5;
						self.stackRollDataList[0].numRolls = 6;
						self.stackRollDataList[1].stacks = 4;
						self.stackRollDataList[1].numRolls = 5;
						self.stackRollDataList[2].stacks = 2;
						self.stackRollDataList[2].numRolls = 3;
					}
					else if (flag3)
					{
						self.stackRollDataList[0].stacks = 4;
						self.stackRollDataList[0].numRolls = 4;
						self.stackRollDataList[1].stacks = 2;
						self.stackRollDataList[1].numRolls = 3;
						self.stackRollDataList[2].stacks = 2;
						self.stackRollDataList[2].numRolls = 2;
					}
				}
				if (flag)
				{
					PickupDef pickupDef = PickupCatalog.GetPickupDef(((PickupDropTable)DropTableForBossScav).GenerateDrop(ScavengerItemGranter.rng));
					component.GiveItemPermanent(pickupDef.itemIndex, num);
				}
			}
		}
		orig.Invoke(self);
		Inventory component2 = ((Component)self).GetComponent<Inventory>();
		EquipmentIndex currentEquipmentIndex = component2.currentEquipmentIndex;
		if (currentEquipmentIndex == Equipment.Recycle.equipmentIndex || currentEquipmentIndex == Equipment.Gateway.equipmentIndex || currentEquipmentIndex == Equipment.MultiShopCard.equipmentIndex)
		{
			component2.GiveRandomEquipment(ScavengerItemGranter.rng);
		}
	}

	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(Items.Clover) >= 20) ? 4f : damageCoeff));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: Buff Married Lemurians");
		}
	}
}
public class Changes_Interactables
{
	[Serializable]
	[CompilerGenerated]
	private sealed class <>c
	{
		public static readonly <>c <>9 = new <>c();

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

		public static Manipulator <>9__3_0;

		public static hook_AddShrineStack <>9__3_1;

		public static hook_AddShrineStack <>9__3_2;

		public static hook_AddShrineStack <>9__3_3;

		public static hook_AddShrineStack <>9__3_4;

		public static hook_AddShrineStack <>9__3_5;

		public static hook_AddShrineStack <>9__3_6;

		internal void <Faster>b__3_0(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 = 1f;
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb");
			}
		}

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

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

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

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

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

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

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

	public static void Start()
	{
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Expected O, but got Unknown
		//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_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		Changes_Shrines.Start();
		Faster();
		if (WConfig.VoidSeedsMore.Value)
		{
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"e515327d3d5e0144488357748ce1e899").WaitForCompletion();
			((Component)val.transform.GetChild(0)).GetComponent<CampDirector>().baseMonsterCredit = 75;
			((Component)val.transform.GetChild(1)).GetComponent<CampDirector>().baseMonsterCredit = 75;
		}
		CampDirector.CalculateCredits += new hook_CalculateCredits(VoidSeedLoopCredits);
		if (WConfig.VoidCradlesMore.Value)
		{
			GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"e82b1a3fea19dfd439109683ce4a14b7").WaitForCompletion();
			ScriptedCombatEncounter component = val2.GetComponent<ScriptedCombatEncounter>();
			component.spawns[0].cullChance = 30f;
			component.spawns[1].cullChance = 30f;
			component.spawns[2].cullChance = 50f;
			component.spawns[3].cullChance = 50f;
			GivePickupsOnStart component2 = Addressables.LoadAssetAsync<GameObject>((object)"741e2f9222e19bd4185f43aff65ea213").WaitForCompletion().GetComponent<GivePickupsOnStart>();
			if (component2.itemInfos.Length != 0)
			{
				component2.itemInfos[0].count = 100;
			}
		}
	}

	private static void VoidSeedLoopCredits(orig_CalculateCredits orig, CampDirector self)
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Invalid comparison between Unknown and I4
		if (WConfig.VoidSeedsScale.Value && Object.op_Implicit((Object)(object)self.combatDirector) && (int)self.combatDirector.teamIndex == 4)
		{
			float num = 0.7f + (float)Run.instance.stageClearCount * 0.1f + (float)Run.instance.loopClearCount * 0.3f;
			if (num > 1f)
			{
				self.baseMonsterCredit = (int)((float)self.baseMonsterCredit * num);
				self.monsterCreditPenaltyCoefficient /= num;
			}
		}
		orig.Invoke(self);
	}

	public 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 Faster()
	{
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Expected O, but got Unknown
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Expected O, but got Unknown
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Expected O, but got Unknown
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Expected O, but got Unknown
		//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_00c3: Expected O, but got Unknown
		//IL_00dd: 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_00e8: Expected O, but got Unknown
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: 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
		if (WConfig.FasterScrapper.Value)
		{
			object obj = <>c.<>9__3_0;
			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 val8 = new ILCursor(il);
					if (val8.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f)
					}))
					{
						val8.Next.Operand = 1f;
					}
					else
					{
						Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb");
					}
				};
				<>c.<>9__3_0 = val;
				obj = (object)val;
			}
			ScrapperController.CreateItemTakenOrb += (Manipulator)obj;
			ScrapperBaseState.OnEnter += new hook_OnEnter(FasterScrapper_ClientSync);
		}
		if (!WConfig.FasterShrines.Value)
		{
			return;
		}
		object obj2 = <>c.<>9__3_1;
		if (obj2 == null)
		{
			hook_AddShrineStack val2 = delegate(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__3_1 = val2;
			obj2 = (object)val2;
		}
		ShrineBloodBehavior.AddShrineStack += (hook_AddShrineStack)obj2;
		object obj3 = <>c.<>9__3_2;
		if (obj3 == null)
		{
			hook_AddShrineStack val3 = delegate(orig_AddShrineStack orig, ShrineBossBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__3_2 = val3;
			obj3 = (object)val3;
		}
		ShrineBossBehavior.AddShrineStack += (hook_AddShrineStack)obj3;
		object obj4 = <>c.<>9__3_3;
		if (obj4 == null)
		{
			hook_AddShrineStack val4 = delegate(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__3_3 = val4;
			obj4 = (object)val4;
		}
		ShrineChanceBehavior.AddShrineStack += (hook_AddShrineStack)obj4;
		object obj5 = <>c.<>9__3_4;
		if (obj5 == null)
		{
			hook_AddShrineStack val5 = delegate(orig_AddShrineStack orig, ShrineCombatBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__3_4 = val5;
			obj5 = (object)val5;
		}
		ShrineCombatBehavior.AddShrineStack += (hook_AddShrineStack)obj5;
		object obj6 = <>c.<>9__3_5;
		if (obj6 == null)
		{
			hook_AddShrineStack val6 = delegate(orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__3_5 = val6;
			obj6 = (object)val6;
		}
		ShrineHealingBehavior.AddShrineStack += (hook_AddShrineStack)obj6;
		object obj7 = <>c.<>9__3_6;
		if (obj7 == null)
		{
			hook_AddShrineStack val7 = delegate(orig_AddShrineStack orig, ShrineRestackBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__3_6 = val7;
			obj7 = (object)val7;
		}
		ShrineRestackBehavior.AddShrineStack += (hook_AddShrineStack)obj7;
	}

	private static void FasterScrapper_ClientSync(orig_OnEnter orig, ScrapperBaseState self)
	{
		orig.Invoke(self);
		if (NetworkServer.active)
		{
			WaitToBeginScrapping.duration = 0.9f;
			ScrappingToIdle.duration = 0.4f;
			Scrapping.duration = 1f;
		}
	}

	public static void StupidPriceChanger()
	{
	}
}
public class Changes_Shrines
{
	public static void Start()
	{
		//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_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_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Expected O, but got Unknown
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Expected O, but got Unknown
		if (WConfig.Shrine_Healing.Value)
		{
			LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<PurchaseInteraction>().cost = 20;
			LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<ShrineHealingBehavior>().costMultiplierPerPurchase = 1f;
		}
		BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"bb3b51f04206e3242af6981db3c402a7").WaitForCompletion();
		val.requiredItemTags = Array.Empty<ItemTag>();
		Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"e291748f54c927a47ad44789d295c39f").WaitForCompletion().bannedItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)21 };
		HalcyoniteShrineInteractable.Awake += new hook_Awake(HalcyoniteShrine_ApplyNumbers);
		ShrineBloodBehavior.AddShrineStack += new Manipulator(BloodBehavior_GoldAmount);
	}

	private static void BloodShrine_DontBreakTransmitter(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.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "unstableTransmitter")
		}))
		{
			val.Emit(OpCodes.Ldarg_1);
			val.EmitDelegate<Func<int, DamageInfo, int>>((Func<int, DamageInfo, int>)((int item, DamageInfo info) => (!Object.op_Implicit((Object)(object)info.attacker) || !Object.op_Implicit((Object)(object)info.attacker.GetComponent<PurchaseInteraction>())) ? item : 0));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: BloodShrineDontBreakElixir");
		}
	}

	private static void BloodShrine_DontBreakElixir(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)
		//IL_00b4: 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.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "healingPotion")
		}))
		{
			val.Emit(OpCodes.Ldarg_S, (byte)4);
			val.EmitDelegate<Func<int, GameObject, int>>((Func<int, GameObject, int>)((int item, GameObject attacker) => (item == 0 || !Object.op_Implicit((Object)(object)attacker) || !Object.op_Implicit((Object)(object)attacker.GetComponent<PurchaseInteraction>())) ? item : 0));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: BloodShrineDontBreakElixir");
		}
		if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
		{
			(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "fragileDamageBonus")
		}))
		{
			val.Emit(OpCodes.Ldarg_S, (byte)4);
			val.EmitDelegate<Func<int, GameObject, int>>((Func<int, GameObject, int>)((int item, GameObject attacker) => (item == 0 || !Object.op_Implicit((Object)(object)attacker) || !Object.op_Implicit((Object)(object)attacker.GetComponent<PurchaseInteraction>())) ? item : 0));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: BloodShrineDontBreakWatch");
		}
	}

	private static void VoidSeedLoopCredits(orig_CalculateCredits orig, CampDirector self)
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Invalid comparison between Unknown and I4
		if (WConfig.VoidSeedsScale.Value && Object.op_Implicit((Object)(object)self.combatDirector) && (int)self.combatDirector.teamIndex == 4)
		{
			float num = 0.7f + (float)Run.instance.stageClearCount * 0.1f + (float)Run.instance.loopClearCount * 0.3f;
			if (num > 1f)
			{
				self.baseMonsterCredit = (int)((float)self.baseMonsterCredit * num);
				self.monsterCreditPenaltyCoefficient /= num;
			}
		}
		orig.Invoke(self);
	}

	private static void BloodBehavior_GoldAmount(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.MatchStloc(x, 1)
		}))
		{
			val.EmitDelegate<Func<uint, uint>>((Func<uint, uint>)((uint money) => WConfig.Shrine_Blood_Gold.Value ? ((uint)((float)money * Mathf.Pow(Run.instance.difficultyCoefficient, 1.05f))) : money));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: PurchaseInteraction.ShrineBloodBehavior_GoldAmount");
		}
	}

	private static void HalcyoniteShrine_ApplyNumbers(orig_Awake orig, HalcyoniteShrineInteractable self)
	{
		if (NetworkServer.active)
		{
			if (WConfig.cfgHalcyon_FastDrain.Value)
			{
				self.goldDrainValue = 2;
			}
			self.purchaseInteraction.Networkcost = self.goldDrainValue;
		}
		orig.Invoke(self);
		self.activationDirector.combatSquad.grantBonusHealthInMultiplayer = WConfig.cfgHalcyon_ScaleHPMult.Value;
	}

	private static void MakeHalcyoniteBoss(CharacterMaster obj)
	{
		obj.isBoss = true;
	}
}
public class Changes_Stages
{
	public static void Start()
	{
		//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_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Expected O, but got Unknown
		ClassicStageInfo.Start += new hook_Start(MoreSceneCredits);
		ClassicStageInfo.Start += new hook_Start(RunsAlways_ClassicStageInfo_Start);
		if (ConfigStages.Stage_F_Moon.Value)
		{
			EscapeSequenceController.OnEnable += new hook_OnEnable(EscapeSequenceController_OnEnable);
		}
		BazaarController.SetUpSeerStations += new hook_SetUpSeerStations(ThirdSeerNew);
		HoldoutZoneController.Start += new hook_Start(OnlyRequireOnePlayer);
	}

	private static void OnlyRequireOnePlayer(orig_Start orig, HoldoutZoneController self)
	{
		orig.Invoke(self);
		string name = ((Object)((Component)self).transform.root).name;
		if (name.StartsWith("Moon") || name.StartsWith("Aren"))
		{
			self.playerCountScaling = 0f;
		}
	}

	public static void ThirdSeerNew(orig_SetUpSeerStations orig, BazaarController self)
	{
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: 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)
		GameObject val = null;
		SeerStationController val2 = null;
		if (WConfig.ThirdLunarSeer.Value && NetworkServer.active && self.seerStations.Length == 2)
		{
			SeerStationController component = ((Component)self.seerStations[0]).GetComponent<SeerStationController>();
			val = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/bazaar/SeerStation.prefab").WaitForCompletion(), ((Component)self.seerStations[0]).gameObject.transform.parent);
			val.transform.localPosition = new Vector3(-45.9807f, -15.22f, 9.5654f);
			val.transform.localRotation = new Quaternion(0f, 0.7772f, 0f, 0.6293f);
			val2 = val.GetComponent<SeerStationController>();
			val2.explicitTargetSceneExitController = component.explicitTargetSceneExitController;
			ArrayUtils.ArrayAppend<SeerStationController>(ref self.seerStations, ref val2);
			NetworkServer.Spawn(val);
		}
		orig.Invoke(self);
	}

	public static void EscapeSequenceController_OnEnable(orig_OnEnable orig, EscapeSequenceController self)
	{
		orig.Invoke(self);
		((Component)((Component)self).gameObject.transform.GetChild(0).GetChild(1)).GetComponent<CombatDirector>().monsterCards = DCCS_Family.dccsMoonVoids;
	}

	public static void RunsAlways_ClassicStageInfo_Start(orig_Start orig, ClassicStageInfo self)
	{
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)SceneInfo.instance))
		{
			string cachedName = SceneInfo.instance.sceneDef.cachedName;
			string text = cachedName;
			if (text == "goolake")
			{
				BuffDef buffType = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Base/Common/bdClayGoo.asset").WaitForCompletion();
				GameObject val = GameObject.Find("/HOLDER: Misc Props");
				GameObject val2 = GameObject.Find("/HOLDER: GameplaySpace/mdlGlDam/GL_AqueductPartial/GL_Waterfall");
				if (Object.op_Implicit((Object)(object)val))
				{
					GameObject gameObject = ((Component)val.transform.GetChild(2)).gameObject;
					GameObject gameObject2 = ((Component)val.transform.GetChild(3)).gameObject;
					if (Object.op_Implicit((Object)(object)val2))
					{
						((Component)val2.transform.GetChild(8)).GetComponent<DebuffZone>().buffType = buffType;
						gameObject.GetComponentInChildren<DebuffZone>().buffType = buffType;
						gameObject2.GetComponentInChildren<DebuffZone>().buffType = buffType;
					}
				}
			}
		}
		orig.Invoke(self);
	}

	public static void MoreSceneCredits(orig_Start orig, ClassicStageInfo self)
	{
		//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)SceneInfo.instance))
		{
			SceneDef sceneDef = SceneInfo.instance.sceneDef;
			if (WConfig.cfgStageCredits_Interactables.Value)
			{
				switch (sceneDef.baseSceneName)
				{
				case "golemplains":
					self.sceneDirectorInteractibleCredits += 20;
					break;
				case "blackbeach":
					self.sceneDirectorInteractibleCredits += 20;
					break;
				case "goolake":
				{
					self.sceneDirectorInteractibleCredits = 280;
					ref BonusInteractibleCreditObject[] bonusInteractibleCreditObjects2 = ref self.bonusInteractibleCreditObjects;
					BonusInteractibleCreditObject val = new BonusInteractibleCreditObject
					{
						points = -60,
						objectThatGrantsPointsIfEnabled = ((Component)Run.instance).gameObject
					};
					ArrayUtils.ArrayAppend<BonusInteractibleCreditObject>(ref bonusInteractibleCreditObjects2, ref val);
					break;
				}
				case "rootjungle":
				case "shipgraveyard":
				{
					ref BonusInteractibleCreditObject[] bonusInteractibleCreditObjects = ref self.bonusInteractibleCreditObjects;
					BonusInteractibleCreditObject val = new BonusInteractibleCreditObject
					{
						points = 30,
						objectThatGrantsPointsIfEnabled = ((Component)Run.instance).gameObject
					};
					ArrayUtils.ArrayAppend<BonusInteractibleCreditObject>(ref bonusInteractibleCreditObjects, ref val);
					break;
				}
				case "goldshores":
					if (WConfig.cfgGoldShoresCredits.Value)
					{
						self.sceneDirectorInteractibleCredits += 60;
					}
					break;
				}
			}
			if (self.sceneDirectorMonsterCredits > 0)
			{
				if (WConfig.cfgStageCredits_Monsters.Value)
				{
					int stageOrder = sceneDef.stageOrder;
					int num = stageOrder;
					if ((uint)(num - 1) <= 2u)
					{
						self.sceneDirectorMonsterCredits = (int)((float)self.sceneDirectorMonsterCredits * 1.2f);
					}
				}
				if (WConfig.cfgMonsterCreditLoopScale.Value && sceneDef.stageOrder < 6)
				{
					self.sceneDirectorMonsterCredits += Run.instance.loopClearCount * 100;
				}
			}
		}
		orig.Invoke(self);
	}
}
public class Changes_Survivors
{
	[Serializable]
	[CompilerGenerated]
	private sealed class <>c
	{
		public static readonly <>c <>9 = new <>c();

		public static hook_OnEnter <>9__0_0;

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

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

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

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

		internal float <MarriedLemurianBandActivator>b__4_0(float damageCoeff, FireMegaFireball entityState)
		{
			if (((EntityState)entityState).characterBody.inventory.GetItemCount(Items.Clover) >= 20)
			{
				return 4f;
			}
			return damageCoeff;
		}
	}

	public static void Start()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Expected O, but got Unknown
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Expected O, but got Unknown
		CharacterMaster.GetDeployableSameSlotLimit += new hook_GetDeployableSameSlotLimit(Captain3Beacon);
		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__0_0;
		if (obj == null)
		{
			hook_OnEnter val = delegate(orig_OnEnter orig, Uppercut self)
			{
				orig.Invoke(self);
				if (self.duration < 0.15f)
				{
					self.duration = 0.15f;
				}
			};
			<>c.<>9__0_0 = val;
			obj = (object)val;
		}
		Uppercut.OnEnter += (hook_OnEnter)obj;
		AimArrowSnipe.OnEnter += new hook_OnEnter(Lysate_DoubleBallista);
		if (WConfig.CharactersCaptainKeepInHiddemRealm.Value)
		{
			((ResourceAvailability)(ref SceneCatalog.availability)).CallWhenAvailable((Action)NoOrbitalStrikeBlocking);
		}
		AISkillDriver[] components = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/EngiWalkerTurretMaster").GetComponents<AISkillDriver>();
		components[0].shouldSprint = true;
		if (components[0].minDistance == 110f)
		{
			components[0].minDistance = 45f;
		}
		LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/EquipmentDroneMaster").AddComponent<FireEquipmentAlways>();
	}

	private static void Lysate_DoubleBallista(orig_OnEnter orig, AimArrowSnipe self)
	{
		orig.Invoke(self);
		if (WConfig.CharactersHuntressLysateCell.Value)
		{
			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;
		}
	}

	private static int Captain3Beacon(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Invalid comparison between Unknown and I4
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		if ((int)slot == 21 && self.inventory.GetItemCount(Items.EquipmentMagazineVoid) > 0)
		{
			return orig.Invoke(self, slot) + 1;
		}
		return orig.Invoke(self, slot);
	}

	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;
		}
		SceneDef val = SceneCatalog.FindSceneDef("bazaar");
		val.blockOrbitalSkills = true;
	}

	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(Items.Clover) >= 20) ? 4f : damageCoeff));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: Buff Married Lemurians");
		}
	}
}
public class FireEquipmentAlways : MonoBehaviour
{
	public bool ShouldFireNearPlayer(EquipmentIndex index)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(index);
		if ((Object)(object)equipmentDef == (Object)(object)Equipment.Tonic || (Object)(object)equipmentDef == (Object)(object)Equipment.Fruit || (Object)(object)equipmentDef == (Object)(object)Equipment.Jetpack || (Object)(object)equipmentDef == (Object)(object)Equipment.PassiveHealing || (Object)(object)equipmentDef == (Object)(object)Equipment.Scanner || (Object)(object)equipmentDef == (Object)(object)Equipment.Gateway || (Object)(object)equipmentDef == (Object)(object)Equipment.Cleanse || (Object)(object)equipmentDef == (Object)(object)Equipment.GainArmor || (Object)(object)equipmentDef == (Object)(object)Equipment.Recycle || (Object)(object)equipmentDef == (Object)(object)Equipment.GummyClone || (Object)(object)equipmentDef == (Object)(object)Equipment.VendingMachine || (Object)(object)equipmentDef == (Object)(object)Equipment.BossHunterConsumed || (Object)(object)equipmentDef == (Object)(object)Equipment.HealAndReviveConsumed || (Object)(object)equipmentDef == (Object)(object)Equipment.Gateway)
		{
			return true;
		}
		return false;
	}

	public bool ShouldFireAlways(EquipmentIndex index)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(index);
		if ((Object)(object)equipmentDef == (Object)(object)Equipment.Tonic || (Object)(object)equipmentDef == (Object)(object)Equipment.CommandMissile || (Object)(object)equipmentDef == (Object)(object)Equipment.Fruit || (Object)(object)equipmentDef == (Object)(object)Equipment.PassiveHealing || (Object)(object)equipmentDef == (Object)(object)Equipment.Scanner || (Object)(object)equipmentDef == (Object)(object)Equipment.Gateway || (Object)(object)equipmentDef == (Object)(object)Equipment.Cleanse || (Object)(object)equipmentDef == (Object)(object)Equipment.GainArmor || (Object)(object)equipmentDef == (Object)(object)Equipment.TeamWarCry || (Object)(object)equipmentDef == (Object)(object)Equipment.VendingMachine || (Object)(object)equipmentDef == (Object)(object)Equipment.HealAndReviveConsumed)
		{
			return true;
		}
		return false;
	}

	public void Start()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		if (WConfig.cfgEquipmentDroneThing.Value)
		{
			EquipmentIndex currentEquipmentIndex = ((Component)this).GetComponent<Inventory>().currentEquipmentIndex;
			if (ShouldFireAlways(currentEquipmentIndex))
			{
				Debug.Log((object)"Equipment Drone fire always");
				AISkillDriver[] components = ((Component)this).GetComponents<AISkillDriver>();
				components[6].shouldFireEquipment = true;
			}
		}
	}
}
public class DCCS_ApplyAsNeeded
{
	public static void InteractableDCCS_Changes(DirectorCardCategorySelection dccs)
	{
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0180: Unknown result type (might be due to invalid IL or missing references)
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_0200: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_0135: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)dccs == (Object)null || (Object)(object)ClassicStageInfo.instance.interactableCategories == (Object)null)
		{
			return;
		}
		int num = dccs.FindCategoryIndexByName("Chests");
		int num2 = dccs.FindCategoryIndexByName("Duplicator");
		int num3 = dccs.FindCategoryIndexByName("Rare");
		int num4 = dccs.FindCategoryIndexByName("Void Stuff");
		int num5 = dccs.FindCategoryIndexByName("Storm Stuff");
		try
		{
			bool flag = (Object)(object)SceneInfo.instance.sceneDef.requiredExpansion != (Object)null;
			float num6 = 2f / ((float)ClassicStageInfo.instance.interactableCategories.expansionsInEffect.Count + (flag ? 1f : 0f));
			if (num6 > 1f)
			{
				num6 = 1f;
			}
			if (num != -1)
			{
				Category val = dccs.categories[num];
				for (int i = 0; i < val.cards.Length; i++)
				{
					if (((Object)val.cards[i].spawnCard).name.StartsWith("iscCategoryChest2"))
					{
						if (SceneInfo.instance.sceneDef.baseSceneName != "helminthroost")
						{
							val.cards[i].selectionWeight = 8;
						}
						break;
					}
				}
			}
			if (num2 != -1)
			{
				Category val = dccs.categories[num2];
				for (int j = 0; j < val.cards.Length; j++)
				{
					if (((Object)val.cards[j].GetSpawnCard()).name.EndsWith("Military"))
					{
						val.cards[j].selectionWeight = 2;
					}
					else if (((Object)val.cards[j].GetSpawnCard()).name.StartsWith("iscDroneCombiner"))
					{
						val.cards[j].selectionWeight = 10;
					}
				}
			}
			if (num3 != -1)
			{
				dccs.categories[num3].selectionWeight += 0.05f;
			}
			if (num4 != -1)
			{
				if (DCCS_Interactables.VanillaVoidsInstalled)
				{
					dccs.categories[num4].selectionWeight += 1f;
				}
				dccs.categories[num4].selectionWeight *= num6;
			}
			if (num5 != -1)
			{
				Category val = dccs.categories[num5];
				dccs.categories[num5].selectionWeight *= num6;
				if (SceneInfo.instance.sceneDef.stageOrder == 1 && Run.instance.stageRng.nextNormalizedFloat < num6)
				{
					dccs.categories[num5].selectionWeight = 0f;
				}
			}
		}
		catch (Exception ex)
		{
			Debug.LogWarning((object)"REPORT THIS");
			Debug.LogWarning((object)ex);
		}
	}

	public static void RemoveMonsterBasedOnSotVReplacement(DirectorCardCategorySelection dccs)
	{
		if (WConfig.cfgSotV_EnemyRemovals.Value && Object.op_Implicit((Object)(object)Run.instance) && Run.instance.IsExpansionEnabled(DLCS.DLC1))
		{
			switch (SceneInfo.instance.sceneDef.baseSceneName)
			{
			case "golemplains":
				DccsUtil.RemoveCard(dccs, 2, "fish");
				break;
			case "frozenwall":
				DccsUtil.RemoveCard(dccs, 2, "Lemurian");
				DccsUtil.RemoveCard(dccs, 2, "Wisp");
				break;
			case "dampcavesimple":
				DccsUtil.RemoveCard(dccs, 1, "GreaterWisp");
				break;
			case "shipgraveyard":
				DccsUtil.RemoveCard(dccs, 2, "Beetle");
				break;
			case "rootjungle":
				DccsUtil.RemoveCard(dccs, 1, "LemurianBruiser");
				DccsUtil.RemoveCard(dccs, 2, "Lemurian");
				break;
			case "skymeadow":
				break;
			}
		}
	}
}
public class DCCS_Credits
{
	public static void Start()
	{
		//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_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_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_0157: Unknown result type (might be due to invalid IL or missing references)
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		//IL_018e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: 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_01d8: 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_01f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_021c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0221: 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_023a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		if (WConfig.cfgCredits_Monsters.Value)
		{
			Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/Grandparent/cscGrandparent.asset").WaitForCompletion().directorCreditCost = 1000;
			((SpawnCard)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscParent")).directorCreditCost = 80;
			Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC2/Child/cscChild.asset").WaitForCompletion().directorCreditCost = 30;
			Addressables.LoadAssetAsync<SpawnCard>((object)"f7a1bc2e4756beb448d61e9e1421a9e1").WaitForCompletion().directorCreditCost = 24;
			Addressables.LoadAssetAsync<SpawnCard>((object)"a19470701f77bd945bef064b8890c14b").WaitForCompletion().directorCreditCost = 130;
			((SpawnCard)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscNullifier")).directorCreditCost = 260;
			if (Addressables.LoadAssetAsync<SpawnCard>((object)"4e2432e1ea733b74998d8fe4b1c8a6f1").WaitForCompletion().directorCreditCost == 20)
			{
				Addressables.LoadAssetAsync<SpawnCard>((object)"c3faae8c7469bad4eaf316420d242776").WaitForCompletion().directorCreditCost = 20;
				Addressables.LoadAssetAsync<SpawnCard>((object)"9fac94ba9c88de649856e6e42d129531").WaitForCompletion().directorCreditCost = 15;
				Addressables.LoadAssetAsync<SpawnCard>((object)"4e2432e1ea733b74998d8fe4b1c8a6f1").WaitForCompletion().directorCreditCost = 25;
			}
		}
		if (WConfig.cfgCredits_Interactables.Value)
		{
			Addressables.LoadAssetAsync<SpawnCard>((object)"2eaec01927ea16245822dcb50080cba3").WaitForCompletion().directorCreditCost = 25;
			Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/DeepVoidPortalBattery/iscDeepVoidPortalBattery.asset").WaitForCompletion().directorCreditCost = 0;
			Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/DuplicatorWild/iscDuplicatorWild.asset").WaitForCompletion().directorCreditCost = 15;
			Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/VoidTriple/iscVoidTriple.asset").WaitForCompletion().directorCreditCost = 30;
			Addressables.LoadAssetAsync<SpawnCard>((object)"d21f2d3075f064e4081a41a368c505b1").WaitForCompletion().directorCreditCost = 20;
			Addressables.LoadAssetAsync<SpawnCard>((object)"caab08f30f159b54f92e7d42b4b1d717").WaitForCompletion().directorCreditCost = 10;
			Addressables.LoadAssetAsync<SpawnCard>((object)"ba9d25d63bbcef34a9077c08a6d6df95").WaitForCompletion().directorCreditCost = 5;
			Addressables.LoadAssetAsync<SpawnCard>((object)"3547e84f7f2c8064ba91cc54e517f5b9").WaitForCompletion().directorCreditCost = 5;
			Addressables.LoadAssetAsync<SpawnCard>((object)"0e981358f6bf4de4e83e30286ad5df75").WaitForCompletion().directorCreditCost = 5;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"ba9d25d63bbcef34a9077c08a6d6df95").WaitForCompletion().maxSpawnsPerStage = 1;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"3547e84f7f2c8064ba91cc54e517f5b9").WaitForCompletion().maxSpawnsPerStage = 1;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"0e981358f6bf4de4e83e30286ad5df75").WaitForCompletion().maxSpawnsPerStage = 1;
		}
	}
}
public class DCCS_Family
{
	public static DirectorCardCategorySelection dccsMoonVoids;

	public static void Start()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//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_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: 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_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_0114: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: 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_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_0158: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Unknown result type (might be due to invalid IL or missing references)
		//IL_017d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0200: Unknown result type (might be due to invalid IL or missing references)
		//IL_0210: Unknown result type (might be due to invalid IL or missing references)
		//IL_0215: Unknown result type (might be due to invalid IL or missing references)
		//IL_0225: Unknown result type (might be due to invalid IL or missing references)
		//IL_022a: Unknown result type (might be due to invalid IL or missing references)
		//IL_023a: Unknown result type (might be due to invalid IL or missing references)
		//IL_023f: Unknown result type (might be due to invalid IL or missing references)
		//IL_024f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0254: Unknown result type (might be due to invalid IL or missing references)
		//IL_0264: Unknown result type (might be due to invalid IL or missing references)
		//IL_0269: Unknown result type (might be due to invalid IL or missing references)
		//IL_0279: Unknown result type (might be due to invalid IL or missing references)
		//IL_027e: Unknown result type (might be due to invalid IL or missing references)
		//IL_028e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0293: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0356: Unknown result type (might be due to invalid IL or missing references)
		//IL_035b: Unknown result type (might be due to invalid IL or missing references)
		//IL_037a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0399: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ac: Expected O, but got Unknown
		//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d7: Unknown result type (might be due to invalid I