Decompiled source of VanillaArtifactsPlus v3.1.1
FixedspawnDissonance.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates.Gup; 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.CharacterAI; 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.1", 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 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_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 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; } private static void PickupDropletController_CreateCommandCube(orig_CreateCommandCube orig, PickupDropletController self) { throw new NotImplementedException(); } 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 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 Devotion { 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown DevotionInventoryController.OnDevotionArtifactEnabled += new hook_OnDevotionArtifactEnabled(FixMissingEliteTypes); DevotionInventoryController.OnDevotionArtifactDisabled += new hook_OnDevotionArtifactDisabled(DevotionInventoryController_OnDevotionArtifactDisabled); LemurianEggController.CreateItemTakenOrb += new hook_CreateItemTakenOrb(LemurianEggController_CreateItemTakenOrb); ScoreboardController.Rebuild += new hook_Rebuild(AddLemurianInventory); } private static void DevotionInventoryController_OnDevotionArtifactDisabled(orig_OnDevotionArtifactDisabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { if ((Object)(object)artifactDef == (Object)(object)Artifacts.Devotion) { List<EquipmentIndex> lowLevelEliteBuffs = new List<EquipmentIndex>(DevotionInventoryController.lowLevelEliteBuffs); List<EquipmentIndex> highLevelEliteBuffs = new List<EquipmentIndex>(DevotionInventoryController.highLevelEliteBuffs); orig.Invoke(runArtifactManager, artifactDef); DevotionInventoryController.lowLevelEliteBuffs = lowLevelEliteBuffs; DevotionInventoryController.highLevelEliteBuffs = highLevelEliteBuffs; } else { orig.Invoke(runArtifactManager, artifactDef); } } private static void LemurianEggController_CreateItemTakenOrb(orig_CreateItemTakenOrb orig, LemurianEggController self, Vector3 effectOrigin, GameObject targetObject, ItemIndex itemIndex) { //IL_003b: 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) if (!Object.op_Implicit((Object)(object)DevotionInventoryController.s_effectPrefab)) { Items.BoostDamage.hidden = true; Items.BoostHp.hidden = true; DevotionInventoryController.s_effectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/ItemTakenOrbEffect"); } orig.Invoke(self, effectOrigin, targetObject, itemIndex); } private static void AddLemurianInventory(orig_Rebuild orig, ScoreboardController self) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (DevotionInventoryController.InstanceList.Count <= 0) { return; } List<CharacterMaster> list = new List<CharacterMaster>(); Inventory val3 = default(Inventory); foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { list.Add(instance.master); if (!WConfig.DevotionOnlyOneInventory.Value) { continue; } CharacterMaster master = instance.master; MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)master).netId); if (val == null) { continue; } MinionOwnership[] members = val.members; foreach (MinionOwnership val2 in members) { if (Object.op_Implicit((Object)(object)val2) && ((Component)val2).TryGetComponent<Inventory>(ref val3)) { if (val3.GetItemCount(Items.LemurianHarness) > 0) { list.Add(((Component)val2).GetComponent<CharacterMaster>()); } break; } } } if (!WConfig.DevotionOnlyOneInventory.Value) { CharacterMaster master2 = LocalUserManager.readOnlyLocalUsersList.First().cachedMasterController.master; MinionGroup val4 = MinionGroup.FindGroup(((NetworkBehaviour)master2).netId); if (val4 != null) { MinionOwnership[] members2 = val4.members; DevotedLemurianController val6 = default(DevotedLemurianController); foreach (MinionOwnership val5 in members2) { if (Object.op_Implicit((Object)(object)val5) && ((Component)((Component)val5).GetComponent<CharacterMaster>()).TryGetComponent<DevotedLemurianController>(ref val6)) { list.Add(((Component)val5).GetComponent<CharacterMaster>()); break; } } } } self.SetStripCount(list.Count); for (int k = 0; k < list.Count; k++) { self.stripAllocator.elements[k].SetMaster(list[k]); } } private static void FixMissingEliteTypes(orig_OnDevotionArtifactEnabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(runArtifactManager, artifactDef); if (!((Object)(object)artifactDef != (Object)(object)Artifacts.Devotion)) { Items.BoostDamage.hidden = true; Items.BoostHp.hidden = true; if (!DevotionInventoryController.lowLevelEliteBuffs.Contains(Elites.Aurelionite.eliteEquipmentDef.equipmentIndex) && Elites.Aurelionite.IsAvailable()) { DevotionInventoryController.lowLevelEliteBuffs.Add(Elites.Aurelionite.eliteEquipmentDef.equipmentIndex); DevotionInventoryController.highLevelEliteBuffs.Add(Elites.Aurelionite.eliteEquipmentDef.equipmentIndex); DevotionInventoryController.highLevelEliteBuffs.Add(Elites.Bead.eliteEquipmentDef.equipmentIndex); } } } } public class Dissonance { public static DirectorCard DissoGolem = null; public static DirectorCard DissoTitan = null; public static DirectorCard DissoVermin = null; public static DirectorCard DissoVerminFlying = null; public static DirectorCard DissoBeetle = null; public static DirectorCard DissoBeetleGuard = null; public static DirectorCard DissoBeetleQueen = 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 //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown Mixenemymaker(); ClassicStageInfo.RebuildCards += new hook_RebuildCards(DissoanceLunerEliteAll); ClassicStageInfo.HandleMixEnemyArtifact += new hook_HandleMixEnemyArtifact(ClassicStageInfo_HandleMixEnemyArtifact); FamilyDirectorCardCategorySelection.OnSelected += new hook_OnSelected(FamilyDirectorCardCategorySelection_OnSelected); } private static void FamilyDirectorCardCategorySelection_OnSelected(orig_OnSelected orig, FamilyDirectorCardCategorySelection self, ClassicStageInfo stageInfo) { if (!RunArtifactManager.instance.IsArtifactEnabled(Artifacts.MixEnemy)) { orig.Invoke(self, stageInfo); } } 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, DirectorCardCategorySelection forcedMonsterCategory, DirectorCardCategorySelection forcedInteractableCategory) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, forcedMonsterCategory, forcedInteractableCategory); 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_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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //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) //IL_005c: 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_006a: 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_0079: Expected O, but got Unknown //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Expected O, but got Unknown //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Expected O, but got Unknown //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Expected O, but got Unknown DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/MixEnemy/dccsMixEnemy.asset").WaitForCompletion(); DirectorCard val2 = new DirectorCard { spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav"), preventOverhead = false, selectionWeight = 1, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; DirectorCard val3 = new DirectorCard { spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscHermitCrab"), selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)2 }; val.categories[0].selectionWeight = 3f; val.categories[1].selectionWeight = 3f; val.categories[2].selectionWeight = 4f; val.categories[3].cards = val.categories[3].cards.Remove(val.categories[3].cards[0]); val.AddCard(0, val2); bool flag = false; DirectorCard val4 = null; DirectorCard val5 = null; for (int i = 0; val.categories[2].cards.Length > i; i++) { if (((Object)val.categories[2].cards[i].spawnCard).name.EndsWith("Child")) { flag = true; } else if (((Object)val.categories[2].cards[i].spawnCard).name.EndsWith("lMini")) { val4 = val.categories[2].cards[i]; val.categories[2].cards[i] = val3; } else if (((Object)val.categories[2].cards[i].spawnCard).name.Equals("cscVermin")) { DissoVermin = val.categories[2].cards[i]; } else if (((Object)val.categories[2].cards[i].spawnCard).name.Equals("cscFlyingVermin")) { DissoVerminFlying = val.categories[2].cards[i]; } else if (((Object)val.categories[2].cards[i].spawnCard).name.Equals("cscBeetle")) { DissoBeetle = val.categories[2].cards[i]; } } for (int j = 0; val.categories[1].cards.Length > j; j++) { if (((Object)val.categories[1].cards[j].spawnCard).name.Equals("cscLunarWisp")) { val5 = val.categories[1].cards[j]; val.categories[1].cards[j] = val4; } else if (((Object)val.categories[1].cards[j].spawnCard).name.Equals("cscGolem")) { DissoGolem = val.categories[1].cards[j]; } else if (((Object)val.categories[1].cards[j].spawnCard).name.Equals("cscBeetleGuard")) { DissoBeetleGuard = val.categories[1].cards[j]; } } for (int k = 0; val.categories[0].cards.Length > k; k++) { if (((Object)val.categories[0].cards[k].spawnCard).name.Equals("cscTitanBlackBeach")) { DissoTitan = val.categories[1].cards[k]; } else if (((Object)val.categories[0].cards[k].spawnCard).name.Equals("cscBeetleQueen")) { DissoBeetleQueen = val.categories[0].cards[k]; } } val.AddCard(0, val5); if (!flag) { DirectorCard val6 = new DirectorCard { spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC2/Child/cscChild.asset").WaitForCompletion(), selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; DirectorCard val7 = new DirectorCard { spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC2/Scorchling/cscScorchling.asset").WaitForCompletion(), selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; DirectorCard val8 = new DirectorCard { spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC2/Halcyonite/cscHalcyonite.asset").WaitForCompletion(), selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; val.AddCard(2, val6); val.AddCard(1, val7); val.AddCard(0, val8); } } public static void ClassicStageInfo_HandleMixEnemyArtifact(orig_HandleMixEnemyArtifact orig, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng) { //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_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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(monsterCategories, rng); if (DissoTitan != null) { switch (Main.Random.Next(1, 5)) { 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; } } if (DissoGolem != null) { switch (Main.Random.Next(1, 5)) { 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; } } if (DissoVermin != null) { switch (Main.Random.Next(1, 3)) { 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; } } if (DissoVerminFlying != null) { switch (Main.Random.Next(1, 3)) { 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; } } } } public class Enigma { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_CalculateEquipmentCooldownScale <>9__4_0; internal float <MakeEnigmaFragment>b__4_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() { ColorUtility.TryParseHtmlString("#AE6BCB", ref CustomColor); 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; } LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Tonic").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Meteor").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BurnNearby").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/CrippleWard").enigmaCompatible = true; if (!WConfig.DisableNewContent.Value) { MakeEnigmaFragment(); } } public static void MakeEnigmaFragment() { //IL_0020: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown 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__4_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__4_0 = val4; obj = (object)val4; } Inventory.CalculateEquipmentCooldownScale += (hook_CalculateEquipmentCooldownScale)obj; } public static void EnigmaCallLate() { //IL_00d5: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_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) if (!WConfig.DisableNewContent.Value) { Texture2D val = Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/texItemEnigmaP.png"); ((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)23); Items.DroneWeapons.tags = Items.DroneWeapons.tags.Add((ItemTag)4); Items.BarrierOnOverHeal.tags = Items.BarrierOnOverHeal.tags.Add((ItemTag)23); Items.CritDamage.tags = Items.CritDamage.tags.Add((ItemTag)4); Items.RegeneratingScrap.tags = Items.RegeneratingScrap.tags.Add((ItemTag)4); Items.IncreaseDamageOnMultiKill.tags = Items.IncreaseDamageOnMultiKill.tags.Add((ItemTag)4); Items.DelayedDamage.tags = Items.DelayedDamage.tags.Add((ItemTag)4); Items.ExtraStatsOnLevelUp.tags = Items.ExtraStatsOnLevelUp.tags.Add((ItemTag)4); Items.LowerPricedChests.tags = Items.LowerPricedChests.tags.Add((ItemTag)4); Items.ExtraShrineItem.tags = Items.ExtraShrineItem.tags.Add((ItemTag)4); Items.TeleportOnLowHealth.tags = Items.TeleportOnLowHealth.tags.Add((ItemTag)23); Items.GoldOnStageStart.tags = Items.GoldOnStageStart.tags.Add((ItemTag)4); Items.ResetChests.tags = Items.ResetChests.tags.Add((ItemTag)4); Items.BoostAllStats.tags = Items.BoostAllStats.tags.Add((ItemTag)4); } } public class Honor { public static List<EquipmentDef> EliteEquipmentDefs = new List<EquipmentDef>(); public static void Start() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown if (WConfig.HonorPerfectedLunarBosses.Value) { ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(ScriptedCombatEncounter_BeginEncounter); InfiniteTowerExplicitSpawnWaveController.Initialize += new hook_Initialize(InfiniteTowerExplicitSpawnWaveController_Initialize); } CharacterBody.UpdateItemAvailability += new hook_UpdateItemAvailability(RemoveFireTrailFromWorm); if (WConfig.HonorStartingEliteEquip.Value) { Run.Start += new hook_Start(HonorGiveEliteEquipOnStart); } } private static void InfiniteTowerExplicitSpawnWaveController_Initialize(orig_Initialize orig, InfiniteTowerExplicitSpawnWaveController self, int waveIndex, Inventory enemyInventory, GameObject spawnTargetObject) { if (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.EliteOnly)) { string name = ((Object)self.spawnList[0].spawnCard).name; if (name.StartsWith("cscBrother")) { self.spawnList[0].eliteDef = Elites.Lunar; } else if (name.StartsWith("cscScavLunar")) { self.spawnList[0].eliteDef = Elites.Lunar; } else if (name.StartsWith("cscMiniVoidR")) { self.spawnList[0].eliteDef = Elites.Void; } else if (name.StartsWith("cscITVoidMe")) { self.spawnList[0].eliteDef = Elites.Void; } else if (name.StartsWith("cscFalseSon")) { self.spawnList[0].eliteDef = Elites.Aurelionite; } } orig.Invoke(self, waveIndex, enemyInventory, spawnTargetObject); } private static void ScriptedCombatEncounter_BeginEncounter(orig_BeginEncounter orig, ScriptedCombatEncounter self) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!RunArtifactManager.instance.IsArtifactEnabled(Artifacts.EliteOnly)) { return; } string name = ((Object)self.spawns[0].spawnCard).name; if (name.StartsWith("cscBrother")) { for (int i = 0; i < self.combatSquad.memberCount; i++) { self.combatSquad.membersList[i].inventory.SetEquipmentIndex(Equipment.AffixLunar.equipmentIndex); } } else if (name.StartsWith("cscMiniVoidR")) { for (int j = 0; j < self.combatSquad.memberCount; j++) { self.combatSquad.membersList[j].inventory.SetEquipmentIndex(Equipment.EliteVoidEquipment.equipmentIndex); } } else if (name.StartsWith("cscFalseSon")) { for (int k = 0; k < self.combatSquad.memberCount; k++) { self.combatSquad.membersList[k].inventory.SetEquipmentIndex(Equipment.EliteAurelioniteEquipment.equipmentIndex); } } } private static void RemoveFireTrailFromWorm(orig_UpdateItemAvailability orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).GetComponent<WormBodyPositions2>())) { self.itemAvailability.hasFireTrail = false; } } public static void PreventPerfectedMithrixFromRegenningShield(orig_OnOutOfDangerChanged orig, CharacterBody self) { orig.Invoke(self); if (((Object)self).name.StartsWith("Bro")) { self.outOfDangerStopwatch = -1000f; } } 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) 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 && EliteEquipmentDefs.Count > 0) { int index = Main.Random.Next(EliteEquipmentDefs.Count); component.SetEquipment(new EquipmentState(EliteEquipmentDefs[index].equipmentIndex, FixedTimeStamp.negativeInfinity, (byte)0, false), 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 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: 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_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_040d: 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" }; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Halcyonite/HalcyoniteBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.Knurl" }; DeathRewards component2 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BeetleBody").GetComponent<DeathRewards>(); component2.bossPickup = bossPickup2; component2 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BeetleGuardBody").GetComponent<DeathRewards>(); component2.bossPickup = bossPickup2; DeathRewards component3 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/JellyfishBody").GetComponent<DeathRewards>(); component3.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.NovaOnLowHealth" }; DeathRewards component4 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/WispBody").GetComponent<DeathRewards>(); component4.bossPickup = bossPickup; component4 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/GreaterWispBody").GetComponent<DeathRewards>(); component4.bossPickup = bossPickup; DeathRewards component5 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LemurianBody").GetComponent<DeathRewards>(); component5.bossPickup = bossPickup4; component5 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LemurianBruiserBody").GetComponent<DeathRewards>(); component5.bossPickup = bossPickup4; component5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Scorchling/ScorchlingBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component5.bossPickup = bossPickup4; DeathRewards component6 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayBruiserBody").GetComponent<DeathRewards>(); component6.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.SiphonOnLowHealth" }; component6 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayGrenadierBody").GetComponent<DeathRewards>(); component6.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.SiphonOnLowHealth" }; DeathRewards component7 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ImpBody").GetComponent<DeathRewards>(); component7.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.BleedOnHitAndExplode" }; DeathRewards component8 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ParentBody").GetComponent<DeathRewards>(); component8.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.ParentEgg" }; component8 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Child/ChildBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component8.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.ParentEgg" }; DeathRewards component9 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/RoboBallMiniBody").GetComponent<DeathRewards>(); component9.bossPickup = bossPickup3; component9 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/VultureBody").GetComponent<DeathRewards>(); component9.bossPickup = bossPickup3; DeathRewards component10 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarExploderBody").GetComponent<DeathRewards>(); component10.bossPickup = bossPickup5; component10 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarGolemBody").GetComponent<DeathRewards>(); component10.bossPickup = bossPickup5; component10 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarWispBody").GetComponent<DeathRewards>(); component10.bossPickup = bossPickup5; DeathRewards component11 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/MinorConstructBody").GetComponent<DeathRewards>(); component11.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.MinorConstructOnKill" }; DeathRewards component12 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/VoidMegaCrabBody").GetComponent<DeathRewards>(); component12.bossPickup = bossPickup6; component12 = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/NullifierBody").GetComponent<DeathRewards>(); component12.bossPickup = bossPickup6; component12 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component12.bossPickup = bossPickup6; component12 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidBarnacle/VoidBarnacleBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component12.bossPickup = bossPickup6; component12 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/VoidInfestorBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component12.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; public static GameObject SoulGreaterWispMaster; public static GameObject SoulArchWispBody; public static GameObject SoulArchWispMaster; 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = SoulLesserWispBody.GetComponent<CharacterBody>(); Texture2D val = Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/texBodyWispSoul.png"); ((Texture)val).wrapMode = (TextureWrapMode)1; component.baseMaxHealth = 50f; component.levelMaxHealth = 50f; component.baseMoveSpeed *= 1.25f; component.baseAcceleration *= 1.25f; component.baseRegen = 0f; component.levelRegen = 0f; component.baseDamage *= 0.65f; component.levelDamage *= 0.65f; component.baseAttackSpeed *= 1.1f; component.autoCalculateLevelStats = false; ItemInfo val2 = default(ItemInfo); val2.itemString = "AlienHead"; val2.count = 1; ItemInfo val3 = val2; val2 = default(ItemInfo); val2.itemString = "DeathMark"; val2.count = 2; ItemInfo val4 = val2; val2 = default(ItemInfo); val2.itemString = "SlowOnHit"; val2.count = 1; ItemInfo val5 = val2; ItemInfo[] array = (ItemInfo[])(object)new ItemInfo[0]; array = array.Add(val3, val5, val4); SoulLesserWispMaster.AddComponent<GivePickupsOnStart>().itemInfos = array; SoulLesserWispMaster.AddComponent<MasterSuicideOnTimer>().lifeTimer = 15f; if (!WConfig.DisableNewContent.Value) { SoulGreaterWispBody = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/GreaterWispBody"), "GreaterWispSoulBody", true); SoulGreaterWispMaster = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/GreaterWispMaster"), "GreaterWispSoulMaster", true); SoulArchWispBody = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/ArchWispBody"), "SoulArchWispBody", true); SoulArchWispMaster = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/ArchWispMaster"), "SoulArchWispMaster", true); Texture2D val6 = Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/texRampWispSoulAlt.png"); ((Texture)val6).filterMode = (FilterMode)0; ((Texture)val6).wrapMode = (TextureWrapMode)1; Texture2D val7 = Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/texRampWispSoulAlt2.png"); ((Texture)val7).filterMode = (FilterMode)0; ((Texture)val7).wrapMode = (TextureWrapMode)1; CharacterModel component2 = ((Component)SoulGreaterWispBody.transform.GetChild(0).GetChild(0)).GetComponent<CharacterModel>(); component2.baseLightInfos[0].defaultColor = ((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(2)).GetComponent<Light>().color; 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)val6); component2.baseRendererInfos[1].defaultMaterial.SetColor("_CutoffScroll", new Color(15f, 13f, 15f, 15f)); component2.baseRendererInfos[1].defaultMaterial.SetColor("_TintColor", new Color(1f, 1f, 1.8f, 0.6f)); CharacterModel component3 = ((Component)SoulArchWispBody.transform.GetChild(0).GetChild(0)).GetComponent<CharacterModel>(); component3.baseLightInfos[0].defaultColor = new Color(0f, 0.3476f, 1f, 1f); component3.baseRendererInfos[0].defaultMaterial = ((Renderer)((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(0)).GetComponent<SkinnedMeshRenderer>()).material; component3.baseRendererInfos[1].defaultMaterial = ((Renderer)((Component)SoulLesserWispBody.transform.GetChild(0).GetChild(0).GetChild(1) .GetChild(0) .GetChild(0) .GetChild(3)).GetComponent<ParticleSystemRenderer>()).material; component3.baseRendererInfos[1].defaultMaterial.SetTexture("_RemapTex", (Texture)(object)val7); component3.baseRendererInfos[1].defaultMaterial.SetColor("_CutoffScroll", new Color(15f, 13f, 15f, 15f)); component3.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 component4 = SoulGreaterWispBody.GetComponent<CharacterBody>(); CharacterBody component5 = SoulArchWispBody.GetComponent<CharacterBody>(); SoulGreaterWispBody.GetComponent<DeathRewards>().logUnlockableDef = null; Texture2D val8 = Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/texBodyGreaterWispSoul.png"); ((Texture)val8).wrapMode = (TextureWrapMode)1; Texture2D val9 = Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/texBodyArchSoul.png"); ((Texture)val9).wrapMode = (TextureWrapMode)1; component.portraitIcon = (Texture)(object)val; component.baseNameToken = "SOULWISP_BODY_NAME"; component4.portraitIcon = (Texture)(object)val8; component4.baseNameToken = "SOULGREATERWISP_BODY_NAME"; component5.portraitIcon = (Texture)(object)val9; component5.baseNameToken = "SOULARCHWISP_BODY_NAME"; 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; SoulGreaterWispMaster.AddComponent<GivePickupsOnStart>().itemInfos = array; SoulArchWispMaster.AddComponent<GivePickupsOnStart>().itemInfos = array; 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(