Decompiled source of LittleGameplayTweaks v2.5.9
LittleGameplayTweaks.dll
Decompiled 2 months 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.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.AffixEarthHealer; using EntityStates.BeetleQueenMonster; using EntityStates.Commando; using EntityStates.Croco; using EntityStates.Duplicator; using EntityStates.Huntress; using EntityStates.LemurianBruiserMonster; using EntityStates.LunarTeleporter; using EntityStates.Merc; using EntityStates.Merc.Weapon; using EntityStates.Missions.LunarScavengerEncounter; using EntityStates.ScavMonster; using EntityStates.VoidSurvivor.CorruptMode; using HG; using IL.EntityStates.LemurianBruiserMonster; using IL.RoR2; using LittleGameplayTweaks.Properties; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.AffixEarthHealer; using On.EntityStates.BeetleQueenMonster; using On.EntityStates.Commando; using On.EntityStates.Croco; using On.EntityStates.Duplicator; using On.EntityStates.Huntress; using On.EntityStates.LunarTeleporter; using On.EntityStates.Merc; using On.EntityStates.Merc.Weapon; using On.EntityStates.Missions.LunarScavengerEncounter; using On.EntityStates.ScavMonster; using On.EntityStates.VoidSurvivor.CorruptMode; using On.RoR2; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Utils; using RoR2; using RoR2.CharacterAI; using RoR2.EntitlementManagement; using RoR2.EntityLogic; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; 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.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("LittleGameplayTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LittleGameplayTweaks")] [assembly: AssemblyTitle("LittleGameplayTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace LittleGameplayTweaks { public class WConfig { public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Little_Gameplay_Tweaks.cfg", true); public static ConfigEntry<bool> DCCSEnemyChanges; public static ConfigEntry<bool> DCCSEnemyChangesLooping; public static ConfigEntry<bool> DCCSEnemyNewFamilies; public static ConfigEntry<float> DCCSEnemyFamilyChance; public static ConfigEntry<bool> DCCSInteractableChanges; public static ConfigEntry<bool> DCCSInteractableCostChanges; public static ConfigEntry<bool> DCCSInteractablesStageCredits; public static ConfigEntry<bool> cfgGoldShoresCredits; public static ConfigEntry<float> InteractablesMountainMultiplier; public static ConfigEntry<bool> FasterPrinter; public static ConfigEntry<bool> FasterScrapper; public static ConfigEntry<bool> FasterShrines; public static ConfigEntry<int> FasterDeepVoidSignal; public static ConfigEntry<bool> InteractableNoLunarCost; public static ConfigEntry<bool> InteractableHealingShrine; public static ConfigEntry<bool> InteractableBloodShrineScaleWithTime; public static ConfigEntry<bool> InteractablesCombatShrineHP; public static ConfigEntry<int> InteractableRedSoupAmount; public static ConfigEntry<int> MegaDroneCost; public static ConfigEntry<int> TurretDroneCost; public static ConfigEntry<bool> CharactersCaptainKeepInHiddemRealm; public static ConfigEntry<bool> CharactersEngineerWarbanner; public static ConfigEntry<bool> CharactersHuntressLysateCell; public static ConfigEntry<bool> CharactersCommandoInvul; public static ConfigEntry<bool> CharactersVoidFiendEquip; public static ConfigEntry<bool> ItemsCaptainMatrix; public static ConfigEntry<bool> ItemsScopeBuff; public static ConfigEntry<bool> ItemsEuologyLunarElites; public static ConfigEntry<bool> ItemSquidMechanical; public static ConfigEntry<bool> ItemDefenseNucleus; public static ConfigEntry<bool> MinionsInherit; public static ConfigEntry<bool> cfgScavBossItem; public static ConfigEntry<bool> cfgScavMoreItemsElites; public static ConfigEntry<bool> cfgScavNewTwisted; public static ConfigEntry<bool> cfgScavTwistedScaling; public static ConfigEntry<bool> cfgMendingCoreBuff; public static ConfigEntry<bool> VoidPortalChance; public static ConfigEntry<float> ShopChancePercentage; public static ConfigEntry<float> YellowPercentage; public static ConfigEntry<float> BonusAspectDropRate; public static ConfigEntry<bool> GuaranteedRedToWhite; public static ConfigEntry<bool> ThirdLunarSeer; public static ConfigEntry<bool> EclipseDifficultyAlways; public static ConfigEntry<bool> cfgPrismaticElites; public static void InitConfig() { DCCSEnemyChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Changes to spawn enemy spawn pools (Pre Loop)", true, "Adds and changes some enemy variety"); DCCSEnemyChangesLooping = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Changes to spawn enemy spawn pools (Loop)", true, "All stages will have enemies that will only appear after looping"); DCCSEnemyNewFamilies = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Family event additions and changes", true, "Add new family events and reorganizes existing ones"); DCCSEnemyFamilyChance = ConfigFileUNSORTED.Bind<float>("Spawnpool - Enemy", "Family event weight", 2.5f, "Weight for family event. Vanilla is 2"); DCCSInteractableChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Changes to spawn interactable spawn pools", true, "Mountain Shrine on Sulfur Pools, No Gunner Turret on Stage 4 & 5, Rare Printers and Cleansing Pools are a bit more common."); DCCSInteractableCostChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Makes various interactables cheaper to spawn", true, "Combat and Blood shrines most notably"); DCCSInteractablesStageCredits = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Makes certain stages have more credits", true, "Plains & Roost & Aquaduct get +20, Sirens & Grove get +40."); cfgGoldShoresCredits = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Gilded Coast gets interactables", true, "Mostly combat shrines"); InteractablesMountainMultiplier = ConfigFileUNSORTED.Bind<float>("Spawnpool - Interactables", "Mountain Shrine multiplier", 2f, "Multiply Mountain Shrine weight compared to other shrines"); FasterPrinter = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Printers", true, ""); FasterScrapper = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Scrappers", true, ""); FasterShrines = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Shrines", true, ""); FasterDeepVoidSignal = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Faster Deep Void Signal", 45, "Vanilla is 60."); InteractableBloodShrineScaleWithTime = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Blood Shrine reward scale with Difficulty", true, "Normally Blood Shrines Reward is only based on HP quickly making them a bad source of money"); InteractablesCombatShrineHP = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Combat Shrine enemies multipled HP in multiplayer", false, "Enemies spawned by combat shrines have multiplied hp in vanilla."); InteractableRedSoupAmount = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "RedToWhite Cauldron extra item amount", 2, "This is in addition to the 3 that Vanilla pays out with\nie If you want 5 set it to 2"); InteractableNoLunarCost = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Cost - Free Lunars", false, "Everything that costs Lunar Coins will cost 0"); MegaDroneCost = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Cost - TC-280 Prototype", 300, "Vanilla is 350"); TurretDroneCost = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Cost - Gunner Turret", 25, "Vanilla is 35"); InteractableHealingShrine = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Cost - Shrine of Woods", true, "Make Shrine of Woods cost significantly less"); ItemsCaptainMatrix = ConfigFileUNSORTED.Bind<bool>("Changes - Items", "Red Defense Microbots", false, "Make Defensive Microbots available as a normal item"); ItemsScopeBuff = ConfigFileUNSORTED.Bind<bool>("Changes - Items", "Laser Scope gives 10 crit", true, "Other crit items give crit chance on first stack"); ItemsEuologyLunarElites = ConfigFileUNSORTED.Bind<bool>("Changes - Items", "Eulogy Zero Perfected Elites", true, "Should Eulogy have a chance to replace Tier 1 elites with a Perfected elite"); ItemSquidMechanical = ConfigFileUNSORTED.Bind<bool>("Changes - Items", "Squid Polyp Mechanical", true, "Make Squid Turret benefit from Captain Microbots, Spare Drone Parts and immune to Void Infestors."); ItemDefenseNucleus = ConfigFileUNSORTED.Bind<bool>("Changes - Items", "Defense Nucleus Buff", true, "Constructs get 200 Wake of Vultures"); MinionsInherit = ConfigFileUNSORTED.Bind<bool>("Changes - Items", "Minions Inherit Elite Equip", true, "If you have a Elite Aspect your minions spawn as Elites"); CharactersCaptainKeepInHiddemRealm = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Captain Hidden Realms", true, "Should Captain be allowed to have fun in Hidden and Void realms."); CharactersHuntressLysateCell = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Huntress Balista Lysate Cell", true, "Lysate Cell will combined 2 casts of Ballista if you have the stock available."); CharactersCommandoInvul = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Commando Invulnerable Tactical Dive", true, "Tactical Dive will make you Invulnerable like in RoRR"); CharactersEngineerWarbanner = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Engineer Warbanner Turrets", true, "Should Engi Turrets inherit Warbanner"); CharactersVoidFiendEquip = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Void Fiend 2 Equipment", false, "Void Fiend gets two equipment slots switching between them as he switches modes\nMade this as a joke idk how this would be helpful"); cfgScavBossItem = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Scavs as proper Bosses", true, "Scavs are allowed to spawn as a boss under normal conditions and gain a Boss item"); cfgScavMoreItemsElites = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Boss and Elite scavs get more items", true, "Boss Scavs get a small amount more items while Elite scavs get a lot more."); cfgScavNewTwisted = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "New Twisted Scavengers", true, "Adds new Twisted Scavengers"); cfgScavTwistedScaling = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Fix Twisted Scavengers not scaling harder in Multiplayer", true, "Mithrix and Voidling gets more of a HP boost in Multiplayer, Twisteds do not due to a bug."); cfgMendingCoreBuff = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Mending Healing Core", true, "Mending Healing Core starts with some invulnerability and has more hp."); EclipseDifficultyAlways = ConfigFileUNSORTED.Bind<bool>("Other", "Eclipse 8 Difficulty always available", false, "Allows you to choose 8 Eclipse in normal lobbies."); GuaranteedRedToWhite = ConfigFileUNSORTED.Bind<bool>("Other", "Guaranteed RedToWhite Cauldron on Commencement", true, "It does not guarantee it will be a good item in any way. Simply makes it more consistent at getting rid of Red Scrap if you have any."); ThirdLunarSeer = ConfigFileUNSORTED.Bind<bool>("Other", "Third Lunar Seer", true, "Future proofing for when they add more stage without really making the bazaar more powerful."); YellowPercentage = ConfigFileUNSORTED.Bind<float>("Rates", "Boss Item Percent", 25f, "Percent for a yellow item to replace a green from a teleporter. Vanilla is 15"); BonusAspectDropRate = ConfigFileUNSORTED.Bind<float>("Rates", "Aspect Drop Rate", 0.067f, "Percent Drop rate for Aspects. Vanilla is 0.025 or 1/4000. Does not need to be changed if ZetAspects is changed."); ShopChancePercentage = ConfigFileUNSORTED.Bind<float>("Rates", "Natural Bazaar Portal Chance", 20f, "Vanilla is 5%"); VoidPortalChance = ConfigFileUNSORTED.Bind<bool>("Rates", "More Void Portals", true, "Guaranteed Void Portal on Primordial Teleporters with 20% chance on normal teleporters starting stage 4. Vanilla would be 10% after stage 7."); } } public static class ArrayUtil { public static T[] Add<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray(); } public static T[] Remove<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Except(items).ToArray(); } } public class WRect { public static readonly Random random = new Random(); public static Rect recnothing = new Rect(0f, 0f, 0f, 0f); public static Rect recwide = new Rect(0f, 0f, 384f, 256f); public static Rect rechalftall = new Rect(0f, 0f, 256f, 320f); public static Rect rechalfwide = new Rect(0f, 0f, 320f, 256f); public static Rect rectall = new Rect(0f, 0f, 256f, 384f); public static Rect rec512 = new Rect(0f, 0f, 512f, 512f); public static Rect rec320 = new Rect(0f, 0f, 320f, 320f); public static Rect rec256 = new Rect(0f, 0f, 256f, 256f); public static Rect rec192 = new Rect(0f, 0f, 192f, 192f); public static Rect rec128 = new Rect(0f, 0f, 128f, 128f); public static Rect rec106 = new Rect(0f, 0f, 106f, 106f); public static Rect rec64 = new Rect(0f, 0f, 64f, 64f); public static Vector2 half = new Vector2(0.5f, 0.5f); } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Wolfo.LittleGameplayTweaks", "LittleGameplayTweaks", "2.5.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class LittleGameplayTweaks : BaseUnityPlugin { private static readonly Random random = new Random(); public static List<ExplicitPickupDropTable> AllScavCompatibleBossItems = new List<ExplicitPickupDropTable>(); public void Awake() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_0083: 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_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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown WConfig.InitConfig(); DCCSEnemies.Start(); DCCSInteractables.Start(); ChangesItems.Start(); ChangesCharacters.Start(); ChangesInteractables.Start(); Prismatic.Start(); TwistedScavs.Start(); ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)ModSupport); MainMenuController.Start += new hook_Start(OneTimeOnlyLateRunner); SceneDirector.Start += new hook_Start(GameplayQoL_SceneDirector_Start); ClassicStageInfo.Awake += new hook_Awake(ClassicStageInfoMethod); SceneDef val = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/Base/rootjungle/rootjungle.asset").WaitForCompletion(); MusicTrackDef bossTrack = Addressables.LoadAssetAsync<MusicTrackDef>((object)"RoR2/DLC1/Common/muBossfightDLC1_12.asset").WaitForCompletion(); val.bossTrack = bossTrack; Physics.IgnoreLayerCollision(15, 13, false); Physics.IgnoreLayerCollision(10, 13, false); MapZone.TryZoneStart += new hook_TryZoneStart(PickupTeleportHook); } internal static void ModSupport() { DCCSEnemies.ModSupport(); ChangesInteractables.ModSupport(); ChangesItems.ItemsLate(); GameModeCatalog.FindGameModePrefabComponent("WeeklyRun").startingScenes = GameModeCatalog.FindGameModePrefabComponent("ClassicRun").startingScenes; Items.BonusGoldPackOnKill.tags = Items.BonusGoldPackOnKill.tags.Add((ItemTag)4); Items.Infusion.tags = Items.Infusion.tags.Add((ItemTag)4); Items.GoldOnHit.tags = Items.GoldOnHit.tags.Add((ItemTag)4); Items.RegeneratingScrap.tags = Items.RegeneratingScrap.tags.Add((ItemTag)4); Items.NovaOnHeal.tags = Items.NovaOnHeal.tags.Add((ItemTag)4); Items.ShockNearby.tags = Items.ShockNearby.tags.Add((ItemTag)21); Items.CritDamage.tags = Items.CritDamage.tags.Add((ItemTag)4); Items.DroneWeapons.tags = Items.DroneWeapons.tags.Add((ItemTag)4); Items.RoboBallBuddy.tags = Items.RoboBallBuddy.tags.Add((ItemTag)4); Items.MinorConstructOnKill.tags = Items.MinorConstructOnKill.tags.Add((ItemTag)4); Items.CaptainDefenseMatrix.tags = Items.CaptainDefenseMatrix.tags.Add((ItemTag)12); Items.BearVoid.tags = Items.BearVoid.tags.Add((ItemTag)11); if (WConfig.CharactersEngineerWarbanner.Value) { Items.WardOnLevel.tags = Items.WardOnLevel.tags.Remove((ItemTag)13); Items.TPHealingNova.tags = Items.TPHealingNova.tags.Remove((ItemTag)13); Items.TonicAffliction.tags = Items.TonicAffliction.tags.Add((ItemTag)13); } if (WConfig.EclipseDifficultyAlways.Value) { RuleChoiceDef val = RuleCatalog.FindChoiceDef("Difficulty.Eclipse8"); if (val != null) { val.excludeByDefault = false; } } if (WConfig.cfgMendingCoreBuff.Value) { Heal.healCoefficient *= 4f; } } public static void GameplayQoL_SceneDirector_Start(orig_Start orig, SceneDirector self) { //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: 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_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)SceneInfo.instance)) { orig.Invoke(self); return; } switch (SceneInfo.instance.sceneDef.baseSceneName) { case "blackbeach": { GameObject val5 = GameObject.Find("/HOLDER: Preplaced Objects"); if (!((Object)(object)val5 != (Object)null)) { break; } UnlockableGranter[] componentsInChildren = val5.GetComponentsInChildren<UnlockableGranter>(true); int num3 = 0; for (int l = 0; l < componentsInChildren.Length; l++) { if (!((Component)componentsInChildren[l]).gameObject.activeSelf) { num3++; } if (num3 == 3) { ((Component)componentsInChildren[1]).gameObject.SetActive(true); } } componentsInChildren = null; GC.Collect(); break; } case "goolake": { Inventory[] array2 = Object.FindObjectsOfType(typeof(Inventory)) as Inventory[]; for (int j = 0; j < array2.Length; j++) { if (NetworkServer.active && (((Object)array2[j]).name.StartsWith("LemurianBruiserFireMaster") || ((Object)array2[j]).name.StartsWith("LemurianBruiserIceMaster"))) { array2[j].GiveItem(Items.UseAmbientLevel, 1); array2[j].GiveItem(Items.BoostHp, 15); array2[j].GiveItem(ChangesCharacters.MarriageLemurianIdentifier, 1); } } break; } case "bazaar": { SeerStationController[] array3 = Object.FindObjectsOfType(typeof(SeerStationController)) as SeerStationController[]; int num2 = 10; if (WConfig.ThirdLunarSeer.Value) { num2 = 0; } SceneDef nextStageScene = Run.instance.nextStageScene; List<SceneDef> list = new List<SceneDef>(); if ((Object)(object)nextStageScene != (Object)null) { int stageOrder = nextStageScene.stageOrder; Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator(); try { while (enumerator.MoveNext()) { SceneDef current = enumerator.Current; if (current.stageOrder == stageOrder && ((Object)(object)current.requiredExpansion == (Object)null || Run.instance.IsExpansionEnabled(current.requiredExpansion)) && !current.baseSceneName.EndsWith("2")) { list.Add(current); } } } finally { ((IDisposable)enumerator).Dispose(); } } for (int k = 0; k < array3.Length; k++) { if (!((Object)array3[k]).name.StartsWith("SeerStation") || !NetworkServer.active) { continue; } if (list.Count > 0) { SceneDef sceneDef = SceneCatalog.GetSceneDef((SceneIndex)((Component)array3[k]).gameObject.GetComponent<SeerStationController>().NetworktargetSceneDefIndex); if (Object.op_Implicit((Object)(object)sceneDef)) { if (sceneDef.cachedName.StartsWith("blackbeach") || sceneDef.cachedName.StartsWith("golemplains")) { list.Remove(SceneCatalog.FindSceneDef(sceneDef.baseSceneName)); list.Remove(SceneCatalog.FindSceneDef(sceneDef.baseSceneName + "2")); } else { list.Remove(sceneDef); } } } if (num2 == 1) { num2 = 2; GameObject val4 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/bazaar/SeerStation.prefab").WaitForCompletion(), ((Component)array3[k]).gameObject.transform.parent); val4.transform.localPosition = new Vector3(10f, -0.81f, 4f); val4.transform.localRotation = new Quaternion(0f, 0.3827f, 0f, -0.9239f); if (list.Count > 0) { val4.GetComponent<SeerStationController>().SetTargetScene(list[random.Next(list.Count)]); ((NetworkBehaviour)val4.GetComponent<SeerStationController>()).OnStartClient(); } else { val4.GetComponent<PurchaseInteraction>().SetAvailable(false); ((NetworkBehaviour)val4.GetComponent<SeerStationController>()).OnStartClient(); } NetworkServer.Spawn(val4); } num2++; } break; } case "moon2": { ShopTerminalBehavior[] array = Object.FindObjectsOfType(typeof(ShopTerminalBehavior)) as ShopTerminalBehavior[]; int num = 0; Transform val = null; Transform val2 = null; for (int i = 0; i < array.Length; i++) { if (!((Object)array[i]).name.StartsWith("LunarCauldron,")) { continue; } if (num == 0) { val2 = ((Component)array[i]).gameObject.transform; val = ((Component)array[i]).gameObject.transform.parent; } num++; if (((Object)array[i]).name.StartsWith("LunarCauldron, RedToWhite")) { num = 10; ((Component)array[i]).gameObject.GetComponent<ShopTerminalBehavior>().dropVelocity = new Vector3(5f, 10f, 5f); } if (num == 5 && (Object)(object)val != (Object)null) { if (WConfig.GuaranteedRedToWhite.Value) { GameObject val3 = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/LunarCauldron, RedToWhite Variant"), val2.position, val2.rotation); NetworkServer.Spawn(val3); ((Component)val2).gameObject.SetActive(false); Debug.Log((object)"No White Soup, making one"); } else { Debug.Log((object)"No White Soup"); } } } break; } } orig.Invoke(self); } public void OneTimeOnlyLateRunner(orig_Start orig, MainMenuController self) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Invalid comparison between Unknown and I4 orig.Invoke(self); Items.RegeneratingScrapConsumed.canRemove = false; ExplicitPickupDropTable[] array = Resources.FindObjectsOfTypeAll(typeof(ExplicitPickupDropTable)) as ExplicitPickupDropTable[]; for (int i = 0; i < array.Length; i++) { ((PickupDropTable)array[i]).canDropBeReplaced = false; if (!((Object)array[i]).name.StartsWith("dtBoss")) { continue; } PickupDefEntry[] pickupEntries = array[i].pickupEntries; foreach (PickupDefEntry val in pickupEntries) { Object pickupDef = val.pickupDef; ItemDef val2 = (ItemDef)(object)((pickupDef is ItemDef) ? pickupDef : null); if (Object.op_Implicit((Object)(object)val2) && (int)val2.tier == 4 && val2.DoesNotContainTag((ItemTag)9)) { AllScavCompatibleBossItems.Add(array[i]); } } } if (((BaseUserEntitlementTracker<LocalUser>)(object)EntitlementManager.localUserEntitlementTracker).AnyUserHasEntitlement(LegacyResourcesAPI.Load<EntitlementDef>("EntitlementDefs/entitlementDLC1")) && WConfig.cfgScavNewTwisted.Value) { MultiCharacterSpawnCard val3 = LegacyResourcesAPI.Load<MultiCharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScavLunar"); val3.masterPrefabs = val3.masterPrefabs.Add(TwistedScavs.ScavLunarWGoomanMaster, TwistedScavs.ScavLunarWSpeedMaster, TwistedScavs.ScavLunarWTankMaster); } MainMenuController.Start -= new hook_Start(OneTimeOnlyLateRunner); } public static void ClassicStageInfoMethod(orig_Awake orig, ClassicStageInfo self) { orig.Invoke(self); if (WConfig.cfgScavBossItem.Value) { ChangesCharacters.DropTableForBossScav = AllScavCompatibleBossItems[WRect.random.Next(AllScavCompatibleBossItems.Count)]; int num = random.Next(10); if (num > 4) { LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = false; } else { LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = true; } } } private static bool ColliderPickup(Collider collider) { if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<PickupDropletController>())) { return true; } if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<GenericPickupController>())) { return true; } if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<PickupPickerController>())) { return true; } return false; } private static void PickupTeleportHook(orig_TryZoneStart orig, MapZone self, Collider collider) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0087: 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_00a5: 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_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_00b8: 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_00c4: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, collider); if ((int)self.zoneType != 0 || !ColliderPickup(collider)) { return; } InfiniteTowerRun component = ((Component)Run.instance).GetComponent<InfiniteTowerRun>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.safeWardController)) { Debug.Log((object)"it tp item back"); TeleportHelper.TeleportGameObject(((Component)collider).gameObject, ((Component)component.safeWardController).transform.position); return; } SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = (HullClassification)0; val.nodeGraphType = (GraphType)0; val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); DirectorPlacementRule val2 = new DirectorPlacementRule { placementMode = (PlacementMode)3, position = ((Component)collider).transform.position }; GameObject val3 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, val2, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val3)) { Debug.Log((object)"tp item back"); TeleportHelper.TeleportGameObject(((Component)collider).gameObject, val3.transform.position); Object.Destroy((Object)(object)val3); } Object.Destroy((Object)(object)val); } } public class ChangesCharacters { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__3_1; public static hook_PickupIsNonBlacklistedItem <>9__3_0; public static hook_OnEnter <>9__4_0; public static hook_OnEnter <>9__4_1; public static hook_OnEnter <>9__4_2; public static hook_OnEnter <>9__4_3; public static hook_OnExit <>9__4_4; public static hook_OnEnter <>9__4_5; public static hook_OnExit <>9__4_6; public static hook_OnEnter <>9__4_7; public static Func<Instruction, bool> <>9__9_1; public static Func<float, FireMegaFireball, float> <>9__9_0; internal void <Enemies>b__3_1(orig_OnEnter orig, Chargeup self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 2.5f); } } internal bool <Enemies>b__3_0(orig_PickupIsNonBlacklistedItem orig, FindItem self, PickupIndex pickupIndex) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) bool flag = orig.Invoke(self, pickupIndex); if (flag) { PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex); ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); return !((Object)(object)itemDef == (Object)null) && itemDef.DoesNotContainTag((ItemTag)8) && itemDef.DoesNotContainTag((ItemTag)20); } return flag; } internal void <Characters>b__4_0(orig_OnEnter orig, GroundLight2 self) { if (self.isComboFinisher) { ((BasicMeleeAttack)self).ignoreAttackSpeed = true; } orig.Invoke(self); } internal void <Characters>b__4_1(orig_OnEnter orig, Uppercut self) { orig.Invoke(self); if (self.duration < 0.15f) { self.duration = 0.15f; } } internal void <Characters>b__4_2(orig_OnEnter orig, AimArrowSnipe self) { orig.Invoke(self); int num = ((EntityState)self).skillLocator.special.stock; int baseMaxStock = self.primarySkillSlot.skillDef.baseMaxStock; if (num > 1) { num = 1; } else if ((double)((EntityState)self).skillLocator.special.finalRechargeInterval == 0.5) { num--; } int stock = baseMaxStock * (num + 1); if (num >= 0) { ((EntityState)self).skillLocator.special.DeductStock(num); } ((EntityState)self).skillLocator.primary.stock = stock; } internal void <Characters>b__4_3(orig_OnEnter orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } } internal void <Characters>b__4_4(orig_OnExit orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f); } } internal void <Characters>b__4_5(orig_OnEnter orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } } internal void <Characters>b__4_6(orig_OnExit orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } internal void <Characters>b__4_7(orig_OnEnter orig, CorruptModeBase self) { orig.Invoke(self); if (self is CorruptMode) { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)1); } else { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)0); } } internal bool <MarriedLemurianBandActivator>b__9_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "EntityStates.LemurianBruiserMonster.FireMegaFireball", "damageCoefficient"); } internal float <MarriedLemurianBandActivator>b__9_0(float damageCoeff, FireMegaFireball entityState) { if (((EntityState)entityState).characterBody.inventory.GetItemCount(MarriageLemurianIdentifier) == 1) { ((EntityState)entityState).characterBody.ClearTimedBuffs(Buffs.ElementalRingsCooldown); return 4f; } return damageCoeff; } } public static ItemDef MarriageLemurianIdentifier = ScriptableObject.CreateInstance<ItemDef>(); public static ExplicitPickupDropTable DropTableForBossScav = null; public static void Start() { Enemies(); Characters(); MarriedEldersBands(); } public static void Enemies() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0119: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_0173: 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_017e: Expected O, but got Unknown if (WConfig.cfgMendingCoreBuff.Value) { GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteEarth/AffixEarthHealerMaster.prefab").WaitForCompletion(); val.AddComponent<GivePickupsOnStart>().itemInfos = (ItemInfo[])(object)new ItemInfo[1] { new ItemInfo { itemString = "UseAmbientLevel", count = 1 } }; CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteEarth/AffixEarthHealerBody.prefab").WaitForCompletion().GetComponent<CharacterBody>(); component.baseArmor += 300f; component.baseMaxHealth *= 3f; component.levelMaxHealth *= 3f; component.baseDamage *= 0.5f; component.levelDamage += component.baseDamage; object obj = <>c.<>9__3_1; if (obj == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, Chargeup self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 2.5f); } }; <>c.<>9__3_1 = val2; obj = (object)val2; } Chargeup.OnEnter += (hook_OnEnter)obj; } if (WConfig.cfgScavBossItem.Value) { ScavengerItemGranter.Start += new hook_Start(GiveScavMoreItems); LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = false; LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscGolem").forbiddenAsBoss = false; } if (WConfig.cfgScavMoreItemsElites.Value) { ScavengerItemGranter.Start += new hook_Start(GiveScavBossItems); } object obj2 = <>c.<>9__3_0; if (obj2 == null) { hook_PickupIsNonBlacklistedItem val3 = delegate(orig_PickupIsNonBlacklistedItem orig, FindItem self, PickupIndex pickupIndex) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) bool flag = orig.Invoke(self, pickupIndex); if (flag) { PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex); ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); return !((Object)(object)itemDef == (Object)null) && itemDef.DoesNotContainTag((ItemTag)8) && itemDef.DoesNotContainTag((ItemTag)20); } return flag; }; <>c.<>9__3_0 = val3; obj2 = (object)val3; } FindItem.PickupIsNonBlacklistedItem += (hook_PickupIsNonBlacklistedItem)obj2; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar1Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar2Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar3Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar4Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; AISkillDriver[] components = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/ScavMaster").GetComponents<AISkillDriver>(); for (int i = 0; i < components.Length; i++) { if (components[i].customName.Contains("Sit")) { components[i].maxUserHealthFraction = 1f; components[i].minUserHealthFraction = 0.3f; components[i].selectionRequiresOnGround = false; components[i].maxDistance = 1000f; components[i].minDistance = 60f; } } components = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/EngiWalkerTurretMaster").GetComponents<AISkillDriver>(); for (int j = 0; j < components.Length; j++) { if (components[j].customName.StartsWith("ReturnToLeader")) { components[j].shouldSprint = true; if (components[j].minDistance == 110f) { components[j].minDistance = 50f; } } } components = LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/EquipmentDroneMaster").GetComponents<AISkillDriver>(); components[0].shouldFireEquipment = true; components[2].shouldFireEquipment = true; components[5].shouldFireEquipment = true; components[6].shouldFireEquipment = true; } public static void Characters() { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0082: 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_008d: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_0103: 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_010e: Expected O, but got Unknown //IL_0128: 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) //IL_0133: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //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_01d3: Expected O, but got Unknown //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Commando/CommandoBodyFireFMJ.asset").WaitForCompletion().mustKeyPress = false; Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Croco/CrocoSpit.asset").WaitForCompletion().mustKeyPress = false; Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/LunarSkillReplacements/LunarSecondaryReplacement.asset").WaitForCompletion().mustKeyPress = true; object obj = <>c.<>9__4_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, GroundLight2 self) { if (self.isComboFinisher) { ((BasicMeleeAttack)self).ignoreAttackSpeed = true; } orig.Invoke(self); }; <>c.<>9__4_0 = val; obj = (object)val; } GroundLight2.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__4_1; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, Uppercut self) { orig.Invoke(self); if (self.duration < 0.15f) { self.duration = 0.15f; } }; <>c.<>9__4_1 = val2; obj2 = (object)val2; } Uppercut.OnEnter += (hook_OnEnter)obj2; if (WConfig.CharactersHuntressLysateCell.Value) { object obj3 = <>c.<>9__4_2; if (obj3 == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, AimArrowSnipe self) { orig.Invoke(self); int num = ((EntityState)self).skillLocator.special.stock; int baseMaxStock = self.primarySkillSlot.skillDef.baseMaxStock; if (num > 1) { num = 1; } else if ((double)((EntityState)self).skillLocator.special.finalRechargeInterval == 0.5) { num--; } int stock = baseMaxStock * (num + 1); if (num >= 0) { ((EntityState)self).skillLocator.special.DeductStock(num); } ((EntityState)self).skillLocator.primary.stock = stock; }; <>c.<>9__4_2 = val3; obj3 = (object)val3; } AimArrowSnipe.OnEnter += (hook_OnEnter)obj3; } if (WConfig.CharactersCaptainKeepInHiddemRealm.Value) { ((ResourceAvailability)(ref SceneCatalog.availability)).CallWhenAvailable((Action)NoOrbitalStrikeBlocking); } object obj4 = <>c.<>9__4_3; if (obj4 == null) { hook_OnEnter val4 = delegate(orig_OnEnter orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } }; <>c.<>9__4_3 = val4; obj4 = (object)val4; } Spawn.OnEnter += (hook_OnEnter)obj4; object obj5 = <>c.<>9__4_4; if (obj5 == null) { hook_OnExit val5 = delegate(orig_OnExit orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f); } }; <>c.<>9__4_4 = val5; obj5 = (object)val5; } Spawn.OnExit += (hook_OnExit)obj5; if (WConfig.CharactersCommandoInvul.Value) { object obj6 = <>c.<>9__4_5; if (obj6 == null) { hook_OnEnter val6 = delegate(orig_OnEnter orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } }; <>c.<>9__4_5 = val6; obj6 = (object)val6; } DodgeState.OnEnter += (hook_OnEnter)obj6; object obj7 = <>c.<>9__4_6; if (obj7 == null) { hook_OnExit val7 = delegate(orig_OnExit orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } }; <>c.<>9__4_6 = val7; obj7 = (object)val7; } DodgeState.OnExit += (hook_OnExit)obj7; LanguageAPI.Add("COMMANDO_UTILITY_DESCRIPTION", "<style=cIsUtility>Roll</style> a short distance. You <style=cIsUtility>cannot be hit</style> while rolling."); } if (!WConfig.CharactersVoidFiendEquip.Value) { return; } object obj8 = <>c.<>9__4_7; if (obj8 == null) { hook_OnEnter val8 = delegate(orig_OnEnter orig, CorruptModeBase self) { orig.Invoke(self); if (self is CorruptMode) { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)1); } else { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)0); } }; <>c.<>9__4_7 = val8; obj8 = (object)val8; } CorruptModeBase.OnEnter += (hook_OnEnter)obj8; } private static void GiveScavBossItems(orig_Start orig, ScavengerItemGranter self) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Invalid comparison between Unknown and I4 //IL_007e: 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) orig.Invoke(self); CharacterBody body = ((Component)self).GetComponent<CharacterMaster>().GetBody(); Inventory component = ((Component)self).GetComponent<Inventory>(); if (Object.op_Implicit((Object)(object)body) && body.isBoss) { DeathRewards component2 = ((Component)body).GetComponent<DeathRewards>(); if (Object.op_Implicit((Object)(object)component2)) { component2.bossDropTable = (PickupDropTable)(object)DropTableForBossScav; } ItemDef val = (ItemDef)DropTableForBossScav.pickupEntries[0].pickupDef; int num = 2; if ((int)component.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)component.currentEquipmentState.equipmentDef.passiveBuffDef) && component.currentEquipmentState.equipmentDef.passiveBuffDef.isElite) { num = 3; } else { component.GiveItem(Items.BoostHp, 5); } if (val.DoesNotContainTag((ItemTag)4) && val.DoesNotContainTag((ItemTag)8)) { Debug.Log((object)("Giving Boss Scav " + (object)val)); component.GiveItem(val, num); } else { Debug.Log((object)(((object)val)?.ToString() + " is Blacklisted for Scavs, resorting to ShinyPearl")); component.GiveItem(Items.ShinyPearl, num); } } } public static void GiveScavMoreItems(orig_Start orig, ScavengerItemGranter self) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Invalid comparison between Unknown and I4 //IL_002b: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { CharacterBody body = ((Component)self).GetComponent<CharacterMaster>().GetBody(); Inventory component = ((Component)self).GetComponent<Inventory>(); bool flag = (int)component.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)component.currentEquipmentState.equipmentDef.passiveBuffDef) && component.currentEquipmentState.equipmentDef.passiveBuffDef.isElite; if (self.stackRollDataList.Length == 3 && flag) { bool flag2 = (float)component.GetItemCount(Items.BoostHp) >= component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient * 10f - 10f; if (flag2 && component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient > 10f) { self.stackRollDataList[0].stacks = 7; self.stackRollDataList[0].numRolls = 7; self.stackRollDataList[1].stacks = 5; self.stackRollDataList[1].numRolls = 5; self.stackRollDataList[2].stacks = 2; self.stackRollDataList[2].numRolls = 3; } else if (flag2) { self.stackRollDataList[0].stacks = 5; self.stackRollDataList[0].numRolls = 5; self.stackRollDataList[1].stacks = 3; self.stackRollDataList[1].numRolls = 4; self.stackRollDataList[2].stacks = 2; self.stackRollDataList[2].numRolls = 2; } else if (body.isBoss) { self.stackRollDataList[2].numRolls++; } } } orig.Invoke(self); } public unsafe static void NoOrbitalStrikeBlocking() { //IL_0021: 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_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) for (int i = 0; i < SceneCatalog.allSceneDefs.Length; i++) { ((SceneDef)Unsafe.Read<object>((void*)SceneCatalog.allSceneDefs[i])).blockOrbitalSkills = false; } } public static void MarriedEldersBands() { //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_0046: 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_00cf: Expected O, but got Unknown FireMegaFireball.FixedUpdate += new Manipulator(MarriedLemurianBandActivator); Util.GetBestBodyName += new hook_GetBestBodyName(MarriedLemurianNameHook); ItemDef val = LegacyResourcesAPI.Load<ItemDef>("ItemDefs/AACannon"); ((Object)MarriageLemurianIdentifier).name = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.deprecatedTier = (ItemTier)5; MarriageLemurianIdentifier._itemTierDef = val._itemTierDef; MarriageLemurianIdentifier.nameToken = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.pickupToken = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.descriptionToken = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.hidden = false; MarriageLemurianIdentifier.canRemove = false; MarriageLemurianIdentifier.pickupIconSprite = val.pickupIconSprite; MarriageLemurianIdentifier.pickupModelPrefab = val.pickupModelPrefab; CustomItem val2 = new CustomItem(MarriageLemurianIdentifier, (ItemDisplayRule[])(object)new ItemDisplayRule[0]); ItemAPI.Add(val2); } public static void MarriedLemurianBandActivator(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "EntityStates.LemurianBruiserMonster.FireMegaFireball", "damageCoefficient") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, FireMegaFireball, float>>((Func<float, FireMegaFireball, float>)delegate(float damageCoeff, FireMegaFireball entityState) { if (((EntityState)entityState).characterBody.inventory.GetItemCount(MarriageLemurianIdentifier) == 1) { ((EntityState)entityState).characterBody.ClearTimedBuffs(Buffs.ElementalRingsCooldown); return 4f; } return damageCoeff; }); } else { Debug.LogWarning((object)"IL Failed: Buff Married Lemurians"); } } public static string MarriedLemurianNameHook(orig_GetBestBodyName orig, GameObject bodyObject) { string result = orig.Invoke(bodyObject); if (Object.op_Implicit((Object)(object)bodyObject)) { CharacterBody component = bodyObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && component.inventory.GetItemCount(MarriageLemurianIdentifier) > 0) { if (component.inventory.GetItemCount(Items.FireRing) > 0) { return "Kjaro"; } if (component.inventory.GetItemCount(Items.IceRing) > 0) { return "Runald"; } } } return result; } } public class ChangesInteractables { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__7_8; public static Manipulator <>9__7_6; public static hook_DropDroplet <>9__7_7; public static Func<Instruction, bool> <>9__7_10; public static Manipulator <>9__7_9; public static hook_AddShrineStack <>9__7_0; public static hook_AddShrineStack <>9__7_1; public static hook_AddShrineStack <>9__7_2; public static hook_AddShrineStack <>9__7_3; public static hook_AddShrineStack <>9__7_4; public static hook_AddShrineStack <>9__7_5; public static hook_Awake <>9__8_0; public static hook_Start <>9__8_1; public static hook_DropPickup <>9__8_2; internal void <Faster>b__7_6(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: PurchaseInteraction.CreateItemTakenOrb"); } } internal bool <Faster>b__7_8(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal void <Faster>b__7_7(orig_DropDroplet orig, Duplicating self) { orig.Invoke(self); if (NetworkServer.active) { ((Component)((EntityState)self).outer).GetComponent<PurchaseInteraction>().Networkavailable = true; } } internal void <Faster>b__7_9(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb"); } } internal bool <Faster>b__7_10(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal void <Faster>b__7_0(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__7_1(orig_AddShrineStack orig, ShrineBossBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__7_2(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__7_3(orig_AddShrineStack orig, ShrineCombatBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__7_4(orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__7_5(orig_AddShrineStack orig, ShrineRestackBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <StupidPriceChanger>b__8_0(orig_Awake orig, PurchaseInteraction self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 orig.Invoke(self); if ((int)self.costType == 3) { self.cost = 0; } } internal void <StupidPriceChanger>b__8_1(orig_Start orig, ShrineBloodBehavior self) { orig.Invoke(self); self.goldToPaidHpRatio *= Mathf.Pow(Run.instance.difficultyCoefficient, 0.6f); } internal void <StupidPriceChanger>b__8_2(orig_DropPickup orig, ShopTerminalBehavior self) { //IL_0032: 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_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) if (((Object)self).name.StartsWith("LunarCauldron, RedToWhite")) { if (!((Component)self).GetComponent<PurchaseInteraction>().available) { for (int i = 0; i < WConfig.InteractableRedSoupAmount.Value; i++) { PickupDropletController.CreatePickupDroplet(self.pickupIndex, (Object.op_Implicit((Object)(object)self.dropTransform) ? self.dropTransform : ((Component)self).transform).position, ((Component)self).transform.TransformVector(self.dropVelocity)); } } if (self.hasBeenPurchased) { } } orig.Invoke(self); } } public static InteractableSpawnCard RedMultiShopISC = ScriptableObject.CreateInstance<InteractableSpawnCard>(); public static InteractableSpawnCard iscShrineGoldFake = Object.Instantiate<InteractableSpawnCard>(LegacyResourcesAPI.Load<InteractableSpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineGoldshoresAccess")); public static readonly GameObject MiliMutliShopMain = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("prefabs/networkedobjects/chest/TripleShopLarge"), "TripleShopRed", true); public static readonly GameObject MiliMutliShopTerminal = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("prefabs/networkedobjects/chest/MultiShopLargeTerminal"), "MultiShopRedTerminal", true); private static Material MatMiliMultiShop; public static void Start() { //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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) RedMultiShopMaker(); FakeGoldShrine(); StupidPriceChanger(); Faster(); BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/TreasureCache/dtLockbox.asset").WaitForCompletion(); ((PickupDropTable)val).canDropBeReplaced = false; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest1StealthedVariant/Chest1StealthedVariant.prefab").WaitForCompletion().GetComponent<ChestBehavior>() .dropTable = (PickupDropTable)(object)val; ((PickupDropTable)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/TreasureCacheVoid/dtVoidLockbox.asset").WaitForCompletion()).canDropBeReplaced = false; ((PickupDropTable)Addressables.LoadAssetAsync<FreeChestDropTable>((object)"RoR2/DLC1/FreeChest/dtFreeChest.asset").WaitForCompletion()).canDropBeReplaced = false; GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/DeepVoidPortalBattery/DeepVoidPortalBattery.prefab").WaitForCompletion(); val2.GetComponent<HoldoutZoneController>().baseChargeDuration = WConfig.FasterDeepVoidSignal.Value; HoldoutZoneController component = val2.GetComponent<HoldoutZoneController>(); component.baseRadius += 5f; GameObject val3 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Teleporters/Teleporter1"); GameObject val4 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Teleporters/LunarTeleporter Variant"); val3.GetComponent<BossGroup>().bossDropChance = WConfig.YellowPercentage.Value / 100f; val4.GetComponent<BossGroup>().bossDropChance = WConfig.YellowPercentage.Value / 100f; val3.GetComponent<TeleporterInteraction>().baseShopSpawnChance = WConfig.ShopChancePercentage.Value / 100f; if (WConfig.VoidPortalChance.Value) { val3.GetComponent<PortalSpawner>().minStagesCleared = 4; val4.GetComponent<PortalSpawner>().spawnChance = 0.2f; val4.GetComponent<PortalSpawner>().minStagesCleared = 4; val4.GetComponent<PortalSpawner>().spawnChance = 1f; } if (!WConfig.InteractablesCombatShrineHP.Value) { GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombat.prefab").WaitForCompletion(); val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false; val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSandy Variant.prefab").WaitForCompletion(); val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false; val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSnowy Variant.prefab").WaitForCompletion(); val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false; } LunarTeleporterBaseState.FixedUpdate += new hook_FixedUpdate(LunarTeleporterBaseState_FixedUpdate); } public static void LunarTeleporterBaseState_FixedUpdate(orig_FixedUpdate orig, LunarTeleporterBaseState self) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { if (TeleporterInteraction.instance.isInFinalSequence) { self.genericInteraction.Networkinteractability = (Interactability)0; } else { self.genericInteraction.Networkinteractability = self.preferredInteractability; } } } public static void Faster() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown if (WConfig.FasterPrinter.Value) { object obj = <>c.<>9__7_6; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val15 = new ILCursor(il); if (val15.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val15.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: PurchaseInteraction.CreateItemTakenOrb"); } }; <>c.<>9__7_6 = val; obj = (object)val; } PurchaseInteraction.CreateItemTakenOrb += (Manipulator)obj; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/Duplicator").GetComponent<DelayedEvent>()).enabled = false; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorLarge").GetComponent<DelayedEvent>()).enabled = false; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorMilitary").GetComponent<DelayedEvent>()).enabled = false; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorWild").GetComponent<DelayedEvent>()).enabled = false; object obj2 = <>c.<>9__7_7; if (obj2 == null) { hook_DropDroplet val2 = delegate(orig_DropDroplet orig, Duplicating self) { orig.Invoke(self); if (NetworkServer.active) { ((Component)((EntityState)self).outer).GetComponent<PurchaseInteraction>().Networkavailable = true; } }; <>c.<>9__7_7 = val2; obj2 = (object)val2; } Duplicating.DropDroplet += (hook_DropDroplet)obj2; EntityStateConfiguration val3 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Duplicator.Duplicating"); val3.serializedFieldsCollection.serializedFields[0].fieldValue.stringValue = "0.6"; val3.serializedFieldsCollection.serializedFields[1].fieldValue.stringValue = "1.25"; } if (WConfig.FasterScrapper.Value) { object obj3 = <>c.<>9__7_9; if (obj3 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val14 = new ILCursor(il); if (val14.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val14.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb"); } }; <>c.<>9__7_9 = val4; obj3 = (object)val4; } ScrapperController.CreateItemTakenOrb += (Manipulator)obj3; EntityStateConfiguration val5 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Scrapper.Scrapping"); EntityStateConfiguration val6 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Scrapper.ScrappingToIdle"); EntityStateConfiguration val7 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Scrapper.WaitToBeginScrapping"); val5.serializedFieldsCollection.serializedFields[2].fieldValue.stringValue = "1"; val6.serializedFieldsCollection.serializedFields[2].fieldValue.stringValue = "0.4"; val7.serializedFieldsCollection.serializedFields[0].fieldValue.stringValue = "0.9"; } if (!WConfig.FasterShrines.Value) { return; } object obj4 = <>c.<>9__7_0; if (obj4 == null) { hook_AddShrineStack val8 = delegate(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__7_0 = val8; obj4 = (object)val8; } ShrineBloodBehavior.AddShrineStack += (hook_AddShrineStack)obj4; object obj5 = <>c.<>9__7_1; if (obj5 == null) { hook_AddShrineStack val9 = delegate(orig_AddShrineStack orig, ShrineBossBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__7_1 = val9; obj5 = (object)val9; } ShrineBossBehavior.AddShrineStack += (hook_AddShrineStack)obj5; object obj6 = <>c.<>9__7_2; if (obj6 == null) { hook_AddShrineStack val10 = delegate(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__7_2 = val10; obj6 = (object)val10; } ShrineChanceBehavior.AddShrineStack += (hook_AddShrineStack)obj6; object obj7 = <>c.<>9__7_3; if (obj7 == null) { hook_AddShrineStack val11 = delegate(orig_AddShrineStack orig, ShrineCombatBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__7_3 = val11; obj7 = (object)val11; } ShrineCombatBehavior.AddShrineStack += (hook_AddShrineStack)obj7; object obj8 = <>c.<>9__7_4; if (obj8 == null) { hook_AddShrineStack val12 = delegate(orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__7_4 = val12; obj8 = (object)val12; } ShrineHealingBehavior.AddShrineStack += (hook_AddShrineStack)obj8; object obj9 = <>c.<>9__7_5; if (obj9 == null) { hook_AddShrineStack val13 = delegate(orig_AddShrineStack orig, ShrineRestackBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__7_5 = val13; obj9 = (object)val13; } ShrineRestackBehavior.AddShrineStack += (hook_AddShrineStack)obj9; } public static void StupidPriceChanger() { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown if (WConfig.InteractableHealingShrine.Value) { LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<PurchaseInteraction>().cost = 10; LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<ShrineHealingBehavior>().costMultiplierPerPurchase = 1.4f; ShrineHealingBehavior component = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<ShrineHealingBehavior>(); component.maxPurchaseCount++; } LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/BrokenDrones/MegaDroneBroken").GetComponent<PurchaseInteraction>().cost = WConfig.MegaDroneCost.Value; LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/BrokenDrones/Turret1Broken").GetComponent<PurchaseInteraction>().cost = WConfig.TurretDroneCost.Value; LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/LunarCauldron, RedToWhite Variant").GetComponent<ShopTerminalBehavior>().dropVelocity = new Vector3(5f, 10f, 5f); if (WConfig.InteractableNoLunarCost.Value) { object obj = <>c.<>9__8_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, PurchaseInteraction self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 orig.Invoke(self); if ((int)self.costType == 3) { self.cost = 0; } }; <>c.<>9__8_0 = val; obj = (object)val; } PurchaseInteraction.Awake += (hook_Awake)obj; } if (WConfig.InteractableBloodShrineScaleWithTime.Value) { object obj2 = <>c.<>9__8_1; if (obj2 == null) { hook_Start val2 = delegate(orig_Start orig, ShrineBloodBehavior self) { orig.Invoke(self); self.goldToPaidHpRatio *= Mathf.Pow(Run.instance.difficultyCoefficient, 0.6f); }; <>c.<>9__8_1 = val2; obj2 = (object)val2; } ShrineBloodBehavior.Start += (hook_Start)obj2; } if (WConfig.InteractableRedSoupAmount.Value == 0) { return; } object obj3 = <>c.<>9__8_2; if (obj3 == null) { hook_DropPickup val3 = delegate(orig_DropPickup orig, ShopTerminalBehavior self) { //IL_0032: 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_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) if (((Object)self).name.StartsWith("LunarCauldron, RedToWhite")) { if (!((Component)self).GetComponent<PurchaseInteraction>().available) { for (int i = 0; i < WConfig.InteractableRedSoupAmount.Value; i++) { PickupDropletController.CreatePickupDroplet(self.pickupIndex, (Object.op_Implicit((Object)(object)self.dropTransform) ? self.dropTransform : ((Component)self).transform).position, ((Component)self).transform.TransformVector(self.dropVelocity)); } } if (self.hasBeenPurchased) { } } orig.Invoke(self); }; <>c.<>9__8_2 = val3; obj3 = (object)val3; } ShopTerminalBehavior.DropPickup += (hook_DropPickup)obj3; } internal static void FakeGoldShrine() { ((Object)iscShrineGoldFake).name = "iscShrineGoldFake"; iscShrineGoldFake.maxSpawnsPerStage = -1; GameObject val = PrefabAPI.InstantiateClone(((SpawnCard)iscShrineGoldFake).prefab, "iscShrineGoldFake", true); ((Object)val).name = "FakeGoldShrine"; Object.Destroy((Object)(object)val.GetComponent<HologramProjector>()); Object.Destroy((Object)(object)val.GetComponent<PurchaseAvailabilityIndicator>()); Object.Destroy((Object)(object)val.GetComponent<PortalStatueBehavior>()); Object.Destroy((Object)(object)val.GetComponent<PurchaseInteraction>()); Object.Destroy((Object)(object)((Component)val.transform.GetChild(3)).gameObject); Object.Destroy((Object)(object)((Component)val.transform.GetChild(2)).gameObject); Object.Destroy((Object)(object)((Component)val.transform.GetChild(1)).gameObject); ((SpawnCard)iscShrineGoldFake).prefab = val; } internal static void RedMultiShopMaker() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_012f: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0216: 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_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: 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_0311: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(64, 64, (TextureFormat)10, false) { filterMode = (FilterMode)1 }; ImageConversion.LoadImage(val, Resources.texRedMultiChestPodDiffuse, false); ((Behaviour)MiliMutliShopMain.GetComponentInChildren<RandomizeSplatBias>()).enabled = false; ((Behaviour)MiliMutliShopTerminal.GetComponentInChildren<RandomizeSplatBias>()).enabled = false; MeshRenderer componentInChildren = MiliMutliShopMain.GetComponentInChildren<MeshRenderer>(); SkinnedMeshRenderer componentInChildren2 = MiliMutliShopTerminal.GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren3 = Resources.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorMilitary").GetComponentInChildren<SkinnedMeshRenderer>(); MatMiliMultiShop = Object.Instantiate<Material>(((Renderer)componentInChildren3).material); MatMiliMultiShop.mainTexture = (Texture)(object)val; ((Renderer)componentInChildren).material = MatMiliMultiShop; ((Renderer)componentInChildren).sharedMaterial = MatMiliMultiShop; ((Renderer)componentInChildren2).material = MatMiliMultiShop; ((Renderer)componentInChildren2).sharedMaterial = MatMiliMultiShop; GameObject gameObject = Resources.Load<ItemDef>("itemdefs/LaserTurbine").pickupModelPrefab.gameObject; Transform child = gameObject.transform.GetChild(0).GetChild(1); Transform val2 = Object.Instantiate<Transform>(((Component)child).transform, MiliMutliShopTerminal.transform.GetChild(0)); Transform val3 = Object.Instantiate<Transform>(((Component)child).transform, MiliMutliShopTerminal.transform.GetChild(0)); val2.localScale = new Vector3(1.8f, 1.8f, 1.6f); val3.localScale = new Vector3(1.8f, 1.8f, 1.6f); val2.localPosition = new Vector3(-0.0029f, 0.5176f, 0.0073f); val3.localPosition = new Vector3(-0.0029f, 5.9676f, 0.0073f); val2.rotation = new Quaternion(180f, 0f, 0f, 180f); val3.rotation = new Quaternion(180f, 0f, 0f, 180f); Renderer component = (Renderer)(object)((Component)val2).GetComponent<MeshRenderer>(); Renderer component2 = (Renderer)(object)((Component)val3).GetComponent<MeshRenderer>(); component.material = Object.Instantiate<Material>(component.material); component.material.SetColor("_EmColor", new Color(1f, 0f, 0f, 0f)); component2.material = component.material; Renderer[] renderers = MiliMutliShopTerminal.GetComponent<DitherModel>().renderers; renderers = renderers.Add(component, component2); MiliMutliShopTerminal.GetComponent<DitherModel>().renderers = renderers; MultiShopController component3 = MiliMutliShopMain.GetComponent<MultiShopController>(); component3.baseCost = 450; component3.itemTier = (ItemTier)2; component3.terminalPrefab = MiliMutliShopTerminal; PurchaseInteraction component4 = MiliMutliShopTerminal.GetComponent<PurchaseInteraction>(); component4.cost = 500; component4.displayNameToken = "Mili-Multishop Terminal"; ShopTerminalBehavior component5 = MiliMutliShopTerminal.GetComponent<ShopTerminalBehavior>(); component5.itemTier = (ItemTier)2; component5.dropTable = Addressables.LoadAssetAsync<PickupDropTable>((object)"RoR2/Base/GoldChest/dtGoldChest.asset").WaitForCompletion(); GameObject val4 = Resources.Load<GameObject>("prefabs/networkedobjects/chest/TripleShopLarge"); val4.transform.GetChild(0).localPosition = new Vector3(0f, 6f, 0f); MiliMutliShopMain.transform.GetChild(0).localPosition = new Vector3(0f, 6f, 0f); ((Object)RedMultiShopISC).name = "iscTripleShopRed"; ((SpawnCard)RedMultiShopISC).prefab = MiliMutliShopMain; ((SpawnCard)RedMultiShopISC).sendOverNetwork = true; ((SpawnCard)RedMultiShopISC).hullSize = (HullClassification)0; ((SpawnCard)RedMultiShopISC).nodeGraphType = (GraphType)0; ((SpawnCard)RedMultiShopISC).requiredFlags = (NodeFlags)0; ((SpawnCard)RedMultiShopISC).forbiddenFlags = (NodeFlags)8; ((SpawnCard)RedMultiShopISC).directorCreditCost = 50; ((SpawnCard)RedMultiShopISC).occupyPosition = false; ((SpawnCard)RedMultiShopISC).eliteRules = (EliteRules)0; RedMultiShopISC.orientToFloor = false; RedMultiShopISC.slightlyRandomizeOrientation = false; RedMultiShopISC.skipSpawnWhenSacrificeArtifactEnabled = true; } public static void ModSupport() { //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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/GoldChest/GoldChest.prefab").WaitForCompletion(); if ((Object)(object)val.GetComponent<PingInfoProvider>() != (Object)null) { MiliMutliShopTerminal.AddComponent<PingInfoProvider>().pingIconOverride = val.GetComponent<PingInfoProvider>().pingIconOverride; } GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineGoldshoresAccess/ShrineGoldshoresAccess.prefab").WaitForCompletion(); if ((Object)(object)val2.GetComponent<PingInfoProvider>() != (Object)null) { ((SpawnCard)iscShrineGoldFake).prefab.AddComponent<PingInfoProvider>().pingIconOverride = val2.GetComponent<PingInfoProvider>().pingIconOverride; } } } public class ChangesItems { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static StatHookEventHandler <>9__4_0; public static hook_Awake <>9__4_1; public static hook_BeginEncounter <>9__4_2; public static hook_OnEnter <>9__4_3; public static hook_OnPreDestroyBodyServer <>9__4_4; public static hook_RespawnExtraLifeVoid <>9__6_0; public static hook_OnEquipmentLost <>9__6_1; public static hook_OnEnable <>9__6_2; internal void <Items>b__4_0(CharacterBody sender, StatHookEventArgs args) { if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(Items.CritDamage) > 0) { args.critAdd += 10f; } } internal void <Items>b__4_1(orig_Awake orig, HoldoutZoneController self) { orig.Invoke(self); if (self.minimumRadius == 0f) { self.minimumRadius = 10f; } } internal void <Items>b__4_2(orig_BeginEncounter orig, ScriptedCombatEncounter self) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (((Object)self).name.StartsWith("ScavLunar")) { int num = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true); if (num == 0) { num = 1; } for (int i = 0; i < num; i++) { self.hasSpawnedServer = false; orig.Invoke(self); } } else { orig.Invoke(self); } } internal void <Items>b__4_3(orig_OnEnter orig, FadeOut self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); int num = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true); if (num > 1) { if (num > 10) { num = 10; } float num2 = FadeOut.duration / 4f * (float)(num - 1); Reflection.SetFieldValue<float>((object)self, "duration", FadeOut.duration + num2); } } internal void <Items>b__4_4(orig_OnPreDestroyBodyServer orig, Death self) { if (((Object)((EntityState)self).outer).name.StartsWith("ScavLunar")) { self.shouldDropPack = true; } orig.Invoke(self); } internal void <VoidAffix>b__6_0(orig_RespawnExtraLifeVoid orig, CharacterMaster self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if ((int)self.inventory.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)EquipmentCatalog.GetEquipmentDef(self.inventory.currentEquipmentIndex).passiveBuffDef)) { CharacterMasterNotificationQueue.PushEquipmentTransformNotification(self, self.inventory.currentEquipmentIndex, Equipment.EliteVoidEquipment.equipmentIndex, (TransformationType)1); self.inventory.SetEquipment(new EquipmentState(Equipment.EliteVoidEquipment.equipmentIndex, FixedTimeStamp.negativeInfinity, (byte)0), 0u); } } internal void <VoidAffix>b__6_1(orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef) { if (!((Object)(object)equipmentDef == (Object)(object)Equipment.EliteVoidEquipment) || self.healthComponent.alive) { orig.Invoke(self, equipmentDef); } } internal void <VoidAffix>b__6_2(orig_OnEnable orig, AffixVoidBehavior self) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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(self); if (Object.op_Implicit((Object)(object)((ItemBehavior)self).body) && ((ItemBehavior)self).body.isPlayerControlled && ((ItemBehavior)self).body.inventory.currentEquipmentIndex != Equipment.EliteVoidEquipment.equipmentIndex && !self.wasVoidBody) { CharacterBody body = ((ItemBehavior)self).body; body.bodyFlags = (BodyFlags)(body.bodyFlags & -1025); } } } public static EliteDef EliteDefLunarEulogy = ScriptableObject.CreateInstance<EliteDef>(); public static ItemDef MarriageLemurianIdentifier = ScriptableObject.CreateInstance<ItemDef>(); public static void Start() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown Items(); BetterRedWhipCheck(); VoidAffix(); if (WConfig.MinionsInherit.Value) { MinionGroup.AddMinion += new hook_AddMinion(MinionsInheritWithDrones); } } public static void MinionsInheritWithDrones(orig_AddMinion orig, NetworkInstanceId ownerId, MinionOwnership minion) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Invalid comparison between Unknown and I4 //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_00ae: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(ownerId, minion); if (NetworkServer.active && !((Object)minion).name.StartsWith("AffixEarth") && Object.op_Implicit((Object)(object)minion.ownerMaster) && Object.op_Implicit((Object)(object)((Component)minion.ownerMaster).GetComponent<PlayerCharacterMasterController>()) && (int)minion.ownerMaster.inventory.GetEquipmentIndex() != -1 && minion.ownerMaster.hasBody && minion.ownerMaster.GetBody().isElite) { Inventory component = ((Component)minion).gameObject.GetComponent<Inventory>(); component.SetEquipment(new EquipmentState(minion.ownerMaster.inventory.GetEquipmentIndex(), FixedTimeStamp.negativeInfinity, (byte)0), 0u); component.GiveItem(Items.BoostDamage, 10); component.GiveItem(Items.BoostHp, 30); } } public static void Items() { //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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown //IL_00af: 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_00ba: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_024b: 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_0256: Expected O, but got Unknown Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/Base/Jetpack/Jetpack.asset").WaitForCompletion().canBeRandomlyTriggered = true; if (WConfig.ItemSquidMechanical.Value) { CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Squid/SquidTurretBody.prefab").WaitForCompletion().GetComponent<CharacterBody>(); component.bodyFlags = (BodyFlags)(component.bodyFlags | 2); } if (WConfig.ItemsCaptainMatrix.Value) { ItemDef val = LegacyResourcesAPI.Load<ItemDef>("ItemDefs/CaptainDefenseMatrix"); val.tags = val.tags.Remove((ItemTag)9); } if (WConfig.ItemsScopeBuff.Value) { object obj = <>c.<>9__4_0; if (obj == null) { StatHookEventHandler val2 = delegate(CharacterBody sender, StatHookEventArgs args) { if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(Items.CritDamage) > 0) { args.critAdd += 10f; } }; <>c.<>9__4_0 = val2; obj = (object)val2; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; LanguageAPI.Add("ITEM_CRITDAMAGE_DESC", "Gain <style=cIsDamage>10% critical chance</style>. <style=cIsDamage>Critical Strikes</style> deal an additional <style=cIsDamage>100% damage</style><style=cStack>(+100% per stack)</style>."); } EliteDef val3 = Addressables.LoadAssetAsync<EliteDef>((object)"RoR2/Base/EliteLunar/edLunar.asset").WaitForCompletion(); EliteDefLunarEulogy.modifierToken = val3.modifierToken; EliteDefLunarEulogy.eliteEquipmentDef = val3.eliteEquipmentDef; EliteDefLunarEulogy.color = val3.color; EliteDefLunarEulogy.shaderEliteRampIndex = val3.shaderEliteRampIndex; EliteDefLunarEulogy.healthBoostCoefficient = 3.2f; EliteDefLunarEulogy.damageBoostCoefficient = val3.damageBoostCoefficient; ((Object)EliteDefLunarEulogy).name = "edLunarEulogy"; ContentAddition.AddEliteDef(val3); if (WConfig.ItemsEuologyLunarElites.Value) { CombatDirector.Spawn += new hook_Spawn(LunarEulogyHook); LanguageAPI.Add("ITEM_RANDOMLYLUNAR_PICKUP", "Items, equipment and elites have a small chance to transform into a Lunar version instead.", "en"); LanguageAPI.Add("ITEM_RANDOMLYLUNAR_DESC", "Items and equipment have a <style=cIsUtility>5% <style=cStack>(+5% per stack)</style></style> chance to become a <style=cIsLunar>Lunar</style> item or equipment and Elite Enemies have a <style=cIsUtility>10% <style=cStack>(+5% per stack)</style></style> spawn as <style=cIsLunar>Perfected</style> instead.", "en"); } FocusConvergenceController.cap = 999999; object obj2 = <>c.<>9__4_1; if (obj2 == null) { hook_Awake val4 = delegate(orig_Awake orig, HoldoutZoneController self) { orig.Invoke(self); if (self.minimumRadius == 0f) { self.minimumRadius = 10f; } }; <>c.<>9__4_1 = val4; obj2 = (object)val4; } HoldoutZoneController.Awake += (hook_Awake)obj2; LanguageAPI.Add("ITEM_LUNARTRINKET_DESC", "Once guided to the <style=cIsUtility>monolith</style>, become whole and <style=cIsDamage>fight 1 <style=cStack>(+1 per stack)</style> guardians</style>", "en"); object obj3 = <>c.<>9__4_2; if (obj3 == null) { hook_BeginEncounter val5 = delegate(orig_BeginEncounter orig, ScriptedCombatEncounter self) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (((Object)self).name.StartsWith("ScavLunar")) { int num3 = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true); if (num3 == 0) { num3 = 1; } for (int i = 0; i < num3; i++) { self.hasSpawnedServer = false; orig.Invoke(self); } } else { orig.Invoke(self); } }; <>c.<>9__4_2 = val5; obj3 = (object)val5; } ScriptedCombatEncounter.BeginEncounter += (hook_BeginEncounter)obj3; object obj4 = <>c.<>9__4_3; if (obj4 == null) { hook_OnEnter val6 = delegate(orig_OnEnter orig, FadeOut self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); int num = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true); if (num > 1) { if (num > 10) { num = 10; } float num2 = FadeOut.duration / 4f * (float)(num - 1); Reflection.SetFieldValue<float>((object)self, "duration", FadeOut.duration + num2); } }; <>c.<>9__4_3 = val6; obj4 = (object)val6; } FadeOut.OnEnter += (hook_OnEnter)obj4; object obj5 = <>c.<>9__4_4; if (obj5 == null) { hook_OnPreDestroyBodyServer val7 = delegate(orig_OnPreDestroyBodyServer orig, Death self) { if (((Object)((EntityState)self).outer).name.StartsWith("ScavLunar")) { self.shouldDropPack = true; } orig.Invoke(self); }; <>c.<>9__4_4 = val7; obj5 = (object)val7; } Death.OnPreDestroyBodyServer += (hook_OnPreDestroyBodyServer)obj5; } public static void ItemsLate() { //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_0026: 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_0045: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MinorConstructOnKillMaster.prefab").WaitForCompletion(); ItemDefInfo[] array = (ItemDefInfo[])(object)new ItemDefInfo[0]; array = array.Add(new ItemDefInfo { itemDef = Items.HeadHunter, count = 200 }); val.AddComponent<GivePickupsOnStart>().itemDefInfos = array; } public static void VoidAffix() { //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)