using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Missions.AccessCodes.Node; using EntityStates.Missions.Goldshores; using HG; using IL; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.Missions.AccessCodes.Node; using On.EntityStates.Missions.Goldshores; using On.RoR2; using On.RoR2.Networking; using ProperSave; using R2API; using R2API.Utils; using RiskySotS.Tweaks.Enemies; using RiskySotS.Tweaks.Interactables; using RiskySotS.Tweaks.Progression; using RoR2; using RoR2.ExpansionManagement; using RoR2.Navigation; using RoR2.Networking; using RoR2.Projectile; using RoR2.UI; using RoR2BepInExPack.GameAssetPathsBetter; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RiskySotS")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+088e0fb8145bc2838b0ab40c8568d836c6585ed7")] [assembly: AssemblyProduct("RiskySotS")] [assembly: AssemblyTitle("RiskySotS")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace RiskySotS { internal static class CommonHooks { internal static void DisableRemoveBuffGeneric(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "RemoveBuff") })) { val.EmitDelegate>((Func)((BuffIndex orig) => (BuffIndex)(-1))); } else { Debug.LogError((object)"RiskySotS: DisableRemoveBuffGeneric IL Hook failed"); } } internal static void DisableAddBuffGeneric(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "AddBuff") })) { val.EmitDelegate>((Func)((BuffIndex orig) => (BuffIndex)(-1))); } else { Debug.LogError((object)"RiskySotS: DisableAddBuffGeneric IL Hook failed"); } } } internal class LanguageTokens { public LanguageTokens() { LanguageAPI.Add("SHRINE_COLOSSUS_RISKYSOTS_NAME", "Shrine of the Colossus"); LanguageAPI.Add("SHRINE_COLOSSUS_RISKYSOTS_CONTEXT", "Pray to Shrine of the Colossus"); LanguageAPI.Add("SHRINE_COLOSSUS_RISKYSOTS_DESCRIPTION", "A Shrine that marks the path towards the Meridian.\n\nActivate the Shrine on 2 consecutive stages to guarantee a Halcyon Shrine on the 3rd stage."); LanguageAPI.Add("SHRINE_COLOSSUS_RISKYSOTS_LORE", "LORE HERE"); LanguageAPI.Add("SHRINE_COLOSSUS_RISKYSOTS_ACTIVATION_1", "Lightning flashes in the distance."); LanguageAPI.Add("SHRINE_COLOSSUS_RISKYSOTS_TP_FINISH", "The storm draws closer."); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.RiskyLives.RiskySotS", "RiskySotS", "1.2.3")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class RiskySotSPlugin : BaseUnityPlugin { internal static bool loopVariantPluginLoaded; public void Awake() { ReadConfig(); ModCompat(); new LanguageTokens(); new EarlygameSpawnPools(); new Halcyonite(); new Child(); new Scorchling(); new ProgressionRework(); new NerfInteractableCredits(); new RemoveReviveShrine(); new HalcyonShrine(); } private void ReadConfig() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0061: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_009a: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d3: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_010c: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_0141: Expected O, but got Unknown //IL_015b: 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_0176: Expected O, but got Unknown //IL_0176: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Expected O, but got Unknown //IL_01ab: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01e0: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_0215: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_024a: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Expected O, but got Unknown //IL_027f: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02b4: Expected O, but got Unknown //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown //IL_02e9: Expected O, but got Unknown //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_031e: Expected O, but got Unknown ProgressionRework.enabled = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Progression", "Progression Rework"), true, new ConfigDescription("SotS stages are mixed into the normal map pool, and Meridian access is changed.", (AcceptableValueBase)null, Array.Empty())).Value; ProgressionRework.allowVariantsPreLoop = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Progression", "Progression Rework - Allow Variants Pre-Loop"), true, new ConfigDescription("SotS stage variants can show up on the first loop.", (AcceptableValueBase)null, Array.Empty())).Value; ProgressionRework.goldShrineChance = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Progression", "Progression Rework - Altar of Gold Chance"), 33f, new ConfigDescription("Chance for Altar of Gold to spawn on the next stage after hitting a Shrine of the Colossus.", (AcceptableValueBase)null, Array.Empty())).Value; ColossusAccessShrine.initialSpawnChance = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Progression", "Progression Rework - Shrine of the Colossus - Initial Spawn Chance"), 100f, new ConfigDescription("Chance for Shrine of the Colossus to spawn on Stage 1.", (AcceptableValueBase)null, Array.Empty())).Value; ColossusAccessShrine.loopSpawnChance = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Progression", "Progression Rework - Shrine of the Colossus - Loop Spawn Chance"), 100f, new ConfigDescription("Chance for Shrine of the Colossus to spawn on Stage 1 when Looping.", (AcceptableValueBase)null, Array.Empty())).Value; HalcyonShrine.fasterCharging = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Interactables", "Halcyon Shrine - Faster Charging"), true, new ConfigDescription("Halcyon Shrine charges faster.", (AcceptableValueBase)null, Array.Empty())).Value; HalcyonShrine.consistentScaling = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Interactables", "Halcyon Shrine - Consistent Scaling"), true, new ConfigDescription("Halcyon Shrine boss scaling remains consistent throughout the run.", (AcceptableValueBase)null, Array.Empty())).Value; RemoveReviveShrine.enabled = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Interactables", "Remove Shrine of Shaping"), true, new ConfigDescription("Removes Shrine of Shaping.", (AcceptableValueBase)null, Array.Empty())).Value; NerfInteractableCredits.enabled = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Interactables", "Nerf Interactable Credits"), true, new ConfigDescription("Brings interactable credits in-line with Vanilla stages.", (AcceptableValueBase)null, Array.Empty())).Value; EarlygameSpawnPools.enabled = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Enemies", "Adjust Earlygame Spawnpools"), true, new ConfigDescription("Removes lategame enemies from earlygame stages.", (AcceptableValueBase)null, Array.Empty())).Value; Halcyonite.enabled = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Enemies", "Halcyonite - Hitboxes"), true, new ConfigDescription("Adjusts Halcyonite hitboxes, still kinda jank tho.", (AcceptableValueBase)null, Array.Empty())).Value; Child.removeIFrames = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Enemies", "Child - Remove I-Frames"), true, new ConfigDescription("Removes invulnerability from teleport.", (AcceptableValueBase)null, Array.Empty())).Value; Child.nerfDamage = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Enemies", "Child - Nerf Damage"), true, new ConfigDescription("Reduces projectile damage to be in line with other enmies.", (AcceptableValueBase)null, Array.Empty())).Value; Scorchling.removeIFrames = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Enemies", "Scorch Worm - Remove I-Frames"), true, new ConfigDescription("Removes invulnerability from burrow.", (AcceptableValueBase)null, Array.Empty())).Value; Scorchling.nerfDamage = ((BaseUnityPlugin)this).Config.Bind(new ConfigDefinition("Enemies", "Scorch Worm - Nerf Damage"), true, new ConfigDescription("Reduces projectile damage a bit.", (AcceptableValueBase)null, Array.Empty())).Value; } private void ModCompat() { bool flag = Chainloader.PluginInfos.ContainsKey("com.Moffein.RiskyTweaks"); bool flag2 = Chainloader.PluginInfos.ContainsKey("com.RiskyLives.RiskyMod"); loopVariantPluginLoaded = Chainloader.PluginInfos.ContainsKey("Wolfo.LoopVariantConfig"); if (Chainloader.PluginInfos.ContainsKey("com.Moffein.RemoveReviveShrine")) { RemoveReviveShrine.enabled = false; } if (Chainloader.PluginInfos.ContainsKey("Onyx.HalcyonKnight")) { Halcyonite.enabled = false; } if (Chainloader.PluginInfos.ContainsKey("com.Viliger.SpeedUpHalcyoniteShrine")) { HalcyonShrine.fasterCharging = false; } if (flag2) { Child.nerfDamage = false; Scorchling.nerfDamage = false; } if (flag) { Child.removeIFrames = false; Scorchling.removeIFrames = false; } } } public static class SneedUtils { public enum MonsterCategories { BasicMonsters, Minibosses, Champions } private static SceneDef bazaarSceneDef = Addressables.LoadAssetAsync((object)"RoR2/Base/bazaar/bazaar.asset").WaitForCompletion(); public static bool IsInBazaar() { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); return Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && (Object)(object)sceneDefForCurrentScene == (Object)(object)bazaarSceneDef; } public static bool SetAddressableEntityStateField(string fullEntityStatePath, string fieldName, string value) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) EntityStateConfiguration val = Addressables.LoadAssetAsync((object)fullEntityStatePath).WaitForCompletion(); for (int i = 0; i < val.serializedFieldsCollection.serializedFields.Length; i++) { if (val.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { val.serializedFieldsCollection.serializedFields[i].fieldValue.stringValue = value; return true; } } return false; } public static bool SetAddressableEntityStateField(string fullEntityStatePath, string fieldName, Object value) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) EntityStateConfiguration val = Addressables.LoadAssetAsync((object)fullEntityStatePath).WaitForCompletion(); for (int i = 0; i < val.serializedFieldsCollection.serializedFields.Length; i++) { if (val.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { val.serializedFieldsCollection.serializedFields[i].fieldValue.objectValue = value; return true; } } return false; } public static int FindCategoryIndexByName(DirectorCardCategorySelection dcs, MonsterCategories category) { string categoryName; switch (category) { case MonsterCategories.BasicMonsters: categoryName = "Basic Monsters"; break; case MonsterCategories.Minibosses: categoryName = "Minibosses"; break; case MonsterCategories.Champions: categoryName = "Champions"; break; default: return -1; } return FindCategoryIndexByName(dcs, categoryName); } public static int FindCategoryIndexByName(DirectorCardCategorySelection dcs, string categoryName) { for (int i = 0; i < dcs.categories.Length; i++) { if (string.CompareOrdinal(dcs.categories[i].name, categoryName) == 0) { return i; } } return -1; } } } namespace RiskySotS.Tweaks.Progression { public class ColossusAccessShrine { public static GameObject ShrinePrefab; public static InspectDef ShrineInspectDef; public static InteractableSpawnCard iscColossusAccessShrine; public static float initialSpawnChance; public static float loopSpawnChance; public ColossusAccessShrine() { BuildShrineInspectDef(); BuildShrinePrefab(); BuildSpawnCard(); } private void BuildShrineInspectDef() { //IL_0010: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown ShrineInspectDef = ScriptableObject.CreateInstance(); ShrineInspectDef.Info = new InspectInfo { Visual = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineIcon.png").WaitForCompletion(), TitleToken = "SHRINE_COLOSSUS_RISKYSOTS_NAME", DescriptionToken = "SHRINE_COLOSSUS_RISKYSOTS_DESCRIPTION", FlavorToken = "SHRINE_COLOSSUS_RISKYSOTS_LORE" }; } private void BuildShrinePrefab() { //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_0029: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC2/ShrineColossusAccess.prefab").WaitForCompletion(), "RiskySotS_ShrineColossusAccess", true); PurchaseInteraction component = val.GetComponent(); component.costType = (CostTypeIndex)0; component.displayNameToken = "SHRINE_COLOSSUS_RISKYSOTS_NAME"; component.contextToken = "SHRINE_COLOSSUS_RISKYSOTS_CONTEXT"; component.onPurchase = null; component.onDetailedPurchaseServer = null; Object.Destroy((Object)(object)val.GetComponent()); val.AddComponent(); component.setUnavailableOnTeleporterActivated = true; GenericInspectInfoProvider component2 = val.GetComponent(); component2.InspectInfo = ShrineInspectDef; PurchaseAvailabilityIndicator component3 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { ((Behaviour)component3).enabled = true; } ShrinePrefab = val; } private void BuildSpawnCard() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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) InteractableSpawnCard val = ScriptableObject.CreateInstance(); ((SpawnCard)val).prefab = ShrinePrefab; ((SpawnCard)val).sendOverNetwork = true; ((SpawnCard)val).hullSize = (HullClassification)1; ((SpawnCard)val).nodeGraphType = (GraphType)0; ((SpawnCard)val).requiredFlags = (NodeFlags)0; ((SpawnCard)val).forbiddenFlags = (NodeFlags)16; ((SpawnCard)val).occupyPosition = true; ((SpawnCard)val).directorCreditCost = 0; val.slightlyRandomizeOrientation = false; iscColossusAccessShrine = val; } } [RequireComponent(typeof(PurchaseInteraction))] public class ColossusAccessShrineBehavior : MonoBehaviour { private PurchaseInteraction purchaseInteraction; private void PurchaseInteractionHack(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator) { bool flag = (Object)(object)self == (Object)(object)purchaseInteraction && (Object)(object)purchaseInteraction != (Object)null; orig.Invoke(self, activator); if (flag) { OnPurchaseServer(); } } private void Awake() { purchaseInteraction = ((Component)this).GetComponent(); } private void OnEnable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown PurchaseInteraction.OnInteractionBegin += new hook_OnInteractionBegin(PurchaseInteractionHack); } private void OnDisable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown PurchaseInteraction.OnInteractionBegin -= new hook_OnInteractionBegin(PurchaseInteractionHack); } public void OnPurchaseServer() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown if (!NetworkServer.active || !Object.op_Implicit((Object)(object)purchaseInteraction)) { return; } purchaseInteraction.SetAvailable(false); ProgressionRework.RunVariables.hitShrineThisStage = true; SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene)) { if (sceneDefForCurrentScene.stageOrder == 1) { ProgressionRework.RunVariables.hitShrineStage1 = true; } else { ProgressionRework.RunVariables.hitShrineStage1 = true; ProgressionRework.RunVariables.hitShrineStage2 = true; } } Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = (ProgressionRework.RunVariables.hitShrineStage2 ? "PORTAL_STORM_WILL_OPEN" : "SHRINE_COLOSSUS_RISKYSOTS_ACTIVATION_1") }); if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { PortalSpawner[] components = ((Component)TeleporterInteraction.instance).gameObject.GetComponents(); foreach (PortalSpawner val in components) { if (val.previewChildName == "StormPortalIndicator") { ((Behaviour)val).enabled = true; break; } } } EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/ShrineUseEffect"), new EffectData { origin = ((Component)this).transform.position, rotation = Quaternion.identity, scale = 1f, color = Color32.op_Implicit(new Color(16f / 51f, 0.8392157f, 64f / 85f)) }, true); } } public class HabitatAccessNodes { public struct AccessCodePosition { public Vector3 position; public Vector3 rotation; } private static ExpansionDef dlc3Expansion = Addressables.LoadAssetAsync((object)"RoR2/DLC3/DLC3.asset").WaitForCompletion(); public static GameObject habitatAccessNode; public static AccessCodePosition[] habitatAccessCodePositions = new AccessCodePosition[4] { new AccessCodePosition { position = new Vector3(-8.4f, 36f, -91f), rotation = new Vector3(0f, 0f, 57f) }, new AccessCodePosition { position = new Vector3(-56.7f, 31f, 2f), rotation = new Vector3(-90f, 0f, -30f) }, new AccessCodePosition { position = new Vector3(12.84f, -8.14f, 131.2f), rotation = new Vector3(25.06f, -26.9f, -32.2f) }, new AccessCodePosition { position = new Vector3(-20f, 25f, -12.5f), rotation = Vector3.zero } }; private static bool IsHabitat() { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); return Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && (sceneDefForCurrentScene.baseSceneName == "habitat" || sceneDefForCurrentScene.baseSceneName == "habitatfall"); } public HabitatAccessNodes() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown BuildPrefab(); SceneDirector.onPrePopulateSceneServer += SceneDirector_onPrePopulateSceneServer; AccessNodesBaseState.OnEnter += new hook_OnEnter(AccessNodesBaseState_OnEnter); NodeAccessed.OnEnter += new hook_OnEnter(NodeAccessed_OnEnter); NodeActive.OnEnter += new hook_OnEnter(NodeActive_OnEnter); } private void BuildPrefab() { //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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC3/AccessCodesNode/Access Codes Node.prefab").WaitForCompletion(), "RiskySotS_HabitatAccessNode", true); val.AddComponent(); PortalSpawner val2 = val.AddComponent(); val2.portalSpawnCard = Addressables.LoadAssetAsync((object)"RoR2/DLC3/iscHardwareProgPortal.asset").WaitForCompletion(); val2.minSpawnDistance = 10f; val2.maxSpawnDistance = 30f; val2.spawnPreviewMessageToken = "PORTAL_SOLUSSHOP_WILL_OPEN"; val2.spawnMessageToken = "PORTAL_SOLUSSHOP_OPEN"; val2.previewChildName = "CEPortalIndicator"; val2.registerSelfToPortalRemotelyOnActivation = true; PortalSpawner val3 = val.AddComponent(); val3.portalSpawnCard = Addressables.LoadAssetAsync((object)"RoR2/DLC3/iscSolusShopPortal.asset").WaitForCompletion(); val3.minSpawnDistance = 10f; val3.maxSpawnDistance = 30f; val3.spawnPreviewMessageToken = "PORTAL_SOLUSSHOP_WILL_OPEN"; val3.spawnMessageToken = "PORTAL_SOLUSSHOP_OPEN"; val3.previewChildName = "CEPortalIndicator"; val3.registerSelfToPortalRemotelyOnActivation = true; PortalSpawner val4 = val.AddComponent(); val4.portalSpawnCard = Addressables.LoadAssetAsync((object)"RoR2/DLC3/iscHardwareProgPortal.asset").WaitForCompletion(); val4.minSpawnDistance = 10f; val4.maxSpawnDistance = 30f; val4.spawnPreviewMessageToken = "PORTAL_SOLUSSHOP_WILL_OPEN"; val4.spawnMessageToken = "PORTAL_SOLUSSHOP_OPEN"; val4.previewChildName = "CEPortalIndicator"; SolusFight val5 = val.AddComponent(); val5.requiredExpansion = dlc3Expansion; val5.conduitCanyonPortalSpawner = val2; val5.computationalExchangePortalSpawner = val3; val5.solutionalHauntPortalSpawner = val4; val5.ForcedBossFight = new DirectorCard { selectionWeight = 1, spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/DLC3/SolusAmalgamator/cscSolusAmalgamator.asset").WaitForCompletion(), spawnDistance = (MonsterSpawnDistance)0 }; habitatAccessNode = val; } private void NodeActive_OnEnter(orig_OnEnter orig, NodeActive self) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown if (IsHabitat()) { if (!Object.op_Implicit((Object)(object)((AccessNodesBaseState)self).childLocator)) { ((AccessNodesBaseState)self).childLocator = ((EntityState)self).GetComponent(); } ((AccessNodesBaseState)self).SwapMaterials((NodeStates)1); GameObject completedEffectPrefab = AccessNodesBaseState.completedEffectPrefab; if (Object.op_Implicit((Object)(object)completedEffectPrefab)) { Transform val = ((AccessNodesBaseState)self).childLocator.FindChild(AccessNodesBaseState.effectAttachString); EffectData val2 = new EffectData { origin = val.position, rotation = val.rotation }; val2.SetChildLocatorTransformReference(((Component)val).gameObject, 0); EffectManager.SpawnEffect(completedEffectPrefab, val2, true); } HabitatBaseOnEnter((AccessNodesBaseState)(object)self); if (NetworkServer.active) { SolusFight component = ((EntityState)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((OverrideFightBase)component).TriggerServer(); } } } else { orig.Invoke(self); } } private static void HabitatBaseOnEnter(AccessNodesBaseState self) { self.interactionComponent = ((EntityState)self).GetComponent(); self.interactionComponent.getContextString = self.GetContextStringInternal; self.interactionComponent.getInteractability = self.GetInteractabilityInternal; self.interactionComponent.onInteractionBegin = self.OnInteractionBeginInternal; self.interactionComponent.shouldShowOnScanner = self.ShouldShowOnScannerInternal; self.interactionComponent.shouldIgnoreSpherecastForInteractability = self.ShouldIgnoreSpherecastForInteractabilityInternal; self.childLocator = ((EntityState)self).GetComponent(); self.Id = 0; Transform val = self.childLocator.FindChild("OFF"); if (Object.op_Implicit((Object)(object)val)) { self._nodeMeshAnimator = ((Component)val).GetComponent(); } } private void NodeAccessed_OnEnter(orig_OnEnter orig, NodeAccessed self) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown if (IsHabitat()) { HabitatBaseOnEnter((AccessNodesBaseState)(object)self); if (((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextState((EntityState)new NodeActive { Id = 0 }); } } else { orig.Invoke(self); } } private void AccessNodesBaseState_OnEnter(orig_OnEnter orig, AccessNodesBaseState self) { if (IsHabitat()) { HabitatBaseOnEnter(self); } else { orig.Invoke(self); } } private void SceneDirector_onPrePopulateSceneServer(SceneDirector director) { //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00cb: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (!Object.op_Implicit((Object)(object)Run.instance) || !Run.instance.IsExpansionEnabled(dlc3Expansion) || Run.instance.GetEventFlag("HardwarePortalTaken") || !Object.op_Implicit((Object)(object)sceneDefForCurrentScene) || !IsHabitat()) { return; } int num = Random.RandomRangeInt(0, habitatAccessCodePositions.Length); AccessCodePosition accessCodePosition = habitatAccessCodePositions[num]; GameObject val = Object.Instantiate(habitatAccessNode); if (Object.op_Implicit((Object)(object)val)) { EntityStateMachine component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.initialStateType = new SerializableEntityStateType(typeof(NodesOnAndReady)); component.SetNextState((EntityState)new NodesOnAndReady { Id = 0 }); Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "ACCESSCODES_SPAWNED" }); } NetworkServer.Spawn(val); val.transform.position = accessCodePosition.position; val.transform.rotation = Quaternion.Euler(accessCodePosition.rotation.x, accessCodePosition.rotation.y, accessCodePosition.rotation.z); Debug.Log((object)("RiskySotS: Spawning Access Node on " + sceneDefForCurrentScene.baseSceneName)); } else { Debug.LogError((object)("RiskySotS: CRITICAL FAILURE - Access Node failed to spawn on " + sceneDefForCurrentScene.baseSceneName + ", report this error!")); } } } [RequireComponent(typeof(NetworkIdentity))] public class TurnOffNodeOnTeleporterStart : MonoBehaviour { private NetworkIdentity networkIdentity; private void Awake() { networkIdentity = ((Component)this).GetComponent(); } private void FixedUpdate() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)TeleporterInteraction.instance) || !TeleporterInteraction.instance.isCharging) { return; } if (Object.op_Implicit((Object)(object)networkIdentity) && Util.HasEffectiveAuthority(networkIdentity)) { EntityStateMachine component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetNextState((EntityState)new Off { Id = 0 }); } } Object.Destroy((Object)(object)this); } } public class ProgressionRework { public class RunVariables { public static bool hitShrineStage1; public static bool hitShrineStage2; public static bool enteredMeridian; public static bool spawnedGoldShrineThisLoop; public static bool spawnedGoldShrineThisStage; public static bool hitShrineThisStage; } public static bool enabled; public static bool allowVariantsPreLoop; public static float goldShrineChance = 50f; public static ExpansionDef dlc2Expansion = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Common/DLC2.asset").WaitForCompletion(); private SpawnCard iscShrineHalcyonite = (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/DLC2/iscShrineHalcyonite.asset").WaitForCompletion(); private SpawnCard iscShrineHalcyoniteTier1 = (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/DLC2/iscShrineHalcyoniteTier1.asset").WaitForCompletion(); private SpawnCard iscShrineGold = (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineGoldshoresAccess/iscShrineGoldshoresAccess.asset").WaitForCompletion(); private static GameObject miniGeode = Addressables.LoadAssetAsync((object)"RoR2/DLC2/MiniGeodeBody.prefab").WaitForCompletion(); public ProgressionRework() { //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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_003b: 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) //IL_00c3: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown if (enabled) { new ColossusAccessShrine(); AddStagesToMainline(); ReworkGreenPortalLogic(); ReworkHalcyonShrineProgression(); Run.onRunStartGlobal += Run_onRunStartGlobal; SceneDirector.onPrePopulateSceneServer += SceneDirector_onPrePopulateSceneServer; SceneDirector.onGenerateInteractableCardSelection += FilterGoldShrineIfForceSpawned; GoldshoresMissionController.OnEnable += new hook_OnEnable(GoldshoresMissionController_OnEnable); MeridianEventTriggerInteraction.OnEnable += new hook_OnEnable(MeridianEventTriggerInteraction_OnEnable); if (Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ProperSave")) { HandleSave(); } new HabitatAccessNodes(); } } private void FilterGoldShrineIfForceSpawned(SceneDirector director, DirectorCardCategorySelection dccs) { dccs.RemoveCardsThatFailFilter((Predicate)((DirectorCard card) => (Object)(object)card.spawnCard != (Object)(object)iscShrineGold || !RunVariables.spawnedGoldShrineThisStage)); } private void MeridianEventTriggerInteraction_OnEnable(orig_OnEnable orig, MeridianEventTriggerInteraction self) { orig.Invoke(self); RunVariables.enteredMeridian = true; } private void GoldshoresMissionController_OnEnable(orig_OnEnable orig, GoldshoresMissionController self) { orig.Invoke(self); RunVariables.hitShrineStage1 = true; RunVariables.hitShrineStage2 = true; } private void SceneDirector_onPrePopulateSceneServer(SceneDirector director) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Invalid comparison between Unknown and I4 //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Expected O, but got Unknown //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Expected O, but got Unknown //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Invalid comparison between Unknown and I4 RunVariables.hitShrineThisStage = false; RunVariables.spawnedGoldShrineThisStage = false; if (!Object.op_Implicit((Object)(object)Run.instance) || RunVariables.enteredMeridian || !Run.instance.IsExpansionEnabled(dlc2Expansion)) { return; } bool flag = false; bool flag2 = false; bool flag3 = false; SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && (int)sceneDefForCurrentScene.sceneType == 1 && !sceneDefForCurrentScene.blockOrbitalSkills) { if (sceneDefForCurrentScene.stageOrder == 1) { RunVariables.spawnedGoldShrineThisLoop = false; RunVariables.hitShrineStage2 = false; bool flag4 = Run.instance.stageClearCount == 0; flag = (flag4 && ColossusAccessShrine.initialSpawnChance >= 100f) || (!flag4 && ColossusAccessShrine.loopSpawnChance >= 100f) || director.rng.nextNormalizedFloat * 100f <= (flag4 ? ColossusAccessShrine.initialSpawnChance : ColossusAccessShrine.loopSpawnChance); } else if (sceneDefForCurrentScene.stageOrder == 2 && RunVariables.hitShrineStage1) { flag = true; if (!RunVariables.spawnedGoldShrineThisLoop) { flag3 = Util.CheckRoll(goldShrineChance, 0f, (CharacterMaster)null); } } else if (sceneDefForCurrentScene.stageOrder == 3 && RunVariables.hitShrineStage2) { flag = false; flag2 = true; if (!RunVariables.spawnedGoldShrineThisLoop) { flag3 = Util.CheckRoll(goldShrineChance, 0f, (CharacterMaster)null); } } else { RunVariables.hitShrineStage1 = false; RunVariables.hitShrineStage2 = false; } } if (flag3) { RunVariables.spawnedGoldShrineThisStage = true; Debug.Log((object)"RiskySotS: Spawning random chance Altar of Gold."); DirectorPlacementRule val = new DirectorPlacementRule { placementMode = (PlacementMode)4 }; GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(iscShrineGold, val, director.rng)); if (Object.op_Implicit((Object)(object)val2)) { int interactableCredit = director.interactableCredit; director.interactableCredit = interactableCredit - 1; RunVariables.spawnedGoldShrineThisLoop = true; PurchaseInteraction component = val2.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.costType == 1) { component.Networkcost = Run.instance.GetDifficultyScaledCost(component.cost); } } } if (flag2) { Debug.Log((object)"RiskySotS: Spawning Halcyonite Shrine."); float num = 1f + 0.5f * ((float)Run.instance.participatingPlayerCount - 1f); DirectorPlacementRule val3 = new DirectorPlacementRule { placementMode = (PlacementMode)4 }; GameObject val4 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(iscShrineHalcyonite, val3, director.rng)); if (Object.op_Implicit((Object)(object)val4)) { director.interactableCredit -= Mathf.FloorToInt(50f * num); } } if (flag) { Debug.Log((object)"RiskySotS: Spawning Shrine of the Colossus."); DirectorPlacementRule val5 = new DirectorPlacementRule { placementMode = (PlacementMode)4 }; DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)ColossusAccessShrine.iscColossusAccessShrine, val5, director.rng)); } } private void Run_onRunStartGlobal(Run obj) { RunVariables.hitShrineStage1 = false; RunVariables.hitShrineStage2 = false; RunVariables.enteredMeridian = false; RunVariables.spawnedGoldShrineThisStage = false; RunVariables.spawnedGoldShrineThisLoop = false; } private void AddStagesToMainline() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00e9: 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_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) SceneDef scene = Addressables.LoadAssetAsync((object)"RoR2/DLC2/village/village.asset").WaitForCompletion(); SceneDef scene2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lemuriantemple/lemuriantemple.asset").WaitForCompletion(); SceneDef scene3 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/habitat/habitat.asset").WaitForCompletion(); SceneDef scene4 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakes/lakes.asset").WaitForCompletion(); SceneDef scene5 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakesnight/lakesnight.asset").WaitForCompletion(); SceneDef scene6 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/villagenight/villagenight.asset").WaitForCompletion(); SceneDef scene7 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/habitatfall/habitatfall.asset").WaitForCompletion(); SceneCollection collection = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/sgStage1.asset").WaitForCompletion(); SceneCollection collection2 = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/sgStage2.asset").WaitForCompletion(); SceneCollection collection3 = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/sgStage3.asset").WaitForCompletion(); SceneCollection collection4 = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/loopSgStage1.asset").WaitForCompletion(); SceneCollection collection5 = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/loopSgStage2.asset").WaitForCompletion(); SceneCollection collection6 = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/loopSgStage3.asset").WaitForCompletion(); AddSceneToCollection(scene2, collection2); AddSceneToCollection(scene2, collection5); if (allowVariantsPreLoop) { if (!RiskySotSPlugin.loopVariantPluginLoaded) { Debug.LogWarning((object)"RiskySotS: Progression Rework - Detected LoopVariantConfig. Stage 1 variants will NOT be added to the pool. Check the LoopVariantConfig config file!"); ModifySceneWeightInCollection(scene4, collection, 0.5f); AddSceneToCollection(scene5, collection, 0.5f); ModifySceneWeightInCollection(scene5, collection4, 0.5f); AddSceneToCollection(scene4, collection4, 0.5f); ModifySceneWeightInCollection(scene, collection, 0.5f); AddSceneToCollection(scene6, collection, 0.5f); AddSceneToCollection(scene, collection4, 0.5f); ModifySceneWeightInCollection(scene6, collection4, 0.5f); } AddSceneToCollection(scene3, collection3, 0.5f); AddSceneToCollection(scene7, collection3, 0.5f); AddSceneToCollection(scene3, collection6, 0.5f); AddSceneToCollection(scene7, collection6, 0.5f); } else { AddSceneToCollection(scene3, collection3); AddSceneToCollection(scene7, collection6); } } private void ModifySceneWeightInCollection(SceneDef scene, SceneCollection collection, float newWeight) { //IL_0014: 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_001a: Unknown result type (might be due to invalid IL or missing references) List list = collection._sceneEntries.ToList(); for (int i = 0; i < list.Count; i++) { SceneEntry val = list[i]; if ((Object)(object)val.sceneDef == (Object)(object)scene) { ((SceneEntry)(ref val)).weight = newWeight; break; } } collection._sceneEntries = list.ToArray(); } private void AddSceneToCollection(SceneDef scene, SceneCollection collection, float weight = 1f) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_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_001c: 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_0071: Unknown result type (might be due to invalid IL or missing references) Enumerator enumerator = collection.sceneEntries.GetEnumerator(); try { while (enumerator.MoveNext()) { SceneEntry current = enumerator.Current; if ((Object)(object)current.sceneDef == (Object)(object)scene) { return; } } } finally { ((IDisposable)enumerator).Dispose(); } List list = collection._sceneEntries.ToList(); SceneEntry item = new SceneEntry { sceneDef = scene }; ((SceneEntry)(ref item)).weight = weight; list.Add(item); collection._sceneEntries = list.ToArray(); } private void ReworkHalcyonShrineProgression() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown DCCSBlender.GetBlendedDCCS += new hook_GetBlendedDCCS(DCCSBlender_GetBlendedDCCS); } private DirectorCardCategorySelection DCCSBlender_GetBlendedDCCS(orig_GetBlendedDCCS orig, Category dccsPoolCategory, ref Xoroshiro128Plus rng, ClassicStageInfo stageInfo, int contentSourceMixLimit, List acceptableExpansionList) { DirectorCardCategorySelection val = orig.Invoke(dccsPoolCategory, ref rng, stageInfo, contentSourceMixLimit, acceptableExpansionList); if ((Object)(object)val != (Object)null && val.categories != null) { for (int i = 0; i < val.categories.Length; i++) { if (val.categories[i].cards != null) { val.categories[i].cards = val.categories[i].cards.Where((DirectorCard card) => card == null || (!((Object)(object)card.spawnCard == (Object)(object)iscShrineHalcyonite) && !((Object)(object)card.spawnCard == (Object)(object)iscShrineHalcyoniteTier1))).ToArray(); val.categories = val.categories.Where((Category cat) => cat.cards != null && cat.cards.Length != 0).ToArray(); } } } return val; } private void ReworkGreenPortalLogic() { //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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/PortalColossus.prefab").WaitForCompletion(); val.GetComponent().isAlternatePath = false; Exit.IsValidStormTier += new hook_IsValidStormTier(Exit_IsValidStormTier); GenericSceneSpawnPoint.Start += new hook_Start(GenericSceneSpawnPoint_Start); SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/EntityStates.Missions.MiniGeodeTracker.Listening.asset", "maxStageTierOrder", "-1"); InteractableSpawnCard colossusPortal = Addressables.LoadAssetAsync((object)"RoR2/DLC2/iscColossusPortal.asset").WaitForCompletion(); ReworkGreenOrbs(colossusPortal); ReworkHalcyoniteShrinePortals(colossusPortal); PortalSpawner.AttemptSpawnPortalServer += new hook_AttemptSpawnPortalServer(PortalSpawner_AttemptSpawnPortalServer); } private bool PortalSpawner_AttemptSpawnPortalServer(orig_AttemptSpawnPortalServer orig, PortalSpawner self) { //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_0044: Expected O, but got Unknown if ((Object)(object)self.portalSpawnCard == (Object)null && self.spawnMessageToken == "SHRINE_COLOSSUS_RISKYSOTS_TP_FINISH" && RunVariables.hitShrineThisStage) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = self.spawnMessageToken }); return false; } return orig.Invoke(self); } private void ReworkHalcyoniteShrinePortals(InteractableSpawnCard colossusPortal) { //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) GameObject val = Addressables.LoadAssetAsync((object)RoR2_DLC2.ShrineHalcyonite_prefab).WaitForCompletion(); PortalSpawner[] components = val.GetComponents(); PortalSpawner[] array = components; foreach (PortalSpawner val2 in array) { if ((Object)(object)val2.portalSpawnCard == (Object)(object)colossusPortal) { val2.invalidStages = new string[0]; val2.validStageTiers = new int[0]; } else { ((Behaviour)val2).enabled = false; } } } private void ReworkGreenOrbs(InteractableSpawnCard colossusPortal) { //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) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Teleporters/Teleporter1.prefab").WaitForCompletion(); PortalSpawner[] components = val.GetComponents(); PortalSpawner[] array = components; foreach (PortalSpawner val2 in array) { if ((Object)(object)val2.portalSpawnCard == (Object)(object)colossusPortal) { ((Behaviour)val2).enabled = false; val2.spawnPreviewMessageToken = ""; val2.spawnMessageToken = "SHRINE_COLOSSUS_RISKYSOTS_TP_FINISH"; val2.validStages = new string[0]; val2.portalSpawnCard = null; break; } } } private void GenericSceneSpawnPoint_Start(orig_Start orig, GenericSceneSpawnPoint self) { if ((Object)(object)self.networkedObjectPrefab == (Object)(object)miniGeode) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && sceneDefForCurrentScene.baseSceneName == "bazaar") { Debug.LogWarning((object)"RiskySotS: Intercepted MiniGeodeBody spawn in Bazaar. Spawn will not proceed."); ((Component)self).gameObject.SetActive(false); } } else { orig.Invoke(self); } } private bool Exit_IsValidStormTier(orig_IsValidStormTier orig, Exit self) { return Object.op_Implicit((Object)(object)Run.instance) && Run.instance.IsExpansionEnabled(dlc2Expansion) && Run.instance.nextStageScene.stageOrder == 4 && !RunVariables.enteredMeridian; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void HandleSave() { SaveFile.OnGatherSaveData += Save; Loading.OnLoadingEnded += Load; } public static void Save(Dictionary dict) { dict.Add("riskySots.hitShrineStage1", RunVariables.hitShrineStage1); dict.Add("riskySots.hitShrineStage2", RunVariables.hitShrineStage2); dict.Add("riskySots.enteredMeridian", RunVariables.enteredMeridian); dict.Add("riskySots.spawnedGoldShrineThisLoop", RunVariables.spawnedGoldShrineThisLoop); dict.Add("riskySots.spawnedGoldShrineThisStage", RunVariables.spawnedGoldShrineThisStage); } public void Load(SaveFile save) { RunVariables.hitShrineStage1 = save.GetModdedData("riskySots.hitShrineStage1"); RunVariables.hitShrineStage2 = save.GetModdedData("riskySots.hitShrineStage2"); RunVariables.enteredMeridian = save.GetModdedData("riskySots.enteredMeridian"); RunVariables.spawnedGoldShrineThisLoop = save.GetModdedData("riskySots.spawnedGoldShrineThisLoop"); RunVariables.spawnedGoldShrineThisStage = save.GetModdedData("riskySots.spawnedGoldShrineThisStage"); } } } namespace RiskySotS.Tweaks.Interactables { public class HalcyonShrine { public static bool fasterCharging; public static bool consistentScaling; public HalcyonShrine() { if (fasterCharging) { ChargeFaster(); } if (consistentScaling) { ScaleConsistently(); } } private void ChargeFaster() { //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) GameObject val = Addressables.LoadAssetAsync((object)RoR2_DLC2.ShrineHalcyonite_prefab).WaitForCompletion(); HalcyoniteShrineInteractable component = val.GetComponent(); component.tickRate = 10f; } private void ScaleConsistently() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CombatDirector.HalcyoniteShrineActivation += new hook_HalcyoniteShrineActivation(CombatDirector_HalcyoniteShrineActivation); } private void CombatDirector_HalcyoniteShrineActivation(orig_HalcyoniteShrineActivation orig, CombatDirector self, float monsterCredit, DirectorCard chosenDirectorCard, int difficultyLevel, Transform shrineTransform) { int num = difficultyLevel; if (Object.op_Implicit((Object)(object)((Component)self).gameObject) && Object.op_Implicit((Object)(object)Run.instance)) { HalcyoniteShrineInteractable component = ((Component)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { float num2 = (Object.op_Implicit((Object)(object)Stage.instance) ? Stage.instance.entryDifficultyCoefficient : Run.instance.difficultyCoefficient); int difficultyScaledCost = Run.instance.GetDifficultyScaledCost(component.midGoldCost, num2); int difficultyScaledCost2 = Run.instance.GetDifficultyScaledCost(component.maxGoldCost, num2); float num3 = Mathf.InverseLerp((float)difficultyScaledCost, (float)difficultyScaledCost2, (float)component.goldDrained); int num4 = 4; int num5 = 10; int num6 = Mathf.FloorToInt((float)num4 + (float)(num5 - num4) * num3); num = num6; } } orig.Invoke(self, monsterCredit, chosenDirectorCard, num, shrineTransform); } } public class NerfInteractableCredits { public static bool enabled; public NerfInteractableCredits() { if (enabled) { SceneDirector.onPrePopulateSceneServer += SceneDirector_onPrePopulateSceneServer; } } private void SceneDirector_onPrePopulateSceneServer(SceneDirector director) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene)) { switch (sceneDefForCurrentScene.baseSceneName) { case "village": director.interactableCredit = 240; break; case "villagenight": director.interactableCredit = 210; break; case "lakes": director.interactableCredit = 240; break; case "lakesnight": director.interactableCredit = 240; break; case "lemuriantemple": director.interactableCredit = 220; break; } } } } public class RemoveReviveShrine { public static bool enabled; private SpawnCard shrineCard = (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/DLC2/iscShrineColossusAccess.asset").WaitForCompletion(); public RemoveReviveShrine() { //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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown if (enabled) { DCCSBlender.GetBlendedDCCS += new hook_GetBlendedDCCS(DCCSBlender_GetBlendedDCCS); } } private DirectorCardCategorySelection DCCSBlender_GetBlendedDCCS(orig_GetBlendedDCCS orig, Category dccsPoolCategory, ref Xoroshiro128Plus rng, ClassicStageInfo stageInfo, int contentSourceMixLimit, List acceptableExpansionList) { DirectorCardCategorySelection val = orig.Invoke(dccsPoolCategory, ref rng, stageInfo, contentSourceMixLimit, acceptableExpansionList); if ((Object)(object)val != (Object)null && val.categories != null) { for (int i = 0; i < val.categories.Length; i++) { if (val.categories[i].cards != null) { val.categories[i].cards = val.categories[i].cards.Where((DirectorCard card) => card == null || !((Object)(object)card.spawnCard == (Object)(object)shrineCard)).ToArray(); val.categories = val.categories.Where((Category cat) => cat.cards != null && cat.cards.Length != 0).ToArray(); } } } return val; } } } namespace RiskySotS.Tweaks.Enemies { public class Child { public static bool removeIFrames; public static bool nerfDamage; public Child() { NerfDamage(); RemoveIFrames(); } private void NerfDamage() { //IL_0029: 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_004b: Unknown result type (might be due to invalid IL or missing references) if (nerfDamage) { SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/Child/EntityStates.ChildMonster.FireTrackingSparkBall.asset", "bombDamageCoefficient", "4"); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Child/ChildTrackingSparkBall.prefab").WaitForCompletion(), "RiskyModChildTrackingSparkball", true); ProjectileExplosion component = val.GetComponent(); component.falloffModel = (FalloffModel)3; ContentAddition.AddProjectile(val); SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/Child/EntityStates.ChildMonster.FireTrackingSparkBall.asset", "projectilePrefab", (Object)(object)val); } } private void RemoveIFrames() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown if (removeIFrames) { ChildMonsterController.RegisterTeleport += new hook_RegisterTeleport(ChildMonsterController_RegisterTeleport); } } private void ChildMonsterController_RegisterTeleport(orig_RegisterTeleport orig, ChildMonsterController self, bool addInvincibility) { orig.Invoke(self, false); } } public class EarlygameSpawnPools { public static bool enabled; public EarlygameSpawnPools() { if (enabled) { ModifyLemurianTemple(); if (!Chainloader.PluginInfos.ContainsKey("com.RiskyLives.RiskyMod")) { ModifyLakesNight(); ModifyVillageNight(); } } } internal DirectorCard BuildDirectorCard(CharacterSpawnCard spawnCard) { return BuildDirectorCard(spawnCard, 1, 0, (MonsterSpawnDistance)0); } internal DirectorCard BuildDirectorCard(CharacterSpawnCard spawnCard, int weight, int minStages, MonsterSpawnDistance spawnDistance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown return new DirectorCard { spawnCard = (SpawnCard)(object)spawnCard, selectionWeight = weight, preventOverhead = false, minimumStageCompletions = minStages, spawnDistance = spawnDistance, forbiddenUnlockableDef = null, requiredUnlockableDef = null }; } private void ModifyLakesNight() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) List cardList2 = new List { (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/cscLemurianBruiser.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Parent/cscParent.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Nullifier/cscNullifier.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/cscGupBody.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/cscGrandparent.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/ImpBoss/cscImpBoss.asset").WaitForCompletion() }; DirectorCardCategorySelection dccs2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakesnight/dccsLakesnightMonsters.asset").WaitForCompletion(); DirectorCardCategorySelection dccs3 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakesnight/dccsLakesnightMonsters_DLC1.asset").WaitForCompletion(); ModifyCards(dccs2, cardList2); ModifyCards(dccs3, cardList2); static void ModifyCards(DirectorCardCategorySelection dccs, List cardList) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Category[] categories = dccs.categories; foreach (Category val in categories) { DirectorCard[] cards = val.cards; foreach (DirectorCard val2 in cards) { if (val2.minimumStageCompletions < 3 && cardList.Contains(val2.spawnCard)) { val2.minimumStageCompletions = 3; } } } } } private void ModifyVillageNight() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) List cardList2 = new List { (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/cscLemurianBruiser.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Parent/cscParent.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/cscGrandparent.asset").WaitForCompletion() }; ModifyCards(Addressables.LoadAssetAsync((object)"RoR2/DLC2/villagenight/dccsVillageNightMonsters_Additional.asset").WaitForCompletion(), cardList2); static void ModifyCards(DirectorCardCategorySelection dccs, List cardList) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Category[] categories = dccs.categories; foreach (Category val in categories) { DirectorCard[] cards = val.cards; foreach (DirectorCard val2 in cards) { if (val2.minimumStageCompletions < 3 && cardList.Contains(val2.spawnCard)) { val2.minimumStageCompletions = 3; } } } } } private void ModifyLemurianTemple() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) List cardList2 = new List { (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/cscLemurianBruiser.asset").WaitForCompletion() }; ModifyCards(Addressables.LoadAssetAsync((object)"RoR2/DLC2/lemuriantemple/dccsLemurianTempleMonsters.asset").WaitForCompletion(), cardList2); static void ModifyCards(DirectorCardCategorySelection dccs, List cardList) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Category[] categories = dccs.categories; foreach (Category val in categories) { DirectorCard[] cards = val.cards; foreach (DirectorCard val2 in cards) { if (val2.minimumStageCompletions < 3 && cardList.Contains(val2.spawnCard)) { val2.minimumStageCompletions = 3; } } } } } } public class Halcyonite { public static bool enabled; public Halcyonite() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_0114: 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) if (!enabled) { return; } GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/HalcyoniteBody.prefab").WaitForCompletion(); GameObject gameObject = ((Component)val.GetComponent().modelTransform).gameObject; HitBoxGroup[] componentsInChildren = gameObject.GetComponentsInChildren(); bool flag = false; bool flag2 = false; foreach (HitBoxGroup val2 in componentsInChildren) { if (val2.groupName == "GoldenSword" && !flag) { flag = true; HitBox val3 = val2.hitBoxes[0]; ((Component)val3).transform.localPosition = new Vector3(1f, 3f, 7f); ((Component)val3).transform.localScale = new Vector3(3f, 3f, 12f); } else if (val2.groupName == "GoldenSlash" && !flag2) { flag2 = true; HitBox val4 = val2.hitBoxes[0]; ((Component)val4).transform.localPosition = new Vector3(0f, 1.6f, 4f); ((Component)val4).transform.localScale = new Vector3(12f, 3f, 9f); } } } } public class Scorchling { public static bool removeIFrames; public static bool nerfDamage; public Scorchling() { NerfDamage(); RemoveIFrames(); } private void NerfDamage() { if (nerfDamage) { SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/Scorchling/EntityStates.Scorchling.LavaBomb.asset", "mortarDamageCoefficient", "0.8"); } } private void RemoveIFrames() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown if (removeIFrames) { ScorchlingController.Burrow += new Manipulator(CommonHooks.DisableAddBuffGeneric); ScorchlingController.Breach += new Manipulator(CommonHooks.DisableRemoveBuffGeneric); } } } }