Decompiled source of VanillaArtifactsPlus v2.5.2

FixedspawnDissonance.dll

Decompiled 4 months ago
using System;
using System.CodeDom.Compiler;
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 BepInEx;
using BepInEx.Configuration;
using EntityStates.Gup;
using FixedspawnDissonance.Properties;
using HG;
using IL.RoR2.Artifacts;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.Gup;
using On.RoR2;
using On.RoR2.Artifacts;
using On.RoR2.Items;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Artifacts;
using RoR2.CharacterAI;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
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("FixedspawnDissonance")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FixedspawnDissonance")]
[assembly: AssemblyTitle("FixedspawnDissonance")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace FixedspawnDissonance
{
	public static class Util
	{
		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 Command
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_SetOptionsFromPickupForCommandArtifact <>9__1_0;

			internal void <Start>b__1_0(orig_SetOptionsFromPickupForCommandArtifact orig, PickupPickerController self, PickupIndex pickupIndex)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Invalid comparison between Unknown and I4
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Invalid comparison between Unknown and I4
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Invalid comparison between Unknown and I4
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_004f: Invalid comparison between Unknown and I4
				//IL_0058: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Invalid comparison between Unknown and I4
				orig.Invoke(self, pickupIndex);
				if ((int)((PickupIndex)(ref pickupIndex)).pickupDef.itemIndex != -1 && ((int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 6 || (int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 7 || (int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 8 || (int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 9))
				{
					((Component)self).gameObject.GetComponent<GenericDisplayNameProvider>().displayToken = "Pink Command Essence";
					GameObject val = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/GenericPickup").GetComponent<GenericPickupController>().pickupDisplay.voidParticleEffect, ((Component)self).transform.GetChild(0));
					val.SetActive(true);
				}
			}
		}

		public static Option[] EliteEquipmentChoicesForCommand = (Option[])(object)new Option[0];

		public static void Start()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			CommandArtifactManager.OnDropletHitGroundServer += new hook_OnDropletHitGroundServer(CommandArtifactManager_OnDropletHitGroundServer);
			PickupPickerController.GetOptionsFromPickupIndex += new hook_GetOptionsFromPickupIndex(CommandGiveAffixChoices);
			object obj = <>c.<>9__1_0;
			if (obj == null)
			{
				hook_SetOptionsFromPickupForCommandArtifact val = delegate(orig_SetOptionsFromPickupForCommandArtifact orig, PickupPickerController self, PickupIndex pickupIndex)
				{
					//IL_0003: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0017: Invalid comparison between Unknown and I4
					//IL_002b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0031: Invalid comparison between Unknown and I4
					//IL_003a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0040: Invalid comparison between Unknown and I4
					//IL_0049: Unknown result type (might be due to invalid IL or missing references)
					//IL_004f: Invalid comparison between Unknown and I4
					//IL_0058: Unknown result type (might be due to invalid IL or missing references)
					//IL_005f: Invalid comparison between Unknown and I4
					orig.Invoke(self, pickupIndex);
					if ((int)((PickupIndex)(ref pickupIndex)).pickupDef.itemIndex != -1 && ((int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 6 || (int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 7 || (int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 8 || (int)((PickupIndex)(ref pickupIndex)).pickupDef.itemTier == 9))
					{
						((Component)self).gameObject.GetComponent<GenericDisplayNameProvider>().displayToken = "Pink Command Essence";
						GameObject val2 = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/GenericPickup").GetComponent<GenericPickupController>().pickupDisplay.voidParticleEffect, ((Component)self).transform.GetChild(0));
						val2.SetActive(true);
					}
				};
				<>c.<>9__1_0 = val;
				obj = (object)val;
			}
			PickupPickerController.SetOptionsFromPickupForCommandArtifact += (hook_SetOptionsFromPickupForCommandArtifact)obj;
		}

		public static void MakeEliteLists()
		{
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < EliteCatalog.eliteDefs.Length; i++)
			{
				EliteDef val = EliteCatalog.eliteDefs[i];
				EquipmentDef eliteEquipmentDef = val.eliteEquipmentDef;
				if (!((Object)(object)eliteEquipmentDef != (Object)null) || ((Object)val).name.EndsWith("Eulogy") || ((Object)eliteEquipmentDef).name.Contains("Gold") || ((Object)eliteEquipmentDef).name.Contains("Echo") || ((Object)eliteEquipmentDef).name.Contains("Yellow"))
				{
					continue;
				}
				if (eliteEquipmentDef.dropOnDeathChance > 0f)
				{
					PickupIndex val2 = PickupCatalog.FindPickupIndex(eliteEquipmentDef.equipmentIndex);
					Option val3 = default(Option);
					val3.pickupIndex = val2;
					val3.available = true;
					Option val4 = val3;
					bool flag = false;
					for (int j = 0; j < EliteEquipmentChoicesForCommand.Length; j++)
					{
						if (EliteEquipmentChoicesForCommand[j].pickupIndex == val2)
						{
							flag = true;
						}
					}
					if (!flag)
					{
						EliteEquipmentChoicesForCommand = EliteEquipmentChoicesForCommand.Add(val4);
					}
				}
				if (((Object)EliteCatalog.eliteDefs[i]).name.EndsWith("Honor"))
				{
					Honor.EliteEquipmentDefs.Add(eliteEquipmentDef);
				}
			}
			if (Honor.EliteEquipmentDefs.Count == 0)
			{
				Debug.LogWarning((object)"No Honor Elites found : Who messed up the EliteCatalog");
				Honor.EliteEquipmentDefs.Add(Elites.FireHonor.eliteEquipmentDef);
				Honor.EliteEquipmentDefs.Add(Elites.LightningHonor.eliteEquipmentDef);
				Honor.EliteEquipmentDefs.Add(Elites.IceHonor.eliteEquipmentDef);
			}
			if (EliteEquipmentChoicesForCommand.Length == 0)
			{
				Debug.LogWarning((object)"No Elites Found: Who messed up the EliteCatalog");
			}
		}

		public static void CommandArtifactManager_OnDropletHitGroundServer(orig_OnDropletHitGroundServer orig, ref CreatePickupInfo createPickupInfo, ref bool shouldSpawn)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			PickupIndex pickupIndex = ((CreatePickupInfo)(ref createPickupInfo)).pickupIndex;
			PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex);
			if (pickupDef != null)
			{
				Option[] optionsFromPickupIndex = PickupPickerController.GetOptionsFromPickupIndex(pickupIndex);
				if (optionsFromPickupIndex.Length <= 1)
				{
					return;
				}
			}
			orig.Invoke(ref createPickupInfo, ref shouldSpawn);
		}

		public static Option[] CommandGiveAffixChoices(orig_GetOptionsFromPickupIndex orig, PickupIndex pickupIndex)
		{
			//IL_0002: 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_0011: Invalid comparison between Unknown and I4
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			Option[] result = orig.Invoke(pickupIndex);
			if ((int)((PickupIndex)(ref pickupIndex)).equipmentIndex != -1)
			{
				EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(((PickupIndex)(ref pickupIndex)).equipmentIndex);
				if (Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite && equipmentDef.dropOnDeathChance > 0f && EliteEquipmentChoicesForCommand.Length != 0)
				{
					return EliteEquipmentChoicesForCommand;
				}
			}
			return result;
		}
	}
	public class Dissonance
	{
		public static DirectorCard DissoBeetle = null;

		public static DirectorCard DissoGolem = null;

		public static DirectorCard DissoTitan = null;

		public static DirectorCard DissoVermin = null;

		public static DirectorCard DissoVerminFlying = null;

		public static WeightedSelection<DirectorCard> LunarifiedList = new WeightedSelection<DirectorCard>(8);

		public static int LunarDone = 0;

		public static void Start()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			Mixenemymaker();
			ClassicStageInfo.RebuildCards += new hook_RebuildCards(DissoanceLunerEliteAll);
			ClassicStageInfo.HandleMixEnemyArtifact += new hook_HandleMixEnemyArtifact(ClassicStageInfo_HandleMixEnemyArtifact);
		}

		public static void ModdedEnemiesSupport()
		{
			CharacterSpawnCard[] array = Object.FindObjectsOfType(typeof(CharacterSpawnCard)) as CharacterSpawnCard[];
			for (int i = 0; i < array.Length; i++)
			{
				switch (((Object)array[i]).name)
				{
				}
			}
		}

		public static void DissoanceLunerEliteAll(orig_RebuildCards orig, ClassicStageInfo self)
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!((Object)(object)self != (Object)null))
			{
				return;
			}
			if (LunarDone == 1)
			{
				Debug.Log((object)"UnLunarify");
				for (int i = 0; i < LunarifiedList.Count; i++)
				{
					ChoiceInfo<DirectorCard> choice = LunarifiedList.GetChoice(i);
					if (!(((Object)choice.value.spawnCard).name == "cscLunarWisp") && !(((Object)choice.value.spawnCard).name == "cscLunarGolem") && !(((Object)choice.value.spawnCard).name == "cscLunarExploder"))
					{
						choice.value.spawnCard.eliteRules = (EliteRules)0;
					}
				}
				LunarDone = 0;
			}
			if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.mixEnemyArtifactDef) && (SceneInfo.instance.sceneDef.baseSceneName == "moon2" || SceneInfo.instance.sceneDef.baseSceneName == "itmoon"))
			{
				WeightedSelection<DirectorCard> val = new WeightedSelection<DirectorCard>(8);
				val = ClassicStageInfo.instance.monsterSelection;
				LunarDone = 1;
				LunarifiedList = val;
				Debug.Log((object)"Lunarified");
				for (int j = 0; j < val.Count; j++)
				{
					val.GetChoice(j).value.spawnCard.eliteRules = (EliteRules)2;
				}
			}
		}

		public static void Mixenemymaker()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//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_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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			DirectorCard val = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav"),
				preventOverhead = false,
				selectionWeight = 1,
				minimumStageCompletions = 0,
				spawnDistance = (MonsterSpawnDistance)0
			};
			DirectorCard val2 = new DirectorCard
			{
				spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscHermitCrab"),
				selectionWeight = 1,
				preventOverhead = false,
				minimumStageCompletions = 0,
				spawnDistance = (MonsterSpawnDistance)2
			};
			RoR2Content.mixEnemyMonsterCards.categories[0].selectionWeight = 2f;
			RoR2Content.mixEnemyMonsterCards.categories[1].selectionWeight = 2f;
			RoR2Content.mixEnemyMonsterCards.categories[2].selectionWeight = 3f;
			RoR2Content.mixEnemyMonsterCards.categories[3].cards = RoR2Content.mixEnemyMonsterCards.categories[3].cards.Remove(RoR2Content.mixEnemyMonsterCards.categories[3].cards[0]);
			RoR2Content.mixEnemyMonsterCards.AddCard(0, val);
			DirectorCard val3 = null;
			DirectorCard val4 = null;
			int num = RoR2Content.mixEnemyMonsterCards.categories.Length - 1;
			while (0 <= num)
			{
				for (int i = 0; RoR2Content.mixEnemyMonsterCards.categories[num].cards.Length > i; i++)
				{
					if (((Object)RoR2Content.mixEnemyMonsterCards.categories[num].cards[i].spawnCard).name.Equals("cscRoboBallMini"))
					{
						val3 = RoR2Content.mixEnemyMonsterCards.categories[num].cards[i];
						RoR2Content.mixEnemyMonsterCards.categories[num].cards[i] = val2;
					}
					else if (((Object)RoR2Content.mixEnemyMonsterCards.categories[num].cards[i].spawnCard).name.Equals("cscLunarWisp"))
					{
						val4 = RoR2Content.mixEnemyMonsterCards.categories[num].cards[i];
						RoR2Content.mixEnemyMonsterCards.categories[num].cards[i] = val3;
					}
					else if (((Object)RoR2Content.mixEnemyMonsterCards.categories[num].cards[i].spawnCard).name.Equals("cscTitanBlackBeach"))
					{
						DissoTitan = RoR2Content.mixEnemyMonsterCards.categories[num].cards[i];
					}
					else if (((Object)RoR2Content.mixEnemyMonsterCards.categories[num].cards[i].spawnCard).name.Equals("cscGolem"))
					{
						DissoGolem = RoR2Content.mixEnemyMonsterCards.categories[num].cards[i];
					}
					else if (((Object)RoR2Content.mixEnemyMonsterCards.categories[num].cards[i].spawnCard).name.Equals("cscVermin"))
					{
						DissoVermin = RoR2Content.mixEnemyMonsterCards.categories[num].cards[i];
					}
					else if (((Object)RoR2Content.mixEnemyMonsterCards.categories[num].cards[i].spawnCard).name.Equals("cscFlyingVermin"))
					{
						DissoVerminFlying = RoR2Content.mixEnemyMonsterCards.categories[num].cards[i];
					}
					else if (((Object)RoR2Content.mixEnemyMonsterCards.categories[num].cards[i].spawnCard).name.Equals("cscBeetle"))
					{
						DissoBeetle = RoR2Content.mixEnemyMonsterCards.categories[num].cards[i];
					}
				}
				num--;
			}
			RoR2Content.mixEnemyMonsterCards.AddCard(0, val4);
		}

		public static void ClassicStageInfo_HandleMixEnemyArtifact(orig_HandleMixEnemyArtifact orig, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng)
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: 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_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//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_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			int num = Main.Random.Next(1, 5);
			int num2 = Main.Random.Next(1, 5);
			int num3 = Main.Random.Next(1, 3);
			int num4 = Main.Random.Next(1, 3);
			int num5 = Main.Random.Next(1, 51);
			switch (num)
			{
			case 1:
				DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanBlackBeach.asset").WaitForCompletion();
				break;
			case 2:
				DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanDampCave.asset").WaitForCompletion();
				break;
			case 3:
				DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGolemPlains.asset").WaitForCompletion();
				break;
			case 4:
				DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGooLake.asset").WaitForCompletion();
				break;
			}
			switch (num2)
			{
			case 1:
				DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolem.asset").WaitForCompletion();
				break;
			case 2:
				DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemNature.asset").WaitForCompletion();
				break;
			case 3:
				DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemSandy.asset").WaitForCompletion();
				break;
			case 4:
				DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemSnowy.asset").WaitForCompletion();
				break;
			}
			switch (num3)
			{
			case 1:
				DissoVermin.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/Vermin/cscVermin.asset").WaitForCompletion();
				break;
			case 2:
				DissoVermin.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/Vermin/cscVerminSnowy.asset").WaitForCompletion();
				break;
			}
			switch (num4)
			{
			case 1:
				DissoVerminFlying.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVermin.asset").WaitForCompletion();
				break;
			case 2:
				DissoVerminFlying.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset").WaitForCompletion();
				break;
			}
			if (num5 == 50)
			{
				Debug.LogWarning((object)"Shiny Beetle");
				DissoBeetle.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetleSulfur.asset").WaitForCompletion();
			}
			else
			{
				DissoBeetle.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetle.asset").WaitForCompletion();
			}
			orig.Invoke(monsterCategories, rng);
		}
	}
	public class Enigma
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_CalculateEquipmentCooldownScale <>9__3_0;

			internal float <Start>b__3_0(orig_CalculateEquipmentCooldownScale orig, Inventory self)
			{
				int itemCount = self.GetItemCount(EnigmaFragmentPurple);
				if (itemCount > 0)
				{
					float num = orig.Invoke(self);
					return num * Mathf.Pow(EnigmaFragmentCooldownReduction, (float)itemCount);
				}
				return orig.Invoke(self);
			}
		}

		public static ItemDef EnigmaFragmentPurple = null;

		public static float EnigmaFragmentCooldownReduction = 0.88f;

		public static Color CustomColor = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)24));

		public static void Start()
		{
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Expected O, but got Unknown
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Expected O, but got Unknown
			ColorUtility.TryParseHtmlString("#AE6BCB", ref CustomColor);
			LanguageAPI.Add("ARTIFACT_COMMAND_CUBE_INTERACTION_PROMPT", "Choose", "en");
			LanguageAPI.Add("ARTIFACT_ENIGMA_DESCRIPTION", "Your equipment changes every time it's activated. Additional Equipment become fragments that reduce cooldown instead.", "en");
			LanguageAPI.Add("ITEM_ENIGMAEQUIPMENTBOOST_NAME", "Enigma Fragment", "en");
			LanguageAPI.Add("ITEM_ENIGMAEQUIPMENTBOOST_PICKUP", "Reduce equipment cooldown.", "en");
			LanguageAPI.Add("ITEM_ENIGMAEQUIPMENTBOOST_DESC", "<style=cIsUtility>Reduce equipment cooldown</style> by <style=cIsUtility>" + WConfig.EnigmaCooldownReduction.Value + "%</style> <style=cStack>(+" + WConfig.EnigmaCooldownReduction.Value + "% per stack)</style>.", "en");
			LanguageAPI.Add("EQUIPMENT_ENIGMAEQUIPMENT_NAME", "Enigma Box", "en");
			LanguageAPI.Add("EQUIPMENT_ENIGMAEQUIPMENT_PICKUP", "What could it be?", "en");
			LanguageAPI.Add("EQUIPMENT_ENIGMAEQUIPMENT_DESC", "Activate a random equipment on use.", "en");
			ArtifactDef val = LegacyResourcesAPI.Load<ArtifactDef>("artifactdefs/Enigma");
			ItemDef val2 = ScriptableObject.CreateInstance<ItemDef>();
			((Object)val2).name = "EnigmaFragment_ArtifactHelper";
			val2.deprecatedTier = (ItemTier)5;
			val2.pickupModelPrefab = val.pickupModelPrefab;
			val2.nameToken = "ITEM_ENIGMAEQUIPMENTBOOST_NAME";
			val2.pickupToken = "ITEM_ENIGMAEQUIPMENTBOOST_PICKUP";
			val2.descriptionToken = "ITEM_ENIGMAEQUIPMENTBOOST_DESC";
			val2.loreToken = "";
			val2.hidden = false;
			val2.canRemove = false;
			val2.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 };
			ItemDisplayRule[] array = (ItemDisplayRule[])(object)new ItemDisplayRule[1] { default(ItemDisplayRule) };
			CustomItem val3 = new CustomItem(val2, (ItemDisplayRule[])(object)new ItemDisplayRule[0]);
			ItemAPI.Add(val3);
			EnigmaFragmentPurple = val2;
			EnigmaFragmentCooldownReduction = 1f - WConfig.EnigmaCooldownReduction.Value / 100f;
			object obj = <>c.<>9__3_0;
			if (obj == null)
			{
				hook_CalculateEquipmentCooldownScale val4 = delegate(orig_CalculateEquipmentCooldownScale orig, Inventory self)
				{
					int itemCount = self.GetItemCount(EnigmaFragmentPurple);
					if (itemCount > 0)
					{
						float num = orig.Invoke(self);
						return num * Mathf.Pow(EnigmaFragmentCooldownReduction, (float)itemCount);
					}
					return orig.Invoke(self);
				};
				<>c.<>9__3_0 = val4;
				obj = (object)val4;
			}
			Inventory.CalculateEquipmentCooldownScale += (hook_CalculateEquipmentCooldownScale)obj;
			if (!WConfig.EnigmaInterrupt.Value)
			{
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BossHunter").enigmaCompatible = false;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BossHunterConsumed").enigmaCompatible = false;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Recycle").enigmaCompatible = false;
			}
			if (WConfig.EnigmaMovement.Value)
			{
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Jetpack").enigmaCompatible = true;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/FireBallDash").enigmaCompatible = true;
			}
			else
			{
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Jetpack").enigmaCompatible = false;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/FireBallDash").enigmaCompatible = false;
			}
			if (!WConfig.EnigmaTonic.Value)
			{
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Tonic").enigmaCompatible = false;
			}
			if (WConfig.EnigmaDestructive.Value)
			{
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Meteor").enigmaCompatible = true;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BurnNearby").enigmaCompatible = true;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/CrippleWard").enigmaCompatible = true;
			}
			else
			{
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Meteor").enigmaCompatible = false;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BurnNearby").enigmaCompatible = false;
				LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/CrippleWard").enigmaCompatible = false;
			}
		}

		public static void EnigmaCallLate()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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)
			Texture2D val = new Texture2D(128, 128, (TextureFormat)12, false);
			ImageConversion.LoadImage(val, Resources.texItemEnigmaP, true);
			((Texture)val).filterMode = (FilterMode)1;
			((Texture)val).wrapMode = (TextureWrapMode)1;
			Sprite val2 = Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f));
			EnigmaFragmentPurple.pickupIconSprite = val2;
			PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex("ItemIndex.EnigmaFragment_ArtifactHelper"));
			pickupDef.baseColor = CustomColor;
			pickupDef.darkColor = CustomColor;
			pickupDef.displayPrefab = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex("ArtifactIndex.Enigma")).displayPrefab;
			pickupDef.dropletDisplayPrefab = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex("EquipmentIndex.Fruit")).dropletDisplayPrefab;
			pickupDef.iconSprite = val2;
			EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex("EQUIPMENT_IMPULSEFROSTSHIELD"));
			if ((Object)(object)equipmentDef != (Object)null)
			{
				equipmentDef.enigmaCompatible = false;
			}
		}

		public static GenericPickupController EnigmaFragmentMaker(orig_CreatePickup orig, ref CreatePickupInfo createPickupInfo)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Invalid comparison between Unknown and I4
			//IL_0028: 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_004c: Unknown result type (might be due to invalid IL or missing references)
			PickupDef pickupDef = PickupCatalog.GetPickupDef(((CreatePickupInfo)(ref createPickupInfo)).pickupIndex);
			if (pickupDef != null && (int)pickupDef.equipmentIndex != -1)
			{
				EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex);
				if (equipmentDef.enigmaCompatible)
				{
					((CreatePickupInfo)(ref createPickupInfo)).pickupIndex = PickupCatalog.FindPickupIndex(EnigmaFragmentPurple.itemIndex);
					GenericPickupController val = orig.Invoke(ref createPickupInfo);
					if (Object.op_Implicit((Object)(object)((Component)val).gameObject) && Object.op_Implicit((Object)(object)val.pickupDisplay))
					{
						Util.PlaySound("Play_item_proc_crit_cooldown", ((Component)val).gameObject);
						Util.PlaySound("Play_item_proc_crit_cooldown", ((Component)val).gameObject);
						val.pickupDisplay.tier1ParticleEffect.SetActive(true);
						val.pickupDisplay.equipmentParticleEffect.SetActive(true);
					}
					return val;
				}
			}
			return orig.Invoke(ref createPickupInfo);
		}

		public static void EnigmaEquipmentGranter(orig_AttemptGrant orig, GenericPickupController self, CharacterBody body)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Invalid comparison between Unknown and I4
			//IL_0010: 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_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Invalid comparison between Unknown and I4
			//IL_003a: 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_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Invalid comparison between Unknown and I4
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Invalid comparison between Unknown and I4
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			if ((int)body.inventory.currentEquipmentIndex == -1 && PickupCatalog.GetPickupDef(self.pickupIndex).itemIndex == EnigmaFragmentPurple.itemIndex)
			{
				self.pickupIndex = PickupCatalog.FindPickupIndex(EnigmaArtifactManager.GetRandomEquipment(EnigmaArtifactManager.serverInitialEquipmentRng, 0));
				Util.PlaySound("Play_UI_insufficient_funds", ((Component)self).gameObject);
				Util.PlaySound("Play_UI_insufficient_funds", ((Component)self).gameObject);
				Util.PlaySound("Play_UI_insufficient_funds", ((Component)self).gameObject);
			}
			bool flag = (int)body.inventory.currentEquipmentIndex != -1 && (int)PickupCatalog.GetPickupDef(self.pickupIndex).equipmentIndex != -1;
			orig.Invoke(self, body);
			if (flag && (int)PickupCatalog.GetPickupDef(self.pickupIndex).equipmentIndex != -1)
			{
				EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(PickupCatalog.GetPickupDef(self.pickupIndex).equipmentIndex);
				CreatePickupInfo val;
				if (Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite)
				{
					val = default(CreatePickupInfo);
					val.position = ((Component)self).transform.position;
					val.rotation = ((Component)self).transform.rotation;
					((CreatePickupInfo)(ref val)).pickupIndex = PickupCatalog.FindPickupIndex(Items.ShinyPearl.itemIndex);
					GenericPickupController.CreatePickup(ref val);
					Util.PlaySound("Play_item_proc_crit_cooldown", ((Component)self).gameObject);
					Util.PlaySound("Play_item_proc_crit_cooldown", ((Component)self).gameObject);
					Util.PlaySound("Play_item_proc_crit_cooldown", ((Component)self).gameObject);
				}
				else
				{
					val = default(CreatePickupInfo);
					val.position = ((Component)self).transform.position;
					val.rotation = ((Component)self).transform.rotation;
					((CreatePickupInfo)(ref val)).pickupIndex = PickupCatalog.FindPickupIndex(Equipment.Fruit.equipmentIndex);
					GenericPickupController.CreatePickup(ref val);
				}
				Object.Destroy((Object)(object)((Component)self).gameObject);
			}
		}

		public static void PickupItemNotification(orig_SetItem orig, GenericNotification self, ItemDef itemDef)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, itemDef);
			if ((Object)(object)itemDef == (Object)(object)EnigmaFragmentPurple)
			{
				((Graphic)self.titleTMP).color = CustomColor;
			}
		}
	}
	public class Evolution
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_OnServerCardSpawnedGlobal <>9__1_0;

			internal void <Start>b__1_0(orig_OnServerCardSpawnedGlobal orig, SpawnResult spawnResult)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: 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_0034: Invalid comparison between Unknown and I4
				//IL_0055: 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_005f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(spawnResult);
				CharacterMaster val = (Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) ? spawnResult.spawnedInstance.GetComponent<CharacterMaster>() : null);
				if (!Object.op_Implicit((Object)(object)val) || (int)val.teamIndex != 4)
				{
					return;
				}
				val.inventory.AddItemsFrom(MonsterTeamGainsItemsArtifactManager.monsterTeamInventory);
				Enumerator<TransformationInfo> enumerator = ContagiousItemManager.transformationInfos.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						TransformationInfo current = enumerator.Current;
						ContagiousItemManager.TryForceReplacement(val.inventory, current.originalItem);
					}
				}
				finally
				{
					((IDisposable)enumerator).Dispose();
				}
			}
		}

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

		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_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_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Expected O, but got Unknown
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Expected O, but got Unknown
			BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier1Item.asset").WaitForCompletion();
			BasicPickupDropTable val2 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier2Item.asset").WaitForCompletion();
			BasicPickupDropTable val3 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier3Item.asset").WaitForCompletion();
			ItemTag[] array = new ItemTag[8];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			ItemTag[] bannedItemTags = (val3.bannedItemTags = (val2.bannedItemTags = (val.bannedItemTags = (ItemTag[])(object)array)));
			dtMonsterTeamLunarItem.bannedItemTags = bannedItemTags;
			dtMonsterTeamLunarItem.tier1Weight = 0f;
			dtMonsterTeamLunarItem.tier2Weight = 0f;
			dtMonsterTeamLunarItem.tier3Weight = 0f;
			dtMonsterTeamLunarItem.lunarItemWeight = 1f;
			((PickupDropTable)dtMonsterTeamLunarItem).canDropBeReplaced = false;
			((Object)dtMonsterTeamLunarItem).name = "dtMonsterTeamLunarItem";
			if (WConfig.EvoMoreItems.Value)
			{
				MonsterTeamGainsItemsArtifactManager.GrantMonsterTeamItem += new hook_GrantMonsterTeamItem(EvolutionGiveMoreItems);
			}
			object obj = <>c.<>9__1_0;
			if (obj == null)
			{
				hook_OnServerCardSpawnedGlobal val4 = delegate(orig_OnServerCardSpawnedGlobal orig, SpawnResult spawnResult)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0009: Unknown result type (might be due to invalid IL or missing references)
					//IL_0019: 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_0034: Invalid comparison between Unknown and I4
					//IL_0055: 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_005f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0064: Unknown result type (might be due to invalid IL or missing references)
					//IL_006c: Unknown result type (might be due to invalid IL or missing references)
					//IL_006d: Unknown result type (might be due to invalid IL or missing references)
					orig.Invoke(spawnResult);
					CharacterMaster val5 = (Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) ? spawnResult.spawnedInstance.GetComponent<CharacterMaster>() : null);
					if (Object.op_Implicit((Object)(object)val5) && (int)val5.teamIndex == 4)
					{
						val5.inventory.AddItemsFrom(MonsterTeamGainsItemsArtifactManager.monsterTeamInventory);
						Enumerator<TransformationInfo> enumerator = ContagiousItemManager.transformationInfos.GetEnumerator();
						try
						{
							while (enumerator.MoveNext())
							{
								TransformationInfo current = enumerator.Current;
								ContagiousItemManager.TryForceReplacement(val5.inventory, current.originalItem);
							}
						}
						finally
						{
							((IDisposable)enumerator).Dispose();
						}
					}
				};
				<>c.<>9__1_0 = val4;
				obj = (object)val4;
			}
			MonsterTeamGainsItemsArtifactManager.OnServerCardSpawnedGlobal += (hook_OnServerCardSpawnedGlobal)obj;
		}

		private static void EvolutionGiveMoreItems(orig_GrantMonsterTeamItem orig)
		{
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: 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_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			bool flag = false;
			if (!WConfig.EvoMoreAfterLoop.Value)
			{
				flag = true;
			}
			else if (WConfig.EvoMoreAfterLoop.Value && MonsterTeamGainsItemsArtifactManager.currentItemIterator >= 5)
			{
				flag = true;
			}
			if (flag)
			{
				PickupDropTable[] dropPattern = MonsterTeamGainsItemsArtifactManager.dropPattern;
				int currentItemIterator = MonsterTeamGainsItemsArtifactManager.currentItemIterator;
				MonsterTeamGainsItemsArtifactManager.currentItemIterator = currentItemIterator + 1;
				PickupDropTable val = dropPattern[currentItemIterator % MonsterTeamGainsItemsArtifactManager.dropPattern.Length];
				if (!Object.op_Implicit((Object)(object)val))
				{
					return;
				}
				PickupIndex val2 = val.GenerateDrop(MonsterTeamGainsItemsArtifactManager.treasureRng);
				if (!(val2 != PickupIndex.none))
				{
					return;
				}
				PickupDef pickupDef = PickupCatalog.GetPickupDef(val2);
				if (pickupDef != null)
				{
					switch ((MonsterTeamGainsItemsArtifactManager.currentItemIterator - 1) % MonsterTeamGainsItemsArtifactManager.dropPattern.Length)
					{
					case 0:
					case 1:
						MonsterTeamGainsItemsArtifactManager.monsterTeamInventory.GiveItem(pickupDef.itemIndex, WConfig.EvoMoreWhite.Value);
						break;
					case 2:
					case 3:
						MonsterTeamGainsItemsArtifactManager.monsterTeamInventory.GiveItem(pickupDef.itemIndex, WConfig.EvoMoreGreen.Value);
						break;
					case 4:
						MonsterTeamGainsItemsArtifactManager.monsterTeamInventory.GiveItem(pickupDef.itemIndex, WConfig.EvoMoreRed.Value);
						break;
					}
				}
			}
			else
			{
				orig.Invoke();
			}
		}

		public static void EvolutionGiveMoreItemsOld(orig_GiveItem_ItemIndex_int orig, Inventory self, ItemIndex itemIndex, int count)
		{
			//IL_0105: 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_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Invalid comparison between Unknown and I4
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)self == (Object)(object)MonsterTeamGainsItemsArtifactManager.monsterTeamInventory)
			{
				bool flag = false;
				if (!WConfig.EvoMoreAfterLoop.Value)
				{
					flag = true;
				}
				else if (WConfig.EvoMoreAfterLoop.Value && MonsterTeamGainsItemsArtifactManager.currentItemIterator >= 5)
				{
					flag = true;
				}
				if ((int)ItemCatalog.GetItemDef(itemIndex).tier == 3)
				{
					PickupIndex val = ((PickupDropTable)dtMonsterTeamLunarItem).GenerateDrop(MonsterTeamGainsItemsArtifactManager.treasureRng);
					itemIndex = ((PickupIndex)(ref val)).itemIndex;
				}
				if (flag)
				{
					switch ((MonsterTeamGainsItemsArtifactManager.currentItemIterator - 1) % MonsterTeamGainsItemsArtifactManager.dropPattern.Length)
					{
					case 0:
					case 1:
						orig.Invoke(self, itemIndex, WConfig.EvoMoreWhite.Value);
						return;
					case 2:
					case 3:
						orig.Invoke(self, itemIndex, WConfig.EvoMoreGreen.Value);
						return;
					case 4:
						orig.Invoke(self, itemIndex, WConfig.EvoMoreRed.Value);
						return;
					}
				}
			}
			orig.Invoke(self, itemIndex, count);
		}

		public static void Tagchanger()
		{
			Items.MoveSpeedOnKill.tags = Items.MoveSpeedOnKill.tags.Add((ItemTag)6);
			Items.MonstersOnShrineUse.tags = Items.MonstersOnShrineUse.tags.Add((ItemTag)18);
			Items.GoldOnHit.tags = Items.GoldOnHit.tags.Add((ItemTag)4);
			Items.LunarTrinket.tags = Items.LunarTrinket.tags.Add((ItemTag)4);
			Items.LunarSun.tags = Items.LunarSun.tags.Add((ItemTag)4);
			Items.LunarPrimaryReplacement.tags = Items.LunarPrimaryReplacement.tags.Remove((ItemTag)4);
			Items.LunarSecondaryReplacement.tags = Items.LunarSecondaryReplacement.tags.Remove((ItemTag)4);
			Items.LunarUtilityReplacement.tags = Items.LunarUtilityReplacement.tags.Remove((ItemTag)4);
			Items.LunarSpecialReplacement.tags = Items.LunarSpecialReplacement.tags.Remove((ItemTag)4);
			Items.NovaOnHeal.tags = Items.NovaOnHeal.tags.Add((ItemTag)4);
			Items.ShockNearby.tags = Items.ShockNearby.tags.Add((ItemTag)21);
			Items.DroneWeapons.tags = Items.DroneWeapons.tags.Add((ItemTag)4);
			Items.BarrierOnOverHeal.tags = Items.BarrierOnOverHeal.tags.Add((ItemTag)21);
			Items.CritDamage.tags = Items.CritDamage.tags.Add((ItemTag)4);
			Items.RegeneratingScrap.tags = Items.RegeneratingScrap.tags.Add((ItemTag)4);
		}
	}
	public class Honor
	{
		public static List<EquipmentDef> EliteEquipmentDefs = new List<EquipmentDef>();

		public static GivePickupsOnStart HonorAffixGiverVoidling0 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterBase.prefab").WaitForCompletion().AddComponent<GivePickupsOnStart>();

		public static GivePickupsOnStart HonorAffixGiverVoidling1 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase1.prefab").WaitForCompletion().AddComponent<GivePickupsOnStart>();

		public static GivePickupsOnStart HonorAffixGiverVoidling2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase2.prefab").WaitForCompletion().AddComponent<GivePickupsOnStart>();

		public static GivePickupsOnStart HonorAffixGiverVoidling3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase3.prefab").WaitForCompletion().AddComponent<GivePickupsOnStart>();

		public static GivePickupsOnStart BrotherLunarAffixGiver = LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/BrotherMaster").AddComponent<GivePickupsOnStart>();

		public static GivePickupsOnStart BrotherHurtLunarAffixGiver = LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/BrotherHurtMaster").AddComponent<GivePickupsOnStart>();

		public static GivePickupsOnStart BrotherHauntLunarAffixGiver = LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/BrotherHauntMaster").AddComponent<GivePickupsOnStart>();

		public static void Start()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			if (WConfig.HonorPerfectedLunarBosses.Value)
			{
				LunarAffixHonorInit();
			}
			LunarAffixDisable();
			if (WConfig.HonorStartingEliteEquip.Value)
			{
				Run.Start += new hook_Start(HonorGiveEliteEquipOnStart);
			}
		}

		public static void PreventPerfectedMithrixFromRegenningShield(orig_OnOutOfDangerChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (((Object)self).name.StartsWith("Bro"))
			{
				self.outOfDangerStopwatch = -1000f;
			}
		}

		public static void LunarAffixHonorInit()
		{
			BrotherLunarAffixGiver.equipmentString = "EliteLunarEquipment";
			BrotherHurtLunarAffixGiver.equipmentString = "EliteLunarEquipment";
			BrotherHauntLunarAffixGiver.equipmentString = "EliteLunarEquipment";
			HonorAffixGiverVoidling0.equipmentString = "EliteVoidEquipment";
			HonorAffixGiverVoidling1.equipmentString = "EliteVoidEquipment";
			HonorAffixGiverVoidling2.equipmentString = "EliteVoidEquipment";
			HonorAffixGiverVoidling3.equipmentString = "EliteVoidEquipment";
		}

		public static void MinionsInheritHonor(orig_AddMinion orig, NetworkInstanceId ownerId, MinionOwnership minion)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Invalid comparison between Unknown and I4
			//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_0065: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(ownerId, minion);
			if (NetworkServer.active)
			{
				Inventory component = ((Component)minion).gameObject.GetComponent<Inventory>();
				if (Object.op_Implicit((Object)(object)component) && (int)component.currentEquipmentIndex == -1)
				{
					int index = Main.Random.Next(EliteEquipmentDefs.Count);
					component.SetEquipment(new EquipmentState(EliteEquipmentDefs[index].equipmentIndex, FixedTimeStamp.negativeInfinity, (byte)0), 0u);
					component.GiveItem(Items.BoostDamage, 5);
					component.GiveItem(Items.BoostHp, 15);
				}
			}
		}

		public static void HonorGiveEliteEquipOnStart(orig_Start orig, Run self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)RunArtifactManager.instance) || !RunArtifactManager.instance.IsArtifactEnabled(Artifacts.eliteOnlyArtifactDef))
			{
				return;
			}
			foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
			{
				int index = Main.Random.Next(EliteEquipmentDefs.Count);
				instance.master.inventory.GiveEquipmentString(((Object)EliteEquipmentDefs[index]).name);
			}
		}

		public static void LunarAffixDisable()
		{
			((Behaviour)BrotherLunarAffixGiver).enabled = false;
			((Behaviour)BrotherHurtLunarAffixGiver).enabled = false;
			((Behaviour)BrotherHauntLunarAffixGiver).enabled = false;
			((Behaviour)HonorAffixGiverVoidling0).enabled = false;
			((Behaviour)HonorAffixGiverVoidling1).enabled = false;
			((Behaviour)HonorAffixGiverVoidling2).enabled = false;
			((Behaviour)HonorAffixGiverVoidling3).enabled = false;
		}

		public static void LunarAffixEnable()
		{
			((Behaviour)BrotherLunarAffixGiver).enabled = true;
			((Behaviour)BrotherHurtLunarAffixGiver).enabled = true;
			((Behaviour)BrotherHauntLunarAffixGiver).enabled = true;
			((Behaviour)HonorAffixGiverVoidling0).enabled = true;
			((Behaviour)HonorAffixGiverVoidling1).enabled = true;
			((Behaviour)HonorAffixGiverVoidling2).enabled = true;
			((Behaviour)HonorAffixGiverVoidling3).enabled = true;
		}

		public static void WormStart()
		{
			//IL_002e: 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_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			if (WConfig.HonorEliteWormRules.Value == "Never")
			{
				CharacterSpawnCard val = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscMagmaWorm");
				val.noElites = true;
				((SpawnCard)val).eliteRules = (EliteRules)0;
				CharacterSpawnCard val2 = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscElectricWorm");
				val2.noElites = true;
				((SpawnCard)val2).eliteRules = (EliteRules)0;
			}
			else if (!(WConfig.HonorEliteWormRules.Value == "HonorOnly"))
			{
				if (WConfig.HonorEliteWormRules.Value == "Always")
				{
					CharacterSpawnCard val3 = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscMagmaWorm");
					val3.noElites = false;
					((SpawnCard)val3).eliteRules = (EliteRules)0;
					CharacterSpawnCard val4 = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscElectricWorm");
					val4.noElites = false;
					((SpawnCard)val4).eliteRules = (EliteRules)0;
				}
				else
				{
					Debug.LogWarning((object)"Invalid String for Worm Elite Rules");
				}
			}
		}
	}
	public class Kin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_HandleSingleMonsterTypeArtifact <>9__2_0;

			internal void <Start>b__2_0(orig_HandleSingleMonsterTypeArtifact orig2, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng)
			{
				KinBackup.CopyFrom(monsterCategories);
				orig2.Invoke(monsterCategories, rng);
				int num = 0;
				SpawnCard spawnCard = monsterCategories.categories[0].cards[0].spawnCard;
				if ((Object)(object)spawnCard == (Object)(object)KinNoRepeat)
				{
					do
					{
						num++;
						monsterCategories.CopyFrom(KinBackup);
						orig2.Invoke(monsterCategories, rng);
						spawnCard = monsterCategories.categories[0].cards[0].spawnCard;
					}
					while (num < 15 && (Object)(object)spawnCard == (Object)(object)KinNoRepeat);
				}
				if ((Object)(object)spawnCard != (Object)(object)KinNoRepeat)
				{
					Debug.Log((object)(num + " Cycles until non repeat"));
					KinNoRepeat = spawnCard;
				}
				else if (num == 10)
				{
					Debug.Log((object)(num + " Cycles, stop looking for non repeat"));
				}
				KinBackup.Clear();
			}
		}

		public static DirectorCardCategorySelection KinBackup = ScriptableObject.CreateInstance<DirectorCardCategorySelection>();

		public static SpawnCard KinNoRepeat;

		public static void Start()
		{
			//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_0030: Expected O, but got Unknown
			((Object)KinBackup).name = "dcccBackupKinHelper";
			object obj = <>c.<>9__2_0;
			if (obj == null)
			{
				hook_HandleSingleMonsterTypeArtifact val = delegate(orig_HandleSingleMonsterTypeArtifact orig2, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng)
				{
					KinBackup.CopyFrom(monsterCategories);
					orig2.Invoke(monsterCategories, rng);
					int num = 0;
					SpawnCard spawnCard = monsterCategories.categories[0].cards[0].spawnCard;
					if ((Object)(object)spawnCard == (Object)(object)KinNoRepeat)
					{
						do
						{
							num++;
							monsterCategories.CopyFrom(KinBackup);
							orig2.Invoke(monsterCategories, rng);
							spawnCard = monsterCategories.categories[0].cards[0].spawnCard;
						}
						while (num < 15 && (Object)(object)spawnCard == (Object)(object)KinNoRepeat);
					}
					if ((Object)(object)spawnCard != (Object)(object)KinNoRepeat)
					{
						Debug.Log((object)(num + " Cycles until non repeat"));
						KinNoRepeat = spawnCard;
					}
					else if (num == 10)
					{
						Debug.Log((object)(num + " Cycles, stop looking for non repeat"));
					}
					KinBackup.Clear();
				};
				<>c.<>9__2_0 = val;
				obj = (object)val;
			}
			ClassicStageInfo.HandleSingleMonsterTypeArtifact += (hook_HandleSingleMonsterTypeArtifact)obj;
		}
	}
	public class KinBossDropsForEnemies
	{
		public static CharacterMaster tempClayMan;

		public static string ol = Language.GetString("ELITE_MODIFIER_LIGHTNING");

		public static void Start()
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: 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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_0045: 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_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: 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_0148: 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_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: 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_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: 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_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: 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_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: 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_0346: 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_035a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0364: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_037b: 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)
			SerializablePickupIndex val = default(SerializablePickupIndex);
			val.pickupName = "ItemIndex.SprintWisp";
			SerializablePickupIndex bossPickup = val;
			val = default(SerializablePickupIndex);
			val.pickupName = "ItemIndex.BeetleGland";
			SerializablePickupIndex bossPickup2 = val;
			val = default(SerializablePickupIndex);
			val.pickupName = "ItemIndex.RoboBallBuddy";
			SerializablePickupIndex bossPickup3 = val;
			val = default(SerializablePickupIndex);
			val.pickupName = "ItemIndex.FireballsOnHit";
			SerializablePickupIndex bossPickup4 = val;
			val = default(SerializablePickupIndex);
			val.pickupName = "ItemIndex.ShinyPearl";
			SerializablePickupIndex bossPickup5 = val;
			val = default(SerializablePickupIndex);
			val.pickupName = "ItemIndex.VoidMegaCrabItem";
			SerializablePickupIndex bossPickup6 = val;
			DeathRewards component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/GolemBody").GetComponent<DeathRewards>();
			component.bossPickup = new SerializablePickupIndex
			{
				pickupName = "ItemIndex.Knurl"
			};
			DeathRewards component2 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BeetleBody").GetComponent<DeathRewards>();
			component2.bossPickup = bossPickup2;
			DeathRewards component3 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BeetleGuardBody").GetComponent<DeathRewards>();
			component3.bossPickup = bossPickup2;
			DeathRewards component4 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/JellyfishBody").GetComponent<DeathRewards>();
			component4.bossPickup = new SerializablePickupIndex
			{
				pickupName = "ItemIndex.NovaOnLowHealth"
			};
			DeathRewards component5 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/WispBody").GetComponent<DeathRewards>();
			component5.bossPickup = bossPickup;
			DeathRewards component6 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/GreaterWispBody").GetComponent<DeathRewards>();
			component6.bossPickup = bossPickup;
			DeathRewards component7 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LemurianBody").GetComponent<DeathRewards>();
			component7.bossPickup = bossPickup4;
			DeathRewards component8 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LemurianBruiserBody").GetComponent<DeathRewards>();
			component8.bossPickup = bossPickup4;
			DeathRewards component9 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayBruiserBody").GetComponent<DeathRewards>();
			component9.bossPickup = new SerializablePickupIndex
			{
				pickupName = "ItemIndex.SiphonOnLowHealth"
			};
			DeathRewards component10 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayGrenadierBody").GetComponent<DeathRewards>();
			component10.bossPickup = new SerializablePickupIndex
			{
				pickupName = "ItemIndex.SiphonOnLowHealth"
			};
			DeathRewards component11 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ImpBody").GetComponent<DeathRewards>();
			component11.bossPickup = new SerializablePickupIndex
			{
				pickupName = "ItemIndex.BleedOnHitAndExplode"
			};
			DeathRewards component12 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ParentBody").GetComponent<DeathRewards>();
			component12.bossPickup = new SerializablePickupIndex
			{
				pickupName = "ItemIndex.ParentEgg"
			};
			DeathRewards component13 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/RoboBallMiniBody").GetComponent<DeathRewards>();
			component13.bossPickup = bossPickup3;
			DeathRewards component14 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/VultureBody").GetComponent<DeathRewards>();
			component14.bossPickup = bossPickup3;
			DeathRewards component15 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarExploderBody").GetComponent<DeathRewards>();
			component15.bossPickup = bossPickup5;
			DeathRewards component16 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarGolemBody").GetComponent<DeathRewards>();
			component16.bossPickup = bossPickup5;
			DeathRewards component17 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarWispBody").GetComponent<DeathRewards>();
			component17.bossPickup = bossPickup5;
			DeathRewards component18 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/MinorConstructBody").GetComponent<DeathRewards>();
			component18.bossPickup = new SerializablePickupIndex
			{
				pickupName = "ItemIndex.MinorConstructOnKill"
			};
			DeathRewards component19 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/VoidMegaCrabBody").GetComponent<DeathRewards>();
			component19.bossPickup = bossPickup6;
			DeathRewards component20 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/NullifierBody").GetComponent<DeathRewards>();
			component20.bossPickup = bossPickup6;
			DeathRewards component21 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerBody.prefab").WaitForCompletion().GetComponent<DeathRewards>();
			component21.bossPickup = bossPickup6;
			DeathRewards component22 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidBarnacle/VoidBarnacleBody.prefab").WaitForCompletion().GetComponent<DeathRewards>();
			component22.bossPickup = bossPickup6;
			DeathRewards component23 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/VoidInfestorBody.prefab").WaitForCompletion().GetComponent<DeathRewards>();
			component23.bossPickup = bossPickup6;
		}

		public static void ModBossDropChanger()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)tempClayMan != (Object)null)
			{
				DeathRewards component = tempClayMan.bodyPrefab.GetComponent<DeathRewards>();
				component.bossPickup = new SerializablePickupIndex
				{
					pickupName = "ItemIndex.SiphonOnLowHealth"
				};
			}
		}

		public static void BossDropChanger(orig_OnMemberDefeatedServer orig, BossGroup self, CharacterMaster memberMaster, DamageReport damageReport)
		{
			if (self.bestObservedName.Contains(Language.GetString("LEMURIAN_BODY_NAME")) && self.bestObservedName.Contains(ol))
			{
				foreach (CharacterMaster readOnlyMembers in self.combatSquad.readOnlyMembersList)
				{
				}
			}
			orig.Invoke(self, memberMaster, damageReport);
		}
	}
	public class Sacrifice
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_OnPrePopulateSceneServer <>9__3_0;

			internal void <Start>b__3_0(orig_OnPrePopulateSceneServer orig, SceneDirector sceneDirector)
			{
				sceneDirector.monsterCredit = (int)((float)sceneDirector.monsterCredit * 1.6f);
				orig.Invoke(sceneDirector);
			}
		}

		public static BasicPickupDropTable dtSacrificeArtifact = LegacyResourcesAPI.Load<BasicPickupDropTable>("DropTables/dtSacrificeArtifact");

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

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

		public static void Start()
		{
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Expected O, but got Unknown
			dtSacrificeArtifact.tier1Weight = 0.8f;
			dtSacrificeArtifact.tier2Weight = 0.25f;
			dtSacrificeArtifact.tier3Weight = 0.015f;
			dtSacrificeArtifactBoss.tier1Weight = 0f;
			dtSacrificeArtifactBoss.tier2Weight = 0.75f;
			dtSacrificeArtifactBoss.tier3Weight = 0.2f;
			dtSacrificeArtifactBoss.bossWeight = 0.2f;
			dtSacrificeArtifactBoss.equipmentWeight = 0f;
			((Object)dtSacrificeArtifactBoss).name = "dtSacrificeArtifactBoss";
			dtSacrificeArtifactVoid.tier1Weight = 0f;
			dtSacrificeArtifactVoid.tier2Weight = 0f;
			dtSacrificeArtifactVoid.tier3Weight = 0f;
			dtSacrificeArtifactVoid.equipmentWeight = 0f;
			dtSacrificeArtifactVoid.voidTier1Weight = 6f;
			dtSacrificeArtifactVoid.voidTier2Weight = 3f;
			dtSacrificeArtifactVoid.voidTier3Weight = 1f;
			((Object)dtSacrificeArtifactVoid).name = "dtSacrificeArtifactVoid";
			if (!WConfig.SacrificeMoreEnemySpawns.Value)
			{
				return;
			}
			object obj = <>c.<>9__3_0;
			if (obj == null)
			{
				hook_OnPrePopulateSceneServer val = delegate(orig_OnPrePopulateSceneServer orig, SceneDirector sceneDirector)
				{
					sceneDirector.monsterCredit = (int)((float)sceneDirector.monsterCredit * 1.6f);
					orig.Invoke(sceneDirector);
				};
				<>c.<>9__3_0 = val;
				obj = (object)val;
			}
			SacrificeArtifactManager.OnPrePopulateSceneServer += (hook_OnPrePopulateSceneServer)obj;
		}

		public static void SacrificeArtifactManager_OnServerCharacterDeath(orig_OnServerCharacterDeath orig, DamageReport damageReport)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			if ((int)damageReport.victimTeamIndex == 4 || (Object.op_Implicit((Object)(object)damageReport.victimBody) && ((Enum)damageReport.victimBody.bodyFlags).HasFlag((Enum)(object)(BodyFlags)1024)))
			{
				SacrificeArtifactManager.dropTable = (PickupDropTable)(object)dtSacrificeArtifactVoid;
			}
			else if (damageReport.victimBody.isChampion)
			{
				SacrificeArtifactManager.dropTable = (PickupDropTable)(object)dtSacrificeArtifactBoss;
			}
			else
			{
				SacrificeArtifactManager.dropTable = (PickupDropTable)(object)dtSacrificeArtifact;
			}
			orig.Invoke(damageReport);
		}
	}
	public class Soul
	{
		public static GameObject SoulLesserWispBody = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/WispSoulBody");

		public static GameObject SoulLesserWispMaster = LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/WispSoulMaster");

		public static GameObject SoulGreaterWispBody = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/GreaterWispBody"), "GreaterWispSoulBody", true);

		public static GameObject SoulGreaterWispMaster = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/GreaterWispMaster"), "GreaterWispSoulMaster", true);

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

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

		public static BodyIndex SoulGreaterWispIndex = (BodyIndex)(-1);

		public static BodyIndex SoulArchWispIndex = (BodyIndex)(-1);

		public static BodyIndex IndexAffixHealingCore = (BodyIndex)(-1);

		public static void Start()
		{
			SoulWispCreator();
		}

		public static void SoulWispCreator()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: 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_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Expected O, but got Unknown
			//IL_03de: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Expected O, but got Unknown
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Expected O, but got Unknown
			//IL_063f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_065b: Unknown result type (might be due to invalid IL or missing references)
			//IL_065f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0679: Unknown result type (might be due to invalid IL or missing references)
			//IL_067b: Unknown result type (might be due to invalid IL or missing references)
			//IL_067f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0699: 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_06af: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b8: 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_06c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c3: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(256, 16, (TextureFormat)12, false);
			ImageConversion.LoadImage(val, Resources.texRampWispSoulAlt, true);
			((Texture)val).filterMode = (FilterMode)0;
			((Texture)val).wrapMode = (TextureWrapMode)1;
			Texture2D val2 = new Texture2D(256, 16, (TextureFormat)12, false);
			ImageConversion.LoadImage(val2, Resources.texRampWispSoulAlt2, true);
			((Texture)val2).filterMode = (FilterMode)0;
			((Texture)val2).wrapMode = (TextureWrapMode)1;
			CharacterModel component = ((Component)SoulGreaterWispBody.transform.GetChild(0).GetChild(0)).GetComponent<CharacterModel>();
			component.baseLightInfos[0].defaultColor = ((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(2)).GetComponent<Light>().color;
			component.baseRendererInfos[0].defaultMaterial = ((Renderer)((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(0)).GetComponent<SkinnedMeshRenderer>()).material;
			component.baseRendererInfos[1].defaultMaterial = ((Renderer)((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(1)
				.GetChild(0)
				.GetChild(0)
				.GetChild(3)).GetComponent<ParticleSystemRenderer>()).material;
			component.baseRendererInfos[1].defaultMaterial.SetTexture("_RemapTex", (Texture)(object)val);
			component.baseRendererInfos[1].defaultMaterial.SetColor("_CutoffScroll", new Color(15f, 13f, 15f, 15f));
			component.baseRendererInfos[1].defaultMaterial.SetColor("_TintColor", new Color(1f, 1f, 1.8f, 0.6f));
			CharacterModel component2 = ((Component)SoulArchWispBody.transform.GetChild(0).GetChild(0)).GetComponent<CharacterModel>();
			component2.baseLightInfos[0].defaultColor = new Color(0f, 0.3476f, 1f, 1f);
			component2.baseRendererInfos[0].defaultMaterial = ((Renderer)((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(0)).GetComponent<SkinnedMeshRenderer>()).material;
			component2.baseRendererInfos[1].defaultMaterial = ((Renderer)((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(1)
				.GetChild(0)
				.GetChild(0)
				.GetChild(3)).GetComponent<ParticleSystemRenderer>()).material;
			component2.baseRendererInfos[1].defaultMaterial.SetTexture("_RemapTex", (Texture)(object)val2);
			component2.baseRendererInfos[1].defaultMaterial.SetColor("_CutoffScroll", new Color(15f, 13f, 15f, 15f));
			component2.baseRendererInfos[1].defaultMaterial.SetColor("_TintColor", new Color(0.9f, 0.9f, 1.8f, 0.6f));
			SoulGreaterWispMaster.GetComponent<CharacterMaster>().bodyPrefab = SoulGreaterWispBody;
			SoulArchWispMaster.GetComponent<CharacterMaster>().bodyPrefab = SoulArchWispBody;
			CharacterBody component3 = SoulLesserWispBody.GetComponent<CharacterBody>();
			CharacterBody component4 = SoulGreaterWispBody.GetComponent<CharacterBody>();
			CharacterBody component5 = SoulArchWispBody.GetComponent<CharacterBody>();
			SoulGreaterWispBody.GetComponent<DeathRewards>().logUnlockableDef = null;
			LanguageAPI.Add("SOULWISP_BODY_NAME", "Lesser Soul", "en");
			LanguageAPI.Add("SOULGREATERWISP_BODY_NAME", "Greater Soul", "en");
			LanguageAPI.Add("SOULARCHWISP_BODY_NAME", "Arch Soul", "en");
			Texture2D val3 = new Texture2D(128, 128, (TextureFormat)12, false);
			ImageConversion.LoadImage(val3, Resources.texBodyWispSoul, true);
			((Texture)val3).filterMode = (FilterMode)1;
			((Texture)val3).wrapMode = (TextureWrapMode)1;
			Texture2D val4 = new Texture2D(128, 128, (TextureFormat)12, false);
			ImageConversion.LoadImage(val4, Resources.texBodyGreaterWispSoul, true);
			((Texture)val4).filterMode = (FilterMode)1;
			((Texture)val4).wrapMode = (TextureWrapMode)1;
			Texture2D val5 = new Texture2D(128, 128, (TextureFormat)12, false);
			ImageConversion.LoadImage(val5, Resources.texBodyArchSoul, true);
			((Texture)val5).filterMode = (FilterMode)1;
			((Texture)val5).wrapMode = (TextureWrapMode)1;
			component3.portraitIcon = (Texture)(object)val3;
			component3.baseNameToken = "SOULWISP_BODY_NAME";
			component4.portraitIcon = (Texture)(object)val4;
			component4.baseNameToken = "SOULGREATERWISP_BODY_NAME";
			component5.portraitIcon = (Texture)(object)val5;
			component5.baseNameToken = "SOULARCHWISP_BODY_NAME";
			component3.baseMaxHealth = 50f;
			component3.levelMaxHealth = 50f;
			component3.baseMoveSpeed *= 1.25f;
			component3.baseAcceleration *= 1.25f;
			component3.baseRegen = 0f;
			component3.levelRegen = 0f;
			component3.baseDamage *= 0.65f;
			component3.levelDamage *= 0.65f;
			component3.baseAttackSpeed *= 1.1f;
			component3.autoCalculateLevelStats = false;
			component4.baseMaxHealth = 500f;
			component4.levelMaxHealth = 500f;
			component4.baseMoveSpeed *= 1.5f;
			component4.baseAcceleration *= 1.5f;
			component4.baseRegen = 0f;
			component4.levelRegen = 0f;
			component4.baseDamage *= 0.65f;
			component4.levelDamage *= 0.65f;
			component4.baseAttackSpeed *= 1.2f;
			component4.autoCalculateLevelStats = false;
			component5.baseMaxHealth = 1500f;
			component5.levelMaxHealth = 1500f;
			component5.baseMoveSpeed *= 1.75f;
			component5.baseAcceleration *= 1.75f;
			component5.baseRegen = 0f;
			component5.levelRegen = 0f;
			component5.baseDamage *= 0.65f;
			component5.levelDamage *= 0.65f;
			component5.baseAttackSpeed *= 1.35f;
			component5.autoCalculateLevelStats = false;
			ItemInfo val6 = default(ItemInfo);
			val6.itemString = "AlienHead";
			val6.count = 1;
			ItemInfo val7 = val6;
			val6 = default(ItemInfo);
			val6.itemString = "DeathMark";
			val6.count = 2;
			ItemInfo val8 = val6;
			val6 = default(ItemInfo);
			val6.itemString = "SlowOnHit";
			val6.count = 1;
			ItemInfo val9 = val6;
			ItemInfo[] array = (ItemInfo[])(object)new ItemInfo[0];
			array = array.Add(val7, val9, val8);
			SoulLesserWispMaster.AddComponent<GivePickupsOnStart>().itemInfos = array;
			SoulGreaterWispMaster.AddComponent<GivePickupsOnStart>().itemInfos = array;
			SoulArchWispMaster.AddComponent<GivePickupsOnStart>().itemInfos = array;
			SoulLesserWispMaster.AddComponent<MasterSuicideOnTimer>().lifeTimer = 15f;
			SoulGreaterWispMaster.AddComponent<MasterSuicideOnTimer>().lifeTimer = 25f;
			SoulArchWispMaster.AddComponent<MasterSuicideOnTimer>().lifeTimer = 40f;
			ContentAddition.AddBody(SoulGreaterWispBody);
			ContentAddition.AddMaster(SoulGreaterWispMaster);
			ContentAddition.AddBody(SoulArchWispBody);
			ContentAddition.AddMaster(SoulArchWispMaster);
		}

		public static CharacterMaster SoulSpawnGreaterUniversal(orig_Perform orig, MasterSummon self)
		{
			//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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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)
			if ((Object)(object)self.masterPrefab == (Object)(object)SoulLesserWispMaster && Object.op_Implicit((Object)(object)self.summonerBodyObject))
			{
				CharacterBody component = self.summonerBodyObject.GetComponent<CharacterBody>();
				self.inventoryToCopy = component.inventory;
				if (component.bodyIndex == SoulGreaterWispIndex || component.bodyIndex == SoulArchWispIndex || component.bodyIndex == IndexAffixHealingCore)
				{
					return null;
				}
				uint money;
				if (component.isChampion || component.inventory.GetItemCount(Items.InvadingDoppelganger) > 0)
				{
					self.masterPrefab = SoulArchWispMaster;
					money = component.master.money;
				}
				else if (component.baseMaxHealth > 475f)
				{
					self.masterPrefab = SoulGreaterWispMaster;
					money = component.master.money / 2;
				}
				else
				{
					money = component.master.money / 3;
				}
				CharacterMaster val = orig.Invoke(self);
				val.money = money;
				return val;
			}
			return orig.Invoke(self);
		}
	}
	public class Spite
	{
		public static void SpiteChangesCalledLate()
		{
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Expected O, but got Unknown
			if (BombArtifactManager.maxBombCount == 30)
			{
				BombArtifactManager.maxBombCount = 12;
			}
			if (BombArtifactManager.extraBombPerRadius == 4f)
			{
				BombArtifactManager.extraBombPerRadius = 7f;
			}
			if (BombArtifactManager.bombSpawnBaseRadius == 3f)
			{
				BombArtifactManager.bombSpawnBaseRadius = 36f;
			}
			if (BombArtifactManager.bombSpawnRadiusCoefficient == 4f)
			{
				BombArtifactManager.bombSpawnRadiusCoefficient = 1f;
			}
			if (BombArtifactManager.bombBlastRadius == 7f)
			{
				BombArtifactManager.bombBlastRadius = 8.5f;
			}
			if (BombArtifactManager.maxBombFallDistance == 60f)
			{
				BombArtifactManager.maxBombFallDistance = 240f;
			}
			if (BombArtifactManager.maxBombStepUpDistance == 8f)
			{
				BombArtifactManager.maxBombStepUpDistance = 16f;
			}
			if (BombArtifactManager.bombFuseTimeout == 8f)
			{
				BombArtifactManager.bombFuseTimeout = 7f;
			}
			BombArtifactManager.OnServerCharacterDeath += new Manipulator(BombArtifactManager_OnServerCharacterDeath);
		}

		private static void BombArtifactManager_OnServerCharacterDeath(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageReport", "victimTeamIndex")
			});
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageReport", "victimTeamIndex")
			}))
			{
				val.EmitDelegate<Func<TeamIndex, TeamIndex>>((Func<TeamIndex, TeamIndex>)((TeamIndex teamIndex) => (TeamIndex)4));
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: IL.BombArtifactManager_OnServerCharacterDeath");
			}
		}
	}
	public class Swarms
	{
		public static void BaseSplitDeath_OnEnter(orig_OnEnter orig, BaseSplitDeath self)
		{
			self.spawnCount *= 2;
			orig.Invoke(self);
		}

		public static int SwarmsDeployableLimitChanger(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Invalid comparison between Unknown and I4
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Invalid comparison between Unknown and I4
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Invalid comparison between Unknown and I4
			int num = orig.Invoke(self, slot);
			if ((int)slot == 6 || (int)slot == 14 || slot - 17 <= 3)
			{
				num *= 2;
			}
			return num;
		}
	}
	public class Vengence
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_FromMaster <>9__0_0;

			public static hook_FromMaster <>9__0_1;

			public static hook_GenerateWeightedSelection <>9__0_2;

			internal MasterCopySpawnCard <Start>b__0_0(orig_FromMaster orig, CharacterMaster srcCharacterMaster, bool copyItems, bool copyEquipment, Action<CharacterMaster> onPreSpawnSetup)
			{
				MasterCopySpawnCard val = orig.Invoke(srcCharacterMaster, copyItems, copyEquipment, onPreSpawnSetup);
				if (Object.op_Implicit((Object)(object)srcCharacterMaster) && Object.op_Implicit((Object)(object)srcCharacterMaster.inventory) && srcCharacterMaster.inventory.GetItemCount(Items.InvadingDoppelganger) > 0)
				{
					val.GiveItem(Items.InvadingDoppelganger, 1);
				}
				return val;
			}

			internal DoppelgangerSpawnCard <Start>b__0_1(orig_FromMaster orig, CharacterMaster srcCharacterMaster)
			{
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_0060: 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)
				DoppelgangerSpawnCard val = orig.Invoke(srcCharacterMaster);
				if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.RandomSurvivorOnRespawn))
				{
					BodyIndex val2 = (BodyIndex)(-1);
					SurvivorDef val3 = null;
					do
					{
						int num = Main.Random.Next(SurvivorCatalog.survivorCount);
						val2 = SurvivorCatalog.GetBodyIndexFromSurvivorIndex((SurvivorIndex)num);
						val3 = SurvivorCatalog.GetSurvivorDef((SurvivorIndex)num);
					}
					while (val3.hidden);
					((SpawnCard)val).prefab = MasterCatalog.GetMasterPrefab(MasterCatalog.FindAiMasterIndexForBody(val2));
				}
				return val;
			}

			internal void <Start>b__0_2(orig_GenerateWeightedSelection orig, DoppelgangerDropTable self)
			{
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_00af: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self);
				if (!Object.op_Implicit((Object)(object)self.doppelgangerInventory))
				{
					return;
				}
				foreach (ItemIndex item in self.doppelgangerInventory.itemAcquisitionOrder)
				{
					ItemIndex val = item;
					ItemDef itemDef = ItemCatalog.GetItemDef(item);
					if ((Object)(object)itemDef == (Object)(object)Items.ExtraLifeConsumed)
					{
						itemDef = Items.ExtraLife;
						val = Items.ExtraLife.itemIndex;
						PickupIndex val2 = PickupCatalog.FindPickupIndex(val);
						self.selector.AddChoice(val2, self.tier3Weight);
					}
					else if ((Object)(object)itemDef == (Object)(object)Items.ExtraLifeVoidConsumed)
					{
						itemDef = Items.ExtraLifeVoid;
						val = Items.ExtraLifeVoid.itemIndex;
						PickupIndex val3 = PickupCatalog.FindPickupIndex(val);
						self.selector.AddChoice(val3, self.voidTier3Weight);
					}
				}
			}
		}

		public static void Start()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Expected O, but got Unknown
			DoppelgangerInvasionManager.CreateDoppelganger += new hook_CreateDoppelganger(DoppelgangerInvasionManager_CreateDoppelganger);
			object obj = <>c.<>9__0_0;
			if (obj == null)
			{
				hook_FromMaster val = delegate(orig_FromMaster orig, CharacterMaster srcCharacterMaster, bool copyItems, bool copyEquipment, Action<CharacterMaster> onPreSpawnSetup)
				{
					MasterCopySpawnCard val11 = orig.Invoke(srcCharacterMaster, copyItems, copyEquipment, onPreSpawnSetup);
					if (Object.op_Implicit((Object)(object)srcCharacterMaster) && Object.op_Implicit((Object)(object)srcCharacterMaster.inventory) && srcCharacterMaster.inventory.GetItemCount(Items.InvadingDoppelganger) > 0)
					{
						val11.GiveItem(Items.InvadingDoppelganger, 1);
					}
					return val11;
				};
				<>c.<>9__0_0 = val;
				obj = (object)val;
			}
			MasterCopySpawnCard.FromMaster += (hook_FromMaster)obj;
			object obj2 = <>c.<>9__0_1;
			if (obj2 == null)
			{
				hook_FromMaster val2 = delegate(orig_FromMaster orig, CharacterMaster srcCharacterMaster)
				{
					//IL_002d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0044: Unknown result type (might be due to invalid IL or missing references)
					//IL_0049: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: 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)
					DoppelgangerSpawnCard val8 = orig.Invoke(srcCharacterMaster);
					if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.RandomSurvivorOnRespawn))
					{
						BodyIndex val9 = (BodyIndex)(-1);
						SurvivorDef val10 = null;
						do
						{
							int num = Main.Random.Next(SurvivorCatalog.survivorCount);
							val9 = SurvivorCatalog.GetBodyIndexFromSurvivorIndex((SurvivorIndex)num);
							val10 = SurvivorCatalog.GetSurvivorDef((SurvivorIndex)num);
						}
						while (val10.hidden);
						((SpawnCard)val8).prefab = MasterCatalog.GetMasterPrefab(MasterCatalog.FindAiMasterIndexForBody(val9));
					}
					return val8;
				};
				<>c.<>9__0_1 = val2;
				obj2 = (object)val2;
			}
			DoppelgangerSpawnCard.FromMaster += (hook_FromMaster)obj2;
			if (!WConfig.VengenceGoodDrop.Value)
			{
				return;
			}
			DoppelgangerDropTable val3 = Addressables.LoadAssetAsync<DoppelgangerDropTable>((object)"RoR2/Base/ShadowClone/dtDoppelganger.asset").WaitForCompletion();
			((PickupDropTable)val3).canDropBeReplaced = false;
			val3.tier1Weight = 0.1f;
			val3.tier2Weight = 60f;
			val3.tier3Weight = 30f;
			val3.bossWeight = 50f;
			val3.lunarItemWeight = 0.1f;
			val3.voidTier1Weight = 0.1f;
			val3.voidTier2Weight = 40f;
			val3.voidTier3Weight = 20f;
			val3.voidBossWeight = 15f;
			object obj3 = <>c.<>9__0_2;
			if (obj3 == null)
			{
				hook_GenerateWeightedSelection val4 = delegate(orig_GenerateWeightedSelection orig, DoppelgangerDropTable self)
				{
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003a: Unknown result type (might be due to invalid IL or missing references)
					//IL_003c: Unknown result type (might be due to invalid IL or missing references)
					//IL_003d: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0065: Unknown