Decompiled source of LittleGameplayTweaks v3.6.2

LittleGameplayTweaks.dll

Decompiled a week ago
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.AffixEarthHealer;
using EntityStates.BeetleQueenMonster;
using EntityStates.BrotherMonster;
using EntityStates.Commando;
using EntityStates.Duplicator;
using EntityStates.Huntress;
using EntityStates.Interactables.MSObelisk;
using EntityStates.LemurianBruiserMonster;
using EntityStates.Merc;
using EntityStates.Missions.Arena.NullWard;
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.BeetleQueenMonster;
using On.EntityStates.BrotherMonster;
using On.EntityStates.Commando;
using On.EntityStates.Duplicator;
using On.EntityStates.Huntress;
using On.EntityStates.Interactables.MSObelisk;
using On.EntityStates.Merc;
using On.EntityStates.Missions.Arena.NullWard;
using On.EntityStates.ScavMonster;
using On.EntityStates.Scrapper;
using On.RoR2;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CharacterAI;
using RoR2.EntityLogic;
using RoR2.ExpansionManagement;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using WolfoFixes;

[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+6f44bdd9b8c58694358478b46b344b1f7f0291d5")]
[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 enum MatchCategory
	{
		MatchSmallToBig,
		NoChange,
		AddMissingBig
	}

	public enum EclipseArtifact
	{
		Off,
		Blacklist,
		All
	}

	public enum EclipseDifficulty
	{
		Off,
		E8,
		All
	}

	public static ConfigFile ConfigFileLGT = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Little_Gameplay_Tweaks.cfg", true);

	public static ConfigEntry<bool> cfgVoidTripleAllTier;

	public static ConfigEntry<bool> cfgMasstweak;

	public static ConfigEntry<bool> cfgOverloadingWorm;

	public static ConfigEntry<bool> cfgEarlyScavs;

	public static ConfigEntry<bool> cfgMatchCategory;

	public static ConfigEntry<bool> VoidSeedsScale;

	public static ConfigEntry<bool> VoidSeedsMore;

	public static ConfigEntry<bool> VoidCradlesMore;

	public static ConfigEntry<bool> cfgBlightBuffWhatever;

	public static ConfigEntry<float> cfgShrineBossMult;

	public static ConfigEntry<bool> cfgEquipmentDroneThing;

	public static ConfigEntry<bool> cfgLoopDifficultTeleporters;

	public static ConfigEntry<bool> EclipseAllowVoid;

	public static ConfigEntry<bool> EclipseAllowTwisted;

	public static ConfigEntry<bool> EclipseAllowArtifactWorld;

	public static ConfigEntry<EclipseArtifact> EclipseAllowChoiceArtifacts;

	public static ConfigEntry<bool> EclipseAllowChoiceWeirdArtifacts;

	public static ConfigEntry<bool> EclipseAllowChoiceAllowAllArtifacts;

	public static ConfigEntry<bool> LevelMaximumFinalBoss;

	public static ConfigEntry<bool> cheaperTier2;

	public static ConfigEntry<bool> earlyTier2;

	public static ConfigEntry<bool> portalAfterLimbo;

	public static ConfigEntry<bool> cfgDccsMonster;

	public static ConfigEntry<bool> cfgDccsFamily;

	public static ConfigEntry<bool> FamiliesStage1;

	public static ConfigEntry<float> cfgFamilyChance;

	public static ConfigEntry<bool> cfgDccsInteractables;

	public static ConfigEntry<bool> cfgCredits_Interactables;

	public static ConfigEntry<bool> cfgCredits_Stages;

	public static ConfigEntry<bool> cfgGoldShoresCredits;

	public static ConfigEntry<bool> FasterPrinter;

	public static ConfigEntry<bool> FasterScrapper;

	public static ConfigEntry<bool> FasterShrines;

	public static ConfigEntry<bool> cfgVoidStagePillar;

	public static ConfigEntry<bool> cfgMassPillar;

	public static ConfigEntry<bool> FasterArenaCells;

	public static ConfigEntry<bool> RegenArenaCells;

	public static ConfigEntry<bool> InteractableNoLunarCost;

	public static ConfigEntry<bool> InteractableHealingShrine;

	public static ConfigEntry<bool> cfgShrineBloodGold;

	public static ConfigEntry<bool> InteractableBloodShrineLessCost;

	public static ConfigEntry<bool> InteractablesCombatShrineHP;

	public static ConfigEntry<bool> cfgHalcyon_FastDrain;

	public static ConfigEntry<bool> cfgHalcyon_LessMonsterCredits;

	public static ConfigEntry<bool> cfgHalcyon_ScaleHPMult;

	public static ConfigEntry<bool> cfgHalcyon_Spawnpool;

	public static ConfigEntry<bool> cfgHalcyon_NerfStats;

	public static ConfigEntry<int> InteractableRedSoupAmount;

	public static ConfigEntry<int> MegaDroneCost;

	public static ConfigEntry<int> TurretDroneCost;

	public static ConfigEntry<bool> CharactersCaptainKeepInHiddemRealm;

	public static ConfigEntry<bool> CharactersHuntressLysateCell;

	public static ConfigEntry<bool> CharactersCommandoInvul;

	public static ConfigEntry<bool> BuffMegaDroneStats;

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

	public static ConfigEntry<bool> cfgVoidPortalOUT;

	public static ConfigEntry<bool> cfgMSPortalOUT;

	public static ConfigEntry<int> cfgBossItemChance;

	public static ConfigEntry<int> cfgAspectDropRate;

	public static ConfigEntry<bool> CelestialStage10;

	public static ConfigEntry<bool> ThirdLunarSeer;

	public static ConfigEntry<bool> EclipseDifficultyAlways;

	public static ConfigEntry<bool> cfgLunarTeleporterAlways;

	public static ConfigEntry<bool> cfgTwistedBuff;

	public static ConfigEntry<bool> cfgTwistedBuffEpic;

	public static ConfigEntry<bool> cfgBrotherHurtFix;

	public static ConfigEntry<bool> cfgVoidlingNerf;

	public static ConfigEntry<bool> cfgXIEliteFix;

	public static ConfigEntry<bool> cfgAddLevelCapPerStage;

	public static ConfigEntry<bool> cfgVoidCampScaling;

	public static void InitConfig()
	{
		cfgAddLevelCapPerStage = ConfigFileLGT.Bind<bool>("Looping", "Scale Monster Level Cap", true, "Each stage completed during a loop increases the ambient level cap by 20.\nDoes not count Commencement\nJust a little boost so that enemies can continue scaling.\n\nShould be compatible with any other mods that change Level Cap.");
		cheaperTier2 = ConfigFileLGT.Bind<bool>("Looping", "Cheaper Tier 2 Elites", true, "Makes Tier 2 Elites cost 30x instead of 36x.\n\nWill update mid-run if changed");
		earlyTier2 = ConfigFileLGT.Bind<bool>("Looping", "Early Tier 2 Elites", false, "Tier 2 Elites start spawning on Stage 5.\nInstead of Stage 6.\n\nFor Loop haters.");
		cheaperTier2.SettingChanged += Tier2_SettingChanged;
		earlyTier2.SettingChanged += Tier2_SettingChanged;
		cfgLoopDifficultTeleporters = ConfigFileLGT.Bind<bool>("Looping", "Stronger TP Bosses", true, "For every loop, teleporters spawn 33% more bosses. For every stage past 5, bosses have 20% more health.");
		cfgEarlyScavs = ConfigFileLGT.Bind<bool>("Looping", "Early Scavengers", false, "Allow Scavengers to spawn as early as Stage 4 instead of Stage 6\n\nFor Loop haters.\n\nDoes not affect Sundered Grove");
		cfgScavBoss = ConfigFileLGT.Bind<bool>("Looping", "Scavs as Bosses", true, "Scavs can spawn as a TP Boss under normal conditions but rarer than other teleporter bosses.");
		cfgScavMoreItemsElites = ConfigFileLGT.Bind<bool>("Looping", "Boss & Elite Scavs get more items", true, "Boss Scavs get 1 Yellow or 2 if Elite.\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");
		VoidPortalStage5 = ConfigFileLGT.Bind<bool>("Looping", "Void Locust Portal Stage 5", true, "Guaranteed a portal to Void Locust every Stage 5, 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.");
		CelestialStage10 = ConfigFileLGT.Bind<bool>("Looping", "Celestial Portal Stage 10", true, "Celestial Portals also spawn on every Stage 5, starting Stage 10.");
		cfgLunarTeleporterAlways = ConfigFileLGT.Bind<bool>("Looping", "Primordial Teleporter every stage", false, "After looping, Replace the teleporter on every stage with a Primordial Teleporter.\nThis is how it was in Risk of Rain Returns");
		LevelMaximumFinalBoss = ConfigFileLGT.Bind<bool>("Looping", "Limit Final Boss Level", true, "Final bosses get bonus stats because of the 99 level limit.\nSo allowing them to also increase in level would make them too tanky, especially in multiplayer");
		cfgTwistedBuff = ConfigFileLGT.Bind<bool>("Monsters", "Twisted Elite | Buff", true, "Twisted Elites no longer need to recharge\nTwisted Projectile can no longer killed.");
		cfgTwistedBuffEpic = ConfigFileLGT.Bind<bool>("Monsters", "Twisted Elite | Disables Skills", true, "Twisted Projectile disables skills for 5 seconds instead of Lunar Ruin for 420 seconds.");
		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.");
		cfgBrotherHurtFix = ConfigFileLGT.Bind<bool>("Monsters", "Mithrix | Phase 4", true, "Phase 4 is invulnerable a bit longer so you can't just one shot him while he's getting up.\nAlso immune to fall damage.");
		cfgVoidlingNerf = ConfigFileLGT.Bind<bool>("Monsters", "Voidling | Scaling Nerf", true, "Nerf his special scaling by 20%");
		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.");
		cfgXIEliteFix = ConfigFileLGT.Bind<bool>("Monsters", "Elite XI | Elite Minions", true, "In Vanilla, Unlike Beetle Queen and Solus, the minions spawned by XI dont copy the equipment.\nLike those cases, they do not gain elite stats.");
		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.");
		FasterPrinter = ConfigFileLGT.Bind<bool>("Interactables", "Faster Printers", true, "Removes endlag, but keeps full lenght animation. Time 4s -> 2.83s.");
		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_LessMonsterCredits = ConfigFileLGT.Bind<bool>("Interactables", "Halcyon Shrine | Less Credits", false, "Halcyon Shrines spawn 20% less monsters. Vanilla is 300 credits.");
		cfgHalcyon_ScaleHPMult = ConfigFileLGT.Bind<bool>("Interactables", "Halcyon Shrine | Multiply HP", false, "Multiply health of the Stone Golems (per player), spawned while charging.\nVanilla : True");
		cfgHalcyon_NerfStats = ConfigFileLGT.Bind<bool>("Interactables", "Halcyon Shrine | Stat Nerf", false, "Gilded Halcyonite spawned by Halcyon Shrines have 20% less stats. (Up to 28% to rounding)");
		VoidSeedsScale = ConfigFileLGT.Bind<bool>("Interactables", "Void Seed | Loop Scale", true, "Void Seeds spawn more monsters during loops.");
		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.");
		cfgVoidTripleAllTier = ConfigFileLGT.Bind<bool>("Interactables", "Void Potential Chests contain any tier", true, "Void Potential Chests can contain any item from any tier");
		cfgShrineBloodGold = ConfigFileLGT.Bind<bool>("Interactables", "Blood Shrine | Scale Rward", true, "Blood Shrines reward 25/40/60 Gold scaled with time with a small mult based on HP.\n\nThis results in more money even on Stage 1 and better scaling into late game\n\nNormally, Blood Shrines Reward is only based on HP, quickly making them a bad source of money");
		InteractableBloodShrineLessCost = ConfigFileLGT.Bind<bool>("Interactables", "Blood Shrine | 50 70 90", true, "Will cost 70 on 2nd use and 90 on 3rd use.\nTo avoid breaking your items on the 2nd use.");
		InteractablesCombatShrineHP = ConfigFileLGT.Bind<bool>("Interactables", "Combat Shrine | HP Scaling", false, "Multiply HP of enemies spawned (per player)\nVanilla : True");
		InteractableHealingShrine = 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.");
		MegaDroneCost = ConfigFileLGT.Bind<int>("Interactables", "TC-280 | Cost", 300, "Vanilla is 350");
		BuffMegaDroneStats = ConfigFileLGT.Bind<bool>("Interactables", "TC-280 | Stat Buff", true, "Give TC-280 Adaptive Armor and AoE attack resistence");
		TurretDroneCost = ConfigFileLGT.Bind<int>("Interactables", "Gunner Turret | Cost", 25, "Vanilla is 35");
		cfgMasstweak = ConfigFileLGT.Bind<bool>("Interactables", "Pillar of Mass | Tweak", true, "Charge 20% faster but spawn 20% more monsters.");
		InteractableRedSoupAmount = ConfigFileLGT.Bind<int>("Interactables", "RedToWhite Cauldron extra item amount", 1, "This is in addition to the 3 that Vanilla pays out with\nie If you want 5 items total, set it to 2.  Set to 0 to disable.");
		InteractableNoLunarCost = ConfigFileLGT.Bind<bool>("Interactables", "Free Lunars", false, "Everything that costs Lunar Coins will cost 0");
		cfgCredits_Stages = ConfigFileLGT.Bind<bool>("Stages", "Stage Credits adjustments", true, "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.");
		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");
		RegenArenaCells = ConfigFileLGT.Bind<bool>("Stages", "Void Fields | Regen", true, "Cells give regeneration before actvating so you can heal faster.");
		FasterArenaCells = ConfigFileLGT.Bind<bool>("Stages", "Void Fields | Faster Cells", true, "40s for the first 4, 50s for the next 4, 60s for the last.\n\nShave of 2 minutes of standing.");
		cfgVoidStagePillar = ConfigFileLGT.Bind<bool>("Stages", "Void Locust | Easier Signals", true, "Charge in 48 seconds instead of 60s (25% faster)\n+30% larger radius");
		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.");
		CharactersCommandoInvul = ConfigFileLGT.Bind<bool>("Survivors", "Commando Invulnerable Tactical Dive", false, "Tactical Dive will make you Invulnerable like in Risk of Rain");
		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, "Make some monsters who got nerfed over time cheaper and make Blind Pests rarer\n\nGreater Wisp | 200 -> 180\nGip | 40  -> 20 (Geep costs 40 already)\nParent | 100 -> 80\nVoid Reaver | 300 -> 250 (Worst aim)");
		cfgDccsInteractables = ConfigFileLGT.Bind<bool>("Spawnpools", "Interactables | Spawn Pools", true, "Mountain Shrine on Sulfur Pools\nNo Gunner Turret on Stage 4 & 5\nMili Printers, Large Printers & Cleansing Pools are a bit more common.");
		cfgMatchCategory = ConfigFileLGT.Bind<bool>("Spawnpools", "Interactables | Match Categories", true, "Stages will only have 1 type of Category Chest, matching what Hopoo chose for the Large Category chest on that stage.");
		cfgCredits_Interactables = ConfigFileLGT.Bind<bool>("Spawnpools", "Interactables | Credits Adjustment", true, "TC-280 | 40 -> 35 (Stats buffed in mod)\nEmergency Drone | 30 -> 25\nShrine of Woods | 15 -> 5.\nShrine of Order | 30 -> 5.\nShrine of Combat | 20 -> 15 (Why money so expensive)\nShrine of Blood | 20 -> 15\nShrine of Shaping | 50 -> 40\nLunar Pod | 25 -> 15\nVoid Potential | 40 -> 30 (This is a worse multishop)\nCloaked Chest | 10 -> 2\nOvergrown Printer | 10 -> 15");
		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.");
		FamiliesStage1 = ConfigFileLGT.Bind<bool>("Spawnpools", "Family Events Stage 1", false, "Allow most family events to happen on stage 1");
		EclipseAllowTwisted = ConfigFileLGT.Bind<bool>("Eclipse", "Eclipse allow Moment Whole", true, "Allows Celestial Portal to spawn so you can use Twisted Scav as an alternate final boss in Eclipse. The obelisk will always take you to Moment Whole even if you do not have Beads.");
		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.");
		EclipseAllowArtifactWorld = ConfigFileLGT.Bind<bool>("Eclipse", "Eclipse allow Bulwarks Ambry", true, "Allows computer. For artifact");
		EclipseAllowChoiceArtifacts = ConfigFileLGT.Bind<EclipseArtifact>("Eclipse", "Eclipse Artifacts", EclipseArtifact.Blacklist, "Allows the choice of often considered challenge or variety artifacts.\n\nBlacklist : All except Artifacts that make the game easier. (Includes Modded ones) (Command, Rebirth)\nAll : All");
		EclipseDifficultyAlways = ConfigFileLGT.Bind<bool>("Eclipse", "Eclipse 8 in normal lobbies", false, "Allows you to choose 8 Eclipse in default game mode and Simulacrum");
		EclipseDifficultyAlways.SettingChanged += EclipseDifficultyAlways_SettingChanged;
		cfgShrineBossMult = ConfigFileLGT.Bind<float>("Chances", "More Mountain Shrine", 1.2f, "Increase the weight of Mountain Shrines. Extra chance is divided by player count as this is mostly meant for solo.");
		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", "Aspect Drop Rate", 1600, "1 in X drop chance for Elite Aspects. Vanilla is 1 in 4000.");
		cfgAspectDropRate.SettingChanged += LittleGameplayTweaks.EquipmentBonusRate;
	}

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

	public static void Tier2_SettingChanged(object sender, EventArgs e)
	{
		if (CombatDirector.eliteTiers.Length > 1)
		{
			EliteTierDef val = CombatDirector.eliteTiers[Looping.FindTier2Elite()];
			float costMultiplier = (cheaperTier2.Value ? 5f : 6f) * CombatDirector.baseEliteCostMultiplier;
			float stage = (earlyTier2.Value ? 4f : 5f);
			Debug.Log((object)("Tier 2 Elites | AfterStage " + stage + " | Cost" + costMultiplier));
			val.costMultiplier = costMultiplier;
			val.isAvailable = (EliteRules rules) => (float)Run.instance.stageClearCount >= stage && (int)rules == 0;
		}
	}

	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_0220: Unknown result type (might be due to invalid IL or missing references)
		//IL_022a: Expected O, but got Unknown
		//IL_0261: Unknown result type (might be due to invalid IL or missing references)
		//IL_026b: Expected O, but got Unknown
		//IL_0297: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a1: Expected O, but got Unknown
		//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d7: Expected O, but got Unknown
		//IL_0303: Unknown result type (might be due to invalid IL or missing references)
		//IL_030d: Expected O, but got Unknown
		//IL_0336: Unknown result type (might be due to invalid IL or missing references)
		//IL_0340: 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, FamiliesStage1, cfgDccsInteractables, cfgCredits_Monsters, cfgCredits_Interactables, FasterScrapper, FasterShrines, InteractableNoLunarCost, InteractableHealingShrine,
			InteractablesCombatShrineHP, cfgHalcyon_Spawnpool, CharactersCaptainKeepInHiddemRealm, CharactersCommandoInvul, BuffMegaDroneStats, cfgMendingCoreBuff, cfgElderLemurianBands, cfgTwistedBuff, cfgTwistedBuffEpic, cfgBrotherHurtFix,
			cfgXIEliteFix, cfgVoidStagePillar, VoidSeedsMore, VoidCradlesMore
		};
		List<ConfigEntry<int>> list2 = new List<ConfigEntry<int>> { MegaDroneCost, TurretDroneCost };
		ConfigEntryBase[] configEntries = ConfigFileLGT.GetConfigEntries();
		Debug.Log((object)("Config Values Total : " + configEntries.Length));
		Debug.Log((object)("Config Values Reset : " + (list.Count + list2.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, list2.Contains(val4)));
			}
			else if (val2.SettingType == typeof(float))
			{
				ModSettingsManager.AddOption((BaseOption)new FloatFieldOption((ConfigEntry<float>)(object)val2, false));
			}
			else if (val2.SettingType == typeof(EclipseArtifact))
			{
				ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)(ConfigEntry<EclipseArtifact>)(object)val2, false));
			}
			else if (val2.SettingType == typeof(EclipseDifficulty))
			{
				ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)(ConfigEntry<EclipseDifficulty>)(object)val2, false));
			}
			else if (val2.SettingType == typeof(MatchCategory))
			{
				ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)(ConfigEntry<MatchCategory>)(object)val2, true));
			}
			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_3_Frozen;

	public static ConfigEntry<bool> Stage_3_Wisp;

	public static ConfigEntry<bool> Stage_3_Sulfur;

	public static ConfigEntry<bool> Stage_3_Tree;

	public static ConfigEntry<bool> Stage_4_Damp_Abyss;

	public static ConfigEntry<bool> Stage_4_Ship;

	public static ConfigEntry<bool> Stage_4_Root_Jungle;

	public static ConfigEntry<bool> Stage_5_Sky;

	public static ConfigEntry<bool> Stage_5_Helminth;

	public static ConfigEntry<bool> Stage_F_Moon;

	public static ConfigEntry<bool> Stage_F_Meridian;

	public static ConfigEntry<bool> Stage_X_Arena_Void;

	public static ConfigEntry<bool> Stage_X_Void_Seed;

	public static ConfigEntry<bool> Stage_X_GoldShores;

	public static ConfigEntry<bool> Stage_X_HalcShrine;

	public static void InitConfig()
	{
		Stage_1_Golem = ConfigFileSTAGES.Bind<bool>("Stage 1", "Golem Plains", true, "Loop TC280");
		Stage_1_Roost = ConfigFileSTAGES.Bind<bool>("Stage 1", "Distant Roost", true, "Adds Loop Vultures\n\nAdds Loop Cleansing Pool");
		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\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_3_Frozen = ConfigFileSTAGES.Bind<bool>("Stage 3", "Rally Point", true, "Adds Solus Control Unit\nRemoves Clay Dunestrider\nAdds Loop Solus Probe\nAdds Loop Vulture");
		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 Magma Worm\nAdds Overloading Worm\nAdds Hermit Crab\nAdds Acid Larva\nAdds Loop Grandparent\nAdds Loop Parent\n\nAdds Mountain Shrine\nAdds Emergency Drone\n\nStage has +20 credits");
		Stage_3_Tree = ConfigFileSTAGES.Bind<bool>("Stage 3", "Treeborn", true, "Adds Blind Pest\nAdds Loop Mushroom\n\nAdds Large Damage Chest\nAdds Large Healing Chest");
		Stage_4_Damp_Abyss = ConfigFileSTAGES.Bind<bool>("Stage 4", "Abyssal Depths", true, "Adds Loop Parent\nAdds Loop Grandparent\nAdds Loop Void Jailer\n\nRemoves Gunner Turret");
		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 TC280\nRemoves Gunner Turret\nMore common Equipment Drone");
		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\nRemoves Gunner Turret");
		Stage_5_Sky = ConfigFileSTAGES.Bind<bool>("Stage 5", "Sky Meadow", true, "Adds Loop Lunar Chimera\nAdds Loop Void Devestator\n\nRemoves Gunner Turret");
		Stage_5_Helminth = ConfigFileSTAGES.Bind<bool>("Stage 5", "Helminth", true, "Adds Halcyonite\nRemoves Greater Wisp\nAdds Grandparent\nRemoves Gunner Turret\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 int FindSpawnCard(DirectorCard[] insert, string LookingFor)
	{
		for (int i = 0; i < insert.Length; i++)
		{
			if (((Object)insert[i].spawnCard).name.EndsWith(LookingFor))
			{
				return i;
			}
		}
		Debug.LogWarning((object)("Couldn't find " + LookingFor));
		return -1;
	}

	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, Category cat)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: 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)
		DirectorCard val = category.cards[(int)(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.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class LittleGameplayTweaks : BaseUnityPlugin
{
	private static readonly Random random = new Random();

	public void Awake()
	{
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Expected O, but got Unknown
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Expected O, but got Unknown
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Expected O, but got Unknown
		WConfig.InitConfig();
		ConfigStages.InitConfig();
		Changes_Monsters.Start();
		Changes_Survivors.Start();
		Changes_Interactables.Start();
		Changes_Stages.Start();
		DCCS_Monsters.Start();
		DCCS_Interactables.Start();
		DCCS_Family.Start();
		Eclipse.Start();
		((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)LateMethod);
		SceneDirector.Start += new hook_Start(GameplayQoL_SceneDirector_Start);
		SceneDirector.PlaceTeleporter += new hook_PlaceTeleporter(SceneDirector_PlaceTeleporter);
		ClassicStageInfo.Awake += new hook_Awake(RollForScavBoss);
	}

	private void SceneDirector_PlaceTeleporter(orig_PlaceTeleporter orig, SceneDirector self)
	{
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		if (WConfig.cfgLunarTeleporterAlways.Value && Object.op_Implicit((Object)(object)Run.instance) && Run.instance.loopClearCount > 0 && Object.op_Implicit((Object)(object)self.teleporterSpawnCard))
		{
			self.teleporterSpawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/Teleporters/iscLunarTeleporter.asset").WaitForCompletion();
		}
		orig.Invoke(self);
	}

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

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

	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 == "blackbeach"))
		{
			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, 3);
				component2.inventory.GiveItem(Items.CutHp, 3);
				component.onBodyStart += AquaductEldersStats;
				component2.onBodyStart += AquaductEldersStats;
			}
			return;
		}
		GameObject val2 = GameObject.Find("/HOLDER: Preplaced Objects");
		if (!((Object)(object)val2 != (Object)null))
		{
			return;
		}
		UnlockableGranter[] componentsInChildren = val2.GetComponentsInChildren<UnlockableGranter>(true);
		int num = 0;
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			if (!((Component)componentsInChildren[i]).gameObject.activeSelf)
			{
				num++;
			}
			if (num == 3)
			{
				((Component)componentsInChildren[1]).gameObject.SetActive(true);
			}
		}
		componentsInChildren = null;
		GC.Collect();
	}

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

	public static void RollForScavBoss(orig_Awake orig, ClassicStageInfo self)
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self);
		if (NetworkServer.active && WConfig.cfgScavBoss.Value)
		{
			Changes_Monsters.ScavBossItem = ((PickupDropTable)Changes_Monsters.DropTableForBossScav).GenerateDrop(self.rng);
			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 hook_PickupIsNonBlacklistedItem <>9__16_0;

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

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

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

		internal float <MarriedLemurianBandActivator>b__19_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 PickupIndex ScavBossItem = PickupIndex.none;

	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_0024: 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_003f: 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
			}
		};
	}

	public static void Start()
	{
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Expected O, but got Unknown
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Expected O, but got Unknown
		//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c1: Expected O, but got Unknown
		//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d3: Expected O, but got Unknown
		//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_017f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Unknown result type (might be due to invalid IL or missing references)
		//IL_0186: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Expected O, but got Unknown
		//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ae: Expected O, but got Unknown
		//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f6: 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;
		BasicPickupDropTable dropTableForBossScav = DropTableForBossScav;
		ItemTag[] array = new ItemTag[3];
		RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
		dropTableForBossScav.bannedItemTags = (ItemTag[])(object)array;
		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>());
		}
		if (WConfig.cfgTwistedBuffEpic.Value)
		{
			ProjectileDamage component = val.GetComponent<ProjectileDamage>();
			ref DamageTypeExtended damageTypeExtended = ref component.damageType.damageTypeExtended;
			damageTypeExtended = (DamageTypeExtended)((uint)damageTypeExtended | 0x40000000u);
			ref DamageType damageType = ref component.damageType.damageType;
			damageType = (DamageType)((uint)damageType & 0xBFFFFFFFu);
			ref DamageTypeExtended damageTypeExtended2 = ref component.damageType.damageTypeExtended;
			damageTypeExtended2 = (DamageTypeExtended)((uint)damageTypeExtended2 & 0xDFFFFFFFu);
		}
		if (WConfig.cfgBrotherHurtFix.Value)
		{
			GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherBody.prefab").WaitForCompletion();
			CharacterBody component2 = val2.GetComponent<CharacterBody>();
			component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 1);
			SpellChannelState.OnEnter += new hook_OnEnter(SpellChannelState_OnEnter);
			SpellChannelExitState.OnExit += new hook_OnExit(SpellChannelExitState_OnExit);
		}
		VoidRaidGauntletController.Start += new hook_Start(VoidRaidGauntletController_Start);
		ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(ScalingChanges);
		if (WConfig.cfgXIEliteFix.Value)
		{
			NetworkedBodySpawnSlot.OnSpawnedServer += new hook_OnSpawnedServer(NetworkedBodySpawnSlot_OnSpawnedServer);
		}
		KillableProjectileScaling();
	}

	private static void AffixBeadAttachment_Initialize(orig_Initialize orig, AffixBeadAttachment self)
	{
		orig.Invoke(self);
		self.trackedBodies.Add(((Component)self.networkedBodyAttachment.attachedBody).gameObject);
		self.damageCooldown = 0.1f;
		self.cooldownAfterFiring = 0.1f;
		self.fireDelayTimer = 2f;
		self.damageHitCountTotal = 10;
	}

	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 | 0x10000);
		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 | 0x10000);
		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 | 0x10000);
		val.levelMaxHealth = 0f;
		val.levelArmor = 30f;
		val = Addressables.LoadAssetAsync<GameObject>((object)"de83659161b919844b1309bc9aaa3c71").WaitForCompletion().GetComponent<CharacterBody>();
		CharacterBody obj4 = val;
		obj4.bodyFlags = (BodyFlags)(obj4.bodyFlags | 0x10000);
		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 | 0x10000);
		val.levelMaxHealth = 0f;
		val.levelArmor = 30f;
	}

	private static void NetworkedBodySpawnSlot_OnSpawnedServer(orig_OnSpawnedServer orig, NetworkedBodySpawnSlot self, GameObject ownerBodyObject, SpawnResult spawnResult, Action<ISlot, SpawnResult> callback)
	{
		//IL_0004: 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_001f: 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)
		orig.Invoke(self, ownerBodyObject, spawnResult, callback);
		if (spawnResult.success)
		{
			CharacterBody component = ownerBodyObject.GetComponent<CharacterBody>();
			Inventory component2 = spawnResult.spawnedInstance.GetComponent<Inventory>();
			if (Object.op_Implicit((Object)(object)component) && (Object)(object)component2 != (Object)null)
			{
				component2.SetEquipmentIndex(component.inventory.currentEquipmentIndex);
			}
		}
	}

	private static void VoidRaidGauntletController_Start(orig_Start orig, VoidRaidGauntletController self)
	{
		orig.Invoke(self);
		if (NetworkServer.active && self.phaseEncounters.Length == 3 && WConfig.cfgVoidlingNerf.Value)
		{
			self.phaseEncounters[0].onBeginEncounter += VoidlingPhase1Nerf;
			self.phaseEncounters[1].onBeginEncounter += VoidlingPhase2Nerf;
			self.phaseEncounters[2].onBeginEncounter += VoidlingPhase3Nerf;
		}
	}

	private static void VoidlingPhase1Nerf(ScriptedCombatEncounter obj)
	{
		VoidlingScalingNerf(obj, 1);
	}

	private static void VoidlingPhase2Nerf(ScriptedCombatEncounter obj)
	{
		VoidlingScalingNerf(obj, 2);
	}

	private static void VoidlingPhase3Nerf(ScriptedCombatEncounter obj)
	{
		VoidlingScalingNerf(obj, 3);
	}

	public static void VoidlingScalingNerf(ScriptedCombatEncounter encounter, int phase)
	{
		if (WConfig.cfgVoidlingNerf.Value)
		{
			float num = 0f;
			float num2 = 0f;
			switch (phase)
			{
			case 1:
				num = 0.4f;
				num2 = 0.2f;
				break;
			case 2:
				num = 0.2f;
				num2 = 0.2f;
				break;
			case 3:
				num = 0f;
				num2 = 0.2f;
				break;
			}
			Debug.Log((object)("Voidling Nerf Phase " + phase));
			for (int i = 0; i < encounter.combatSquad.membersList.Count; i++)
			{
				Inventory inventory = encounter.combatSquad.membersList[i].inventory;
				Debug.Log((object)("Pre  Health: " + inventory.GetItemCount(Items.BoostHp) + " Damage: " + inventory.GetItemCount(Items.BoostDamage)));
				inventory.RemoveItem(Items.BoostHp, (int)(num * (float)inventory.GetItemCount(Items.BoostHp)));
				inventory.RemoveItem(Items.BoostDamage, (int)(num2 * (float)inventory.GetItemCount(Items.BoostDamage)));
				Debug.Log((object)("Post Health: " + inventory.GetItemCount(Items.BoostHp) + " Damage: " + inventory.GetItemCount(Items.BoostDamage)));
			}
		}
	}

	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"))
		{
			return;
		}
		if (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.RemoveItem(Items.BoostHp, inventory.GetItemCount(Items.BoostHp));
				inventory.GiveItem(Items.BoostHp, Mathf.RoundToInt((num - 1f) * 10f));
			}
		}
		for (int j = 0; j < self.combatSquad.membersList.Count; j++)
		{
			Inventory inventory2 = self.combatSquad.membersList[j].inventory;
			inventory2.RemoveItem(Items.BoostDamage, (int)(0.2f * (float)inventory2.GetItemCount(Items.BoostDamage)));
		}
	}

	private static void SpellChannelState_OnEnter(orig_OnEnter orig, SpellChannelState self)
	{
		orig.Invoke(self);
		((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility);
		((EntityState)self).characterBody.AddBuff(Buffs.Immune);
	}

	private static void SpellChannelExitState_OnExit(orig_OnExit orig, SpellChannelExitState self)
	{
		orig.Invoke(self);
		((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
		((EntityState)self).characterBody.RemoveBuff(Buffs.Immune);
	}

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

	public static void Enemies()
	{
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Expected O, but got Unknown
		//IL_00b2: 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_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Expected O, but got Unknown
		//IL_019d: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Expected O, but got Unknown
		//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0304: Unknown result type (might be due to invalid IL or missing references)
		//IL_0305: Unknown result type (might be due to invalid IL or missing references)
		//IL_030f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0314: Unknown result type (might be due to invalid IL or missing references)
		//IL_0323: Unknown result type (might be due to invalid IL or missing references)
		//IL_032d: Unknown result type (might be due to invalid IL or missing references)
		//IL_032e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0338: Unknown result type (might be due to invalid IL or missing references)
		//IL_033d: Unknown result type (might be due to invalid IL or missing references)
		//IL_034c: 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_0357: Unknown result type (might be due to invalid IL or missing references)
		//IL_0361: Unknown result type (might be due to invalid IL or missing references)
		//IL_0366: Unknown result type (might be due to invalid IL or missing references)
		//IL_0375: Unknown result type (might be due to invalid IL or missing references)
		//IL_037f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0380: Unknown result type (might be due to invalid IL or missing references)
		//IL_038a: Unknown result type (might be due to invalid IL or missing references)
		//IL_038f: Unknown result type (might be due to invalid IL or missing references)
		//IL_039e: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
		//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_03c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0237: Unknown result type (might be due to invalid IL or missing references)
		//IL_023c: 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 = 500f;
			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__16_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__16_0 = val2;
			obj = (object)val2;
		}
		FindItem.PickupIsNonBlacklistedItem += (hook_PickupIsNonBlacklistedItem)obj;
		LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar1Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
		LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar2Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
		LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar3Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
		LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar4Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f;
		AISkillDriver val3 = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/ScavMaster").GetComponents<AISkillDriver>()[1];
		val3.maxUserHealthFraction = 1f;
		val3.minUserHealthFraction = 0.4f;
		val3.selectionRequiresOnGround = false;
		val3.maxDistance = 300f;
		val3.minDistance = 60f;
		val3.minTargetHealthFraction = 0.4f;
		AISkillDriver[] components = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MegaConstructMaster.prefab").WaitForCompletion().GetComponents<AISkillDriver>();
		if (components.Length > 6)
		{
			((Behaviour)components[6]).enabled = false;
		}
		if (WConfig.cfgOverloadingWorm.Value)
		{
			GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ElectricWorm/ElectricWormBody.prefab").WaitForCompletion();
			val4.GetComponent<CharacterBody>().baseMoveSpeed = 40f;
			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");
		}
		CharacterBody component6 = Addressables.LoadAssetAsync<GameObject>((object)"746b53f076ca9af4d89f67c981d2bbf9").WaitForCompletion().GetComponent<CharacterBody>();
		component6.bodyFlags = (BodyFlags)(component6.bodyFlags | 0x800);
		CharacterBody component7 = Addressables.LoadAssetAsync<GameObject>((object)"a0a8fa4272069874b9e538c59bbda5ed").WaitForCompletion().GetComponent<CharacterBody>();
		component7.bodyFlags = (BodyFlags)(component7.bodyFlags | 0x800);
		CharacterBody component8 = Addressables.LoadAssetAsync<GameObject>((object)"7dfb4548829852a49a4b2840046787ed").WaitForCompletion().GetComponent<CharacterBody>();
		component8.bodyFlags = (BodyFlags)(component8.bodyFlags | 0x800);
		CharacterBody component9 = Addressables.LoadAssetAsync<GameObject>((object)"769510dc6be546b40aa3aca3cf93945c").WaitForCompletion().GetComponent<CharacterBody>();
		component9.bodyFlags = (BodyFlags)(component9.bodyFlags | 0x800);
		CharacterBody component10 = Addressables.LoadAssetAsync<GameObject>((object)"097b0e271757ce24581d4a8983d2c941").WaitForCompletion().GetComponent<CharacterBody>();
		component10.bodyFlags = (BodyFlags)(component10.bodyFlags | 0x800);
		CharacterBody component11 = Addressables.LoadAssetAsync<GameObject>((object)"285347cf04a9df04b9dada8fed09832f").WaitForCompletion().GetComponent<CharacterBody>();
		component11.bodyFlags = (BodyFlags)(component11.bodyFlags | 0x800);
	}

	private static void AffixEarthHealthInvulThing(orig_OnEnter orig, Chargeup self)
	{
		orig.Invoke(self);
		if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.inventory))
		{
			((EntityState)self).characterBody.inventory.GiveItem(Items.BoostHp, 3 * Run.instance.ambientLevelFloor);
			((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 0.5f);
		}
	}

	public static void GiveScavMoreItems(orig_Start orig, ScavengerItemGranter self)
	{
		//IL_0318: Unknown result type (might be due to invalid IL or missing references)
		//IL_031d: Unknown result type (might be due to invalid IL or missing references)
		//IL_031e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0324: Unknown result type (might be due to invalid IL or missing references)
		//IL_032b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0331: Unknown result type (might be due to invalid IL or missing references)
		//IL_0338: Unknown result type (might be due to invalid IL or missing references)
		//IL_033e: 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_010e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0280: Unknown result type (might be due to invalid IL or missing references)
		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)
					{
						num = 2;
						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)
					{
						num = 2;
						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)
				{
					DeathRewards component2 = ((Component)body).GetComponent<DeathRewards>();
					if (Object.op_Implicit((Object)(object)component2))
					{
						component2.bossDropTable = (PickupDropTable)(object)DropTableForBossScav;
					}
					ItemDef itemDef = ItemCatalog.GetItemDef(((PickupIndex)(ref ScavBossItem)).pickupDef.itemIndex);
					if (itemDef.DoesNotContainTag((ItemTag)4) && itemDef.DoesNotContainTag((ItemTag)8))
					{
						Debug.Log((object)("Giving Boss Scav " + (object)itemDef));
						component.GiveItem(itemDef, num);
					}
					else
					{
						Debug.Log((object)(((object)itemDef)?.ToString() + " is Blacklisted for Scavs, resorting to ShinyPearl"));
						component.GiveItem(Items.ShinyPearl, num);
					}
				}
			}
		}
		orig.Invoke(self);
		Inventory component3 = ((Component)self).GetComponent<Inventory>();
		EquipmentIndex currentEquipmentIndex = component3.currentEquipmentIndex;
		if (currentEquipmentIndex == Equipment.Recycle.equipmentIndex || currentEquipmentIndex == Equipment.Gateway.equipmentIndex || currentEquipmentIndex == Equipment.MultiShopCard.equipmentIndex)
		{
			component3.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__2_1;

		public static Func<uint, CharacterBody, ShrineBloodBehavior, uint> <>9__2_0;

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

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

		public static hook_DropDroplet <>9__7_0;

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

		public static Manipulator <>9__7_1;

		public static hook_AddShrineStack <>9__7_2;

		public static hook_AddShrineStack <>9__7_3;

		public static hook_AddShrineStack <>9__7_4;

		public static hook_AddShrineStack <>9__7_5;

		public static hook_AddShrineStack <>9__7_6;

		public static hook_AddShrineStack <>9__7_7;

		public static hook_Awake <>9__9_0;

		internal bool <ShrineBloodBehavior_GoldAmount>b__2_1(Instruction x)
		{
			return ILPatternMatchingExt.MatchStloc(x, 1);
		}

		internal uint <ShrineBloodBehavior_GoldAmount>b__2_0(uint money, CharacterBody body, ShrineBloodBehavior self)
		{
			if (WConfig.cfgShrineBloodGold.Value)
			{
				float num = body.healthComponent.fullCombinedHealth / 100f / (0.7f + body.level * 0.3f);
				if (num < 1f)
				{
					num = 1f;
				}
				int num2 = 25;
				if (self.purchaseCount == 1)
				{
					num2 = 40;
				}
				else if (self.purchaseCount == 2)
				{
					num2 = 60;
				}
				num2 = Run.instance.GetDifficultyScaledCost(num2, Stage.instance.entryDifficultyCoefficient);
				return (uint)((float)num2 * num);
			}
			return money;
		}

		internal bool <HalcyoniteShrine_NerfStats>b__3_1(Instruction x)
		{
			return ILPatternMatchingExt.MatchLdcR4(x, 100f);
		}

		internal float <HalcyoniteShrine_NerfStats>b__3_0(float damageCoeff)
		{
			if (WConfig.cfgHalcyon_NerfStats.Value)
			{
				return 120f;
			}
			return damageCoeff;
		}

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

		internal void <Faster>b__7_1(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			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__7_8(Instruction x)
		{
			return ILPatternMatchingExt.MatchLdcR4(x, 1.5f);
		}

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

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

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

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

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

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

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

	public static void Start()
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: 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_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: 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_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: 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_01f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ff: Expected O, but got Unknown
		//IL_0207: Unknown result type (might be due to invalid IL or missing references)
		//IL_0211: Expected O, but got Unknown
		//IL_0219: Unknown result type (might be due to invalid IL or missing references)
		//IL_0223: Expected O, but got Unknown
		//IL_016a: Unknown result type (might be due to invalid IL or missing references)
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c9: Expected O, but got Unknown
		//IL_023d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0242: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_035d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0362: Unknown result type (might be due to invalid IL or missing references)
		StupidPriceChanger();
		Faster();
		TimedChestController.PreStartClient += new hook_PreStartClient(TimedChestController_PreStartClient);
		BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/TreasureCache/dtLockbox.asset").WaitForCompletion();
		((PickupDropTable)val).canDropBeReplaced = false;
		BasicPickupDropTable val2 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC2/Items/ExtraShrineItem/dtChanceDoll.asset").WaitForCompletion();
		((PickupDropTable)val2).canDropBeReplaced = false;
		((PickupDropTable)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/TreasureCacheVoid/dtVoidLockbox.asset").WaitForCompletion()).canDropBeReplaced = false;
		((PickupDropTable)Addressables.LoadAssetAsync<FreeChestDropTable>((object)"RoR2/DLC1/FreeChest/dtFreeChest.asset").WaitForCompletion()).canDropBeReplaced = false;
		if (WConfig.cfgVoidTripleAllTier.Value)
		{
			Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidTriple/VoidTriple.prefab").WaitForCompletion().GetComponent<OptionChestBehavior>()
				.dropTable = (PickupDropTable)(object)Shared.dtAllTier;
		}
		if (WConfig.cfgVoidStagePillar.Value)
		{
			GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/DeepVoidPortalBattery/DeepVoidPortalBattery.prefab").WaitForCompletion();
			val3.GetComponent<HoldoutZoneController>().baseChargeDuration = 48f;
			val3.GetComponent<HoldoutZoneController>().baseRadius = 26f;
		}
		BasicPickupDropTable val4 = ScriptableObject.CreateInstance<BasicPickupDropTable>();
		val4.tier1Weight = 0.5f;
		val4.tier2Weight = 0.5f;
		val4.tier3Weight = 0.2f;
		val4.bossWeight = 0.02f;
		Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest1StealthedVariant/Chest1StealthedVariant.prefab").WaitForCompletion().GetComponent<ChestBehavior>()
			.dropTable = (PickupDropTable)(object)val4;
		if (!WConfig.InteractablesCombatShrineHP.Value)
		{
			GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombat.prefab").WaitForCompletion();
			val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false;
			val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSandy Variant.prefab").WaitForCompletion();
			val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false;
			val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSnowy Variant.prefab").WaitForCompletion();
			val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false;
		}
		Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"e291748f54c927a47ad44789d295c39f").WaitForCompletion().bannedItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)21 };
		HalcyoniteShrineInteractable.Awake += new hook_Awake(HalcyoniteShrine_ApplyNumbers);
		HalcyoniteShrineInteractable.DrainConditionMet += new Manipulator(HalcyoniteShrine_NerfStats);
		ShrineBloodBehavior.AddShrineStack += new Manipulator(ShrineBloodBehavior_GoldAmount);
		if (WConfig.VoidSeedsMore.Value)
		{
			GameObject val6 = Addressables.LoadAssetAsync<GameObject>((object)"e515327d3d5e0144488357748ce1e899").WaitForCompletion();
			((Component)val6.transform.GetChild(0)).GetComponent<CampDirector>().baseMonsterCredit = 75;
			((Component)val6.transform.GetChild(0)).GetComponent<CombatDirector>().eliteBias = 2f;
			((Component)val6.transform.GetChild(1)).GetComponent<CampDirector>().baseMonsterCredit = 75;
			((Component)val6.transform.GetChild(1)).GetComponent<CombatDirector>().eliteBias = 4f;
		}
		CampDirector.CalculateCredits += new hook_CalculateCredits(CampDirector_CalculateCredits);
		if (WConfig.VoidCradlesMore.Value)
		{
			GameObject val7 = Addressables.LoadAssetAsync<GameObject>((object)"e82b1a3fea19dfd439109683ce4a14b7").WaitForCompletion();
			ScriptedCombatEncounter component = val7.GetComponent<ScriptedCombatEncounter>();
			component.spawns[0].cullChance = 30f;
			component.spawns[1].cullChance = 30f;
			component.spawns[2].cullChance = 30f;
			component.spawns[3].cullChance = 30f;
			GivePickupsOnStart component2 = Addressables.LoadAssetAsync<GameObject>((object)"741e2f9222e19bd4185f43aff65ea213").WaitForCompletion().GetComponent<GivePickupsOnStart>();
			if (component2.itemInfos.Length != 0)
			{
				component2.itemInfos[0].count = 60;
			}
		}
	}

	private static void CampDirector_CalculateCredits(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.4f;
			if (num > 1f)
			{
				self.baseMonsterCredit = (int)((float)self.baseMonsterCredit * num);
				self.monsterCreditPenaltyCoefficient /= num;
			}
		}
		orig.Invoke(self);
	}

	private static void ShrineBloodBehavior_GoldAmount(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_0049: Unknown result type (might be due to invalid IL or missing references)
		ILCursor val = new ILCursor(il);
		if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
		{
			(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 1)
		}))
		{
			val.Emit(OpCodes.Ldloc_0);
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<uint, CharacterBody, ShrineBloodBehavior, uint>>((Func<uint, CharacterBody, ShrineBloodBehavior, uint>)delegate(uint money, CharacterBody body, ShrineBloodBehavior self)
			{
				if (WConfig.cfgShrineBloodGold.Value)
				{
					float num = body.healthComponent.fullCombinedHealth / 100f / (0.7f + body.level * 0.3f);
					if (num < 1f)
					{
						num = 1f;
					}
					int num2 = 25;
					if (self.purchaseCount == 1)
					{
						num2 = 40;
					}
					else if (self.purchaseCount == 2)
					{
						num2 = 60;
					}
					num2 = Run.instance.GetDifficultyScaledCost(num2, Stage.instance.entryDifficultyCoefficient);
					return (uint)((float)num2 * num);
				}
				return money;
			});
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: PurchaseInteraction.ShrineBloodBehavior_GoldAmount");
		}
	}

	private static void HalcyoniteShrine_NerfStats(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.MatchLdcR4(x, 100f)
		}))
		{
			val.EmitDelegate<Func<float, float>>((Func<float, float>)((float damageCoeff) => WConfig.cfgHalcyon_NerfStats.Value ? 120f : damageCoeff));
		}
		else
		{
			Debug.LogWarning((object)"IL Failed: Buff Married Lemurians");
		}
	}

	private static void HalcyoniteShrine_ApplyNumbers(orig_Awake orig, HalcyoniteShrineInteractable self)
	{
		if (NetworkServer.active)
		{
			if (WConfig.cfgHalcyon_FastDrain.Value)
			{
				self.goldDrainValue = 2;
			}
			if (WConfig.cfgHalcyon_LessMonsterCredits.Value)
			{
				self.monsterCredit = 80f;
			}
			self.purchaseInteraction.Networkcost = self.goldDrainValue;
		}
		orig.Invoke(self);
		self.combatDirector.combatSquad.onMemberAddedServer += MakeHalcyoniteBoss;
		self.activationDirector.combatSquad.grantBonusHealthInMultiplayer = WConfig.cfgHalcyon_ScaleHPMult.Value;
	}

	private static void MakeHalcyoniteBoss(CharacterMaster obj)
	{
		obj.isBoss = true;
	}

	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_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_0087: Expected O, but got Unknown
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Expected O, but got Unknown
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Expected O, but got Unknown
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Expected O, but got Unknown
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Expected O, but got Unknown
		//IL_0145: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0150: Expected O, but got Unknown
		//IL_016a: Unknown result type (might be due to invalid IL or missing references)
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Expected O, but got Unknown
		//IL_018f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0194: Unknown result type (might be due to invalid IL or missing references)
		//IL_019a: Expected O, but got Unknown
		//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bf: Expected O, but got Unknown
		if (WConfig.FasterPrinter.Value)
		{
			((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/Duplicator").GetComponent<DelayedEvent>()).enabled = false;
			((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorLarge").GetComponent<DelayedEvent>()).enabled = false;
			((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorMilitary").GetComponent<DelayedEvent>()).enabled = false;
			((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorWild").GetComponent<DelayedEvent>()).enabled = false;
			object obj = <>c.<>9__7_0;
			if (obj == null)
			{
				hook_DropDroplet val = delegate(orig_DropDroplet orig, Duplicating self)
				{
					orig.Invoke(self);
					if (NetworkServer.active)
					{
						((Component)((EntityState)self).outer).GetComponent<PurchaseInteraction>().Networkavailable = true;
					}
				};
				<>c.<>9__7_0 = val;
				obj = (object)val;
			}
			Duplicating.DropDroplet += (hook_DropDroplet)obj;
		}
		if (WConfig.FasterScrapper.Value)
		{
			object obj2 = <>c.<>9__7_1;
			if (obj2 == null)
			{
				Manipulator val2 = delegate(ILContext il)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Expected O, but got Unknown
					ILCursor val9 = new ILCursor(il);
					if (val9.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f)
					}))
					{
						val9.Next.Operand = 1f;
					}
					else
					{
						Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb");
					}
				};
				<>c.<>9__7_1 = val2;
				obj2 = (object)val2;
			}
			ScrapperController.CreateItemTakenOrb += (Manipulator)obj2;
			ScrapperBaseState.OnEnter += new hook_OnEnter(FasterScrapper_ClientSync);
		}
		if (!WConfig.FasterShrines.Value)
		{
			return;
		}
		object obj3 = <>c.<>9__7_2;
		if (obj3 == null)
		{
			hook_AddShrineStack val3 = delegate(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__7_2 = val3;
			obj3 = (object)val3;
		}
		ShrineBloodBehavior.AddShrineStack += (hook_AddShrineStack)obj3;
		object obj4 = <>c.<>9__7_3;
		if (obj4 == null)
		{
			hook_AddShrineStack val4 = delegate(orig_AddShrineStack orig, ShrineBossBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__7_3 = val4;
			obj4 = (object)val4;
		}
		ShrineBossBehavior.AddShrineStack += (hook_AddShrineStack)obj4;
		object obj5 = <>c.<>9__7_4;
		if (obj5 == null)
		{
			hook_AddShrineStack val5 = delegate(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__7_4 = val5;
			obj5 = (object)val5;
		}
		ShrineChanceBehavior.AddShrineStack += (hook_AddShrineStack)obj5;
		object obj6 = <>c.<>9__7_5;
		if (obj6 == null)
		{
			hook_AddShrineStack val6 = delegate(orig_AddShrineStack orig, ShrineCombatBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__7_5 = val6;
			obj6 = (object)val6;
		}
		ShrineCombatBehavior.AddShrineStack += (hook_AddShrineStack)obj6;
		object obj7 = <>c.<>9__7_6;
		if (obj7 == null)
		{
			hook_AddShrineStack val7 = delegate(orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__7_6 = val7;
			obj7 = (object)val7;
		}
		ShrineHealingBehavior.AddShrineStack += (hook_AddShrineStack)obj7;
		object obj8 = <>c.<>9__7_7;
		if (obj8 == null)
		{
			hook_AddShrineStack val8 = delegate(orig_AddShrineStack orig, ShrineRestackBehavior self, Interactor activator)
			{
				orig.Invoke(self, activator);
				self.refreshTimer = 1f;
			};
			<>c.<>9__7_7 = val8;
			obj8 = (object)val8;
		}
		ShrineRestackBehavior.AddShrineStack += (hook_AddShrineStack)obj8;
	}

	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()
	{
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Expected O, but got Unknown
		//IL_010e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Expected O, but got Unknown
		//IL_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_00ee: Expected O, but got Unknown
		if (WConfig.InteractableHealingShrine.Value)
		{
			LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<PurchaseInteraction>().cost = 10;
			LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<ShrineHealingBehavior>().costMultiplierPerPurchase = 1.4f;
			ShrineHealingBehavior component = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<ShrineHealingBehavior>();
			component.maxPurchaseCount++;
		}
		LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/BrokenDrones/MegaDroneBroken").GetComponent<PurchaseInteraction>().cost = WConfig.MegaDroneCost.Value;
		LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/BrokenDrones/Turret1Broken").GetComponent<PurchaseInteraction>().cost = WConfig.TurretDroneCost.Value;
		LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/LunarCauldron, RedToWhite Variant").GetComponent<ShopTerminalBehavior>().dropVelocity = new Vector3(5f, 10f, 5f);
		if (WConfig.InteractableNoLunarCost.Value)
		{
			object obj = <>c.<>9__9_0;
			if (obj == null)
			{
				hook_Awake val = delegate(orig_Awake orig, PurchaseInteraction self)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0010: Invalid comparison between Unknown and I4
					orig.Invoke(self);
					if ((int)self.costType == 3)
					{
						self.cost = 0;
					}
				};
				<>c.<>9__9_0 = val;
				obj = (object)val;
			}
			PurchaseInteraction.Awake += (hook_Awake)obj;
		}
		ShrineBloodBehavior.AddShrineStack += new hook_AddShrineStack(ShrineBloodChanges);
		ShopTerminalBehavior.DropPickup += new hook_DropPickup(RedToWhiteSoupMore);
	}

	public static void RedToWhiteSoupMore(orig_DropPickup orig, ShopTerminalBehavior self)
	{
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		if (WConfig.InteractableRedSoupAmount.Value > 0 && ((Object)self).name.StartsWith("LunarCauldron, RedToWhite") && !((Component)self).GetComponent<PurchaseInteraction>().available)
		{
			for (int i = 0; i < WConfig.InteractableRedSoupAmount.Value; i++)
			{
				PickupDropletController.CreatePickupDroplet(self.pickupIndex, (Object.op_Implicit((Object)(object)self.dropTransform) ? self.dropTransform : ((Component)self).transform).position, ((Component)self).transform.TransformVector(self.dropVelocity));
			}
		}
		orig.Invoke(self);
	}

	public static void ShrineBloodChanges(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor interactor)
	{
		orig.Invoke(self, interactor);
		if (WConfig.InteractableBloodShrineLessCost.Value)
		{
			if (self.purchaseCount == 1)
			{
				self.costMultiplierPerPurchase = 1.75f;
			}
			else if (self.purchaseCount == 2)
			{
				self.costMultiplierPerPurchase = 1.93f;
			}
		}
	}
}
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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: 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_0057: Expected O, but got Unknown
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Expected O, but got Unknown
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Expected O, but got Unknown
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Expected O, but got Unknown
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Expected O, but got Unknown
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Expected O, but got Unknown
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Expected O, but got Unknown
		ClassicStageInfo.Start += new hook_Start(MoreSceneCredits);
		ClassicStageInfo.Start += new hook_Start(RunsAlways_ClassicStageInfo_Start);
		SceneDef val = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/voidraid/voidraid.asset").WaitForCompletion();
		val.sceneType = (SceneType)2;
		val.allowItemsToSpawnObjects = true;
		ArenaMissionController.OnStartServer += new hook_OnStartServer(ArenaMissionController_OnEnable);
		WardOnAndReady.OnEnter += new hook_OnEnter(WardOnAndReady_OnEnter);
		Active.OnEnter += new hook_OnEnter(Active_OnEnter);
		if (ConfigStages.Stage_F_Moon.Value)
		{
			EscapeSequenceController.OnEnable += new hook_OnEnable(EscapeSequenceController_OnEnable);
		}
		BazaarController.SetUpSeerStations += new hook_SetUpSeerStations(ThirdSeerNew);
		SeerStationController.SetRunNextStageToTarget += new hook_SetRunNextStageToTarget(BazaarDisableAllSeers);
		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;
		}
		else if (((Object)self).name.EndsWith("Mass") && WConfig.cfgMasstweak.Value)
		{
			CombatDirector component = ((Component)self).GetComponent<CombatDirector>();
			component.monsterCredit += 140f;
			self.baseChargeDuration = Mathf.Min(self.baseChargeDuration, 48f);
			self.baseRadius += 2f;
		}
	}

	private static void BazaarDisableAllSeers(orig_SetRunNextStageToTarget orig, SeerStationController self)
	{
		orig.Invoke(self);
		if ((Object)(object)((Component)self).transform.parent != (Object)null)
		{
			SeerStationController[] componentsInChildren = ((Component)((Component)self).transform.parent).GetComponentsInChildren<SeerStationController>(false);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				((Component)componentsInChildren[i]).GetComponent<PurchaseInteraction>().SetAvailable(false);
			}
		}
	}

	public static void ThirdSeerNew(orig_SetUpSeerStations orig, BazaarController self)
	{
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: 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_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		//IL_0193: Expected I4, but got Unknown
		GameObject val = null;
		SeerStationController val2 = null;
		bool flag = WConfig.ThirdLunarSeer.Value && NetworkServer.active;
		if (flag)
		{
			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);
		if (!flag || val2.targetSceneDefIndex != -1)
		{
			return;
		}
		List<int> list = new List<int>();
		if ((Object)(object)Run.instance.nextStageScene != (Object)null)
		{
			int stageOrder = Run.instance.nextStageScene.stageOrder;
			Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					SceneDef current = enumerator.Current;
					if (current.stageOrder == stageOrder && ((Object)(object)current.requiredExpansion == (Object)null || Run.instance.IsExpansionEnabled(current.requiredExpansion)) && self.IsUnlockedBeforeLooping(current))
					{
						list.Add((int)current.sceneDefIndex);
					}
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}
		SeerStationController[] seerStations = self.seerStations;
		for