Decompiled source of SimulacrumAdditions v1.9.4

SimulacrumAdditions.dll

Decompiled 2 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AK.Wwise;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.Drone;
using EntityStates.GrandParent;
using EntityStates.InfiniteTowerSafeWard;
using EntityStates.Missions.Moon;
using EntityStates.QuestVolatileBattery;
using EntityStates.VagrantMonster;
using EntityStates.VagrantNovaItem;
using EntityStates.VoidMegaCrab.Weapon;
using IL.RoR2;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates;
using On.EntityStates.Drone;
using On.EntityStates.GrandParent;
using On.EntityStates.InfiniteTowerSafeWard;
using On.EntityStates.Missions.Moon;
using On.EntityStates.QuestVolatileBattery;
using On.EntityStates.VagrantMonster;
using On.EntityStates.VagrantNovaItem;
using On.EntityStates.VoidMegaCrab.Weapon;
using On.RoR2;
using On.RoR2.Artifacts;
using On.RoR2.Projectile;
using On.RoR2.UI.LogBook;
using On.RoR2.UI.MainMenu;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Artifacts;
using RoR2.CharacterAI;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2.UI.MainMenu;
using SimulacrumAdditions.Properties;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.UI;

[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.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("SimulacrumAdditions")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SimulacrumAdditions")]
[assembly: AssemblyTitle("SimulacrumAdditions")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace SimulacrumAdditions
{
	public class WConfig
	{
		public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Simulacrum_Additions.cfg", true);

		public static ConfigEntry<bool> cfgSpeedUpOnLaterWaves;

		public static ConfigEntry<bool> cfgVoidTripleAllTier;

		public static ConfigEntry<bool> cfgVoidTripleContentsInPing;

		public static ConfigEntry<bool> cfgSimuCreditsRebalance;

		public static ConfigEntry<bool> cfgOnlySpecialBossesLate;

		public static ConfigEntry<bool> cfgDifferentTeleportEffect;

		public static ConfigEntry<bool> cfgVoidsEverywhere;

		public static ConfigEntry<bool> cfgExtraDifficuly;

		public static ConfigEntry<bool> cfgNewEnemiesVisible;

		public static ConfigEntry<bool> cfgDumpInfo;

		public static ConfigEntry<bool> cfgVoidCoins;

		public static ConfigEntry<bool> cfgEnableArtifact;

		public static ConfigEntry<bool> cfgMusicSuperBoss;

		public static ConfigEntry<bool> cfgSacrificeBalance;

		public static ConfigEntry<bool> cfgItemsEvery8;

		public static ConfigEntry<bool> cfgItemsFrequently;

		public static ConfigEntry<bool> cfgMakeSpecialWavesMoreCommon;

		public static ConfigEntry<bool> cfgAwaitTravel;

		public static ConfigEntry<int> cfgSimuEndingStartAtXWaves;

		public static ConfigEntry<int> cfgSimuEndingEveryXWaves;

		public static ConfigEntry<int> cfgSuperBossStartAtXWaves;

		public static ConfigEntry<int> cfgSuperBossEveryXWaves;

		public static void InitConfig()
		{
			cfgMusicSuperBoss = ConfigFileUNSORTED.Bind<bool>("Main", "Music for Super Boss waves", true, "Like Mithrix theme for Mithrix wave.");
			cfgSpeedUpOnLaterWaves = ConfigFileUNSORTED.Bind<bool>("Main", "Speed up as waves go on", true, "The crab will travel faster the more waves are completed, mostly noticible later waves.");
			cfgAwaitTravel = ConfigFileUNSORTED.Bind<bool>("Main", "Crab waits before travelling", true, "Like after wave 5, more time to do stuff before leaving or just to leave instantly.");
			cfgEnableArtifact = ConfigFileUNSORTED.Bind<bool>("Main", "Enable Artifact of Augments", true, "An Artifact that allows only special augments.");
			cfgVoidCoins = ConfigFileUNSORTED.Bind<bool>("Main", "Add Void Coins", true, "Add previously unused Void Coins with which you can purchase Void Interactables. You can still purchase them with Blood if you do not have any.");
			cfgVoidTripleAllTier = ConfigFileUNSORTED.Bind<bool>("Main", "Void Potential Chests can drop more tiers", true, "With this they can give items from any tier, normally they use a normal chest pool.");
			cfgDumpInfo = ConfigFileUNSORTED.Bind<bool>("Main", "Wave Info Dump", false, "Dump wave info on startup in log");
			cfgVoidTripleContentsInPing = ConfigFileUNSORTED.Bind<bool>("Main", "Void Potential contents in ping message", true, "When pinging a Void Potential the items inside will be in the ping message. Requested for more easily sharing items inside Void Potentials.");
			cfgDifferentTeleportEffect = ConfigFileUNSORTED.Bind<bool>("Main", "Simulacrum Teleport Effect", true, "Void themed teleport effect for Simulacrum runs");
			cfgItemsEvery8 = ConfigFileUNSORTED.Bind<bool>("Main : Balance", "Items every 8 Waves", true, "Default item period is every 8 waves. Fits better with the run ending at wave 50.");
			cfgItemsFrequently = ConfigFileUNSORTED.Bind<bool>("Main : Balance", "Items are given more frequently later", true, "Default item period is every 8 waves. Fits better with the run ending at wave 50.");
			cfgVoidsEverywhere = ConfigFileUNSORTED.Bind<bool>("Main", "Void Enemies on all stages", true, "After wave 60 void enemies will spawn on all simu stages.");
			cfgSimuCreditsRebalance = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Simulacrum Credits Rebalance", true, "Get more hold early on, Stages have 630 to 400 credits depending on stages completed and get more credits in multiplayer. Vanilla they always have 600.");
			cfgExtraDifficuly = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "More scaling", true, "Scales immediate wave spawns up and elite cost down to overall increase difficulty but also make waves shorter");
			cfgSacrificeBalance = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Nerf Sacrifice in Simulacrum", true, "30% less item drops from enemies and 1 less option in potentials");
			cfgNewEnemiesVisible = ConfigFileUNSORTED.Bind<bool>("Main", "Logbook Entries", false, "Add reskins of enemies added by mod to Logbook");
			cfgSimuEndingStartAtXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Ending Portal", "Ending Start Wave", 50, "This is the first wave the ending Portal appears (only use steps of 10)");
			cfgSimuEndingEveryXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Ending Portal", "Ending Portal Every X Waves", 10, "The ending portal will appear every X waves. (only use steps of 10)");
			cfgSuperBossStartAtXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Forced Super Boss", "Forced Special Boss Start Wave", 50, "A forced special boss is meant to be paired with the wave where the ending portal spawns so it's less of just a random end. (only use steps of 10)");
			cfgSuperBossEveryXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Forced Super Boss", "Forced Special Boss Every X Waves", 30, "The forced special boss will appear every X waves. (only use steps of 10)");
		}
	}
	public static class ArrayUtil
	{
		public static T[] Add<T>(this T[] array, params T[] items)
		{
			return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray();
		}

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

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

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

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

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

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

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

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

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

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

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

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

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

		public static Vector2 half = new Vector2(0.5f, 0.5f);
	}
	public class Artifact
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_DropRewards <>9__1_0;

			internal void <MakeArtifact>b__1_0(orig_DropRewards orig, InfiniteTowerWaveController self)
			{
				bool flag = RunArtifactManager.instance.IsArtifactEnabled(Artifacts.sacrificeArtifactDef);
				SimulacrumExtrasHelper component = ((Component)self).GetComponent<SimulacrumExtrasHelper>();
				if (flag && self.rewardOptionCount > 1)
				{
					self.rewardOptionCount--;
					if (Object.op_Implicit((Object)(object)component) && component.rewardOptionCount > 1)
					{
						component.rewardOptionCount--;
					}
				}
				orig.Invoke(self);
			}
		}

		public static ArtifactDef ArtifactSimulacrum = ScriptableObject.CreateInstance<ArtifactDef>();

		public static void MakeArtifact()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Expected O, but got Unknown
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Expected O, but got Unknown
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Expected O, but got Unknown
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Expected O, but got Unknown
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Expected O, but got Unknown
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Expected O, but got Unknown
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Expected O, but got Unknown
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Expected O, but got Unknown
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(0f, 0f, 64f, 64f);
			Texture2D val2 = new Texture2D(64, 64, (TextureFormat)4, false);
			((Texture)val2).filterMode = (FilterMode)2;
			ImageConversion.LoadImage(val2, Resources.ArtifactOn, true);
			Sprite smallIconSelectedSprite = Sprite.Create(val2, val, new Vector2(0f, 0f));
			Texture2D val3 = new Texture2D(64, 64, (TextureFormat)4, false);
			((Texture)val3).filterMode = (FilterMode)2;
			ImageConversion.LoadImage(val3, Resources.ArtifactOff, true);
			Sprite smallIconDeselectedSprite = Sprite.Create(val3, val, new Vector2(0f, 0f));
			ArtifactSimulacrum.cachedName = "AAAAugmentsOnly";
			ArtifactSimulacrum.nameToken = "Artifact of Augments";
			ArtifactSimulacrum.descriptionToken = "All waves will be augmented waves.";
			ArtifactSimulacrum.smallIconSelectedSprite = smallIconSelectedSprite;
			ArtifactSimulacrum.smallIconDeselectedSprite = smallIconDeselectedSprite;
			ContentAddition.AddArtifactDef(ArtifactSimulacrum);
			Run.OverrideRuleChoices += new hook_OverrideRuleChoices(ArtifactInITOnly);
			WeeklyRun.OverrideRuleChoices += new hook_OverrideRuleChoices(WeeklyArtifactInITOnly);
			RunArtifactManager.onArtifactEnabledGlobal += new ArtifactStateChangeDelegate(OnArtifactEnabled);
			RunArtifactManager.onArtifactDisabledGlobal += new ArtifactStateChangeDelegate(OnArtifactDisabled);
			if (!WConfig.cfgSacrificeBalance.Value)
			{
				return;
			}
			object obj = <>c.<>9__1_0;
			if (obj == null)
			{
				hook_DropRewards val4 = delegate(orig_DropRewards orig, InfiniteTowerWaveController self)
				{
					bool flag = RunArtifactManager.instance.IsArtifactEnabled(Artifacts.sacrificeArtifactDef);
					SimulacrumExtrasHelper component = ((Component)self).GetComponent<SimulacrumExtrasHelper>();
					if (flag && self.rewardOptionCount > 1)
					{
						self.rewardOptionCount--;
						if (Object.op_Implicit((Object)(object)component) && component.rewardOptionCount > 1)
						{
							component.rewardOptionCount--;
						}
					}
					orig.Invoke(self);
				};
				<>c.<>9__1_0 = val4;
				obj = (object)val4;
			}
			InfiniteTowerWaveController.DropRewards += (hook_DropRewards)obj;
			SacrificeArtifactManager.OnArtifactEnabled += new hook_OnArtifactEnabled(SacrificeArtifactManager_OnArtifactEnabled);
			SacrificeArtifactManager.OnArtifactDisabled += new hook_OnArtifactDisabled(SacrificeArtifactManager_OnArtifactDisabled);
		}

		private static void WeeklyArtifactInITOnly(orig_OverrideRuleChoices orig, WeeklyRun self, RuleChoiceMask mustInclude, RuleChoiceMask mustExclude, ulong runSeed)
		{
			orig.Invoke(self, mustInclude, mustExclude, runSeed);
			((Run)self).ForceChoice(mustInclude, mustExclude, RuleCatalog.FindRuleDef("Artifacts.AAAAugmentsOnly").FindChoice("Off"));
			((Run)self).ForceChoice(mustInclude, mustExclude, RuleCatalog.FindRuleDef("Artifacts.AAAUseNormalStages").FindChoice("Off"));
		}

		private static void SacrificeArtifactManager_OnArtifactEnabled(orig_OnArtifactEnabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			orig.Invoke(runArtifactManager, artifactDef);
			if (NetworkServer.active && !((Object)(object)artifactDef != (Object)(object)Artifacts.sacrificeArtifactDef) && Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>()))
			{
				Debug.Log((object)"Simulacrum : Added Sacrifice");
				Util.GetExpAdjustedDropChancePercent += new hook_GetExpAdjustedDropChancePercent(SimulacrumNerfSacrifice);
			}
		}

		private static float SimulacrumNerfSacrifice(orig_GetExpAdjustedDropChancePercent orig, float baseChancePercent, GameObject characterBodyObject)
		{
			return orig.Invoke(baseChancePercent, characterBodyObject) * 0.7f;
		}

		private static void SacrificeArtifactManager_OnArtifactDisabled(orig_OnArtifactDisabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			orig.Invoke(runArtifactManager, artifactDef);
			if (NetworkServer.active && !((Object)(object)artifactDef != (Object)(object)Artifacts.sacrificeArtifactDef) && Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>()))
			{
				Debug.Log((object)"Simulacrum : Removed Sacrifice");
				Util.GetExpAdjustedDropChancePercent -= new hook_GetExpAdjustedDropChancePercent(SimulacrumNerfSacrifice);
			}
		}

		private static void OnArtifactEnabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			if (!((Object)(object)artifactDef != (Object)(object)ArtifactSimulacrum))
			{
				InfiniteTowerWaveCategory.GenerateWeightedSelection += new hook_GenerateWeightedSelection(OnlySpecialWaves);
				SimuMain.ITBasicWaves.GenerateWeightedSelection();
				SimuMain.ITBossWaves.GenerateWeightedSelection();
			}
		}

		private static void OnArtifactDisabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			if (!((Object)(object)artifactDef != (Object)(object)ArtifactSimulacrum))
			{
				InfiniteTowerWaveCategory.GenerateWeightedSelection -= new hook_GenerateWeightedSelection(OnlySpecialWaves);
				SimuMain.ITBasicWaves.GenerateWeightedSelection();
				SimuMain.ITBossWaves.GenerateWeightedSelection();
			}
		}

		public static void OnlySpecialWaves(orig_GenerateWeightedSelection orig, InfiniteTowerWaveCategory self)
		{
			self.weightedSelection.Clear();
			self.weightedSelection.AddChoice(self.wavePrefabs[0].wavePrefab, 0f);
			for (int i = 1; i < self.wavePrefabs.Length; i++)
			{
				self.weightedSelection.AddChoice(self.wavePrefabs[i].wavePrefab, self.wavePrefabs[i].weight + 1f);
			}
		}

		private static void ArtifactInITOnly(orig_OverrideRuleChoices orig, Run self, RuleChoiceMask mustInclude, RuleChoiceMask mustExclude, ulong runSeed)
		{
			orig.Invoke(self, mustInclude, mustExclude, runSeed);
			if (Object.op_Implicit((Object)(object)self) && !(self is InfiniteTowerRun))
			{
				self.ForceChoice(mustInclude, mustExclude, RuleCatalog.FindRuleDef("Artifacts.AAAAugmentsOnly").FindChoice("Off"));
			}
		}
	}
	public class ArtifactReal
	{
		public static ArtifactDef ArtifactUseNormalStages = ScriptableObject.CreateInstance<ArtifactDef>();

		public static void MakeArtifact()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Expected O, but got Unknown
			//IL_0122: 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_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Expected O, but got Unknown
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(0f, 0f, 64f, 64f);
			Texture2D val2 = new Texture2D(64, 64, (TextureFormat)4, false);
			((Texture)val2).filterMode = (FilterMode)2;
			ImageConversion.LoadImage(val2, Resources.Artifact2_On, true);
			Sprite smallIconSelectedSprite = Sprite.Create(val2, val, new Vector2(0f, 0f));
			Texture2D val3 = new Texture2D(64, 64, (TextureFormat)4, false);
			((Texture)val3).filterMode = (FilterMode)2;
			ImageConversion.LoadImage(val3, Resources.Artifact2_Off, true);
			Sprite smallIconDeselectedSprite = Sprite.Create(val3, val, new Vector2(0f, 0f));
			ArtifactUseNormalStages.cachedName = "AAAUseNormalStages";
			ArtifactUseNormalStages.nameToken = "Artifact of Reality";
			ArtifactUseNormalStages.descriptionToken = "Normal stages will be used instead of Simulacrum stages.";
			ArtifactUseNormalStages.smallIconSelectedSprite = smallIconSelectedSprite;
			ArtifactUseNormalStages.smallIconDeselectedSprite = smallIconDeselectedSprite;
			ContentAddition.AddArtifactDef(ArtifactUseNormalStages);
			Run.OverrideRuleChoices += new hook_OverrideRuleChoices(ArtifactInITOnly);
			RunArtifactManager.onArtifactEnabledGlobal += new ArtifactStateChangeDelegate(OnArtifactEnabled);
			RunArtifactManager.onArtifactDisabledGlobal += new ArtifactStateChangeDelegate(OnArtifactDisabled);
			Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/VoidSuppressor/iscVoidSuppressor.asset").WaitForCompletion().directorCreditCost = 5;
			GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSuppressor/VoidSuppressor.prefab").WaitForCompletion();
			val4.GetComponent<PurchaseInteraction>().isShrine = true;
			val4.GetComponent<VoidSuppressorBehavior>().effectColor.a = 0.85f;
			((Component)val4.transform.GetChild(0).GetChild(7).GetChild(1)
				.GetChild(1)).gameObject.SetActive(true);
			val4.transform.GetChild(0).GetChild(7).GetChild(1)
				.GetChild(0)
				.localScale = new Vector3(1.5f, 1.5f, 1.5f);
			val4.transform.GetChild(0).GetChild(7);
			ItemDef ScrapWhiteSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapWhiteSuppressed.asset").WaitForCompletion();
			ItemDef ScrapGreenSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapGreenSuppressed.asset").WaitForCompletion();
			ItemDef ScrapRedSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapRedSuppressed.asset").WaitForCompletion();
			ScrapWhiteSuppressed.pickupToken = "ITEM_SCRAPWHITE_PICKUP";
			ScrapGreenSuppressed.pickupToken = "ITEM_SCRAPGREEN_PICKUP";
			ScrapRedSuppressed.pickupToken = "ITEM_SCRAPRED_PICKUP";
			ScrapWhiteSuppressed.descriptionToken = "ITEM_SCRAPWHITE_DESC";
			ScrapGreenSuppressed.descriptionToken = "ITEM_SCRAPGREEN_DESC";
			ScrapRedSuppressed.descriptionToken = "ITEM_SCRAPRED_DESC";
			ScrapWhiteSuppressed.deprecatedTier = (ItemTier)0;
			ScrapGreenSuppressed.deprecatedTier = (ItemTier)1;
			ScrapRedSuppressed.deprecatedTier = (ItemTier)2;
			LogBookController.BuildStaticData += (hook_BuildStaticData)delegate(orig_BuildStaticData orig)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: 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_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				ScrapWhiteSuppressed.deprecatedTier = (ItemTier)5;
				ScrapGreenSuppressed.deprecatedTier = (ItemTier)5;
				ScrapRedSuppressed.deprecatedTier = (ItemTier)5;
				orig.Invoke();
				ScrapWhiteSuppressed.deprecatedTier = (ItemTier)0;
				ScrapGreenSuppressed.deprecatedTier = (ItemTier)1;
				ScrapRedSuppressed.deprecatedTier = (ItemTier)2;
			};
		}

		private static void OnArtifactEnabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			if (!((Object)(object)artifactDef != (Object)(object)ArtifactUseNormalStages))
			{
				RuleDef val = RuleCatalog.FindRuleDef("Misc.StageOrder");
				Run.instance.ruleBook.GetRuleChoice(val).extraData = (object)(StageOrder)1;
				InfiniteTowerRun.OnPrePopulateSceneServer += new hook_OnPrePopulateSceneServer(Server_IT_PrePopulateScene);
				SceneDirector.Start += new hook_Start(ArtifactReal_SceneDirector_Start);
				SceneDirector.onGenerateInteractableCardSelection += RemoveUnneededInteractables;
			}
		}

		private static void ArtifactReal_SceneDirector_Start(orig_Start orig, SceneDirector self)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/Weather, InfiniteTower.prefab").WaitForCompletion());
			GameObject val = GameObject.Find("/Weather, Wispgraveyard");
			if (Object.op_Implicit((Object)(object)val))
			{
				val.SetActive(false);
			}
			CombatDirector[] components = ((Component)self).gameObject.GetComponents<CombatDirector>();
			for (int i = 0; i < components.Length; i++)
			{
				Debug.Log((object)components[i]);
				((Behaviour)components[i]).enabled = false;
			}
			PortalStatueBehavior[] array = Object.FindObjectsOfType(typeof(PortalStatueBehavior)) as PortalStatueBehavior[];
			if (array.Length == 0)
			{
				return;
			}
			Material material = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/voidstage/matVoidCrystal.mat").WaitForCompletion();
			GameObject val2 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/VoidSuppressor");
			Transform parent = ((Component)array[0]).gameObject.transform.parent;
			for (int j = 0; j < parent.childCount; j++)
			{
				Transform child = parent.GetChild(j);
				if (Object.op_Implicit((Object)(object)((Component)child).GetComponent<PortalStatueBehavior>()))
				{
					Debug.Log((object)child);
					((Component)child).gameObject.SetActive(true);
					if (NetworkServer.active)
					{
						GameObject val3 = Object.Instantiate<GameObject>(val2, child);
						val3.transform.localPosition = new Vector3(0f, -1.38f, 0f);
						NetworkServer.Spawn(val3);
					}
					((Component)child.GetChild(0)).gameObject.SetActive(false);
					((Renderer)((Component)child.GetChild(1)).GetComponent<MeshRenderer>()).material = material;
					((Renderer)((Component)child.GetChild(2)).GetComponent<MeshRenderer>()).material = material;
					((Renderer)((Component)child.GetChild(3)).GetComponent<MeshRenderer>()).material = material;
					((Renderer)((Component)child.GetChild(4)).GetComponent<MeshRenderer>()).material = material;
					Object.Destroy((Object)(object)((Component)child).GetComponent<PurchaseInteraction>());
				}
			}
		}

		private static void OnArtifactDisabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			if (!((Object)(object)artifactDef != (Object)(object)ArtifactUseNormalStages))
			{
				InfiniteTowerRun.OnPrePopulateSceneServer -= new hook_OnPrePopulateSceneServer(Server_IT_PrePopulateScene);
				SceneDirector.Start -= new hook_Start(ArtifactReal_SceneDirector_Start);
				SceneDirector.onGenerateInteractableCardSelection -= RemoveUnneededInteractables;
				if (Object.op_Implicit((Object)(object)Run.instance))
				{
					RuleDef val = RuleCatalog.FindRuleDef("Misc.StageOrder");
					Run.instance.ruleBook.GetRuleChoice(val).extraData = (object)(StageOrder)0;
				}
			}
		}

		private static void ArtifactInITOnly(orig_OverrideRuleChoices orig, Run self, RuleChoiceMask mustInclude, RuleChoiceMask mustExclude, ulong runSeed)
		{
			orig.Invoke(self, mustInclude, mustExclude, runSeed);
			if (Object.op_Implicit((Object)(object)self) && !(self is InfiniteTowerRun))
			{
				self.ForceChoice(mustInclude, mustExclude, RuleCatalog.FindRuleDef("Artifacts.AAAUseNormalStages").FindChoice("Off"));
			}
		}

		private static void Server_IT_PrePopulateScene(orig_OnPrePopulateSceneServer orig, InfiniteTowerRun self, SceneDirector sceneDirector)
		{
			sceneDirector.RemoveAllExistingSpawnPoints();
			orig.Invoke(self, sceneDirector);
			sceneDirector.monsterCredit = 0;
			sceneDirector.teleporterSpawnCard = null;
		}

		private static void RemoveUnneededInteractables(SceneDirector arg1, DirectorCardCategorySelection dccs)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: 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_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Expected O, but got Unknown
			int num = dccs.FindCategoryIndexByName("Void Stuff");
			if (num != -1)
			{
				dccs.categories[num].selectionWeight *= 2.5f;
				DirectorCard val = new DirectorCard
				{
					spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/VoidTriple/iscVoidTriple.asset").WaitForCompletion(),
					selectionWeight = 15
				};
				DirectorCard val2 = new DirectorCard
				{
					spawnCard = (SpawnCard)(object)SimulacrumDCCS.SafteyBarrel,
					selectionWeight = 6
				};
				dccs.AddCard(num, val2);
				dccs.AddCard(num, val);
			}
			dccs.RemoveCardsThatFailFilter((Predicate<DirectorCard>)SimulacrumTrimmer);
		}

		public static bool SimulacrumTrimmer(DirectorCard card)
		{
			GameObject prefab = card.spawnCard.prefab;
			if (((Object)card.spawnCard).name.StartsWith("iscBroken") || ((Object)card.spawnCard).name.EndsWith("Drone"))
			{
				return false;
			}
			return !(Object.op_Implicit((Object)(object)prefab.GetComponent<ShrineCombatBehavior>()) | Object.op_Implicit((Object)(object)prefab.GetComponent<OutsideInteractableLocker>()) | Object.op_Implicit((Object)(object)prefab.GetComponent<ShrineBossBehavior>()) | Object.op_Implicit((Object)(object)prefab.GetComponent<SeerStationController>()) | Object.op_Implicit((Object)(object)prefab.GetComponent<PortalStatueBehavior>()));
		}
	}
	public class CrabActivateToTravel
	{
		public class CrabTravelOnCommand : MonoBehaviour
		{
			public void Activate()
			{
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Expected O, but got Unknown
				Run instance = Run.instance;
				Xoroshiro128Plus safeWardRng = ((InfiniteTowerRun)((instance is InfiniteTowerRun) ? instance : null)).safeWardRng;
				EntityStateMachine component = ((Component)this).GetComponent<EntityStateMachine>();
				component.SetNextState((EntityState)new Travelling(safeWardRng));
				PurchaseInteraction component2 = ((Component)this).gameObject.GetComponent<PurchaseInteraction>();
				component2.SetAvailable(false);
				component2.contextToken = "INFINITE_TOWER_SAFE_WARD_CONTEXT";
				Object.Destroy((Object)(object)this);
			}
		}

		public static void Make()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected O, but got Unknown
			Travelling.OnEnter += new hook_OnEnter(Travelling_OnEnter);
			if (WConfig.cfgAwaitTravel.Value)
			{
				Unburrow.OnEnter += new hook_OnEnter(Unburrow_OnEnter);
				Unburrow.FixedUpdate += new hook_FixedUpdate(Unburrow_FixedUpdate);
			}
			LanguageAPI.Add("INFINITETOWER_OBJECTIVE_AWAITING_TRAVEL", "Awaiting permission to travel.");
			LanguageAPI.Add("INFINITETOWER_TRAVEL_NOTICE", "<style=cWorldEvent>The focus awaits input to travel further.</style>");
			LanguageAPI.Add("INFINITETOWER_TRAVEL_CONTEXT", "Begin travelling");
		}

		private static void Travelling_OnEnter(orig_OnEnter orig, Travelling self)
		{
			self.animationStateName = "Swim";
			self.animationLayerName = "Base";
			orig.Invoke(self);
		}

		private static void Unburrow_OnEnter(orig_OnEnter orig, Unburrow self)
		{
			//IL_001f: 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_0034: Expected O, but got Unknown
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00a3: Expected O, but got Unknown
			((BaseSafeWardState)self).objectiveToken = "INFINITETOWER_OBJECTIVE_AWAITING_TRAVEL";
			orig.Invoke(self);
			self.duration = 0f;
			Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage
			{
				baseToken = "INFINITETOWER_TRAVEL_NOTICE"
			});
			Animator modelAnimator = ((EntityState)self).GetModelAnimator();
			modelAnimator.Play("BurrowedToIdle", 0, -0.2f);
			CrabTravelOnCommand target = ((EntityState)self).gameObject.AddComponent<CrabTravelOnCommand>();
			PurchaseInteraction component = ((EntityState)self).gameObject.GetComponent<PurchaseInteraction>();
			component.SetAvailable(true);
			component.contextToken = "INFINITETOWER_TRAVEL_CONTEXT";
			PersistentCall item = new PersistentCall
			{
				m_Target = (Object)(object)target,
				m_MethodName = "Activate",
				m_Mode = (PersistentListenerMode)1,
				m_Arguments = new ArgumentCache()
			};
			((UnityEventBase)component.onPurchase).m_PersistentCalls.m_Calls.Add(item);
			((UnityEventBase)component.onPurchase).m_CallsDirty = true;
		}

		private static void Unburrow_FixedUpdate(orig_FixedUpdate orig, Unburrow self)
		{
			((EntityState)self).fixedAge = ((EntityState)self).fixedAge + Time.fixedDeltaTime;
			if (((EntityState)self).fixedAge > 5f && ((EntityState)self).fixedAge < 6f)
			{
				Animator modelAnimator = ((EntityState)self).GetModelAnimator();
				modelAnimator.Play("BurrowedToIdle", 0, 12f);
			}
		}
	}
	public class GiantGup
	{
		public static GameObject GiantBody = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/GupBody"), "GupGiantBody", true);

		public static GameObject GiantMaster = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/GupMaster"), "GupGiantMaster", true);

		public static void Start()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Expected O, but got Unknown
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_034d: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_0372: Unknown result type (might be due to invalid IL or missing references)
			//IL_0374: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_0399: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: Unknown result type (might be due to invalid IL or missing references)
			//IL_0436: Unknown result type (might be due to invalid IL or missing references)
			//IL_0456: Unknown result type (might be due to invalid IL or missing references)
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0464: Unknown result type (might be due to invalid IL or missing references)
			//IL_0486: Unknown result type (might be due to invalid IL or missing references)
			//IL_048b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_050f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_054f: Expected O, but got Unknown
			//IL_0568: Unknown result type (might be due to invalid IL or missing references)
			//IL_056d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Unknown result type (might be due to invalid IL or missing references)
			//IL_068b: Unknown result type (might be due to invalid IL or missing references)
			//IL_068d: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a8: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveBossScav.prefab").WaitForCompletion(), "InfiniteTowerWaveBossGiantGup", true);
			GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentBossScavWaveUI.prefab").WaitForCompletion(), "InfiniteTowerCurrentBossGiantGupWaveUI", false);
			ContentAddition.AddBody(GiantBody);
			ContentAddition.AddMaster(GiantMaster);
			GiantMaster.GetComponent<CharacterMaster>().bodyPrefab = GiantBody;
			if (!WConfig.cfgNewEnemiesVisible.Value)
			{
				GiantBody.GetComponent<DeathRewards>().logUnlockableDef = null;
			}
			GiantBody.GetComponent<SetStateOnHurt>().canBeHitStunned = false;
			GiantBody.GetComponent<SetStateOnHurt>().canBeStunned = false;
			GiantBody.GetComponent<SetStateOnHurt>().canBeFrozen = false;
			CharacterBody component = GiantBody.GetComponent<CharacterBody>();
			LanguageAPI.Add("GIANTGUP_BODY_NAME", "Guap", "en");
			component.baseNameToken = "GIANTGUP_BODY_NAME";
			component.isChampion = true;
			Texture2D val3 = new Texture2D(128, 128, (TextureFormat)12, false);
			ImageConversion.LoadImage(val3, Resources.GiantGupBody, true);
			((Texture)val3).filterMode = (FilterMode)1;
			((Texture)val3).wrapMode = (TextureWrapMode)1;
			component.portraitIcon = (Texture)(object)val3;
			component.baseMaxHealth *= 1.6f;
			component.baseDamage *= 1.2f;
			component.baseAttackSpeed = 0.35f;
			component.baseMoveSpeed *= 0.65f;
			component.baseJumpPower *= 2.5f;
			component.baseArmor = 20f;
			component.PerformAutoCalculateLevelStats();
			bool flag = default(bool);
			ContentAddition.AddEntityState<PulseWaveState>(ref flag);
			SerializableEntityStateType deathState = ContentAddition.AddEntityState<GiantGupSplitDeath>(ref flag);
			GiantBody.GetComponent<CharacterDeathBehavior>().deathState = deathState;
			GameObject gameObject = ((Component)GiantBody.transform.GetChild(0).GetChild(0)).gameObject;
			gameObject.transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
			gameObject.GetComponent<ModelPanelParameters>().minDistance = 5f;
			gameObject.GetComponent<ModelPanelParameters>().maxDistance = 9f;
			CharacterModel component2 = gameObject.GetComponent<CharacterModel>();
			Material val4 = Object.Instantiate<Material>(component2.baseRendererInfos[0].defaultMaterial);
			val4.color = new Color(1.5f, 1f, 2.5f, 1f);
			component2.baseRendererInfos[0].defaultMaterial = val4;
			component2.baseRendererInfos[1].defaultMaterial = val4;
			Material val5 = Object.Instantiate<Material>(component2.baseRendererInfos[2].defaultMaterial);
			val5.color = new Color(4f, 2f, 3f, 1f);
			component2.baseRendererInfos[2].defaultMaterial = val5;
			AISkillDriver[] components = GiantMaster.GetComponents<AISkillDriver>();
			components[0].maxDistance = 75f;
			GiantMaster.AddComponent<GivePickupsOnStart>().equipmentString = "Cleanse";
			GiantMaster.GetComponent<GivePickupsOnStart>().itemInfos = (ItemInfo[])(object)new ItemInfo[5]
			{
				new ItemInfo
				{
					itemString = "AutoCastEquipment",
					count = 1
				},
				new ItemInfo
				{
					itemString = "BoostEquipmentRecharge",
					count = 5
				},
				new ItemInfo
				{
					itemString = "AdaptiveArmor",
					count = 1
				},
				new ItemInfo
				{
					itemString = "TeleportWhenOob",
					count = 1
				},
				new ItemInfo
				{
					itemString = "ShinyPearl",
					count = 0
				}
			};
			GiantMaster.GetComponent<GivePickupsOnStart>().itemDefInfos = (ItemDefInfo[])(object)new ItemDefInfo[1]
			{
				new ItemDefInfo
				{
					count = 30,
					itemDef = SimuMain.ITCooldownUp
				}
			};
			CharacterSpawnCard val6 = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscGupBody");
			CharacterSpawnCard val7 = ScriptableObject.CreateInstance<CharacterSpawnCard>();
			((Object)val7).name = "cscITGiantGup";
			val7._loadout = val6._loadout;
			((SpawnCard)val7).forbiddenFlags = ((SpawnCard)val6).forbiddenFlags;
			((SpawnCard)val7).occupyPosition = false;
			((SpawnCard)val7).prefab = GiantMaster;
			((SpawnCard)val7).sendOverNetwork = true;
			((SpawnCard)val7).hullSize = (HullClassification)2;
			((SpawnCard)val7).nodeGraphType = (GraphType)0;
			((SpawnCard)val7).requiredFlags = (NodeFlags)0;
			((SpawnCard)val7).directorCreditCost = 2000;
			((SpawnCard)val7).occupyPosition = true;
			val.GetComponent<CombatDirector>().monsterCards = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsGupFamily.asset").WaitForCompletion();
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).baseCredits = 50f;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).immediateCreditsFraction = 0f;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).linearCreditsPerWave = 3f;
			val.GetComponent<InfiniteTowerExplicitSpawnWaveController>().spawnList[0].spawnCard = val7;
			val.GetComponent<InfiniteTowerExplicitSpawnWaveController>().spawnList[0].spawnDistance = (MonsterSpawnDistance)2;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).rewardDropTable = (PickupDropTable)(object)SimuMain.dtITWaveTier2;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).rewardDisplayTier = (ItemTier)1;
			val.AddComponent<SimulacrumExtrasHelper>().newRadius = 110f;
			InfiniteTowerExplicitSpawnWaveController component3 = val.GetComponent<InfiniteTowerExplicitSpawnWaveController>();
			((InfiniteTowerWaveController)component3).secondsBeforeSuddenDeath = ((InfiniteTowerWaveController)component3).secondsBeforeSuddenDeath * 2f;
			Texture2D val8 = new Texture2D(256, 256, (TextureFormat)12, false);
			ImageConversion.LoadImage(val8, Resources.texITWaveGupIcon, true);
			((Texture)val8).filterMode = (FilterMode)1;
			Sprite sprite = Sprite.Create(val8, WRect.rec64, WRect.half);
			Color color = default(Color);
			((Color)(ref color))..ctor(1f, 0.6784f, 0.6278f, 1f);
			((Component)val2.transform.GetChild(0).GetChild(0).GetChild(0)).GetComponent<Image>().sprite = sprite;
			((Graphic)((Component)val2.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<TextMeshProUGUI>()).color = color;
			((Graphic)((Component)val2.transform.GetChild(0).GetChild(2)).GetComponent<Image>()).color = color;
			val.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab = val2;
			((Component)val2.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token = "Wave {0} - Boss Augment of the Giant";
			((Component)val2.transform.GetChild(0).GetChild(1).GetChild(1)).GetComponent<LanguageTextMeshController>().token = "Goodness Gracious.";
			WeightedWave val9 = default(WeightedWave);
			val9.wavePrefab = val;
			val9.weight = 7f;
			val9.prerequisites = (InfiniteTowerWavePrerequisites)(object)SimuMain.StartWave20Prerequisite;
			WeightedWave val10 = val9;
			SimuMain.ITBossWaves.wavePrefabs = SimuMain.ITBossWaves.wavePrefabs.Add(val10);
		}
	}
	public class GiantGupSplitDeath : GenericCharacterDeath
	{
		public static CharacterSpawnCard gupCard = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscGupBody");

		public static CharacterSpawnCard geepCard = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscGeepBody");

		public static CharacterSpawnCard gipCard = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscGipBody");

		public int gupCount = 3;

		public int geepCount = 6;

		public int gipCount = 9;

		public float deathDelay = 0.5f;

		public float moneyMultiplier = 0.5f;

		public static float spawnRadiusCoefficient = 0.5f;

		public static GameObject deathEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/GupExplosion");

		private bool hasDied;

		public TeamIndex teamIndexGup = (TeamIndex)2;

		public override void OnEnter()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Invalid comparison between Unknown and I4
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			((GenericCharacterDeath)this).OnEnter();
			if ((int)((EntityState)this).teamComponent.teamIndex != -1)
			{
				teamIndexGup = ((EntityState)this).teamComponent.teamIndex;
			}
			((EntityState)this).characterBody.inventory.RemoveItem(Items.BoostHp, ((EntityState)this).characterBody.inventory.GetItemCount(Items.BoostHp));
			((EntityState)this).characterBody.inventory.RemoveItem(Items.BoostDamage, ((EntityState)this).characterBody.inventory.GetItemCount(Items.BoostDamage));
			((EntityState)this).characterBody.inventory.RemoveItem(Items.AdaptiveArmor, ((EntityState)this).characterBody.inventory.GetItemCount(Items.AdaptiveArmor));
			((EntityState)this).characterBody.inventory.RemoveItem(Items.TeleportWhenOob, ((EntityState)this).characterBody.inventory.GetItemCount(Items.TeleportWhenOob));
		}

		public override void OnExit()
		{
			((GenericCharacterDeath)this).DestroyModel();
			((GenericCharacterDeath)this).OnExit();
		}

		public override void FixedUpdate()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Expected O, but got Unknown
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: 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_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			((GenericCharacterDeath)this).FixedUpdate();
			if (!(((EntityState)this).fixedAge > deathDelay) || hasDied)
			{
				return;
			}
			hasDied = true;
			if (!NetworkServer.active)
			{
				return;
			}
			EffectManager.SpawnEffect(deathEffectPrefab, new EffectData
			{
				origin = ((EntityState)this).characterBody.corePosition,
				scale = ((EntityState)this).characterBody.radius * 3f
			}, true);
			if ((((EntityState)this).healthComponent.killingDamageType & 0x40010000) == 0)
			{
				if (Object.op_Implicit((Object)(object)gipCard))
				{
					new BodySplitter
					{
						body = ((EntityState)this).characterBody,
						masterSummon = 
						{
							teamIndexOverride = teamIndexGup
						},
						masterSummon = 
						{
							masterPrefab = ((SpawnCard)gipCard).prefab
						},
						count = gipCount,
						splinterInitialVelocityLocal = new Vector3(0f, 30f, 25f),
						minSpawnCircleRadius = ((EntityState)this).characterBody.radius * spawnRadiusCoefficient * 1.2f,
						moneyMultiplier = moneyMultiplier
					}.Perform();
				}
				if (Object.op_Implicit((Object)(object)geepCard))
				{
					new BodySplitter
					{
						body = ((EntityState)this).characterBody,
						masterSummon = 
						{
							teamIndexOverride = teamIndexGup
						},
						masterSummon = 
						{
							masterPrefab = ((SpawnCard)geepCard).prefab
						},
						count = geepCount,
						splinterInitialVelocityLocal = new Vector3(0f, 25f, 20f),
						minSpawnCircleRadius = ((EntityState)this).characterBody.radius * spawnRadiusCoefficient * 1.1f,
						moneyMultiplier = moneyMultiplier
					}.Perform();
				}
				if (Object.op_Implicit((Object)(object)gupCard))
				{
					new BodySplitter
					{
						body = ((EntityState)this).characterBody,
						masterSummon = 
						{
							teamIndexOverride = teamIndexGup
						},
						masterSummon = 
						{
							masterPrefab = ((SpawnCard)gupCard).prefab
						},
						count = gupCount,
						splinterInitialVelocityLocal = new Vector3(0f, 20f, 15f),
						minSpawnCircleRadius = ((EntityState)this).characterBody.radius * spawnRadiusCoefficient,
						moneyMultiplier = moneyMultiplier
					}.Perform();
				}
				PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(Items.ShinyPearl.itemIndex), ((EntityState)this).characterBody.corePosition, Vector3.up * 20f);
			}
			((GenericCharacterDeath)this).DestroyBodyAsapServer();
		}
	}
	public class SuperMegaCrab
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_OnEnter <>9__3_0;

			internal void <Start>b__3_0(orig_OnEnter orig, FireCrabCannonBase self)
			{
				if (((Object)((EntityState)self).characterBody).name.StartsWith("VoidSuper"))
				{
					self.projectileCount += (int)((float)self.projectileCount * 1.2f) + 1;
				}
				orig.Invoke(self);
			}
		}

		public static GameObject SuperCrabBody = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/VoidMegaCrabBody"), "VoidSuperMegaCrabBody", true);

		public static GameObject SuperCrabMaster = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/VoidMegaCrabMaster"), "VoidSuperMegaCrabMaster", true);

		public static FamilyDirectorCardCategorySelection dccsVoidFamilyNoBarnacle = Object.Instantiate<FamilyDirectorCardCategorySelection>(Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/DLC1/Common/dccsVoidFamily.asset").WaitForCompletion());

		public static void Start()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: 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_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: 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_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: 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_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_035b: Unknown result type (might be due to invalid IL or missing references)
			//IL_035d: 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_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: 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_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Unknown result type (might be due to invalid IL or missing references)
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0461: Unknown result type (might be due to invalid IL or missing references)
			//IL_0499: Unknown result type (might be due to invalid IL or missing references)
			//IL_049e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04be: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_059c: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_060d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0614: Expected O, but got Unknown
			//IL_062d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0632: Unknown result type (might be due to invalid IL or missing references)
			//IL_069b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_072a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0750: Unknown result type (might be due to invalid IL or missing references)
			//IL_0752: Unknown result type (might be due to invalid IL or missing references)
			//IL_076b: Unknown result type (might be due to invalid IL or missing references)
			//IL_076d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Expected O, but got Unknown
			GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveBossScav.prefab").WaitForCompletion(), "InfiniteTowerWaveBossSuperVoidMegaCrab", true);
			GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentBossScavWaveUI.prefab").WaitForCompletion(), "InfiniteTowerWaveBossSuperVoidMegaCrabUI", false);
			ContentAddition.AddBody(SuperCrabBody);
			ContentAddition.AddMaster(SuperCrabMaster);
			SuperCrabMaster.GetComponent<CharacterMaster>().bodyPrefab = SuperCrabBody;
			if (!WConfig.cfgNewEnemiesVisible.Value)
			{
				SuperCrabBody.GetComponent<DeathRewards>().logUnlockableDef = null;
			}
			CharacterBody component = SuperCrabBody.GetComponent<CharacterBody>();
			component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x800);
			LanguageAPI.Add("SUPERMEGACRAB_BODY_NAME", "Deepend Void Devastator", "en");
			component.baseNameToken = "SUPERMEGACRAB_BODY_NAME";
			Texture portraitIcon = Addressables.LoadAssetAsync<Texture>((object)"RoR2/DLC1/VoidSuperMegaCrabBody.png").WaitForCompletion();
			component.portraitIcon = portraitIcon;
			component.baseMaxHealth = 1880f;
			component.baseDamage *= 0.2f;
			component.baseMoveSpeed *= 0.75f;
			component.baseAttackSpeed *= 0.75f;
			component.baseJumpPower *= 1.5f;
			component.PerformAutoCalculateLevelStats();
			object obj = <>c.<>9__3_0;
			if (obj == null)
			{
				hook_OnEnter val3 = delegate(orig_OnEnter orig, FireCrabCannonBase self)
				{
					if (((Object)((EntityState)self).characterBody).name.StartsWith("VoidSuper"))
					{
						self.projectileCount += (int)((float)self.projectileCount * 1.2f) + 1;
					}
					orig.Invoke(self);
				};
				<>c.<>9__3_0 = val3;
				obj = (object)val3;
			}
			FireCrabCannonBase.OnEnter += (hook_OnEnter)obj;
			Material defaultMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/matVoidSuperMegaCrabMetal.mat").WaitForCompletion();
			Material defaultMaterial2 = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/matVoidSuperMegaCrabShell.mat").WaitForCompletion();
			GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/mdlVoidSuperMegaCrab.fbx").WaitForCompletion();
			GameObject gameObject = ((Component)SuperCrabBody.transform.GetChild(0).GetChild(3)).gameObject;
			gameObject.transform.localScale = new Vector3(1.25f, 1.25f, 1.25f);
			((Component)gameObject.transform.GetChild(1)).GetComponent<SkinnedMeshRenderer>().sharedMesh = ((Component)val4.transform.GetChild(0)).GetComponent<SkinnedMeshRenderer>().sharedMesh;
			((Component)gameObject.transform.GetChild(2)).GetComponent<SkinnedMeshRenderer>().sharedMesh = ((Component)val4.transform.GetChild(1)).GetComponent<SkinnedMeshRenderer>().sharedMesh;
			gameObject.GetComponent<ModelPanelParameters>().minDistance = 18f;
			gameObject.GetComponent<ModelPanelParameters>().maxDistance = 30f;
			CharacterModel component2 = gameObject.GetComponent<CharacterModel>();
			component2.baseRendererInfos[2].defaultMaterial = defaultMaterial2;
			component2.baseRendererInfos[3].defaultMaterial = defaultMaterial;
			component2.baseRendererInfos[2].renderer = (Renderer)(object)((Component)gameObject.transform.GetChild(1)).GetComponent<SkinnedMeshRenderer>();
			component2.baseRendererInfos[3].renderer = (Renderer)(object)((Component)gameObject.transform.GetChild(2)).GetComponent<SkinnedMeshRenderer>();
			Transform child = val4.transform.GetChild(2).GetChild(0);
			Transform child2 = gameObject.transform.GetChild(0).GetChild(0);
			SuperCrabMaster.AddComponent<GivePickupsOnStart>().itemInfos = (ItemInfo[])(object)new ItemInfo[9]
			{
				new ItemInfo
				{
					itemString = "AdaptiveArmor",
					count = 1
				},
				new ItemInfo
				{
					itemString = "TeleportWhenOob",
					count = 1
				},
				new ItemInfo
				{
					itemString = "ShieldOnly",
					count = 1
				},
				new ItemInfo
				{
					itemString = "CritGlassesVoid",
					count = 10
				},
				new ItemInfo
				{
					itemString = "BearVoid",
					count = 1
				},
				new ItemInfo
				{
					itemString = "MissileVoid",
					count = 1
				},
				new ItemInfo
				{
					itemString = "ElementalRingVoid",
					count = 1
				},
				new ItemInfo
				{
					itemString = "EquipmentMagazineVoid",
					count = 1
				},
				new ItemInfo
				{
					itemString = "VoidMegaCrabItem",
					count = 3
				}
			};
			CharacterSpawnCard val5 = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscVoidMegaCrab");
			CharacterSpawnCard val6 = ScriptableObject.CreateInstance<CharacterSpawnCard>();
			((Object)val6).name = "cscITVoidMegaCrabSuper";
			val6._loadout = val5._loadout;
			((SpawnCard)val6).forbiddenFlags = ((SpawnCard)val5).forbiddenFlags;
			((SpawnCard)val6).occupyPosition = false;
			((SpawnCard)val6).prefab = SuperCrabMaster;
			((SpawnCard)val6).sendOverNetwork = true;
			((SpawnCard)val6).hullSize = (HullClassification)2;
			((SpawnCard)val6).nodeGraphType = (GraphType)0;
			((SpawnCard)val6).requiredFlags = (NodeFlags)0;
			((SpawnCard)val6).directorCreditCost = 6000;
			((SpawnCard)val6).occupyPosition = true;
			((DirectorCardCategorySelection)dccsVoidFamilyNoBarnacle).categories[2].cards = ((DirectorCardCategorySelection)dccsVoidFamilyNoBarnacle).categories[2].cards.Remove(((DirectorCardCategorySelection)dccsVoidFamilyNoBarnacle).categories[2].cards[1]);
			((Object)dccsVoidFamilyNoBarnacle).name = "dccsVoidFamilyNoBarnacle";
			val.GetComponent<CombatDirector>().monsterCards = (DirectorCardCategorySelection)(object)dccsVoidFamilyNoBarnacle;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).baseCredits = 0f;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).linearCreditsPerWave = 0f;
			val.GetComponent<InfiniteTowerExplicitSpawnWaveController>().spawnList[0].spawnCard = val6;
			val.GetComponent<InfiniteTowerExplicitSpawnWaveController>().spawnList[0].spawnDistance = (MonsterSpawnDistance)2;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).rewardDropTable = (PickupDropTable)(object)SimuMain.dtITWaveTier3;
			((InfiniteTowerWaveController)val.GetComponent<InfiniteTowerExplicitSpawnWaveController>()).rewardDisplayTier = (ItemTier)2;
			val.AddComponent<SimulacrumExtrasHelper>().rewardDropTable = (PickupDropTable)(object)SimuMain.dtITVoid;
			val.GetComponent<SimulacrumExtrasHelper>().rewardDisplayTier = (ItemTier)7;
			val.GetComponent<SimulacrumExtrasHelper>().newRadius = 110f;
			InfiniteTowerExplicitSpawnWaveController component3 = val.GetComponent<InfiniteTowerExplicitSpawnWaveController>();
			((InfiniteTowerWaveController)component3).secondsBeforeSuddenDeath = ((InfiniteTowerWaveController)component3).secondsBeforeSuddenDeath * 2f;
			Texture2D val7 = new Texture2D(256, 256, (TextureFormat)12, false);
			ImageConversion.LoadImage(val7, Resources.texITWaveSuperDevestator, true);
			((Texture)val7).filterMode = (FilterMode)1;
			Sprite sprite = Sprite.Create(val7, WRect.rec64, WRect.half);
			Color color = default(Color);
			((Color)(ref color))..ctor(0.7f, 0.6278f, 1f, 1f);
			((Component)val2.transform.GetChild(0).GetChild(0).GetChild(0)).GetComponent<Image>().sprite = sprite;
			((Graphic)((Component)val2.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<TextMeshProUGUI>()).color = color;
			((Graphic)((Component)val2.transform.GetChild(0).GetChild(2)).GetComponent<Image>()).color = color;
			val.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab = val2;
			((Component)val2.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token = "Wave {0} - Boss Augment of the Devastator";
			((Component)val2.transform.GetChild(0).GetChild(1).GetChild(1)).GetComponent<LanguageTextMeshController>().token = "Face the deepened Void Devastator.";
			WeightedWave val8 = default(WeightedWave);
			val8.wavePrefab = val;
			val8.weight = 4f;
			val8.prerequisites = (InfiniteTowerWavePrerequisites)(object)SimuMain.StartWave35Prerequisite;
			WeightedWave val9 = val8;
			SimuMain.ITBossWaves.wavePrefabs = SimuMain.ITBossWaves.wavePrefabs.Add(val9);
			SimuMain.ITSuperBossWaves.wavePrefabs = SimuMain.ITSuperBossWaves.wavePrefabs.Add(val9);
		}
	}
	public class SimulacrumDCCS
	{
		public static DirectorCardCategorySelection dccsInfiniteTowerInteractables = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/dccsInfiniteTowerInteractables.asset").WaitForCompletion();

		public static DirectorCardCategorySelection dccsITGolemPlainsInteractablesW = null;

		public static DirectorCardCategorySelection dccsITGooLakeInteractablesW = null;

		public static DirectorCardCategorySelection dccsITAncientLoftInteractablesW = null;

		public static DirectorCardCategorySelection dccsITFrozenWallInteractablesW = null;

		public static DirectorCardCategorySelection dccsITDampCaveInteractablesW = null;

		public static DirectorCardCategorySelection dccsITSkyMeadowInteractablesW = null;

		public static DirectorCardCategorySelection dccsITMoonInteractablesW = null;

		public static InteractableSpawnCard SafteyBarrel;

		public static void Start()
		{
			SimusDCCS();
			Enemies();
		}

		public static void CreditsRebalance(orig_OnPrePopulateSceneServer orig, InfiniteTowerRun self, SceneDirector sceneDirector)
		{
			orig.Invoke(self, sceneDirector);
			int num = Run.instance.participatingPlayerCount - 1;
			sceneDirector.interactableCredit += num * 150;
			if (self.waveIndex < 40)
			{
				sceneDirector.interactableCredit += 30;
			}
			else if (self.waveIndex >= 60)
			{
				sceneDirector.interactableCredit = (int)((float)sceneDirector.interactableCredit * 0.55f);
			}
			else if (self.waveIndex >= 40)
			{
				sceneDirector.interactableCredit = (int)((float)sceneDirector.interactableCredit * 0.75f);
			}
			if (RunArtifactManager.instance.IsArtifactEnabled(ArtifactReal.ArtifactUseNormalStages))
			{
				sceneDirector.interactableCredit += 100;
			}
			Debug.Log((object)("InfiniteTower " + sceneDirector.interactableCredit + " interactable credits. "));
		}

		public static void MakeITSand(bool makeITSand)
		{
			//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_001a: 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_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			Material val = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/ShrineChance/matShrineChanceSandy.mat").WaitForCompletion();
			Material val2 = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/ShrineBlood/matShrineBloodSandy.mat").WaitForCompletion();
			Material val3 = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/ShrineCleanse/matShrineCleanseSandy.mat").WaitForCompletion();
			GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineHealing/ShrineHealing.prefab").WaitForCompletion();
			if (makeITSand)
			{
				Texture2D val5 = Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/DLC1/itgoolake/texSand1SimpleInfiniteTower.png").WaitForCompletion();
				val.SetTexture("_GreenChannelTex", (Texture)(object)val5);
				val2.SetTexture("_GreenChannelTex", (Texture)(object)val5);
				val3.SetTexture("_GreenChannelTex", (Texture)(object)val5);
				((Component)val4.transform.GetChild(0).GetChild(0).GetChild(0)).gameObject.SetActive(false);
				((Component)val4.transform.GetChild(0).GetChild(0).GetChild(2)).gameObject.SetActive(false);
			}
			else
			{
				Texture2D val6 = Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/goolake/texSand1Simple.png").WaitForCompletion();
				val.SetTexture("_GreenChannelTex", (Texture)(object)val6);
				val2.SetTexture("_GreenChannelTex", (Texture)(object)val6);
				val3.SetTexture("_GreenChannelTex", (Texture)(object)val6);
				((Component)val4.transform.GetChild(0).GetChild(0).GetChild(0)).gameObject.SetActive(false);
				((Component)val4.transform.GetChild(0).GetChild(0).GetChild(2)).gameObject.SetActive(false);
			}
		}

		public static void SimusDCCS()
		{
			//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_001a: 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_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Expected O, but got Unknown
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Expected O, but got Unknown
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Expected O, but got Unknown
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Expected O, but got Unknown
			//IL_0645: Unknown result type (might be due to invalid IL or missing references)
			//IL_064a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Unknown result type (might be due to invalid IL or missing references)
			//IL_0655: Unknown result type (might be due to invalid IL or missing references)
			//IL_0663: Unknown result type (might be due to invalid IL or missing references)
			//IL_066d: Expected O, but got Unknown
			//IL_066d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0672: Unknown result type (might be due to invalid IL or missing references)
			//IL_0678: Unknown result type (might be due to invalid IL or missing references)
			//IL_067d: Unknown result type (might be due to invalid IL or missing references)
			//IL_068b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0695: Expected O, but got Unknown
			//IL_0695: Unknown result type (might be due to invalid IL or missing references)
			//IL_069a: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bd: Expected O, but got Unknown
			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06db: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e5: Expected O, but got Unknown
			//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0703: Unknown result type (might be due to invalid IL or missing references)
			//IL_070d: Expected O, but got Unknown
			//IL_070d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0712: Unknown result type (might be due to invalid IL or missing references)
			//IL_0718: Unknown result type (might be due to invalid IL or missing references)
			//IL_071d: Unknown result type (might be due to invalid IL or missing references)
			//IL_072b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0735: Expected O, but got Unknown
			//IL_0735: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0740: Unknown result type (might be due to invalid IL or missing references)
			//IL_0745: Unknown result type (might be due to invalid IL or missing references)
			//IL_0753: Unknown result type (might be due to invalid IL or missing references)
			//IL_075d: Expected O, but got Unknown
			//IL_075d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0762: Unknown result type (might be due to invalid IL or missing references)
			//IL_0768: Unknown result type (might be due to invalid IL or missing references)
			//IL_076d: Unknown result type (might be due to invalid IL or missing references)
			//IL_077b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0785: Expected O, but got Unknown
			//IL_0785: Unknown result type (might be due to invalid IL or missing references)
			//IL_078a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0790: Unknown result type (might be due to invalid IL or missing references)
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ac: Expected O, but got Unknown
			//IL_07ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d3: Expected O, but got Unknown
			//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07de: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fa: Expected O, but got Unknown
			//IL_07fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0805: Unknown result type (might be due to invalid IL or missing references)
			//IL_080a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0818: Unknown result type (might be due to invalid IL or missing references)
			//IL_0821: Expected O, but got Unknown
			//IL_0821: Unknown result type (might be due to invalid IL or missing references)
			//IL_0826: Unknown result type (might be due to invalid IL or missing references)
			//IL_082c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0831: Unknown result type (might be due to invalid IL or missing references)
			//IL_083f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0848: Expected O, but got Unknown
			//IL_0848: Unknown result type (might be due to invalid IL or missing references)
			//IL_084d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0853: Unknown result type (might be due to invalid IL or missing references)
			//IL_0858: Unknown result type (might be due to invalid IL or missing references)
			//IL_0866: Unknown result type (might be due to invalid IL or missing references)
			//IL_086f: Expected O, but got Unknown
			//IL_086f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0874: Unknown result type (might be due to invalid IL or missing references)
			//IL_087b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0885: Expected O, but got Unknown
			//IL_0885: Unknown result type (might be due to invalid IL or missing references)
			//IL_088a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0891: Unknown result type (might be due to invalid IL or missing references)
			//IL_089b: Expected O, but got Unknown
			//IL_089b: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b1: Expected O, but got Unknown
			//IL_08b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d8: Expected O, but got Unknown
			//IL_08d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ff: Expected O, but got Unknown
			//IL_09bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aad: Unknown result type (might be due to invalid IL or missing references)
			Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/DLC1/itgoolake/texSand1SimpleInfiniteTower.png").WaitForCompletion();
			Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/goolake/texSand1Simple.png").WaitForCompletion();
			InteractableSpawnCard val = ScriptableObject.CreateInstance<InteractableSpawnCard>();
			((Object)val).name = "iscSoupWhiteGreen";
			((SpawnCard)val).prefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/LunarCauldron, WhiteToGreen");
			((SpawnCard)val).sendOverNetwork = true;
			((SpawnCard)val).hullSize = (HullClassification)1;
			((SpawnCard)val).nodeGraphType = (GraphType)0;
			((SpawnCard)val).requiredFlags = (NodeFlags)0;
			((SpawnCard)val).forbiddenFlags = (NodeFlags)8;
			((SpawnCard)val).directorCreditCost = 1;
			((SpawnCard)val).occupyPosition = true;
			((SpawnCard)val).eliteRules = (EliteRules)0;
			val.orientToFloor = true;
			val.slightlyRandomizeOrientation = false;
			val.skipSpawnWhenSacrificeArtifactEnabled = false;
			InteractableSpawnCard val2 = ScriptableObject.CreateInstance<InteractableSpawnCard>();
			((Object)val2).name = "iscSoupGreenRed";
			((SpawnCard)val2).prefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/LunarCauldron, GreenToRed Variant");
			((SpawnCard)val2).sendOverNetwork = true;
			((SpawnCard)val2).hullSize = (HullClassification)1;
			((SpawnCard)val2).nodeGraphType = (GraphType)0;
			((SpawnCard)val2).requiredFlags = (NodeFlags)0;
			((SpawnCard)val2).forbiddenFlags = (NodeFlags)8;
			((SpawnCard)val2).directorCreditCost = 1;
			((SpawnCard)val2).occupyPosition = true;
			((SpawnCard)val2).eliteRules = (EliteRules)0;
			val2.orientToFloor = true;
			val2.slightlyRandomizeOrientation = false;
			val2.skipSpawnWhenSacrificeArtifactEnabled = false;
			InteractableSpawnCard val3 = ScriptableObject.CreateInstance<InteractableSpawnCard>();
			((Object)val3).name = "iscSoupRedWhite";
			((SpawnCard)val3).prefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/LunarCauldron, RedToWhite Variant");
			((SpawnCard)val3).sendOverNetwork = true;
			((SpawnCard)val3).hullSize = (HullClassification)1;
			((SpawnCard)val3).nodeGraphType = (GraphType)0;
			((SpawnCard)val3).requiredFlags = (NodeFlags)0;
			((SpawnCard)val3).forbiddenFlags = (NodeFlags)8;
			((SpawnCard)val3).directorCreditCost = 1;
			((SpawnCard)val3).occupyPosition = true;
			((SpawnCard)val3).eliteRules = (EliteRules)0;
			val3.orientToFloor = true;
			val3.slightlyRandomizeOrientation = false;
			val3.skipSpawnWhenSacrificeArtifactEnabled = false;
			InteractableSpawnCard val4 = Object.Instantiate<InteractableSpawnCard>(Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/DLC1/VoidCoinBarrel/iscVoidCoinBarrel.asset").WaitForCompletion());
			((SpawnCard)val4).directorCreditCost = 1;
			((Object)val4).name = "iscVoidCoinBarrelIT";
			val4.skipSpawnWhenSacrificeArtifactEnabled = true;
			SafteyBarrel = Object.Instantiate<InteractableSpawnCard>(val4);
			((SpawnCard)SafteyBarrel).directorCreditCost = 1;
			((Object)SafteyBarrel).name = "iscVoidCoinBarrelITSacrifice";
			SafteyBarrel.skipSpawnWhenSacrificeArtifactEnabled = false;
			SafteyBarrel.weightScalarWhenSacrificeArtifactEnabled = 0.5f;
			InteractableSpawnCard val5 = Object.Instantiate<InteractableSpawnCard>(Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/Base/GoldChest/iscGoldChest.asset").WaitForCompletion());
			val5.maxSpawnsPerStage = 1;
			((Object)val5).name = "iscGoldChestIT";
			DirectorCard val6 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/VoidTriple/iscVoidTriple.asset").WaitForCompletion(),
				selectionWeight = 3
			};
			DirectorCard val7 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/VoidChest/iscVoidChestSacrificeOn.asset").WaitForCompletion(),
				selectionWeight = 1
			};
			DirectorCard val8 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val4,
				selectionWeight = 110
			};
			DirectorCard val9 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)SafteyBarrel,
				selectionWeight = 1
			};
			if (WConfig.cfgVoidCoins.Value)
			{
				val8.selectionWeight = 10;
			}
			DirectorCard obj = dccsInfiniteTowerInteractables.categories[0].cards[2];
			obj.selectionWeight -= 5;
			DirectorCard obj2 = dccsInfiniteTowerInteractables.categories[0].cards[3];
			obj2.selectionWeight -= 10;
			DirectorCard obj3 = dccsInfiniteTowerInteractables.categories[0].cards[4];
			obj3.selectionWeight += 5;
			DirectorCard obj4 = dccsInfiniteTowerInteractables.categories[0].cards[9];
			obj4.selectionWeight -= 10;
			dccsInfiniteTowerInteractables.categories[0].cards = dccsInfiniteTowerInteractables.categories[0].cards.Remove(dccsInfiniteTowerInteractables.categories[0].cards[8], dccsInfiniteTowerInteractables.categories[0].cards[7], dccsInfiniteTowerInteractables.categories[0].cards[6], dccsInfiniteTowerInteractables.categories[0].cards[5]);
			dccsInfiniteTowerInteractables.AddCard(0, val8);
			dccsInfiniteTowerInteractables.categories[1].selectionWeight = 2f;
			dccsInfiniteTowerInteractables.categories[2].selectionWeight = 0.5f;
			dccsInfiniteTowerInteractables.categories[2].cards[0].minimumStageCompletions = 1;
			dccsInfiniteTowerInteractables.categories[2].cards[1].minimumStageCompletions = 1;
			dccsInfiniteTowerInteractables.AddCard(2, val9);
			dccsInfiniteTowerInteractables.AddCard(2, val7);
			dccsInfiniteTowerInteractables.categories[3].cards[1].selectionWeight = 8;
			dccsInfiniteTowerInteractables.categories[3].cards[2].selectionWeight = 2;
			dccsInfiniteTowerInteractables.categories[3].cards[3].selectionWeight = 3;
			dccsInfiniteTowerInteractables.categories[3].cards[2].minimumStageCompletions = 1;
			dccsInfiniteTowerInteractables.categories[3].cards[3].minimumStageCompletions = 1;
			dccsInfiniteTowerInteractables.categories[3].cards[4].selectionWeight = 16;
			dccsInfiniteTowerInteractables.categories[4].selectionWeight = 7f;
			dccsInfiniteTowerInteractables.categories[4].cards[0].selectionWeight = 3;
			dccsInfiniteTowerInteractables.AddCard(4, val6);
			dccsITGolemPlainsInteractablesW = Object.Instantiate<DirectorCardCategorySelection>(dccsInfiniteTowerInteractables);
			dccsITGooLakeInteractablesW = Object.Instantiate<DirectorCardCategorySelection>(dccsInfiniteTowerInteractables);
			dccsITAncientLoftInteractablesW = Object.Instantiate<DirectorCardCategorySelection>(dccsInfiniteTowerInteractables);
			dccsITFrozenWallInteractablesW = Object.Instantiate<DirectorCardCategorySelection>(dccsInfiniteTowerInteractables);
			dccsITDampCaveInteractablesW = Object.Instantiate<DirectorCardCategorySelection>(dccsInfiniteTowerInteractables);
			dccsITSkyMeadowInteractablesW = Object.Instantiate<DirectorCardCategorySelection>(dccsInfiniteTowerInteractables);
			dccsITMoonInteractablesW = Object.Instantiate<DirectorCardCategorySelection>(dccsInfiniteTowerInteractables);
			((Object)dccsITGolemPlainsInteractablesW).name = "dccsITGolemPlainsInteractablesW";
			((Object)dccsITGooLakeInteractablesW).name = "dccsITGooLakeInteractablesW";
			((Object)dccsITAncientLoftInteractablesW).name = "dccsITAncientLoftInteractablesW";
			((Object)dccsITFrozenWallInteractablesW).name = "dccsITFrozenWallInteractablesW";
			((Object)dccsITDampCaveInteractablesW).name = "dccsITDampCaveInteractablesW";
			((Object)dccsITSkyMeadowInteractablesW).name = "dccsITSkyMeadowInteractablesW";
			((Object)dccsITMoonInteractablesW).name = "dccsITMoonInteractablesW";
			DirectorCard val10 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/CategoryChest/iscCategoryChestDamage.asset").WaitForCompletion(),
				selectionWeight = 60
			};
			DirectorCard val11 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/CategoryChest/iscCategoryChestHealing.asset").WaitForCompletion(),
				selectionWeight = 60
			};
			DirectorCard val12 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/CategoryChest/iscCategoryChestUtility.asset").WaitForCompletion(),
				selectionWeight = 60
			};
			DirectorCard val13 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/CategoryChest2/iscCategoryChest2Damage.asset").WaitForCompletion(),
				selectionWeight = 9
			};
			DirectorCard val14 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/CategoryChest2/iscCategoryChest2Healing.asset").WaitForCompletion(),
				selectionWeight = 9
			};
			DirectorCard val15 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/CategoryChest2/iscCategoryChest2Utility.asset").WaitForCompletion(),
				selectionWeight = 9
			};
			DirectorCard val16 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/TripleShopLarge/iscTripleShopLarge.asset").WaitForCompletion(),
				selectionWeight = 25
			};
			DirectorCard val17 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/CasinoChest/iscCasinoChest.asset").WaitForCompletion(),
				selectionWeight = 20
			};
			DirectorCard val18 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineChance/iscShrineChance.asset").WaitForCompletion(),
				selectionWeight = 3
			};
			DirectorCard val19 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineChance/iscShrineChanceSandy.asset").WaitForCompletion(),
				selectionWeight = 3
			};
			DirectorCard val20 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineChance/iscShrineChanceSnowy.asset").WaitForCompletion(),
				selectionWeight = 3
			};
			DirectorCard val21 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineCleanse/iscShrineCleanse.asset").WaitForCompletion(),
				selectionWeight = 3
			};
			DirectorCard val22 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineHealing/iscShrineHealing.asset").WaitForCompletion(),
				selectionWeight = 3
			};
			DirectorCard val23 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineRestack/iscShrineRestack.asset").WaitForCompletion(),
				selectionWeight = 2
			};
			DirectorCard val24 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val,
				selectionWeight = 20
			};
			DirectorCard val25 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val2,
				selectionWeight = 15
			};
			DirectorCard val26 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)val3,
				selectionWeight = 10
			};
			DirectorCard val27 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineCleanse/iscShrineCleanseSandy.asset").WaitForCompletion(),
				selectionWeight = 2
			};
			DirectorCard val28 = new DirectorCard
			{
				spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineRestack/iscShrineRestackSnowy.asset").WaitForCompletion(),
				selectionWeight = 2
			};
			dccsITGolemPlainsInteractablesW.AddCard(0, val11);
			dccsITGolemPlainsInteractablesW.AddCard(0, val14);
			dccsITGolemPlainsInteractablesW.categories[1].selectionWeight = 5f;
			dccsITGolemPlainsInteractablesW.categories[1].cards[0] = val18;
			dccsITGolemPlainsInteractablesW.AddCard(1, val22);
			dccsITGooLakeInteractablesW.AddCard(0, val10);
			dccsITGooLakeInteractablesW.AddCard(0, val13);
			dccsITGooLakeInteractablesW.AddCard(0, val16);
			dccsITGooLakeInteractablesW.categories[1].selectionWeight = 5f;
			dccsITGooLakeInteractablesW.categories[1].cards[0].spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineBlood/iscShrineBloodSandy.asset").WaitForCompletion();
			dccsITGooLakeInteractablesW.AddCard(1, val19);
			dccsITGooLakeInteractablesW.AddCard(1, val27);
			dccsITAncientLoftInteractablesW.AddCard(0, val12);
			dccsITAncientLoftInteractablesW.AddCard(0, val15);
			dccsITAncientLoftInteractablesW.categories[1].selectionWeight = 6.5f;
			dccsITAncientLoftInteractablesW.categories[1].cards[0] = val21;
			dccsITAncientLoftInteractablesW.AddCard(1, val22);
			dccsITFrozenWallInteractablesW.AddCard(0, val12);
			dccsITFrozenWallInteractablesW.AddCard(0, val15);
			dccsITFrozenWallInteractablesW.AddCard(0, val17);
			dccsITFrozenWallInteractablesW.categories[1].selectionWeight = 5f;
			dccsITFrozenWallInteractablesW.categories[1].cards[0].spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/ShrineBlood/iscShrineBloodSnowy.asset").WaitForCompletion();
			dccsITFrozenWallInteractablesW.AddCard(1, val20);
			dccsITFrozenWallInteractablesW.AddCard(1, val28);
			dccsITDampCaveInteractablesW.AddCard(0, val10);
			dccsITDampCaveInteractablesW.AddCard(0, val13);
			dccsITDampCaveInteractablesW.AddCard(0, val16);
			dccsITDampCaveInteractablesW.AddCard(0, val17);
			dccsITDampCaveInteractablesW.categories[1].selectionWeight = 5f;
			dccsITDampCaveInteractablesW.AddCard(1, val22);
			dccsITSkyMeadowInteractablesW.AddCard(0, val11);
			dccsITSkyMeadowInteractablesW.AddCard(0, val14);
			dccsITSkyMeadowInteractablesW.AddCard(0, val16);
			dccsITSkyMeadowInteractablesW.categories[1].selectionWeight = 5f;
			dccsITSkyMeadowInteractablesW.AddCard(1, val18);
			dccsITMoonInteractablesW.AddCard(0, val16);
			dccsITMoonInteractablesW.categories[0].cards[4]