using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AI_Blacklist; using AncientScepter; using ArtifactOfPotential; using AssistManager; using AssistManager.VanillaTweaks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using DefenseMatrixManager; using EclipseRevamped; using EntityStates; using EntityStates.Bandit2.Weapon; using EntityStates.Bison; using EntityStates.Captain.Weapon; using EntityStates.CaptainDefenseMatrixItem; using EntityStates.CaptainSupplyDrop; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.Croco; using EntityStates.Drone; using EntityStates.Engi.EngiBubbleShield; using EntityStates.Engi.Mine; using EntityStates.Headstompers; using EntityStates.Huntress; using EntityStates.LemurianMonster; using EntityStates.Loader; using EntityStates.LunarWisp; using EntityStates.Mage; using EntityStates.Mage.Weapon; using EntityStates.MagmaWorm; using EntityStates.MajorConstruct.Weapon; using EntityStates.MeridianEvent; using EntityStates.Missions.BrotherEncounter; using EntityStates.RiskyMod.Bandit2; using EntityStates.RiskyMod.Bandit2.Primary; using EntityStates.RiskyMod.Bandit2.Revolver; using EntityStates.RiskyMod.Bandit2.Revolver.Scepter; using EntityStates.RiskyMod.Captain; using EntityStates.RiskyMod.Captain.Beacon; using EntityStates.RiskyMod.Commando; using EntityStates.RiskyMod.Commando.Scepter; using EntityStates.RiskyMod.Huntress; using EntityStates.RiskyMod.Mage; using EntityStates.RiskyMod.Mage.Weapon; using EntityStates.RiskyMod.MegaDrone; using EntityStates.RiskyMod.Turret1; using EntityStates.Seeker; using EntityStates.TeleporterHealNovaController; using EntityStates.TitanMonster; using EntityStates.Toolbot; using EntityStates.Treebot.Weapon; using EntityStates.VoidInfestor; using EntityStates.VoidSurvivor; using HG; using IL.EntityStates.Bandit2.Weapon; using IL.EntityStates.Bison; using IL.EntityStates.Captain.Weapon; using IL.EntityStates.CaptainSupplyDrop; using IL.EntityStates.Commando.CommandoWeapon; using IL.EntityStates.Croco; using IL.EntityStates.Engi.Mine; using IL.EntityStates.Headstompers; using IL.EntityStates.Huntress; using IL.EntityStates.JellyfishMonster; using IL.EntityStates.Loader; using IL.EntityStates.Mage; using IL.EntityStates.ParentMonster; using IL.EntityStates.Seeker; using IL.EntityStates.TitanMonster; using IL.EntityStates.Toolbot; using IL.EntityStates.VagrantMonster; using IL.EntityStates.VagrantNovaItem; using IL.EntityStates.VoidInfestor; using IL.RoR2; using IL.RoR2.Artifacts; using IL.RoR2.Items; using IL.RoR2.Projectile; using Inferno; using KinematicCharacterController; using LinearDamage.Tweaks; using LinearDamage.Tweaks.Items; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MoreStats; using NS_KingKombatArena; using On.EntityStates; using On.EntityStates.Bandit2.Weapon; using On.EntityStates.CaptainDefenseMatrixItem; using On.EntityStates.CaptainSupplyDrop; using On.EntityStates.Commando; using On.EntityStates.Commando.CommandoWeapon; using On.EntityStates.Croco; using On.EntityStates.Engi.EngiBubbleShield; using On.EntityStates.Headstompers; using On.EntityStates.LemurianMonster; using On.EntityStates.Loader; using On.EntityStates.LunarWisp; using On.EntityStates.Mage.Weapon; using On.EntityStates.MagmaWorm; using On.EntityStates.MajorConstruct.Weapon; using On.EntityStates.MeridianEvent; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.TeleporterHealNovaController; using On.EntityStates.TitanMonster; using On.EntityStates.Toolbot; using On.EntityStates.Treebot.Weapon; using On.EntityStates.VoidSurvivor; using On.RoR2; using On.RoR2.Items; using On.RoR2.Projectile; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RiskyFixes.Fixes.Items; using RiskyMod; using RiskyMod.Allies; using RiskyMod.Allies.DamageResistances; using RiskyMod.Allies.DroneChanges; using RiskyMod.Content; using RiskyMod.Content.Enemies; using RiskyMod.Content.Enemies.Components; using RiskyMod.Enemies; using RiskyMod.Enemies.Bosses; using RiskyMod.Enemies.DLC1; using RiskyMod.Enemies.DLC1.Voidling; using RiskyMod.Enemies.DLC2; using RiskyMod.Enemies.Mithrix; using RiskyMod.Enemies.Mobs; using RiskyMod.Enemies.Mobs.Lunar; using RiskyMod.Enemies.Spawnpools; using RiskyMod.Fixes; using RiskyMod.Items; using RiskyMod.Items.Boss; using RiskyMod.Items.Common; using RiskyMod.Items.DLC1.Boss; using RiskyMod.Items.DLC1.Common; using RiskyMod.Items.DLC1.Equipment; using RiskyMod.Items.DLC1.Legendary; using RiskyMod.Items.DLC1.Uncommon; using RiskyMod.Items.DLC1.Void; using RiskyMod.Items.DLC2; using RiskyMod.Items.DLC3.Boss; using RiskyMod.Items.DLC3.Common; using RiskyMod.Items.DLC3.Food; using RiskyMod.Items.DLC3.Legendary; using RiskyMod.Items.DLC3.Uncommon; using RiskyMod.Items.Equipment; using RiskyMod.Items.Legendary; using RiskyMod.Items.Lunar; using RiskyMod.Items.Uncommon; using RiskyMod.MonoBehaviours; using RiskyMod.Moon; using RiskyMod.SharedHooks; using RiskyMod.Survivors; using RiskyMod.Survivors.Bandit2; using RiskyMod.Survivors.Bandit2.Components; using RiskyMod.Survivors.Captain; using RiskyMod.Survivors.Commando; using RiskyMod.Survivors.Croco; using RiskyMod.Survivors.Croco.Contagion; using RiskyMod.Survivors.Croco.Contagion.Components; using RiskyMod.Survivors.Croco.Tweaks; using RiskyMod.Survivors.DLC1.VoidFiend; using RiskyMod.Survivors.DLC2.FalseSon; using RiskyMod.Survivors.DLC2.Seeker; using RiskyMod.Survivors.Engi; using RiskyMod.Survivors.Huntress; using RiskyMod.Survivors.Loader; using RiskyMod.Survivors.Mage; using RiskyMod.Survivors.Mage.Components; using RiskyMod.Survivors.Mage.Components.Primaries; using RiskyMod.Survivors.Mage.SkillTweaks; using RiskyMod.Survivors.Merc; using RiskyMod.Survivors.Toolbot; using RiskyMod.Survivors.Treebot; using RiskyMod.Tweaks; using RiskyMod.Tweaks.Artifact; using RiskyMod.Tweaks.CharacterMechanics; using RiskyMod.Tweaks.Holdouts; using RiskyMod.Tweaks.Interactables; using RiskyMod.Tweaks.RunScaling; using RiskyMod.VoidFields; using RiskyMod.VoidLocus; using RiskyTweaks.FireSelect; using RiskyTweaks.Tweaks; using RiskyTweaks.Tweaks.Survivors.Bandit2; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using ShareSuite; using SneedHooks; using SneedUtils; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; using Zio.FileSystems; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RiskyMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+1b005fe2466df35d304f7fb2c23d1c6b09a32d50")] [assembly: AssemblyProduct("RiskyMod")] [assembly: AssemblyTitle("RiskyMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace SneedUtils { public class SneedUtils { public enum MonsterCategories { BasicMonsters, Minibosses, Champions } public static GameObject teleportHelperPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/DirectorSpawnProbeHelperPrefab.prefab").WaitForCompletion(); public static void SetPrioritizePlayers(GameObject masterObject) { if (!Object.op_Implicit((Object)(object)masterObject)) { Debug.LogError((object)"SneedUtils: Attempted to call SetPrioritizePlayers on null gameobject."); return; } BaseAI component = masterObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { Debug.LogError((object)("SneedUtils: Attempted to call SetPrioritizePlayers on GameObject without a BaseAI " + (object)masterObject)); } else { component.prioritizePlayers = true; } } public static bool HasShieldOnly(CharacterBody self) { return self.HasBuff(Buffs.AffixLunar) || (Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.ShieldOnly) > 0); } public static void AddCooldownBuff(CharacterBody body, BuffDef buff, int cooldown, float bonusDuration = 0f) { body.ClearTimedBuffs(buff); for (int i = 0; i < cooldown; i++) { body.AddTimedBuff(buff, (float)i + 1f + bonusDuration); } } public static bool RemoveMonsterSpawnCardFromCategory(DirectorCardCategorySelection categorySelection, SpawnCard spawnCard, MonsterCategories monsterCategory) { int num = FindCategoryIndexByName(categorySelection, monsterCategory); if (num >= 0 && categorySelection.categories[num].cards != null) { int num2 = categorySelection.categories[num].cards.Length; categorySelection.categories[num].cards = categorySelection.categories[num].cards.Where((DirectorCard dc) => (Object)(object)dc.spawnCard != (Object)(object)spawnCard).ToArray(); return categorySelection.categories[num].cards.Length < num2; } return false; } public static bool AddMonsterDirectorCardToCategory(DirectorCardCategorySelection categorySelection, DirectorCard directorCard, MonsterCategories monsterCategory) { int num = FindCategoryIndexByName(categorySelection, monsterCategory); if (num >= 0) { categorySelection.AddCard(num, directorCard); return true; } return false; } public static int FindCategoryIndexByName(DirectorCardCategorySelection dcs, MonsterCategories category) { string categoryName; switch (category) { case MonsterCategories.BasicMonsters: categoryName = "Basic Monsters"; break; case MonsterCategories.Minibosses: categoryName = "Minibosses"; break; case MonsterCategories.Champions: categoryName = "Champions"; break; default: return -1; } return FindCategoryIndexByName(dcs, categoryName); } public static int FindCategoryIndexByName(DirectorCardCategorySelection dcs, string categoryName) { for (int i = 0; i < dcs.categories.Length; i++) { if (string.CompareOrdinal(dcs.categories[i].name, categoryName) == 0) { return i; } } return -1; } public static bool ReplaceSkillDef(SkillFamily skillFamily, SkillDef targetSkill, SkillDef newSkill) { bool flag = false; if (skillFamily.variants != null && (Object)(object)targetSkill != (Object)null && (Object)(object)newSkill != (Object)null) { for (int i = 0; i < skillFamily.variants.Length; i++) { if ((Object)(object)skillFamily.variants[i].skillDef == (Object)(object)targetSkill) { skillFamily.variants[i].skillDef = newSkill; flag = true; break; } } } if (!flag) { Debug.LogError((object)("RiskyMod: Could not replace TargetSkill " + (object)targetSkill)); } return flag; } public static bool ShouldRunInfernoChange() { return !EnemiesCore.infernoCompat || !CheckInfernoActive(); } public static bool CheckInfernoActive() { bool result = false; if (SoftDependencies.InfernoPluginLoaded) { result = CheckInfernoActiveInternal(); } return result; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool CheckInfernoActiveInternal() { //IL_0013: 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) return (Object)(object)Run.instance != (Object)null && Run.instance.selectedDifficulty == Main.InfernoDiffIndex; } public static bool GetKeyPressed(ConfigEntry entry) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_004f: 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) KeyboardShortcut value = entry.Value; foreach (KeyCode modifier in ((KeyboardShortcut)(ref value)).Modifiers) { if (!Input.GetKey(modifier)) { return false; } } value = entry.Value; return Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey); } public static Vector3 FindSafeTeleportPosition(GameObject gameObject, Vector3 targetPosition) { //IL_0002: 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return FindSafeTeleportPosition(gameObject, targetPosition, float.NegativeInfinity, float.NegativeInfinity); } public static Vector3 FindSafeTeleportPosition(GameObject gameObject, Vector3 targetPosition, float idealMinDistance, float idealMaxDistance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) SpawnCard val = ScriptableObject.CreateInstance(); val.hullSize = (HullClassification)0; val.nodeGraphType = (GraphType)0; val.prefab = teleportHelperPrefab; Vector3 result = targetPosition; GameObject val2 = null; if (idealMaxDistance > 0f && idealMinDistance < idealMaxDistance) { val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = idealMinDistance, maxDistance = idealMaxDistance, position = targetPosition }, RoR2Application.rng)); } if (!Object.op_Implicit((Object)(object)val2)) { val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)3, position = targetPosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { result = val2.transform.position; } } if (Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); return result; } public static void StunEnemiesInSphere(CharacterBody body, float radius) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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) if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.teamComponent)) { return; } List list = new List(); Collider[] array = Physics.OverlapSphere(body.corePosition, radius, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); for (int i = 0; i < array.Length; i++) { HurtBox component = ((Component)array[i]).GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.healthComponent) || list.Contains(component.healthComponent)) { continue; } list.Add(component.healthComponent); if (Object.op_Implicit((Object)(object)component.healthComponent.body.teamComponent) && component.healthComponent.body.teamComponent.teamIndex != body.teamComponent.teamIndex) { SetStateOnHurt component2 = ((Component)component.healthComponent).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component2) && component2.canBeStunned) { component2.SetStun(1f); } } } } public static void FixSkillName(SkillDef skillDef) { ((Object)skillDef).name = skillDef.skillName; } public static BuffDef CreateBuffDef(string name, bool canStack, bool isCooldown, bool isDebuff, Color color, Sprite iconSprite, bool blacklistFromNoxiousThorn = false) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = name; val.canStack = canStack; val.isCooldown = isCooldown; val.isDebuff = isDebuff; val.buffColor = color; val.iconSprite = iconSprite; if (blacklistFromNoxiousThorn) { val.flags = (Flags)(val.flags | 1); } Content.buffDefs.Add(val); ((Object)val).name = ((Object)val).name; return val; } public static bool IsLocalUser(GameObject playerObject) { foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)playerObject == (Object)(object)readOnlyLocalUsers.cachedBodyObject) { return true; } } return false; } public static bool IsLocalUser(CharacterBody playerBody) { foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)playerBody == (Object)(object)readOnlyLocalUsers.cachedBody) { return true; } } return false; } public static List FindEnemiesInSphere(float radius, Vector3 position, TeamIndex team, bool airborneOnly = false) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) List list = new List(); Collider[] array = Physics.OverlapSphere(position, radius, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); for (int i = 0; i < array.Length; i++) { HurtBox component = ((Component)array[i]).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { HealthComponent healthComponent = component.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && !list.Contains(healthComponent) && Object.op_Implicit((Object)(object)healthComponent.body) && Object.op_Implicit((Object)(object)healthComponent.body.teamComponent) && healthComponent.body.teamComponent.teamIndex != team && (!airborneOnly || healthComponent.body.isFlying || (Object.op_Implicit((Object)(object)healthComponent.body.characterMotor) && !healthComponent.body.characterMotor.isGrounded))) { list.Add(healthComponent); } } } return list; } public static bool IsEnemyInSphere(float radius, Vector3 position, TeamIndex team, bool airborneOnly = false) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) List list = new List(); Collider[] array = Physics.OverlapSphere(position, radius, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); for (int i = 0; i < array.Length; i++) { HurtBox component = ((Component)array[i]).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { continue; } HealthComponent healthComponent = component.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && !list.Contains(healthComponent)) { list.Add(healthComponent); if (Object.op_Implicit((Object)(object)healthComponent.body) && Object.op_Implicit((Object)(object)healthComponent.body.teamComponent) && healthComponent.body.teamComponent.teamIndex != team && (!airborneOnly || healthComponent.body.isFlying || (Object.op_Implicit((Object)(object)healthComponent.body.characterMotor) && !healthComponent.body.characterMotor.isGrounded))) { return true; } } } return false; } public static void RemoveItemTag(ItemDef itemDef, ItemTag tag) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Invalid comparison between Unknown and I4 //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) if (!itemDef.ContainsTag(tag)) { return; } List list = itemDef.tags.ToList(); list.Remove(tag); itemDef.tags = list.ToArray(); ItemIndex itemIndex = itemDef.itemIndex; if ((int)itemIndex != -1 && ItemCatalog.itemIndicesByTag != null && ItemCatalog.itemIndicesByTag[tag] != null) { List list2 = ItemCatalog.itemIndicesByTag[tag].ToList(); if (list2.Contains(itemIndex)) { list2.Remove(itemIndex); ItemCatalog.itemIndicesByTag[tag] = list2.ToArray(); } } } public static void AddItemTag(ItemDef itemDef, ItemTag tag) { //IL_0002: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (itemDef.ContainsTag(tag)) { return; } List list = itemDef.tags.ToList(); list.Add(tag); itemDef.tags = list.ToArray(); ItemIndex itemIndex = itemDef.itemIndex; if ((int)itemIndex != -1 && ItemCatalog.itemIndicesByTag != null) { List list2 = ItemCatalog.itemIndicesByTag[tag].ToList(); if (!list2.Contains(itemIndex)) { list2.Add(itemIndex); ItemCatalog.itemIndicesByTag[tag] = list2.ToArray(); } } } public static void DumpEntityStateConfig(EntityStateConfiguration esc) { for (int i = 0; i < esc.serializedFieldsCollection.serializedFields.Length; i++) { if (Object.op_Implicit(esc.serializedFieldsCollection.serializedFields[i].fieldValue.objectValue)) { Debug.Log((object)(esc.serializedFieldsCollection.serializedFields[i].fieldName + " - " + (object)esc.serializedFieldsCollection.serializedFields[i].fieldValue.objectValue)); } else { Debug.Log((object)(esc.serializedFieldsCollection.serializedFields[i].fieldName + " - " + esc.serializedFieldsCollection.serializedFields[i].fieldValue.stringValue)); } } } public static void DumpAddressableEntityStateConfig(string addressablePath) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) EntityStateConfiguration esc = Addressables.LoadAssetAsync((object)addressablePath).WaitForCompletion(); DumpEntityStateConfig(esc); } public static void SetAddressableEntityStateField(string fullEntityStatePath, string fieldName, string value) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle val = Addressables.LoadAssetAsync((object)fullEntityStatePath); val.Completed += delegate(AsyncOperationHandle handle) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) SetAddressableEntityStateField_String_Completed(handle, fieldName, value); }; } private static void SetAddressableEntityStateField_String_Completed(AsyncOperationHandle handle, string fieldName, string value) { EntityStateConfiguration result = handle.Result; for (int i = 0; i < result.serializedFieldsCollection.serializedFields.Length; i++) { if (result.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { result.serializedFieldsCollection.serializedFields[i].fieldValue.stringValue = value; return; } } Debug.LogError((object)("RiskyMod: " + ((object)result)?.ToString() + " does not have field " + fieldName)); } public static void SetAddressableEntityStateField(string fullEntityStatePath, string fieldName, Object newObject) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle val = Addressables.LoadAssetAsync((object)fullEntityStatePath); val.Completed += delegate(AsyncOperationHandle handle) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) SetAddressableEntityStateField_Object_Completed(handle, fieldName, newObject); }; } private static void SetAddressableEntityStateField_Object_Completed(AsyncOperationHandle handle, string fieldName, Object newObject) { EntityStateConfiguration result = handle.Result; for (int i = 0; i < result.serializedFieldsCollection.serializedFields.Length; i++) { if (result.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { result.serializedFieldsCollection.serializedFields[i].fieldValue.objectValue = newObject; return; } } Debug.LogError((object)("RiskyMod: " + ((object)result)?.ToString() + " does not have field " + fieldName)); } public static Object GetAddressableEntityStateFieldObject(string fullEntityStatePath, string fieldName) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) EntityStateConfiguration val = Addressables.LoadAssetAsync((object)fullEntityStatePath).WaitForCompletion(); for (int i = 0; i < val.serializedFieldsCollection.serializedFields.Length; i++) { if (val.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { return val.serializedFieldsCollection.serializedFields[i].fieldValue.objectValue; } } Debug.LogError((object)("RiskyMod: " + fullEntityStatePath + " does not have field " + fieldName)); return null; } public static string GetAddressableEntityStateFieldString(string fullEntityStatePath, string fieldName) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) EntityStateConfiguration val = Addressables.LoadAssetAsync((object)fullEntityStatePath).WaitForCompletion(); for (int i = 0; i < val.serializedFieldsCollection.serializedFields.Length; i++) { if (val.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { return val.serializedFieldsCollection.serializedFields[i].fieldValue.stringValue; } } Debug.LogError((object)("RiskyMod: " + fullEntityStatePath + " does not have field " + fieldName)); return string.Empty; } public static string FloatToString(float f) { int num = Mathf.FloorToInt(f); int num2 = Mathf.FloorToInt((f - (float)num) * 100f); return num + "." + num2; } public static bool AddSkillToFamily(SkillFamily skillFamily, SkillDef skillDef) { //IL_0084: 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_00b2: Expected O, but got Unknown //IL_00b3: 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) if (!Object.op_Implicit((Object)(object)skillDef)) { Debug.LogError((object)("SkillsReturns: Could not add " + skillDef.skillName + ": SkillDef is null.")); return false; } if ((Object)(object)skillFamily == (Object)null) { Debug.LogError((object)("SkillsReturns: Could not add " + skillDef.skillName + ": SkillFamily is null.")); return false; } Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val = new Variant { skillDef = skillDef, unlockableName = "" }; ((Variant)(ref val)).viewableNode = new Node(skillDef.skillNameToken, false, (Node)null); variants[num] = val; return true; } } } namespace EntityStates.RiskyMod.Mage { public class SpecialLightning : BaseState { private bool rightMuzzle = true; public static float totalDamageCoefficient = 12f; public static GameObject gauntletEffectPrefab; public static GameObject gauntletMissEffectPrefab; public static float maxDistance = 40f; public static float bounceDistance = 20f; public static float baseEntryDuration = 0.6f; public static float baseAttackDuration = 3f; public static float procCoefficientPerTick = 1f; public static float baseTickFrequency = 5f; public static float force = 100f; public static int bounceCount = 1; public static string startAttackSoundString = "Play_mage_m2_shoot"; public static string endAttackSoundString = ""; public static float recoilForce = 0f; private static int baseTickCount = 20; private float tickFrequency; public int loadBaseTickCount; public float loadBaseTickFrequency; public float loadTotalDamageCoefficient; public float loadMaxDistance; public float loadBounceDistance; public float loadBounceCount; private float tickDamageCoefficient; public static GameObject laserEffectPrefab; private float flamethrowerStopwatch; private float stopwatch; private float entryDuration; private float flamethrowerDuration; private bool hasBegunAttack; private ChildLocator childLocator; private Transform leftMuzzleTransform; private Transform rightMuzzleTransform; private bool isCrit; private const float flamethrowerEffectBaseDistance = 16f; public virtual void LoadStats() { loadBaseTickCount = baseTickCount; loadBaseTickFrequency = baseTickFrequency; loadMaxDistance = maxDistance; loadBounceDistance = bounceDistance; loadTotalDamageCoefficient = totalDamageCoefficient; loadBounceCount = bounceCount; } public virtual void ModifyAttack(LightningOrb lo) { } public override void OnEnter() { ((BaseState)this).OnEnter(); stopwatch = 0f; LoadStats(); tickDamageCoefficient = loadTotalDamageCoefficient / (baseTickFrequency * baseAttackDuration); entryDuration = baseEntryDuration / base.attackSpeedStat; tickFrequency = loadBaseTickFrequency * base.attackSpeedStat; flamethrowerDuration = baseAttackDuration; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(entryDuration + flamethrowerDuration + 1f); } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent(); leftMuzzleTransform = childLocator.FindChild("MuzzleLeft"); rightMuzzleTransform = childLocator.FindChild("MuzzleRight"); } isCrit = ((BaseState)this).RollCrit(); ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepFlamethrower", "Flamethrower.playbackRate", entryDuration, 0f); } public override void OnExit() { Util.PlaySound(endAttackSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Additive", "ExitFlamethrower", 0.1f); ((EntityState)this).OnExit(); } private void FireGauntlet(string muzzleString) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { string text = (rightMuzzle ? "MuzzleRight" : "MuzzleLeft"); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 origin = ((Ray)(ref aimRay)).origin; if (Object.op_Implicit((Object)(object)leftMuzzleTransform) && Object.op_Implicit((Object)(object)rightMuzzleTransform)) { origin = ((!rightMuzzle) ? leftMuzzleTransform.position : rightMuzzleTransform.position); rightMuzzle = !rightMuzzle; } List bouncedObjects = new List(); LightningOrb val = new LightningOrb { bouncedObjects = bouncedObjects, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, damageValue = base.damageStat * tickDamageCoefficient, procCoefficient = procCoefficientPerTick, teamIndex = ((BaseState)this).GetTeam(), isCrit = isCrit, procChainMask = default(ProcChainMask), lightningType = (LightningType)8, damageColorIndex = (DamageColorIndex)0, bouncesRemaining = 1, targetsToFindPerBounce = 6, range = loadBounceDistance, origin = origin, damageType = DamageTypeCombo.op_Implicit((DamageType)0), speed = 120f }; val.damageType.damageSource = (DamageSource)8; ModifyAttack(val); BullseyeSearch val2 = new BullseyeSearch(); val2.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref val2.teamMaskFilter)).RemoveTeam(((EntityState)this).characterBody.teamComponent.teamIndex); val2.filterByLoS = false; val2.searchOrigin = ((Ray)(ref aimRay)).origin - ((Ray)(ref aimRay)).direction; val2.sortMode = (SortMode)2; val2.maxDistanceFilter = loadMaxDistance + 1f; val2.maxAngleFilter = (((EntityState)this).isAuthority ? 45f : 90f); val2.searchDirection = ((Ray)(ref aimRay)).direction; val2.RefreshCandidates(); GameObject val3 = gauntletMissEffectPrefab; HurtBox val4 = val2.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val4)) { val.bouncedObjects.Add(val4.healthComponent); ((Orb)val).target = val4; OrbManager.instance.AddOrb((Orb)(object)val); val3 = gauntletEffectPrefab; } else { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = 0f, damage = tickDamageCoefficient * base.damageStat, force = force, tracerEffectPrefab = laserEffectPrefab, muzzleName = text, hitEffectPrefab = null, isCrit = isCrit, radius = 1f, smartCollision = false, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, maxDistance = maxDistance - 5f }.Fire(); } EffectManager.SimpleMuzzleFlash(val3, ((EntityState)this).gameObject, text, true); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= entryDuration && !hasBegunAttack) { hasBegunAttack = true; Util.PlaySound(startAttackSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Additive", "Flamethrower", "Flamethrower.playbackRate", flamethrowerDuration, 0f); FireGauntlet("MuzzleCenter"); } if (hasBegunAttack) { flamethrowerStopwatch += Time.deltaTime; if (flamethrowerStopwatch > 1f / tickFrequency) { flamethrowerStopwatch -= 1f / tickFrequency; FireGauntlet("MuzzleCenter"); } } if (((EntityState)this).fixedAge > baseEntryDuration + baseAttackDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class SpecialLightningScepter : SpecialLightning { public override void LoadStats() { base.LoadStats(); loadMaxDistance = 60f; loadBounceDistance = 30f; loadTotalDamageCoefficient = 32f; loadBounceCount = 2f; } } } namespace EntityStates.RiskyMod.Mage.Weapon { public class PrepFireStorm : BaseState { public static float baseDuration = 0.5f; public static float damageCoefficient = 21.6f; public static GameObject areaIndicatorPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(); public static GameObject muzzleflashEffect = Addressables.LoadAssetAsync((object)"RoR2/Junk/Mage/MuzzleflashMageFireLarge.prefab").WaitForCompletion(); public static GameObject crosshairOverridePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/SimpleDotCrosshair.prefab").WaitForCompletion(); public static string PrepIonSurgeSoundString = "Play_mage_m1_shoot"; public static float maxDistance = 600f; public static string fireSoundString = "Play_mage_R_end"; public static GameObject projectilePrefab; public static GameObject blastEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniExplosionVFX.prefab").WaitForCompletion(); public static float blastRadius = 8f; public static float blastJumpRadius = 14f; public static float blastForce = 4000f; private float duration; private float stopwatch; private GameObject areaIndicatorInstance; private OverrideRequest crosshairOverrideRequest; public override void OnEnter() { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration + 2f); crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, crosshairOverridePrefab, (OverridePriority)1); ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepIonSurge", "PrepIonSurge.playbackRate", duration, 0f); Util.PlaySound(PrepIonSurgeSoundString, ((EntityState)this).gameObject); areaIndicatorInstance = Object.Instantiate(areaIndicatorPrefab); if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { areaIndicatorInstance.transform.localScale = blastRadius * Vector3.one; } UpdateAreaIndicator(); } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } private void UpdateAreaIndicator() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * maxDistance; RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val2, maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0)) { val = ((RaycastHit)(ref val2)).point; } areaIndicatorInstance.transform.SetPositionAndRotation(val, Quaternion.identity); areaIndicatorInstance.transform.localScale = blastRadius * Vector3.one; } } private void OnPreRenderSceneCam(SceneCamera sceneCam) { if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { ((Component)areaIndicatorInstance.transform).gameObject.layer = (((Object)(object)sceneCam.cameraRigController.target == (Object)(object)((EntityState)this).gameObject) ? LayerIndex.defaultLayer.intVal : LayerIndex.noDraw.intVal); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (!((EntityState)this).inputBank.skill3.down && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_01be: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).outer.destroying) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); Util.PlaySound(fireSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", true); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", true); } EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); OverrideRequest val = crosshairOverrideRequest; if (val != null) { val.Dispose(); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 position = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * maxDistance; RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val2, maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0)) { position = ((RaycastHit)(ref val2)).point; } if (MageCore.utilitySelfKnockback.Value && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ApplySelfKnockback(); } ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val3 = new FireProjectileInfo { damage = base.damageStat * damageCoefficient, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, position = position, procChainMask = default(ProcChainMask), force = 0f, owner = ((EntityState)this).gameObject, projectilePrefab = projectilePrefab, rotation = Quaternion.identity }; ((FireProjectileInfo)(ref val3)).speedOverride = 0f; val3.target = null; instance.FireProjectile(val3); } ((EntityState)this).OnExit(); } public void ApplySelfKnockback() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0077: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Jet"); if (!Object.op_Implicit((Object)(object)val) || !(((object)val.state).GetType() == typeof(JetpackOn))) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val2 = -1f * ((Ray)(ref aimRay)).direction * blastForce; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.ApplyForce(val2, true, false); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class PrepIceWall : BaseState { public static float baseDuration = 0.5f; public static GameObject areaIndicatorPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/FirewallAreaIndicator.prefab").WaitForCompletion(); public static GameObject areaIndicatorCirclePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(); public static GameObject projectilePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageIcewallWalkerProjectile.prefab").WaitForCompletion(); public static float damageCoefficient = 1f; public static GameObject muzzleflashEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MuzzleflashMageIceLarge.prefab").WaitForCompletion(); public static GameObject goodCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/SimpleDotCrosshair.prefab").WaitForCompletion(); public static GameObject badCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/SimpleDotCrosshair.prefab").WaitForCompletion(); public static string PrepIceWallSoundString = "Play_mage_shift_start"; public static float maxDistance = 600f; public static string fireSoundString = "Play_mage_shift_stop"; public static float maxSlopeAngle = 70f; public static GameObject hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageIceExplosion.prefab").WaitForCompletion(); public static GameObject blastEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniImpactVFXFrozen.prefab").WaitForCompletion(); public static float blastRadius = 6f; public static float blastJumpRadius = 14f; public static float blastForce = 4000f; private float duration; private float stopwatch; private bool goodPlacement; private GameObject areaIndicatorInstance; private GameObject areaIndicatorCircleInstance; private OverrideRequest crosshairOverrideRequest; public override void OnEnter() { //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) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration + 2f); ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepIceWall", "PrepIceWall.playbackRate", duration, 0f); Util.PlaySound(PrepIceWallSoundString, ((EntityState)this).gameObject); areaIndicatorInstance = Object.Instantiate(areaIndicatorPrefab); areaIndicatorCircleInstance = Object.Instantiate(areaIndicatorCirclePrefab); if (Object.op_Implicit((Object)(object)areaIndicatorCircleInstance)) { areaIndicatorCircleInstance.transform.localScale = blastRadius * Vector3.one; } UpdateAreaIndicator(); } private void UpdateAreaIndicator() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) bool flag = goodPlacement; goodPlacement = false; areaIndicatorInstance.SetActive(true); if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = maxDistance; float num2 = 0f; Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(CameraRigController.ModifyAimRayIfApplicable(aimRay, ((EntityState)this).gameObject, ref num2), ref val, num + num2, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; areaIndicatorInstance.transform.forward = -((Ray)(ref aimRay)).direction; goodPlacement = Vector3.Angle(Vector3.up, ((RaycastHit)(ref val)).normal) < maxSlopeAngle; } if (flag != goodPlacement || crosshairOverrideRequest == null) { OverrideRequest val2 = crosshairOverrideRequest; if (val2 != null) { val2.Dispose(); } GameObject val3 = (goodPlacement ? goodCrosshairPrefab : badCrosshairPrefab); crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, val3, (OverridePriority)1); } } if (Object.op_Implicit((Object)(object)areaIndicatorCircleInstance)) { Ray aimRay2 = ((BaseState)this).GetAimRay(); Vector3 val4 = ((Ray)(ref aimRay2)).origin + ((Ray)(ref aimRay2)).direction * maxDistance; RaycastHit val5 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay2, ref val5, maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0)) { val4 = ((RaycastHit)(ref val5)).point; } areaIndicatorCircleInstance.transform.SetPositionAndRotation(val4, Quaternion.identity); areaIndicatorCircleInstance.transform.localScale = blastRadius * Vector3.one; } areaIndicatorInstance.SetActive(goodPlacement); areaIndicatorCircleInstance.SetActive(!goodPlacement); } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (!((EntityState)this).inputBank.skill3.down && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).outer.destroying) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); Util.PlaySound(fireSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", true); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", true); if (goodPlacement && Object.op_Implicit((Object)(object)areaIndicatorInstance) && ((EntityState)this).isAuthority) { Vector3 forward = areaIndicatorInstance.transform.forward; forward.y = 0f; ((Vector3)(ref forward)).Normalize(); Vector3 val = Vector3.Cross(Vector3.up, forward); bool flag = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); ProjectileManager.instance.FireProjectile(projectilePrefab, areaIndicatorInstance.transform.position + Vector3.up, Util.QuaternionSafeLookRotation(val), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, 0f, flag, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); ProjectileManager.instance.FireProjectile(projectilePrefab, areaIndicatorInstance.transform.position + Vector3.up, Util.QuaternionSafeLookRotation(-val), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, 0f, flag, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); EntityState.Destroy((Object)(object)areaIndicatorCircleInstance.gameObject); OverrideRequest val2 = crosshairOverrideRequest; if (val2 != null) { val2.Dispose(); } if (((EntityState)this).isAuthority) { FireBlast(); if (MageCore.utilitySelfKnockback.Value && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ApplySelfKnockback(); } } ((EntityState)this).OnExit(); } public void ApplySelfKnockback() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0077: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Jet"); if (!Object.op_Implicit((Object)(object)val) || !(((object)val.state).GetType() == typeof(JetpackOn))) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val2 = -1f * ((Ray)(ref aimRay)).direction * blastForce; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.ApplyForce(val2, true, false); } } public void FireBlast() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * maxDistance; RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val2, maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0)) { val = ((RaycastHit)(ref val2)).point; } EffectData val3 = new EffectData(); val3.rotation = Util.QuaternionSafeLookRotation(Vector3.up); val3.origin = val; val3.scale = blastRadius; EffectManager.SpawnEffect(blastEffectPrefab, val3, true); BlastAttack val4 = new BlastAttack { radius = blastRadius, procCoefficient = 1f, position = val, attacker = ((EntityState)this).gameObject, crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), baseDamage = ((EntityState)this).characterBody.damage * damageCoefficient, falloffModel = (FalloffModel)0, baseForce = 0f, teamIndex = ((BaseState)this).GetTeam(), damageType = DamageTypeCombo.op_Implicit((DamageType)256), attackerFiltering = (AttackerFiltering)2, impactEffect = EffectCatalog.FindEffectIndexFromPrefab(hitEffectPrefab) }; val4.Fire(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } } namespace EntityStates.RiskyMod.Loader { public class GroundSlamScaled : BaseCharacterMain { public static float airControl = 0.2f; public static float minimumDuration = 0.1f; public static float blastRadius = 10f; public static float blastProcCoefficient = 1f; public static float blastDamageCoefficient = 20f; public static string enterSoundString = "Play_loader_R_variant_whooshDown"; public static float initialVerticalVelocity = -20f; public static float exitVerticalVelocity = 12f; public static float verticalAcceleration = -100f; public static float exitSlowdownCoefficient = 0.2f; public static GameObject blastImpactEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Loader/OmniImpactVFXLoaderLightning.prefab").WaitForCompletion(); public static GameObject blastEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Loader/LoaderGroundSlam.prefab").WaitForCompletion(); public static GameObject fistEffectPrefab; public static float maxDamageBoost = 2f; public static float maxRadiusBoost = 2f; public static float maxForceBoost = 2f; public static float maxBoostDistance = 100f; private float initialY; private float previousAirControl; private GameObject leftFistEffectInstance; private GameObject rightFistEffectInstance; private bool detonateNextFrame; public override void OnEnter() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).OnEnter(); ((EntityState)this).PlayCrossfade("Body", "GroundSlam", 0.2f); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit); ((EntityState)this).characterMotor.velocity.y = initialVerticalVelocity; } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; leftFistEffectInstance = Object.Instantiate(fistEffectPrefab, ((BaseState)this).FindModelChild("MechHandR")); rightFistEffectInstance = Object.Instantiate(fistEffectPrefab, ((BaseState)this).FindModelChild("MechHandL")); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { initialY = ((EntityState)this).characterBody.footPosition.y; } } public override void FixedUpdate() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).FixedUpdate(); if (!((EntityState)this).isAuthority || !Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { return; } ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterMotor.moveDirection; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity.y = characterMotor.velocity.y + verticalAcceleration * Time.fixedDeltaTime; if (((EntityState)this).fixedAge >= minimumDuration && (detonateNextFrame || ((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround)) { Result val = DetonateAuthority(); if (val.hitCount > 0 && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { ((EntityState)this).healthComponent.AddBarrierAuthority(LoaderMeleeAttack.barrierPercentagePerHit * ((EntityState)this).healthComponent.fullBarrier); } ((EntityState)this).outer.SetNextStateToMain(); } if (!detonateNextFrame && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && ((EntityState)this).fixedAge >= minimumDuration && global::SneedUtils.SneedUtils.IsEnemyInSphere(5f, ((EntityState)this).characterBody.footPosition, ((BaseState)this).GetTeam())) { detonateNextFrame = true; } } public override void OnExit() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= exitSlowdownCoefficient; ((EntityState)this).characterMotor.velocity.y = exitVerticalVelocity; } ((EntityState)this).characterMotor.airControl = previousAirControl; EntityState.Destroy((Object)(object)leftFistEffectInstance); EntityState.Destroy((Object)(object)rightFistEffectInstance); ((BaseCharacterMain)this).OnExit(); } private void OnMovementHit(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } public Result DetonateAuthority() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0031: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c3: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) Vector3 footPosition = ((EntityState)this).characterBody.footPosition; EffectManager.SpawnEffect(blastEffectPrefab, new EffectData { origin = footPosition, scale = blastRadius }, true); BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, baseDamage = ((BaseState)this).damageStat * blastDamageCoefficient, baseForce = 1200f, bonusForce = new Vector3(0f, 3000f, 0f), crit = ((BaseState)this).RollCrit(), damageType = DamageTypeCombo.op_Implicit((DamageType)32), falloffModel = (FalloffModel)0, procCoefficient = blastProcCoefficient, radius = blastRadius, position = footPosition, attackerFiltering = (AttackerFiltering)2, impactEffect = EffectCatalog.FindEffectIndexFromPrefab(blastImpactEffectPrefab), teamIndex = ((EntityState)this).teamComponent.teamIndex }; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { float num = (initialY - ((EntityState)this).characterBody.footPosition.y) / maxBoostDistance; float num2 = Mathf.Lerp(1f, maxDamageBoost, num); float num3 = Mathf.Lerp(1f, maxRadiusBoost, num); val.baseDamage *= num2; val.radius *= num3; } DamageAPI.AddModdedDamageType(val, SharedDamageTypes.AntiFlyingForce); return val.Fire(); } } public class PreGroundSlamScaled : BaseCharacterMain { public static float baseDuration = 0.4f; public static string enterSoundString = "Play_loader_R_variant_activate"; public static float upwardVelocity = 12f; private float duration; public override void OnEnter() { ((BaseCharacterMain)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "PreGroundSlam", "GroundSlam.playbackRate", duration, 0f); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; ((EntityState)this).characterMotor.velocity.y = upwardVelocity; } public override void FixedUpdate() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).FixedUpdate(); ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new GroundSlamScaled()); } } } } namespace EntityStates.RiskyMod.Huntress { public class ArrowRainScepter : BaseArrowBarrage { public static float arrowRainRadius = 11.25f; public static float damageCoefficient = 4.2f; public static GameObject projectilePrefab; public static GameObject areaIndicatorPrefab; public static GameObject muzzleFlashEffect; private GameObject areaIndicatorInstance; private bool shouldFireArrowRain; private void LoadStats() { base.maxDuration = 1.5f; base.beginLoopSoundString = "Play_huntress_R_aim_loop"; base.endLoopSoundString = "Stop_huntress_R_aim_loop"; base.fireSoundString = "Play_huntress_R_rain_start"; } public override void OnEnter() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) LoadStats(); ((BaseArrowBarrage)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "LoopArrowRain"); if (Object.op_Implicit((Object)(object)areaIndicatorPrefab)) { areaIndicatorInstance = Object.Instantiate(areaIndicatorPrefab); areaIndicatorInstance.transform.localScale = new Vector3(arrowRainRadius, arrowRainRadius, arrowRainRadius); } } private void UpdateAreaIndicator() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 1000f; RaycastHit val = default(RaycastHit); if (Physics.Raycast(((BaseState)this).GetAimRay(), ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } } } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } public override void HandlePrimaryAttack() { ((BaseArrowBarrage)this).HandlePrimaryAttack(); shouldFireArrowRain = true; ((EntityState)this).outer.SetNextStateToMain(); } public void DoFireArrowRain() { //IL_0038: 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_004d: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) EffectManager.SimpleMuzzleFlash(muzzleFlashEffect, ((EntityState)this).gameObject, "Muzzle", false); if (Object.op_Implicit((Object)(object)areaIndicatorInstance) && shouldFireArrowRain) { DamageTypeCombo val = default(DamageTypeCombo); val.damageType = (DamageType)136; val.damageSource = (DamageSource)8; DamageTypeCombo value = val; DamageAPI.AddModdedDamageType(ref value, SharedDamageTypes.ProjectileRainForce); ProjectileManager.instance.FireProjectile(projectilePrefab, areaIndicatorInstance.transform.position, areaIndicatorInstance.transform.rotation, ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)value); } } public override void OnExit() { if (shouldFireArrowRain && !((EntityState)this).outer.destroying) { DoFireArrowRain(); } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } ((BaseArrowBarrage)this).OnExit(); } } public class BeginArrowRainScepter : BaseBeginArrowBarrage { private void LoadStats() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) base.basePrepDuration = 0.25f; base.blinkDuration = 0.3f; base.jumpCoefficient = 3f; base.blinkVector = Vector3.up; } public override void OnEnter() { LoadStats(); ((BaseBeginArrowBarrage)this).OnEnter(); } public override EntityState InstantiateNextState() { return (EntityState)(object)new ArrowRainScepter(); } } } namespace EntityStates.RiskyMod.Commando { public class FireLightningRound : GenericProjectileBaseState { public static GameObject lightningMuzzleflashEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion(); public static GameObject lightningProjectilePrefab; private static int FireFMJStateHash = Animator.StringToHash("FireFMJ"); private static int FireFMJParamHash = Animator.StringToHash("FireFMJ.playbackRate"); public override void OnEnter() { base.effectPrefab = lightningMuzzleflashEffect; base.projectilePrefab = lightningProjectilePrefab; base.force = 2000f; base.damageCoefficient = 4.5f; base.baseDuration = 0.5f; base.minSpread = 0f; base.maxSpread = 0f; base.recoilAmplitude = 1.5f; base.attackSoundString = "Play_commando_M2"; base.projectilePitchBonus = 0f; base.baseDelayBeforeFiringProjectile = 0f; base.recoilAmplitude = 1.5f; base.bloom = -1f; base.targetMuzzle = "MuzzleCenter"; ((GenericProjectileBaseState)this).OnEnter(); } public override void PlayAnimation(float duration) { ((GenericProjectileBaseState)this).PlayAnimation(duration); if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator())) { ((EntityState)this).PlayAnimation("Gesture, Additive", FireFMJStateHash, FireFMJParamHash, duration); ((EntityState)this).PlayAnimation("Gesture, Override", FireFMJStateHash, FireFMJParamHash, duration); } } public override Ray ModifyProjectileAimRay(Ray aimRay) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, base.projectilePrefab, ((EntityState)this).gameObject, 1f); return aimRay; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class ShrapnelBarrage : BaseState { private bool triggeredExplosion = false; public float internalBaseBulletCount; public float internalBaseDurationBetweenShots; public static GameObject explosionEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniExplosionVFXQuick.prefab").WaitForCompletion(); public static float blastRadius = 3f; public static GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/MuzzleflashBarrage.prefab").WaitForCompletion(); public static GameObject hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Junk/Commando/HitsparkCommandoBarrage.prefab").WaitForCompletion(); public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/TracerCommandoBoost.prefab").WaitForCompletion(); public static float force = 100f; public static float minSpread = 0f; public static float maxSpread = 1f; public static float baseDurationBetweenShots = 0.12f; public static float totalDuration = 1f; public static float bulletRadius = 0.5f; public static int baseBulletCount = 6; public static string fireBarrageSoundString = "Play_commando_m1"; public static float recoilAmplitude = 1.5f; public static float spreadBloomValue = 0.15f; public static string muzzleName = "MuzzleRight"; private int totalBulletsFired; private int bulletCount; public float stopwatchBetweenShots; private Animator modelAnimator; private Transform modelTransform; private float duration; private float durationBetweenShots; private float maxAttackSpeed; protected virtual float DamageCoefficient => 1.2f; public virtual void LoadStats() { internalBaseBulletCount = baseBulletCount; internalBaseDurationBetweenShots = baseDurationBetweenShots; } public override void OnEnter() { ((BaseState)this).OnEnter(); LoadStats(); ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); duration = totalDuration; durationBetweenShots = internalBaseDurationBetweenShots / base.attackSpeedStat; bulletCount = (int)(internalBaseBulletCount * base.attackSpeedStat); maxAttackSpeed = base.attackSpeedStat; modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireBarrage", "FireBarrage.playbackRate", duration, 0.2f); ((EntityState)this).PlayCrossfade("Gesture, Override", "FireBarrage", "FireBarrage.playbackRate", duration, 0.2f); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(2f); } FireBullet(); } private void FireBullet() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_014a: Expected O, but got Unknown //IL_0152: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)modelAnimator)) { if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, muzzleName, false); } ((EntityState)this).PlayAnimation("Gesture Additive, Right", "FirePistol, Right"); } ((BaseState)this).AddRecoil(-0.8f * recoilAmplitude, -1f * recoilAmplitude, -0.1f * recoilAmplitude, 0.15f * recoilAmplitude); if (((EntityState)this).isAuthority) { triggeredExplosion = false; BulletAttack val = new BulletAttack { tracerEffectPrefab = tracerEffectPrefab, damage = 0f, procCoefficient = 0f, damageType = DamageTypeCombo.op_Implicit((DamageType)2049), owner = ((EntityState)this).gameObject, aimVector = ((Ray)(ref aimRay)).direction, isCrit = false, minSpread = minSpread, maxSpread = maxSpread, origin = ((Ray)(ref aimRay)).origin, maxDistance = 2000f, muzzleName = muzzleName, radius = bulletRadius }; val.hitCallback = new HitCallback(ComboHitCallback); BulletAttack val2 = val; val2.damageType.damageSource = (DamageSource)8; val2.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue); totalBulletsFired++; Util.PlaySound(fireBarrageSoundString, ((EntityState)this).gameObject); } protected virtual bool ComboHitCallback(BulletAttack bulletRef, ref BulletHit hitInfo) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014c: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown _ = hitInfo.point; if (!triggeredExplosion && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { triggeredExplosion = true; _ = bulletRef.aimVector; float num = force; Vector3 aimVector = bulletRef.aimVector; Vector3 bonusForce = num * ((Vector3)(ref aimVector)).normalized; if (Object.op_Implicit((Object)(object)explosionEffectPrefab)) { EffectManager.SpawnEffect(explosionEffectPrefab, new EffectData { origin = hitInfo.point, scale = blastRadius }, true); } BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = base.damageStat * DamageCoefficient, baseForce = 0f, bonusForce = bonusForce, canRejectForce = true, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)32), falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, position = hitInfo.point, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = blastRadius, teamIndex = ((BaseState)this).GetTeam() }; val.damageType.damageSource = (DamageSource)8; val.Fire(); } return false; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = base.attackSpeedStat; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { num = ((EntityState)this).characterBody.attackSpeed; } durationBetweenShots = internalBaseDurationBetweenShots / maxAttackSpeed; if (maxAttackSpeed < num) { maxAttackSpeed = num; bulletCount = (int)(internalBaseBulletCount * maxAttackSpeed); } stopwatchBetweenShots += Time.fixedDeltaTime; if (stopwatchBetweenShots >= durationBetweenShots && totalBulletsFired < bulletCount) { stopwatchBetweenShots -= durationBetweenShots; FireBullet(); } if (((EntityState)this).fixedAge >= duration && totalBulletsFired == bulletCount && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_002a: 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_002d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.skill4.down) { return (InterruptPriority)3; } return (InterruptPriority)1; } } } namespace EntityStates.RiskyMod.Commando.Scepter { public class ShrapnelBarrageScepter : ShrapnelBarrage { protected override float DamageCoefficient => 1.5f; public override void LoadStats() { internalBaseBulletCount = 12f; internalBaseDurationBetweenShots = 0.04f; } } public class ThrowGrenadeScepter : BaseState { public static float pitchBonus = -10f; public static GameObject projectilePrefab; public static float damageCoefficient = 7f; public static float force = 1000f; public static float baseDuration = 0.5f; private float duration; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator())) { ((EntityState)this).PlayAnimation("Gesture, Additive", "ThrowGrenade", "FireFMJ.playbackRate", duration * 2f, 0f); ((EntityState)this).PlayAnimation("Gesture, Override", "ThrowGrenade", "FireFMJ.playbackRate", duration * 2f, 0f); } Util.PlaySound("Play_commando_M2_grenade_throw", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { bool flag = ((BaseState)this).RollCrit(); ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, 0f, 1f, 1f, 0f, pitchBonus); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, 0f, flag, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); for (int i = 0; i < 4; i++) { aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 7f, 15f, 1f, 1f, 0f, pitchBonus); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((Component)((EntityState)this).outer).gameObject, base.damageStat * damageCoefficient, force * 0.5f, flag, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } } namespace EntityStates.RiskyMod.Captain { public class CallSupplyDropSkillRestock : CallSupplyDropBase { public static GameObject _muzzleflashEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/MuzzleflashSupplyDrop, Healing.prefab").WaitForCompletion(); public static GameObject _supplyDropPrefab; public override void OnEnter() { base.supplyDropPrefab = _supplyDropPrefab; base.muzzleflashEffect = _muzzleflashEffect; ((CallSupplyDropBase)this).OnEnter(); } } public class ChargeShotgun : BaseState { public static float baseMinChargeDuration = 0.1f; public static float baseChargeDuration = 1.2f; public static string muzzleName = "MuzzleGun"; public static GameObject chargeupVfxPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Loader/ChargeLoaderFist.prefab").WaitForCompletion(); public static GameObject holdChargeVfxPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/SpearChargedVFX.prefab").WaitForCompletion(); public static string enterSoundString = "Play_captain_m1_chargeStart"; public static string playChargeSoundString = "Play_captain_m1_shotgun_charge_loop"; public static string stopChargeSoundString = "Stop_captain_m1_shotgun_charge_loop"; private float minChargeDuration; private float chargeDuration; private bool released; private GameObject chargeupVfxGameObject; private GameObject holdChargeVfxGameObject; private Transform muzzleTransform; private uint enterSoundID; private float charge; public override void OnEnter() { ((BaseState)this).OnEnter(); minChargeDuration = baseMinChargeDuration / base.attackSpeedStat; chargeDuration = baseChargeDuration / base.attackSpeedStat; ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeCaptainShotgun", "ChargeCaptainShotgun.playbackRate", chargeDuration, 0.1f); ((EntityState)this).PlayCrossfade("Gesture, Additive", "ChargeCaptainShotgun", "ChargeCaptainShotgun.playbackRate", chargeDuration, 0.1f); muzzleTransform = ((BaseState)this).FindModelChild(muzzleName); if (Object.op_Implicit((Object)(object)muzzleTransform)) { chargeupVfxGameObject = Object.Instantiate(chargeupVfxPrefab, muzzleTransform); chargeupVfxGameObject.GetComponent().newDuration = chargeDuration; } enterSoundID = Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); Util.PlaySound(playChargeSoundString, ((EntityState)this).gameObject); charge = 0f; } public override void OnExit() { if (Object.op_Implicit((Object)(object)chargeupVfxGameObject)) { EntityState.Destroy((Object)(object)chargeupVfxGameObject); chargeupVfxGameObject = null; } if (Object.op_Implicit((Object)(object)holdChargeVfxGameObject)) { EntityState.Destroy((Object)(object)holdChargeVfxGameObject); holdChargeVfxGameObject = null; } AkSoundEngine.StopPlayingID(enterSoundID); Util.PlaySound(stopChargeSoundString, ((EntityState)this).gameObject); ((EntityState)this).OnExit(); } public override void Update() { ((EntityState)this).Update(); ((EntityState)this).characterBody.SetSpreadBloom(((EntityState)this).age / chargeDuration, true); } public override void FixedUpdate() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Invalid comparison between Unknown and I4 //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Invalid comparison between Unknown and I4 ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(1f); charge = Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); if (((EntityState)this).fixedAge >= chargeDuration) { if (Object.op_Implicit((Object)(object)chargeupVfxGameObject)) { EntityState.Destroy((Object)(object)chargeupVfxGameObject); chargeupVfxGameObject = null; } if (!Object.op_Implicit((Object)(object)holdChargeVfxGameObject) && Object.op_Implicit((Object)(object)muzzleTransform)) { holdChargeVfxGameObject = Object.Instantiate(holdChargeVfxPrefab, muzzleTransform); } } if (((EntityState)this).isAuthority) { bool value = CaptainAutoFire.Enabled.Value; bool flag = (int)CaptainAutoFire.currentfireMode == 1; bool flag2 = (int)CaptainAutoFire.currentfireMode == 2; if (!released && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill1.down || (value && (flag || (flag2 && charge >= 1f))))) { released = true; } if (released) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireShotgun()); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class FireShotgun : GenericBulletBaseState { public static ConfigEntry scalePellets; public static GameObject _muzzleFlashPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/Muzzleflash1.prefab").WaitForCompletion(); public static GameObject _tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/TracerCaptainShotgun.prefab").WaitForCompletion(); public static GameObject _hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/HitsparkCaptainShotgun.prefab").WaitForCompletion(); public static int maxPellets = 21; public static float tightSoundSwitchThreshold = 2f; public static string wideSoundString = "Play_captain_m1_shootWide"; public static string tightSoundString = "Play_captain_m1_shotgun_shootTight"; private bool tight = false; private void SetStats() { base.baseDuration = 0.9f; base.bulletCount = 7; base.maxDistance = 2000f; base.bulletRadius = 0.3f; base.useSmartCollision = true; base.damageCoefficient = 1.1f; base.procCoefficient = 0.75f; base.force = 500f; base.minSpread = 0f; base.maxSpread = 0f; base.spreadPitchScale = 1f; base.spreadYawScale = 1f; base.spreadBloomValue = -0.2f; base.recoilAmplitudeY = 4f; base.recoilAmplitudeX = 2f; base.muzzleName = "MuzzleGun"; base.muzzleFlashPrefab = _muzzleFlashPrefab; base.tracerEffectPrefab = _tracerEffectPrefab; base.hitEffectPrefab = _hitEffectPrefab; } public override void OnEnter() { tight = ((EntityState)this).characterBody.spreadBloomAngle <= tightSoundSwitchThreshold; base.fireSoundString = (tight ? tightSoundString : wideSoundString); SetStats(); ((GenericBulletBaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Gesture, Additive", "FireCaptainShotgun"); ((EntityState)this).PlayAnimation("Gesture, Override", "FireCaptainShotgun"); base.duration = (scalePellets.Value ? base.baseDuration : (base.baseDuration / ((BaseState)this).attackSpeedStat)); } public override void ModifyBullet(BulletAttack bulletAttack) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) ((GenericBulletBaseState)this).ModifyBullet(bulletAttack); bulletAttack.minSpread = 0f; bulletAttack.damageType.damageSource = (DamageSource)1; if (scalePellets.Value) { int num = (int)(bulletAttack.bulletCount = (uint)Mathf.FloorToInt((float)base.bulletCount * Mathf.Max(((BaseState)this).attackSpeedStat, 1f))); bulletAttack.force = base.force * Mathf.Sqrt((float)base.bulletCount / 7f); if (num > maxPellets) { int pelletsRemaining = num - maxPellets; num = maxPellets; bulletAttack.bulletCount = (uint)num; if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { JustFireTheDamnBullets justFireTheDamnBullets = ((EntityState)this).gameObject.AddComponent(); justFireTheDamnBullets.damagePerBullet = 1.1f * ((BaseState)this).damageStat; justFireTheDamnBullets.useFalloff = tight; justFireTheDamnBullets.force = bulletAttack.force; justFireTheDamnBullets.spread = ((EntityState)this).characterBody.spreadBloomAngle; justFireTheDamnBullets.inputBank = ((EntityState)this).inputBank; justFireTheDamnBullets.pelletsRemaining = pelletsRemaining; } } } if (tight) { bulletAttack.falloffModel = (FalloffModel)0; } else { bulletAttack.falloffModel = (FalloffModel)1; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class JustFireTheDamnBullets : MonoBehaviour { public float spread; public float force; public float damagePerBullet; public int pelletsRemaining; public InputBankTest inputBank; public bool useFalloff; private float age = 0f; private void FixedUpdate() { age += Time.fixedDeltaTime; if (age > 0f) { FireTheDamnBullets(); } if (pelletsRemaining <= 0) { Object.Destroy((Object)(object)this); } } private void FireTheDamnBullets() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)inputBank)) { Object.Destroy((Object)(object)this); return; } Ray aimRay = inputBank.GetAimRay(); int maxPellets = pelletsRemaining; if (pelletsRemaining > FireShotgun.maxPellets) { maxPellets = FireShotgun.maxPellets; pelletsRemaining -= FireShotgun.maxPellets; } else { pelletsRemaining = 0; } new BulletAttack { owner = ((Component)this).gameObject, bulletCount = (uint)maxPellets, maxDistance = 2000f, radius = 0.3f, smartCollision = true, damage = damagePerBullet, procCoefficient = 0.75f, procChainMask = default(ProcChainMask), falloffModel = (FalloffModel)(useFalloff ? 1 : 0), minSpread = 0f, maxSpread = (useFalloff ? spread : 0f), damageType = DamageTypeCombo.GenericPrimary, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, force = force, tracerEffectPrefab = FireShotgun._tracerEffectPrefab, hitEffectPrefab = FireShotgun._hitEffectPrefab, muzzleName = "MuzzleGun" }.Fire(); } } } namespace EntityStates.RiskyMod.Captain.Beacon { public class BeaconEquipmentRestoreMain : BaseMainState { public static float activationCost = 50f; public static float rechargeTimePerUse = 30f; public override bool shouldShowEnergy => true; public override string GetContextString(Interactor activator) { return Language.GetString("CAPTAIN_SUPPLY_EQUIPMENT_RESTOCK_INTERACTION"); } public override Interactability GetInteractability(Interactor activator) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0066: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)activator).GetComponent(); Inventory inventory; if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)(inventory = component.inventory))) { return (Interactability)0; } if (activationCost >= ((BaseCaptainSupplyDropState)this).energyComponent.energy) { return (Interactability)1; } if (inventory.GetEquipmentRestockableChargeCount(inventory.activeEquipmentSlot) <= 0) { return (Interactability)1; } return (Interactability)2; } public override void OnInteractionBegin(Interactor activator) { ((BaseCaptainSupplyDropState)this).energyComponent.TakeEnergy(activationCost); Inventory inventory = ((Component)activator).GetComponent().inventory; inventory.RestockEquipmentCharges(inventory.activeEquipmentSlot, 1); } public override void OnEnter() { ((BaseCaptainSupplyDropState)this).OnEnter(); ((BaseCaptainSupplyDropState)this).energyComponent.chargeRate = activationCost / rechargeTimePerUse; ((BaseCaptainSupplyDropState)this).energyIndicator.sprite = Assets.MiscSprites.CaptainEquipmentRestockBar; } } public class BeaconSkillRestoreMain : BaseMainState { public static float activationCost = 33.333332f; public static float rechargeTimePerUse = 20f; public static float equipmentRechargeAmount = 20f; public override bool shouldShowEnergy => true; public override string GetContextString(Interactor activator) { return Language.GetString("CAPTAIN_SUPPLY_SKILL_RESTOCK_INTERACTION_RISKYMOD"); } public override Interactability GetInteractability(Interactor activator) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (((BaseCaptainSupplyDropState)this).energyComponent.energy >= activationCost) { return (Interactability)2; } return (Interactability)0; } public override void OnInteractionBegin(Interactor activator) { ((BaseCaptainSupplyDropState)this).energyComponent.TakeEnergy(activationCost); CharacterBody component = ((Component)activator).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (Object.op_Implicit((Object)(object)component.skillLocator)) { component.skillLocator.ApplyAmmoPack(); } if (Object.op_Implicit((Object)(object)component.inventory)) { component.inventory.DeductActiveEquipmentCooldown(equipmentRechargeAmount); } } } public override void OnEnter() { ((BaseCaptainSupplyDropState)this).OnEnter(); ((BaseCaptainSupplyDropState)this).energyComponent.chargeRate = activationCost / rechargeTimePerUse; } } } namespace EntityStates.RiskyMod.Bandit2 { public class Reload : BaseState { public static float enterSoundPitch = 1f; public static float exitSoundPitch = 1f; public static string enterSoundString = "Play_bandit2_m1_reload_bullet"; public static string exitSoundString = "Play_bandit2_m1_reload_finish"; public static GameObject reloadEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2Reload.prefab").WaitForCompletion(); public static string reloadEffectMuzzleString = "PalmL"; public static float baseDuration = 0.3f; private bool hasGivenStock; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", (((EntityState)this).characterBody.isSprinting && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.isGrounded) ? "ReloadSimple" : "Reload", "Reload.playbackRate", duration, 0f); } Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); EffectManager.SimpleMuzzleFlash(reloadEffectPrefab, ((EntityState)this).gameObject, reloadEffectMuzzleString, false); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration / 2f) { GiveStock(); } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { if (((EntityState)this).skillLocator.primary.stock < ((EntityState)this).skillLocator.primary.maxStock) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Reload()); return; } Util.PlayAttackSpeedSound(exitSoundString, ((EntityState)this).gameObject, exitSoundPitch); ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void GiveStock() { if (!hasGivenStock) { if (((EntityState)this).isAuthority && ((EntityState)this).skillLocator.primary.stock < ((EntityState)this).skillLocator.primary.maxStock) { ((EntityState)this).skillLocator.primary.AddOneStock(); } hasGivenStock = true; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class StealthMode : BaseState { public static float duration = 3f; public static float minDuration = 0.3f; public static string enterStealthSound = "Play_bandit2_shift_enter"; public static string exitStealthSound = "Play_bandit2_shift_exit"; public static float blastAttackRadius = 12f; public static float blastAttackDamageCoefficient = 2f; public static float blastAttackProcCoefficient = 1f; public static float blastAttackForce = 60f; public static GameObject smokeBombEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2SmokeBomb.prefab").WaitForCompletion(); public static string smokeBombMuzzleString = "MuzzleSmokebomb"; public static float shortHopVelocity = 17f; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Cloak); ((EntityState)this).characterBody.AddBuff(Buffs.CloakSpeed); } ((EntityState)this).characterBody.onSkillActivatedAuthority += OnSkillActivatedAuthority; } FireSmokebomb(); Util.PlaySound(enterStealthSound, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { Util.PlaySound(exitStealthSound, ((EntityState)this).gameObject); if (!((EntityState)this).outer.destroying) { FireSmokebomb(); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.onSkillActivatedAuthority -= OnSkillActivatedAuthority; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.CloakSpeed); ((EntityState)this).characterBody.RemoveBuff(Buffs.Cloak); } } if (Object.op_Implicit((Object)(object)animator)) { animator.SetLayerWeight(animator.GetLayerIndex("Body, StealthWeapon"), 0f); } ((EntityState)this).OnExit(); } private void OnSkillActivatedAuthority(GenericSkill skill) { if (skill.skillDef.isCombatSkill) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireSmokebomb() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0032: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack(); val.radius = blastAttackRadius; val.procCoefficient = blastAttackProcCoefficient; val.position = ((EntityState)this).transform.position; val.attacker = ((EntityState)this).gameObject; val.crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); val.baseDamage = ((EntityState)this).characterBody.damage * blastAttackDamageCoefficient; val.falloffModel = (FalloffModel)0; val.damageType = DamageTypeCombo.op_Implicit((DamageType)32); val.baseForce = blastAttackForce; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.attackerFiltering = (AttackerFiltering)2; val.damageType.damageSource = (DamageSource)4; val.Fire(); } if (Object.op_Implicit((Object)(object)smokeBombEffectPrefab)) { EffectManager.SimpleMuzzleFlash(smokeBombEffectPrefab, ((EntityState)this).gameObject, smokeBombMuzzleString, false); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, shortHopVelocity); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)((((EntityState)this).fixedAge > minDuration) ? 1 : 2); } } public class ThrowSmokebomb : BaseState { public static float duration = 0.1f; public override void OnEnter() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", "ThrowSmokebomb", "ThrowSmokebomb.playbackRate", duration, 0f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new StealthMode()); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } } namespace EntityStates.RiskyMod.Bandit2.Revolver { public abstract class BasePrepState : BaseSidearmState { public static string enterSoundString = "Play_bandit2_R_load"; public static GameObject _crosshairOverridePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2CrosshairPrepRevolver.prefab").WaitForCompletion(); private Animator animator; public override void OnEnter() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", "MainToSide", "MainToSide.playbackRate", duration, 0f); } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill4.down) { ((EntityState)this).outer.SetNextState(GetNextState()); } } public override void OnExit() { base.OnExit(); } public override void LoadStats() { crosshairOverridePrefab = _crosshairOverridePrefab; baseDuration = 0.7f; } protected abstract EntityState GetNextState(); } public class BaseSidearmState : BaseState { [SerializeField] public float baseDuration; [SerializeField] public GameObject crosshairOverridePrefab; protected float duration; private Animator animator; private int bodySideWeaponLayerIndex; private OverrideRequest crosshairOverrideRequest; public virtual string exitAnimationStateName => "BufferEmpty"; public override void OnEnter() { ((BaseState)this).OnEnter(); LoadStats(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / base.attackSpeedStat; if (Object.op_Implicit((Object)(object)animator)) { bodySideWeaponLayerIndex = animator.GetLayerIndex("Body, SideWeapon"); animator.SetLayerWeight(bodySideWeaponLayerIndex, 1f); } if (Object.op_Implicit((Object)(object)crosshairOverridePrefab)) { crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, crosshairOverridePrefab, (OverridePriority)1); } ((EntityState)this).characterBody.SetAimTimer(3f); } public override void OnExit() { //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.op_Implicit((Object)(object)animator)) { animator.SetLayerWeight(bodySideWeaponLayerIndex, 0f); } bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", exitAnimationStateName); } if (crosshairOverrideRequest != null) { crosshairOverrideRequest.Dispose(); } Transform val = ((BaseState)this).FindModelChild("SpinningPistolFX"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(false); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } public virtual void LoadStats() { } } public class ExitSidearm : BaseSidearmState { public override string exitAnimationStateName => "SideToMain"; public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)0; } } public class FireLightsOut : BaseSidearmState { public static GameObject _crosshairOverridePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2CrosshairPrepRevolverFire.prefab").WaitForCompletion(); public static GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/MuzzleflashBandit2.prefab").WaitForCompletion(); public static GameObject hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/HitsparkBandit2Pistol.prefab").WaitForCompletion(); public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/TracerBanditPistol.prefab").WaitForCompletion(); public static float damageCoefficient = 6f; public static float force = 2000f; public static float minSpread = 0f; public static float maxSpread = 0f; public static string attackSoundString = "Play_bandit2_R_fire"; public static float recoilAmplitude = 1f; public static float bulletRadius = 1f; public override void OnEnter() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_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_0216: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); ((BaseState)this).AddRecoil(-3f * recoilAmplitude, -4f * recoilAmplitude, -0.5f * recoilAmplitude, 0.5f * recoilAmplitude); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); string text = "MuzzlePistol"; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireSideWeapon", "FireSideWeapon.playbackRate", duration, 0f); } if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (!((EntityState)this).isAuthority) { return; } BulletAttack val = new BulletAttack(); val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.minSpread = minSpread; val.maxSpread = maxSpread; val.bulletCount = 1u; val.damage = damageCoefficient * ((BaseState)this).damageStat * PersistentDesperado.GetDesperadoMult(((EntityState)this).characterBody); val.force = force; val.falloffModel = (FalloffModel)0; val.tracerEffectPrefab = tracerEffectPrefab; val.muzzleName = text; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = ((BaseState)this).RollCrit(); val.HitEffectNormal = false; val.radius = bulletRadius; val.smartCollision = true; val.maxDistance = 1000f; val.damageType = DamageTypeCombo.op_Implicit((DamageSource)8) | DamageTypeCombo.op_Implicit((DamageType)524288); SpecialDamageController component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { SkillDef passiveSkillDef = component.GetPassiveSkillDef(); if ((Object)(object)passiveSkillDef == (Object)(object)global::RiskyMod.Survivors.Bandit2.Skills.Standoff) { DamageAPI.AddModdedDamageType(val, Bandit2Core.StandoffDamage); } else if ((Object)(object)passiveSkillDef == (Object)(object)global::RiskyMod.Survivors.Bandit2.Skills.DesperadoKillStack) { val.damageType |= DamageTypeCombo.op_Implicit((DamageType)268435456); } else { val.damageType |= DamageTypeCombo.op_Implicit((DamageType)4); } } val.Fire(); } public override void OnExit() { base.OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitSidearm()); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)0; } public override void LoadStats() { crosshairOverridePrefab = _crosshairOverridePrefab; baseDuration = 1f; } } public class FireRackEmUp : BaseSidearmState { public static GameObject _crosshairOverridePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2CrosshairPrepRevolverFire.prefab").WaitForCompletion(); public static GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/MuzzleflashBandit2.prefab").WaitForCompletion(); public static GameObject hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/HitsparkBandit2Pistol.prefab").WaitForCompletion(); public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/TracerBanditPistol.prefab").WaitForCompletion(); public static float damageCoefficient = 1f; public static float bonusDamageCoefficient = 0.2f; public static float force = 300f; public static float minSpread = 0f; public static float maxSpread = 2.5f; public static string attackSoundString = "Play_bandit2_R_fire"; public static float recoilAmplitude = 1.5f; public static float bulletRadius = 0.5f; public static int baseBulletCount = 6; public int shotsFired = 0; private float scaledRecoilAmplitude; private float fireStopwatch = 0f; private Animator modelAnimator; public virtual int GetBulletCount() { return baseBulletCount; } public override void OnEnter() { base.OnEnter(); modelAnimator = ((EntityState)this).GetModelAnimator(); scaledRecoilAmplitude = recoilAmplitude / ((BaseState)this).attackSpeedStat; FireBullet(); } private void FireBullet() { //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_0028: 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_00ac: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //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_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) shotsFired++; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); string text = "MuzzlePistol"; bool flag = true; if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack(); val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.minSpread = minSpread; val.maxSpread = maxSpread; val.bulletCount = 1u; val.damage = damageCoefficient * ((BaseState)this).damageStat * PersistentDesperado.GetDesperadoMult(((EntityState)this).characterBody); val.force = force; val.falloffModel = (FalloffModel)0; val.tracerEffectPrefab = tracerEffectPrefab; val.muzzleName = text; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = ((BaseState)this).RollCrit(); val.HitEffectNormal = false; val.radius = bulletRadius; val.smartCollision = true; val.maxDistance = 200f; val.damageType = DamageTypeCombo.op_Implicit((DamageSource)8) | DamageTypeCombo.op_Implicit((DamageType)524288); SpecialDamageController component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { SkillDef passiveSkillDef = component.GetPassiveSkillDef(); if ((Object)(object)passiveSkillDef == (Object)(object)global::RiskyMod.Survivors.Bandit2.Skills.Standoff) { DamageAPI.AddModdedDamageType(val, Bandit2Core.StandoffDamage); } else if ((Object)(object)passiveSkillDef == (Object)(object)global::RiskyMod.Survivors.Bandit2.Skills.DesperadoKillStack) { val.damageType |= DamageTypeCombo.op_Implicit((DamageType)268435456); } else { val.damageType |= DamageTypeCombo.op_Implicit((DamageType)4); } } DamageAPI.AddModdedDamageType(val, Bandit2Core.RackEmUpDamage); val.Fire(); } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireSideWeapon", "FireSideWeapon.playbackRate", (shotsFired >= baseBulletCount) ? 1f : duration, 0f); } if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } ((BaseState)this).AddRecoil(-3f * scaledRecoilAmplitude, -4f * scaledRecoilAmplitude, -0.5f * scaledRecoilAmplitude, 0.5f * scaledRecoilAmplitude); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); fireStopwatch += Time.fixedDeltaTime; if (fireStopwatch >= duration) { fireStopwatch -= duration; FireBullet(); } if (((EntityState)this).isAuthority && shotsFired >= GetBulletCount()) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitSidearm()); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } public override void LoadStats() { crosshairOverridePrefab = _crosshairOverridePrefab; baseDuration = 0.13f; } } public class PrepLightsOut : BasePrepState { protected override EntityState GetNextState() { return (EntityState)(object)new FireLightsOut(); } } public class PrepRackEmUp : BasePrepState { protected override EntityState GetNextState() { return (EntityState)(object)new FireRackEmUp(); } } } namespace EntityStates.RiskyMod.Bandit2.Revolver.Scepter { internal class FireLightsOutScepter : BaseSidearmState { public static GameObject _crosshairOverridePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2CrosshairPrepRevolverFire.prefab").WaitForCompletion(); public static GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/MuzzleflashBandit2.prefab").WaitForCompletion(); public static GameObject hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/HitsparkBandit2Pistol.prefab").WaitForCompletion(); public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/TracerBanditPistol.prefab").WaitForCompletion(); public static float damageCoefficient = 9f; public static float force = 2000f; public static float minSpread = 0f; public static float maxSpread = 0f; public static string attackSoundString = "Play_bandit2_R_fire"; public static float recoilAmplitude = 1f; public static float bulletRadius = 1f; public static int baseShotCount = 2; public int shotsFired = 0; public override void OnEnter() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0159: 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_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) shotsFired++; base.OnEnter(); ((BaseState)this).AddRecoil(-3f * recoilAmplitude, -4f * recoilAmplitude, -0.5f * recoilAmplitude, 0.5f * recoilAmplitude); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); string text = "MuzzlePistol"; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireSideWeapon", "FireSideWeapon.playbackRate", duration, 0f); } if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (!((EntityState)this).isAuthority) { return; } BulletAttack val = new BulletAttack(); val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.minSpread = minSpread; val.maxSpread = maxSpread; val.bulletCount = 1u; val.damage = damageCoefficient * ((BaseState)this).damageStat * PersistentDesperado.GetDesperadoMult(((EntityState)this).characterBody); val.force = force; val.falloffModel = (FalloffModel)0; val.tracerEffectPrefab = tracerEffectPrefab; val.muzzleName = text; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = ((BaseState)this).RollCrit(); val.HitEffectNormal = false; val.radius = bulletRadius; val.smartCollision = true; val.maxDistance = 1000f; SpecialDamageController component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { SkillDef passiveSkillDef = component.GetPassiveSkillDef(); if ((Object)(object)passiveSkillDef == (Object)(object)global::RiskyMod.Survivors.Bandit2.Skills.Standoff) { DamageAPI.AddModdedDamageType(val, Bandit2Core.StandoffDamage); } else if ((Object)(object)passiveSkillDef == (Object)(object)global::RiskyMod.Survivors.Bandit2.Skills.DesperadoKillStack) { val.damageType |= DamageTypeCombo.op_Implicit((DamageType)268435456); } else { val.damageType |= DamageTypeCombo.op_Implicit((DamageType)4); } val.damageType |= DamageTypeCombo.op_Implicit((DamageType)524288); } val.Fire(); } public override void OnExit() { base.OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (shotsFired >= baseShotCount) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitSidearm()); return; } ((EntityState)this).outer.SetNextState((EntityState)(object)new FireLightsOutScepter { shotsFired = shotsFired }); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)((shotsFired < baseShotCount) ? 1 : 0); } public override void LoadStats() { crosshairOverridePrefab = _crosshairOverridePrefab; baseDuration = ((shotsFired >= baseShotCount) ? 1f : 0.15f); } } public class FireRackEmUpScepter : FireRackEmUp { public new static int baseBulletCount = 12; public override int GetBulletCount() { return baseBulletCount; } } internal class PrepLightsOutScepter : BasePrepState { protected override EntityState GetNextState() { return (EntityState)(object)new FireLightsOutScepter(); } } internal class PrepRackEmUpScepter : BasePrepState { protected override EntityState GetNextState() { return (EntityState)(object)new FireRackEmUpScepter(); } } } namespace EntityStates.RiskyMod.Bandit2.Primary { public class EnterReload : BaseState { public static float baseDuration = 0.3f; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "EnterReload", "Reload.playbackRate", duration, 0.1f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Reload()); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class FirePrimaryBase : GenericBulletBaseState { public static float _baseDuration = 0.3f; public static float baseMinDuration = 0f; public static float baseAnimDuration = 1f; private float minDuration; private bool buttonReleased; private bool fireSelectEnabled; private bool isSpam; public override void OnEnter() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Invalid comparison between Unknown and I4 //IL_00c4: 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) buttonReleased = false; base.baseDuration = _baseDuration; fireSelectEnabled = ((TweakBase)TweakBase.Instance).Enabled.Value && FireMode.Enabled.Value; isSpam = (int)FireMode.currentfireMode == 1; if (fireSelectEnabled && isSpam) { base.baseDuration = 0.12f; } ((GenericBulletBaseState)this).OnEnter(); base.duration = base.baseDuration / ((BaseState)this).attackSpeedStat; minDuration = baseMinDuration / ((BaseState)this).attackSpeedStat; bool flag = true; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture, Additive"); if (layerIndex >= 0) { AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SlashBlade")) { flag = false; } } } if (flag) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireMainWeapon", "FireMainWeapon.playbackRate", baseAnimDuration / ((BaseState)this).attackSpeedStat, 0f); } } public override void ModifyBullet(BulletAttack bulletAttack) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) ((GenericBulletBaseState)this).ModifyBullet(bulletAttack); bulletAttack.falloffModel = (FalloffModel)1; bulletAttack.damageType.damageSource = (DamageSource)1; } public override void FixedUpdate() { ((GenericBulletBaseState)this).FixedUpdate(); if (!buttonReleased && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill1.down)) { buttonReleased = true; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).fixedAge <= minDuration || !buttonReleased) { return (InterruptPriority)2; } return (InterruptPriority)0; } public override void OnExit() { if (!buttonReleased && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && ((EntityState)this).skillLocator.primary.stock > 0 && (!fireSelectEnabled || !isSpam)) { ((EntityState)this).characterBody.SetSpreadBloom(0f, false); } ((EntityState)this).OnExit(); } } public class FirePrimaryRifle : FirePrimaryBase { public static GameObject _muzzleFlashPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/MuzzleflashBandit2.prefab").WaitForCompletion(); public static GameObject _tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/TracerBandit2Rifle.prefab").WaitForCompletion(); public static GameObject _hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/HitsparkBandit.prefab").WaitForCompletion(); private void LoadStats() { ((GenericBulletBaseState)this).damageCoefficient = 3.6f; ((GenericBulletBaseState)this).procCoefficient = 1f; ((GenericBulletBaseState)this).bulletCount = 1; ((GenericBulletBaseState)this).maxDistance = 1000f; ((GenericBulletBaseState)this).bulletRadius = 0.4f; ((GenericBulletBaseState)this).useSmartCollision = true; ((GenericBulletBaseState)this).force = 1000f; ((GenericBulletBaseState)this).minSpread = 0f; ((GenericBulletBaseState)this).maxSpread = 0f; ((GenericBulletBaseState)this).spreadPitchScale = 0.5f; ((GenericBulletBaseState)this).spreadYawScale = 1.3f; ((GenericBulletBaseState)this).spreadBloomValue = 0.4f; ((GenericBulletBaseState)this).recoilAmplitudeY = 1f; ((GenericBulletBaseState)this).recoilAmplitudeX = 0.5f; ((GenericBulletBaseState)this).muzzleName = "MuzzleShotgun"; ((GenericBulletBaseState)this).fireSoundString = "Play_bandit2_m1_rifle"; ((GenericBulletBaseState)this).muzzleFlashPrefab = _muzzleFlashPrefab; ((GenericBulletBaseState)this).tracerEffectPrefab = _tracerEffectPrefab; ((GenericBulletBaseState)this).hitEffectPrefab = _hitEffectPrefab; } public override void OnEnter() { LoadStats(); base.OnEnter(); } public override void ModifyBullet(BulletAttack bulletAttack) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) base.ModifyBullet(bulletAttack); bulletAttack.falloffModel = (FalloffModel)0; bulletAttack.stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask; } } public class FirePrimaryShotgun : FirePrimaryBase { public static GameObject _muzzleFlashPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/MuzzleflashBandit2.prefab").WaitForCompletion(); public static GameObject _tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/TracerBandit2Shotgun.prefab").WaitForCompletion(); public static GameObject _hitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/HitsparkBandit.prefab").WaitForCompletion(); public float minFixedSpreadYaw = 1f; public float maxFixedSpreadYaw = 1f; private void LoadStats() { ((GenericBulletBaseState)this).damageCoefficient = 0.9f; ((GenericBulletBaseState)this).procCoefficient = 0.7f; ((GenericBulletBaseState)this).bulletCount = 5; ((GenericBulletBaseState)this).maxDistance = 1000f; ((GenericBulletBaseState)this).bulletRadius = 0.3f; ((GenericBulletBaseState)this).useSmartCollision = true; ((GenericBulletBaseState)this).force = 320f; ((GenericBulletBaseState)this).minSpread = 0f; ((GenericBulletBaseState)this).maxSpread = 0f; ((GenericBulletBaseState)this).spreadPitchScale = 0f; ((GenericBulletBaseState)this).spreadYawScale = 0f; ((GenericBulletBaseState)this).spreadBloomValue = 0.6f; ((GenericBulletBaseState)this).recoilAmplitudeY = 1f; ((GenericBulletBaseState)this).recoilAmplitudeX = 0.5f; ((GenericBulletBaseState)this).muzzleName = "MuzzleShotgun"; ((GenericBulletBaseState)this).fireSoundString = "Play_bandit2_m1_shotgun"; ((GenericBulletBaseState)this).muzzleFlashPrefab = _muzzleFlashPrefab; ((GenericBulletBaseState)this).tracerEffectPrefab = _tracerEffectPrefab; ((GenericBulletBaseState)this).hitEffectPrefab = _hitEffectPrefab; } public override void OnEnter() { LoadStats(); base.OnEnter(); } public override void ModifyBullet(BulletAttack bulletAttack) { base.ModifyBullet(bulletAttack); bulletAttack.bulletCount = 1u; } public override void FireBullet(Ray aimRay) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).StartAimMode(aimRay, 3f, false); ((GenericBulletBaseState)this).DoFireEffects(); ((GenericBulletBaseState)this).PlayFireAnimation(); ((BaseState)this).AddRecoil(-1f * ((GenericBulletBaseState)this).recoilAmplitudeY, -1.5f * ((GenericBulletBaseState)this).recoilAmplitudeY, -1f * ((GenericBulletBaseState)this).recoilAmplitudeX, 1f * ((GenericBulletBaseState)this).recoilAmplitudeX); if (((EntityState)this).isAuthority) { Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val); float num = 0f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { num = ((EntityState)this).characterBody.spreadBloomAngle; } float num2 = 0f; float num3 = 0f; if (((GenericBulletBaseState)this).bulletCount > 1) { num3 = Random.Range(minFixedSpreadYaw + num, maxFixedSpreadYaw + num) * 2f; num2 = num3 / (float)(((GenericBulletBaseState)this).bulletCount - 1); } Vector3 val3 = Quaternion.AngleAxis((0f - num3) * 0.5f, val2) * ((Ray)(ref aimRay)).direction; Quaternion val4 = Quaternion.AngleAxis(num2, val2); Ray val5 = default(Ray); ((Ray)(ref val5))..ctor(((Ray)(ref aimRay)).origin, val3); for (int i = 0; i < ((GenericBulletBaseState)this).bulletCount; i++) { BulletAttack val6 = ((GenericBulletBaseState)this).GenerateBulletAttack(val5); ((GenericBulletBaseState)this).ModifyBullet(val6); val6.Fire(); ((Ray)(ref val5)).direction = val4 * ((Ray)(ref val5)).direction; } } } } } namespace EntityStates.RiskyMod.Turret1 { public class Turret1DeathState : DeathState { public override void OnEnter() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) ((DeathState)this).OnEnter(); ((DeathState)this).OnImpactServer(((EntityState)this).transform.position); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { EntityState.Destroy((Object)(object)((Component)modelTransform).gameObject); } ((DeathState)this).Explode(); } } } namespace EntityStates.RiskyMod.MegaDrone { public class MegaDroneDeathState : GenericCharacterDeath { public int droneUpgradeCount = 0; public static SpawnCard spawnCard = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/iscBrokenMegaDrone.asset").WaitForCompletion(); public static string initialSoundString = "Play_drone_deathpt1"; public static GameObject initialEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniExplosionVFXDroneDeath.prefab").WaitForCompletion(); public static float initialEffectScale = 15f; public static float velocityMagnitude = 1f; public static float explosionForce = 60000f; public override void OnEnter() { //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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Invalid comparison between Unknown and I4 //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { droneUpgradeCount = ((EntityState)this).characterBody.inventory.GetItemCountPermanent(Items.DroneUpgradeHidden); } if (Object.op_Implicit((Object)(object)((EntityState)this).transform)) { DirectorPlacementRule val = new DirectorPlacementRule { placementMode = (PlacementMode)3, position = ((EntityState)this).transform.position }; int num = 1; Vector3? val2 = null; Quaternion? val3 = null; for (int i = 0; i < num; i++) { GameObject val4 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(spawnCard, val, new Xoroshiro128Plus(0uL))); if (Object.op_Implicit((Object)(object)val4)) { PurchaseInteraction component = val4.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.costType == 1) { float costCoefficient = new DeathState().costCoefficient; float num2 = 1f + (float)droneUpgradeCount * 0.2f; component.Networkcost = Mathf.RoundToInt((float)Run.instance.GetDifficultyScaledCost(component.cost) * costCoefficient * num2); } if (!val2.HasValue) { val2 = val4.transform.position; } else { val4.transform.position = val2.Value; } if (!val3.HasValue) { val4.transform.rotation = ((EntityState)this).transform.rotation; val3 = val4.transform.rotation; } else { val4.transform.rotation = val3.Value; } SummonMasterBehavior component2 = val4.GetComponent(); component2.droneUpgradeCount = droneUpgradeCount; } } } EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } public override void OnExit() { //IL_0105: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown ((GenericCharacterDeath)this).OnExit(); Util.PlaySound(initialSoundString, ((EntityState)this).gameObject); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ((Component)modelTransform).gameObject.AddComponent().duration = 15f; if (NetworkServer.active) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Component)component.FindChild("LeftJet")).gameObject.SetActive(false); ((Component)component.FindChild("RightJet")).gameObject.SetActive(false); if (Object.op_Implicit((Object)(object)initialEffect)) { EffectManager.SpawnEffect(initialEffect, new EffectData { origin = ((EntityState)this).transform.position, scale = initialEffectScale }, true); } } } } Rigidbody component2 = ((EntityState)this).GetComponent(); RagdollController component3 = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component3) && Object.op_Implicit((Object)(object)component2)) { component3.BeginRagdoll(component2.velocity * velocityMagnitude); } ExplodeRigidbodiesOnStart component4 = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.force = explosionForce; ((Behaviour)component4).enabled = true; } } } } namespace RiskyMod { public static class ConfigFiles { public static ConfigFile ItemCfg; public static ConfigFile SurvivorCfg; public static ConfigFile MonsterCfg; public static ConfigFile SpawnpoolCfg; public static ConfigFile GeneralCfg; public static ConfigFile SurvivorCrocoCfg; private const string coreModuleString = "00. Core Modules"; private const string gameMechString = "01. Game Mechanics"; private const string scalingString = "02. Run Scaling"; private const string interactString = "03. Interactables"; private const string allyString = "04. Allies"; private const string artifactString = "05. Artifacts"; private const string voidFieldsString = "06. Void Fields"; private const string moonString = "07. Moon"; private const string voidLocusString = "08. Void Locus"; private const string miscString = "99. Misc Tweaks"; private const string uncommonString = "Items - Uncommon"; private const string commonString = "Items - Common"; private const string legendaryString = "Items - Legendary"; private const string voidString = "Items - Void"; private const string bossString = "Items - Boss"; private const string lunarString = "Items - Lunar"; private const string equipmentString = "Items - Equipment"; private const string mealString = "Items - Meal"; private const string itemConfigDescString = "Enable changes to this item."; private const string fireSelectString = "Firemode Selection (Client-Side)"; private const string commandoString = "Survivors: Commando"; private const string huntressString = "Survivors: Huntress"; private const string toolbotString = "Survivors: MUL-T"; private const string engiString = "Survivors: Engineer"; private const string treebotString = "Survivors: REX"; private const string crocoString = "Survivors: Acrid"; private const string banditString = "Survivors: Bandit"; private const string captainString = "Survivors: Captain"; private const string mageString = "Survivors: Artificer"; private const string loaderString = "Survivors: Loader"; private const string mercString = "Survivors: Mercenary"; private const string railgunnerString = "Survivors: Railgunner"; private const string voidFiendString = "Survivors: Void Fiend"; private const string seekerString = "Survivors: Seeker"; private const string falseSonString = "Survivors: False Son"; private const string monsterString = "Monsters"; private const string monsterGeneralString = "General"; private const string monsterMithrixString = "Mithrix"; private const string monsterVoidlingString = "Voidling"; public static string ConfigFolderPath => Path.Combine(Paths.ConfigPath, RiskyMod.pluginInfo.Metadata.GUID); public static void Init() { ConfigGeneral(); ConfigItems(); ConfigSurvivors(); ConfigMonsters(); ConfigSpawnpools(); if (SoftDependencies.RiskOfOptionsLoaded) { RiskOfOptionsCompat(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void RiskOfOptionsCompat() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown ModSettingsManager.SetModIcon(Assets.MiscSprites.ModIcon); if (!SurvivorsCore.enabled) { return; } if (CaptainCore.enabled && CaptainCore.enablePrimarySkillChanges) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FireShotgun.scalePellets)); } if (MageCore.enabled) { if (MageCore.iceWallRework || MageCore.enableFireUtility) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(MageCore.utilitySelfKnockback)); } ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(MageCore.flamethrowerSprintCancel)); } } private static void ConfigGeneral() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown GeneralCfg = new ConfigFile(Path.Combine(ConfigFolderPath, "RiskyMod_General.cfg"), true); AlliesCore.enabled = GeneralCfg.Bind("00. Core Modules", "Ally Changes", true, "Enable drone and ally changes.").Value; ItemsCore.enabled = GeneralCfg.Bind("00. Core Modules", "Item Changes", true, "Enable item changes.").Value; SurvivorsCore.enabled = GeneralCfg.Bind("00. Core Modules", "Survivor Changes", true, "Enable survivor changes.").Value; EnemiesCore.modifyEnemies = GeneralCfg.Bind("00. Core Modules", "Monster Changes", true, "Enable enemy changes.").Value; EnemiesCore.modifySpawns = GeneralCfg.Bind("00. Core Modules", "Spawnpool Changes", true, "Enable spawnpool changes.").Value; MoonCore.enabled = GeneralCfg.Bind("00. Core Modules", "Moon Changes", true, "Enable Moon changes.").Value; VoidLocusCore.enabled = GeneralCfg.Bind("00. Core Modules", "Void Locus Changes", true, "Enable Void Locus changes.").Value; VoidFieldsCore.enabled = GeneralCfg.Bind("00. Core Modules", "Void Fields Changes", true, "Enable Void Fields changes.").Value; RiskyMod.disableProcChains = GeneralCfg.Bind("01. Game Mechanics", "Disable Proc Chains", true, "Remove the proc coefficient on most item effects.").Value; ShieldGating.enabled = GeneralCfg.Bind("01. Game Mechanics", "Shield Gating", false, "Shields gate against HP damage.").Value; ShieldGating.disableIfGuardiansHeart = GeneralCfg.Bind("01. Game Mechanics", "Shield Gating - Disable if Guardians Heart is Loaded", true, "Shield Gating is disabled if Guardians Heart from ClassicItemsReturns is enabled.").Value; TrueOSP.enabled = GeneralCfg.Bind("01. Game Mechanics", "True OSP", true, "Makes OSP work against multihits.").Value; AIBlacklistItems.enabled = GeneralCfg.Bind("01. Game Mechanics", "Expanded AI Blacklist", true, "Adds extra items to the AI Blacklist by default.").Value; TeleExpandOnBossKill.enabled = GeneralCfg.Bind("01. Game Mechanics", "Tele Expand on Boss Kill", true, "Teleporter expands to cover the whole map when the boss is killed.").Value; TeleExpandOnBossKill.enableDuringEclipse = GeneralCfg.Bind("01. Game Mechanics", "Tele Expand on Boss Kill - Enable During Eclispe", false, "Enables teleporter expansion when playing on Eclipse 2+.").Value; LargeLobbyScaling.enabled = GeneralCfg.Bind("01. Game Mechanics", "Tele Large Lobby Scaling", true, "Holdout size is increased in lobbies with 5+ players.").Value; TeleChargeDuration.enabled = GeneralCfg.Bind("01. Game Mechanics", "Tele Charge Duration Increase", false, "Increases teleporter charge duration from 90s to 120s like RoR1.").Value; CombatDirectorMultiplier.directorCreditMultiplier = GeneralCfg.Bind("02. Run Scaling", "Combat Director Credit Multiplier", 1.4f, "Multiply Combat Director credits by this amount. Set to 1 to disable").Value; CombatDirectorMultiplier.enabled = CombatDirectorMultiplier.directorCreditMultiplier != 1f; MonsterGoldRewards.enabled = GeneralCfg.Bind("02. Run Scaling", "Gold Scaling Tweaks", true, "Lowers gold earn rate scaling. Mainly makes a difference when looping.").Value; MonsterGoldRewards.inflationCoefficient = GeneralCfg.Bind("02. Run Scaling", "Gold Scaling Tweaks - Inflation Coefficient", 0.2f, "Lowers how fast gold gain scales against chest prices. 0 = Vanilla, 0.4 = Equilibrium").Value; if (!MonsterGoldRewards.enabled) { MonsterGoldRewards.linearize = false; MonsterGoldRewards.scaleToInitialDifficulty = false; if (CombatDirectorMultiplier.enabled) { MonsterGoldRewards.enabled = true; } } else { MonsterGoldRewards.scaleToDirectorMultiplier = GeneralCfg.Bind("02. Run Scaling", "Gold Scaling Tweaks - Scale to Director Multiplier", true, "Proportionally lowers gold scaling by Combat Director Credit Multipier.").Value; MonsterGoldRewards.scaleToDirectorMultiplierStage1 = GeneralCfg.Bind("02. Run Scaling", "Gold Scaling Tweaks - Scale to Director Multiplier - Stage 1", false, "Enable the above setting on Stage 1.").Value; } ModdedScaling.enabled = GeneralCfg.Bind("02. Run Scaling", "Scaling: Modded Scaling", true, "Lowers the effect of playercount on difficulty scaling. Geared towards large lobbies.").Value; LinearScaling.enabled = GeneralCfg.Bind("02. Run Scaling", "Scaling: Linear Scaling", false, "Makes difficulty scaling linear like in RoR1. Requires Modded Scaling to be enabled.").Value; LinearScaling.swapToExponential = GeneralCfg.Bind("02. Run Scaling", "Scaling: Linear Scaling - Swap to Exponential Lategame", false, "Linear Scaling swaps to exponential scaling when it gets outscaled.").Value; LoopTeleMountainShrine.enabled = GeneralCfg.Bind("02. Run Scaling", "Loop Teleporter Boss Credits", true, "Teleporter Boss director credits increase by 1 Mountain Shrine every loop.").Value; AntiSplat.enabled = GeneralCfg.Bind("04. Allies", "No Splat Death", true, "Allies are immune to physics damage.").Value; NoVoidDamage.enabled = GeneralCfg.Bind("04. Allies", "No Void Damage", true, "Allies take no damage from Void fog.").Value; NoVoidDamage.alliesInVoidFields = GeneralCfg.Bind("04. Allies", "Drones in Void Fields", true, "Drones spawn in Void Fields.").Value; MegaDrone.allowRepair = GeneralCfg.Bind("04. Allies", "TC280 - Enable Repairs", true, "TC280s can be repaired after being destroyed.").Value; GunnerTurret.allowRepair = GeneralCfg.Bind("04. Allies", "Gunner Turret - Enable Repairs", true, "Gunner Turrets can be repaired after being destroyed.").Value; GunnerTurret.teleportWithPlayer = GeneralCfg.Bind("04. Allies", "Gunner Turret - Teleport with Player", true, "Gunner Turrets are teleported to the player when starting the Teleporter event.").Value; GunnerTurret.teleportToMithrix = GeneralCfg.Bind("04. Allies", "Gunner Turret - Teleport with Player - Teleport to Mithrix", true, "Gunner Turrets are teleported to the player when fighting Mithrix. Requires Teleport with Player.").Value; AntiOverheat.enabled = GeneralCfg.Bind("04. Allies", "No Overheat Death", true, "Drones cannot die to Overheat.").Value; AntiVoidDeath.enabled = GeneralCfg.Bind("04. Allies", "No Void Death", true, "Void Implosions deal high damage to drones instead of instant killing them.").Value; AntiOneshot.enabled = GeneralCfg.Bind("04. Allies", "Drone Oneshot Protection", true, "Drones cannot take more than 60% of their health in a single attack.").Value; SpawnLimits.maxVoidSeeds = GeneralCfg.Bind("03. Interactables", "Max Void Seeds", 1, "Limit how many Void Seeds can spawn on 1 stage. Vanilla is 3. Set to negative for no limit.").Value; ExtraVoidSeedPerLoop.maxExtraSeeds = GeneralCfg.Bind("03. Interactables", "Per-Loop Max Extra Void Seeds", 2, "Increases Max Void Seeds per loop by 1 until this number is reached. Set to negative for no limit.").Value; Sacrifice.enabled = GeneralCfg.Bind("05. Artifacts", "Sacrifice - No Drop Chance Scaling", true, "Increases drop chance when not using Swarms and prevents drop chance from increasing as the run progresses.").Value; global::RiskyMod.VoidFields.LargerHoldout.enabled = GeneralCfg.Bind("06. Void Fields", "Larger Holdout Zone", true, "Increase radius of holdout zone.").Value; ReduceHoldoutCount.enabled = GeneralCfg.Bind("06. Void Fields", "Less Cells", true, "Reduces Cell count from 9 to 5 and speed up enemy progression.").Value; LargerHoldouts.enabled = GeneralCfg.Bind("07. Moon", "Larger Holdout Zone", true, "Increase radius of holdout zone.").Value; LessPillars.enabled = GeneralCfg.Bind("07. Moon", "Reduce Pillar Count", true, "Reduce the amount of pillars required to activate the jump pads.").Value; RemoveFog.enabled = GeneralCfg.Bind("08. Void Locus", "Remove Fog", false, "Removes Void Fog from the map.").Value; global::RiskyMod.VoidLocus.LargerHoldout.enabled = GeneralCfg.Bind("08. Void Locus", "Larger Holdout Zone", true, "Increase radius of holdout zone.").Value; BetterProjectileTracking.enabled = GeneralCfg.Bind("99. Misc Tweaks", "Better Projectile Homing", true, "Homing projectiles target based on angle, instead of distance + angle.").Value; FreezeChampionExecute.enabled = GeneralCfg.Bind("99. Misc Tweaks", "Freeze Executes Bosses", true, "Freeze counts as a debuff and can execute bosses at 15% HP.").Value; FreezeChampionExecute.nerfFreeze = GeneralCfg.Bind("99. Misc Tweaks", "Freeze Executes Bosses - Nerf Freeze Globally", false, "Freeze execute threshold is reduced to 15% globally. Requires Freeze Executes Bosses.").Value; PlayerControlledMonsters.enabled = GeneralCfg.Bind("99. Misc Tweaks", "Player-Controlled Monster Tweaks", true, "Gives players health regen + armor when playing as monsters via mods.").Value; NullifyDebuff.enabled = GeneralCfg.Bind("99. Misc Tweaks", "Nullify Buff", true, "Void Reaver Nullify only takes 2 stacks to apply.").Value; } private static void ConfigItems() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown ItemCfg = new ConfigFile(Path.Combine(ConfigFolderPath, "RiskyMod_Items.cfg"), true); ConfigCommonItems(); ConfigUncommonItems(); ConfigLegendaryItems(); ConfigBossItems(); ConfigLunars(); ConfigEquipment(); ConfigVoidItems(); ConfigMealItems(); } private static void ConfigMealItems() { QuickFix.enabled = ItemCfg.Bind("Items - Meal", "Quick Fix", true, "Enable changes to this item.").Value; SearedSteak.enabled = ItemCfg.Bind("Items - Meal", "Seared Steak", true, "Enable changes to this item.").Value; } private static void ConfigCommonItems() { BisonSteak.enabled = ItemCfg.Bind("Items - Common", "Bison Steak", true, "Enable changes to this item.").Value; Crowbar.enabled = ItemCfg.Bind("Items - Common", "Crowbar", true, "Enable changes to this item.").Value; DelicateWatch.enabled = ItemCfg.Bind("Items - Common", "Delicate Watch", true, "Enable changes to this item.").Value; DelicateWatch.useBuff = ItemCfg.Bind("Items - Common", "Delicate Watch - Show Buff on HUD", true, "Damage bonus from this item is shown as a buff on your HUD.").Value; PowerElixir.enabled = ItemCfg.Bind("Items - Common", "Power Elixir", true, "Enable changes to this item.").Value; Fireworks.enabled = ItemCfg.Bind("Items - Common", "Fireworks", true, "Enable changes to this item.").Value; Fireworks.maxRockets = ItemCfg.Bind("Items - Common", "Fireworks - Max Rockets", 32, "Max rockets that can spawn from each use. Going above this value raises rocket damage instead.").Value; Gasoline.enabled = ItemCfg.Bind("Items - Common", "Gasoline", true, "Enable changes to this item.").Value; CritGlasses.enabled = ItemCfg.Bind("Items - Common", "Lensmakers Glasses", false, "Reduce crit chance from 10% to 7% like in RoR1.").Value; MonsterTooth.enabled = ItemCfg.Bind("Items - Common", "Monster Tooth", true, "Enable changes to this item.").Value; StickyBomb.enabled = ItemCfg.Bind("Items - Common", "Stickybomb", true, "Enable changes to this item.").Value; TougherTimes.enabled = ItemCfg.Bind("Items - Common", "Tougher Times", true, "Enable changes to this item.").Value; Warbanner.enabled = ItemCfg.Bind("Items - Common", "Warbanner", true, "Enable changes to this item.").Value; Warbanner.UseModdedBuff = ItemCfg.Bind("Items - Common", "Warbanner - Use Custom Buff", true, "Warbanner is handled via a custom buff and GameObject so that it doesn't interfere with other mods that rely on it.").Value; StunGrenade.enabled = ItemCfg.Bind("Items - Common", "Stun Grenade", true, "Enable changes to this item.").Value; EclipseLite.enabled = ItemCfg.Bind("Items - Common", "Eclipse Lite", true, "Enable changes to this item.").Value; HikersBoots.enabled = ItemCfg.Bind("Items - Common", "Hikers Boots", true, "Enable changes to this item.").Value; } private static void ConfigUncommonItems() { AtG.enabled = ItemCfg.Bind("Items - Uncommon", "AtG Missile", true, "Enable changes to this item.").Value; AtG.useOrb = ItemCfg.Bind("Items - Uncommon", "AtG Missile - Use OrbAttack", true, "Makes AtG missiles behave like Plasma Shrimp when fired off of weak attacks to improve performance.").Value; AtG.alwaysOrb = ItemCfg.Bind("Items - Uncommon", "AtG Missile - Always Use OrbAttack", false, "AtG Missiles always fire orbattacks regardless of the hit's strength.").Value; Bandolier.enabled = ItemCfg.Bind("Items - Uncommon", "Bandolier", true, "Enable changes to this item.").Value; Berzerker.enabled = ItemCfg.Bind("Items - Uncommon", "Berzerkers Pauldron", true, "Enable changes to this item.").Value; Chronobauble.enabled = ItemCfg.Bind("Items - Uncommon", "Chronobauble", true, "Enable changes to this item.").Value; ElementalBands.enabled = ItemCfg.Bind("Items - Uncommon", "Runalds and Kjaros Bands", true, "Enable changes to this item.").Value; Harpoon.enabled = ItemCfg.Bind("Items - Uncommon", "Hunters Harpoon", true, "Enable changes to this item.").Value; Infusion.enabled = ItemCfg.Bind("Items - Uncommon", "Infusion", true, "Enable changes to this item.").Value; Infusion.useBuff = ItemCfg.Bind("Items - Uncommon", "Infusion - Show Buff on HUD", true, "HP gained from Infusion is displayed as a buff on your HUD.").Value; LeechingSeed.enabled = ItemCfg.Bind("Items - Uncommon", "Leeching Seed", true, "Enable changes to this item.").Value; Daisy.enabled = ItemCfg.Bind("Items - Uncommon", "Lepton Daisy", true, "Enable changes to this item.").Value; Daisy.disableHealPulse = ItemCfg.Bind("Items - Uncommon", "Lepton Daisy - Disable Heal Pulse", true, "Disables the Vanilla Heal Pulse if Lepton Daisy rework is enabled.").Value; Guillotine.enabled = ItemCfg.Bind("Items - Uncommon", "Old Guillotine", true, "Enable changes to this item.").Value; Guillotine.reduceVFX = ItemCfg.Bind("Items - Uncommon", "Old Guillotine - Reduce VFX", true, "Reduce how often this item's VFX shows up.").Value; Razorwire.enabled = ItemCfg.Bind("Items - Uncommon", "Razorwire", true, "Enable changes to this item.").Value; RedWhip.enabled = ItemCfg.Bind("Items - Uncommon", "Red Whip", true, "Enable changes to this item.").Value; RoseBuckler.enabled = ItemCfg.Bind("Items - Uncommon", "Rose Buckler", false, "Enable changes to this item.").Value; SquidPolyp.enabled = ItemCfg.Bind("Items - Uncommon", "Squid Polyp", true, "Enable changes to this item.").Value; SquidPolyp.ignoreAllyCap = ItemCfg.Bind("Items - Uncommon", "Squid Polyp - Ignore Ally Cap", true, "Squid Polyps ignore the ally cap if changes are enabled.").Value; SquidPolyp.scaleCount = ItemCfg.Bind("Items - Uncommon", "Squid Polyp - Stacks Increase Max Squids", false, "Extra stacks allow for more squids to spawn. Will lag in MP.").Value; SquidPolyp.cannotCopy = ItemCfg.Bind("Items - Uncommon", "Squid Polyp - CannotCopy Tag", false, "If True, prevent minions like Engi Turrets from receiving this item.").Value; SquidPolyp.shareCountWithMinions = ItemCfg.Bind("Items - Uncommon", "Squid Polyp - Share Count with Minions", false, "If True, minions such as Engi Turrets will share their squid count with their owner.").Value; Stealthkit.enabled = ItemCfg.Bind("Items - Uncommon", "Old War Stealthkit", true, "Enable changes to this item.").Value; Ukulele.enabled = ItemCfg.Bind("Items - Uncommon", "Ukulele", true, "Enable changes to this item.").Value; WarHorn.enabled = ItemCfg.Bind("Items - Uncommon", "War Horn", true, "Enable changes to this item.").Value; WillOWisp.enabled = ItemCfg.Bind("Items - Uncommon", "Will-o-the-Wisp", true, "Enable changes to this item.").Value; Ignition.enabled = ItemCfg.Bind("Items - Uncommon", "Ignition Tank", true, "Enable changes to this item.").Value; BreachingFin.enabled = ItemCfg.Bind("Items - Uncommon", "Breaching Fin", true, "Enable changes to this item.").Value; NoxiousThorn.enabled = ItemCfg.Bind("Items - Uncommon", "Noxious Thorn", true, "Enable changes to this item.").Value; Dynamite.enabled = ItemCfg.Bind("Items - Uncommon", "Box of Dynamite", true, "Enable changes to this item.").Value; KineticDampener.enabled = ItemCfg.Bind("Items - Uncommon", "Kinetic Dampener", true, "Enable changes to this item.").Value; } private static void ConfigLegendaryItems() { Behemoth.enabled = ItemCfg.Bind("Items - Legendary", "Brilliant Behemoth", false, "Enable changes to this item.").Value; CeremonialDagger.enabled = ItemCfg.Bind("Items - Legendary", "Ceremonial Dagger", true, "Enable changes to this item.").Value; Clover.enabled = ItemCfg.Bind("Items - Legendary", "57 Leaf Clover", false, "Caps how high the Luck stat can go.").Value; Clover.luckCap = ItemCfg.Bind("Items - Legendary", "57 Leaf Clover - Max Luck", 1f, "Maximum Luck value players can reach. Extra Luck is converted to stat boosts.").Value; FrostRelic.enabled = ItemCfg.Bind("Items - Legendary", "Frost Relic", true, "Enable changes to this item.").Value; HappiestMask.enabled = ItemCfg.Bind("Items - Legendary", "Happiest Mask", true, "Enable changes to this item.").Value; HappiestMask.scaleCount = ItemCfg.Bind("Items - Legendary", "Happiest Mask - Stacks Increase Max Ghosts", false, "Extra stacks allow for more ghosts to spawn. Will lag in MP.").Value; HappiestMask.noGhostLimit = ItemCfg.Bind("Items - Legendary", "Happiest Mask - Remove Ghost Limit", false, "Removes the ghost limit at all times. Definitely will lag.").Value; HeadHunter.enabled = ItemCfg.Bind("Items - Legendary", "Wake of Vultures", true, "Enable changes to this item.").Value; HeadHunter.perfectedTweak = ItemCfg.Bind("Items - Legendary", "Wake of Vultures - Perfected Tweak", true, "Perfected Affix gained via Wake of Vultures will not force your health pool to become shields.").Value; Headstompers.enabled = ItemCfg.Bind("Items - Legendary", "H3AD-ST", true, "Enable changes to this item.").Value; Headstompers.useBuff = ItemCfg.Bind("Items - Legendary", "H3AD-ST - Show Buff on HUD", true, "H3AD-ST cooldown is shown as a buff on your HUD. Disabling this prevents Blast Shower from clearing the item's cooldown.").Value; Scorpion.enabled = ItemCfg.Bind("Items - Legendary", "Symbiotic Scorpion", true, "Enable changes to this item.").Value; SpareDroneParts.enabled = ItemCfg.Bind("Items - Legendary", "Spare Drone Parts", true, "Enable changes to this item.").Value; SpareDroneParts.ignoreAllyCap = ItemCfg.Bind("Items - Legendary", "Spare Drone Parts - Ignore Ally Cap", true, "Col. Droneman ignores the ally cap if changes are enabled.").Value; Aegis.enabled = ItemCfg.Bind("Items - Legendary", "Aegis", true, "Enable changes to this item.").Value; Tesla.enabled = ItemCfg.Bind("Items - Legendary", "Unstable Tesla Coil", true, "Enable changes to this item.").Value; Raincoat.enabled = ItemCfg.Bind("Items - Legendary", "Bens Raincoat", true, "Enable changes to this item.").Value; Raincoat.replaceIcons = ItemCfg.Bind("Items - Legendary", "Bens Raincoat - Use Modded Icons", false, "Replace the Vanilla buff icons for this item.").Value; LaserScope.enabled = ItemCfg.Bind("Items - Legendary", "Laser Scope", true, "Enable changes to this item.").Value; Overspill.enabled = ItemCfg.Bind("Items - Legendary", "Runic Lens", true, "Enable changes to this item.").Value; GrowthNectar.enabled = ItemCfg.Bind("Items - Legendary", "Growth Nectar", true, "Enable changes to this item.").Value; NetworkedSuffering.enabled = ItemCfg.Bind("Items - Legendary", "Networked Suffering", true, "Enable changes to this item.").Value; } private static void ConfigVoidItems() { Dungus.enabled = ItemCfg.Bind("Items - Void", "Weeping Fungus", true, "Enable changes to this item.").Value; SaferSpaces.enabled = ItemCfg.Bind("Items - Void", "Safer Spaces", true, "Enable changes to this item.").Value; SaferSpaces.addIframes = ItemCfg.Bind("Items - Void", "Safer Spaces - I-frames on Proc", false, "Gives brief invincibility when triggering this effect.").Value; VoidLens.enabled = ItemCfg.Bind("Items - Void", "Lost Seers Lens", true, "Enable changes to this item.").Value; PlasmaShrimp.enabled = ItemCfg.Bind("Items - Void", "Plasma Shrimp", true, "Enable changes to this item.").Value; VoidWisp.enabled = ItemCfg.Bind("Items - Void", "Voidsent Flame", true, "Enable changes to this item.").Value; Polylute.enabled = ItemCfg.Bind("Items - Void", "Polylute", true, "Enable changes to this item.").Value; VoidRing.enabled = ItemCfg.Bind("Items - Void", "Singularity Band", true, "Enable changes to this item.").Value; Zoea.ignoreAllyCap = ItemCfg.Bind("Items - Void", "Newly Hatched Zoea - Ignore Ally Cap", true, "Zoea Allies ignore the ally cap.").Value; Zoea.maxAllyCount = ItemCfg.Bind("Items - Void", "Newly Hatched Zoea - Max Allies per Player", 6, "Max Void allies each player can summon.").Value; Zoea.enabled = ItemCfg.Bind("Items - Void", "Newly Hatched Zoea", true, "Use the Max Allies per Player setting.").Value; } private static void ConfigBossItems() { ChargedPerf.enabled = ItemCfg.Bind("Items - Boss", "Charged Perforator", true, "Enable changes to this item.").Value; Disciple.enabled = ItemCfg.Bind("Items - Boss", "Charged Perforator", true, "Enable changes to this item.").Value; Knurl.enabled = ItemCfg.Bind("Items - Boss", "Titanic Knurl", true, "Enable changes to this item.").Value; MoltenPerf.enabled = ItemCfg.Bind("Items - Boss", "Molten Perforator", true, "Enable changes to this item.").Value; QueensGland.enabled = ItemCfg.Bind("Items - Boss", "Queens Gland", true, "Enable changes to this item.").Value; QueensGland.ignoreAllyCap = ItemCfg.Bind("Items - Boss", "Queens Gland - Ignore Ally Cap", true, "Queens Gland Guards ignore the ally cap if changes are enabled.").Value; Shatterspleen.enabled = ItemCfg.Bind("Items - Boss", "Shatterspleen", true, "Enable changes to this item.").Value; EmpathyCores.ignoreAllyCap = ItemCfg.Bind("Items - Boss", "Empathy Cores - Ignore Ally Cap", true, "Empathy Cores ignore the ally cap.").Value; EmpathyCores.enabled = EmpathyCores.enabled && EmpathyCores.ignoreAllyCap; DefenseNucleus.enabled = ItemCfg.Bind("Items - Boss", "Defense Nucleus", true, "Enable changes to this item.").Value; DefenseNucleus.removeAllyScaling = ItemCfg.Bind("Items - Boss", "Defense Nucleus - Remove Ally Count Scaling", true, "Stacks increase ally damage and health instead of max allies.").Value; DefenseNucleus.inheritEliteAffix = ItemCfg.Bind("Items - Boss", "Defense Nucleus - Inherit Elite Affix", true, "Defense Nucleus Alpha Constructs inherit the Elite Affix of the enemy that was killed. This removes their spawn VFX.").Value; DefenseNucleus.ignoreAllyCap = ItemCfg.Bind("Items - Boss", "Defense Nucleus - Ignore Ally Cap", true, "Defense Nucleus Alpha Constructs ignore the ally cap if changes are enabled.").Value; HalcyonSeed.enabled = ItemCfg.Bind("Items - Boss", "Halcyon Seed", true, "Enable changes to this item.").Value; PrisonMatrix.enabled = ItemCfg.Bind("Items - Boss", "Prison Matrix", true, "Enable changes to this item.").Value; } private static void ConfigLunars() { BrittleCrown.enabled = ItemCfg.Bind("Items - Lunar", "Brittle Crown", true, "Enable changes to this item.").Value; Meteorite.enabled = ItemCfg.Bind("Items - Lunar", "Glowing Meteorite", true, "Enable changes to this item.").Value; ShapedGlass.enabled = ItemCfg.Bind("Items - Lunar", "Shaped Glass", true, "Enable changes to this item.").Value; Transcendence.enabled = ItemCfg.Bind("Items - Lunar", "Transcendence", true, "Enable changes to this item.").Value; } private static void ConfigEquipment() { Backup.enabled = ItemCfg.Bind("Items - Equipment", "The Back-Up", true, "Enable changes to this item.").Value; Backup.ignoreTeamLimit = !ItemCfg.Bind("Items - Equipment", "The Back-Up: Limit Drones", false, "Back-Up drones count towards the ally cap.").Value; BackupTracker.maxCount = ItemCfg.Bind("Items - Equipment", "The Back-Up: Max Drones", 8, "Max active Backup Drones.").Value; BFG.enabled = ItemCfg.Bind("Items - Equipment", "Preon Accumulator", true, "Enable changes to this item.").Value; Capacitor.enabled = ItemCfg.Bind("Items - Equipment", "Royal Capacitor", true, "Enable changes to this item.").Value; Chrysalis.enabled = ItemCfg.Bind("Items - Equipment", "Milky Chrysalis", true, "Enable changes to this item.").Value; CritHud.enabled = ItemCfg.Bind("Items - Equipment", "Ocular HUD", true, "Enable changes to this item.").Value; SuperLeech.enabled = ItemCfg.Bind("Items - Equipment", "Super Massive Leech", true, "Enable changes to this item.").Value; VolcanicEgg.enabled = ItemCfg.Bind("Items - Equipment", "Volcanic Egg", true, "Enable changes to this item.").Value; Goobo.enabled = ItemCfg.Bind("Items - Equipment", "Goobo Jr.", true, "Enable changes to this item.").Value; } private static void ConfigSurvivors() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown SurvivorCfg = new ConfigFile(Path.Combine(ConfigFolderPath, "RiskyMod_Survivors.cfg"), true); CommandoCore.enabled = SurvivorCfg.Bind("Survivors: Commando", "Enable Changes", true, "Enable changes to this survivor.").Value; CommandoCore.phaseRoundChanges = SurvivorCfg.Bind("Survivors: Commando", "Phase Round Changes", true, "Enable changes to this skill.").Value; CommandoCore.rollChanges = SurvivorCfg.Bind("Survivors: Commando", "Tactical Dive Changes", true, "Enable changes to this skill.").Value; CommandoCore.suppressiveChanges = SurvivorCfg.Bind("Survivors: Commando", "Suppressive Fire Changes", true, "Enable changes to this skill.").Value; CommandoCore.grenadeChanges = SurvivorCfg.Bind("Survivors: Commando", "Frag Grenade Changes", true, "Enable changes to this skill.").Value; CommandoCore.grenadeRemoveFalloff = SurvivorCfg.Bind("Survivors: Commando", "Frag Grenade - Remove Falloff", true, "Remove blast falloff from Frag Grenade. Requires Frag Grenade Changes = true.").Value; CommandoCore.skillLightningRound = SurvivorCfg.Bind("Survivors: Commando", "Phase Lightning Secondary Skill", true, "Adds a new secondary skill.").Value; CommandoCore.replacePhaseRound = SurvivorCfg.Bind("Survivors: Commando", "Phase Lightning - Replace Default", false, "Removes Phase Round and replaces it with this skill.").Value; CommandoCore.skillShrapnelBarrage = SurvivorCfg.Bind("Survivors: Commando", "Shrapnel Barrage Special Skill", true, "Adds a new special skill.").Value; CommandoCore.replaceSuppressive = SurvivorCfg.Bind("Survivors: Commando", "Shrapnel Barrage - Replace Default", false, "Removes Suppressive Fire and replaces it with this skill.").Value; HuntressCore.enabled = SurvivorCfg.Bind("Survivors: Huntress", "Enable Changes", true, "Enable changes to this survivor.").Value; HuntressCore.strafeChanges = SurvivorCfg.Bind("Survivors: Huntress", "Strafe Changes", true, "Enable changes to this skill.").Value; HuntressCore.flurryChanges = SurvivorCfg.Bind("Survivors: Huntress", "Flurry Changes", true, "Enable changes to this skill.").Value; HuntressCore.laserGlaiveChanges = SurvivorCfg.Bind("Survivors: Huntress", "Laser Glaive Changes", true, "Enable changes to this skill.").Value; HuntressCore.blinkChanges = SurvivorCfg.Bind("Survivors: Huntress", "Blink Changes", true, "Enable changes to this skill.").Value; HuntressCore.arrowRainChanges = SurvivorCfg.Bind("Survivors: Huntress", "Arrow Rain Changes", true, "Enable changes to this skill.").Value; HuntressCore.ballistaChanges = SurvivorCfg.Bind("Survivors: Huntress", "Ballista Changes", true, "Enable changes to this skill.").Value; ToolbotCore.enabled = SurvivorCfg.Bind("Survivors: MUL-T", "Enable Changes", true, "Enable changes to this survivor.").Value; ToolbotCore.enableRebarChanges = SurvivorCfg.Bind("Survivors: MUL-T", "Rebar Puncher Changes", true, "Enable changes to this skill.").Value; ToolbotCore.enableScrapChanges = SurvivorCfg.Bind("Survivors: MUL-T", "Scrap Launcher Changes", true, "Enable changes to this skill.").Value; ToolbotCore.sawPhysics = SurvivorCfg.Bind("Survivors: MUL-T", "Power Saw Physics Changes", true, "Makes Power Saw physics more consistent.").Value; ToolbotCore.sawHitbox = SurvivorCfg.Bind("Survivors: MUL-T", "Power Saw Hitbox Changes", true, "Increases Power Saw hitbox size by 50%.").Value; ToolbotCore.sawBarrierOnHit = SurvivorCfg.Bind("Survivors: MUL-T", "Power Saw Barrier On Hit", true, "Power Saw gives barrier-on-hit.").Value; ToolbotCore.enableSecondarySkillChanges = SurvivorCfg.Bind("Survivors: MUL-T", "Blast Canister Changes", true, "Enable changes to this skill.").Value; ToolbotCore.enablePowerModeChanges = SurvivorCfg.Bind("Survivors: MUL-T", "Power Mode Changes", true, "Enable changes to this skill.").Value; EngiCore.enabled = SurvivorCfg.Bind("Survivors: Engineer", "Enable Changes", true, "Enable changes to this survivor.").Value; PressureMines.enabled = SurvivorCfg.Bind("Survivors: Engineer", "Pressure Mine Changes", true, "Pressure Mines only detonate when fully armed.").Value; EngiCore.harpoonRangeTweak = SurvivorCfg.Bind("Survivors: Engineer", "Thermal Harpoon Changes", true, "Increases Thermal Harpoon targeting range.").Value; TurretChanges.normalizeStats = SurvivorCfg.Bind("Survivors: Engineer", "Normalize Turret Stats", true, "Reduces Turret base damage to 12 while keeping damage output the same.").Value; BubbleDefenseMatrix.enabled = SurvivorCfg.Bind("Survivors: Engineer", "Bubble Shield Changes", true, "Enable changes to this skill.").Value; MageCore.enabled = SurvivorCfg.Bind("Survivors: Artificer", "Enable Changes", true, "Enable changes to this survivor.").Value; MageCore.modifyFireBolt = SurvivorCfg.Bind("Survivors: Artificer", "Fire Bolt Changes", true, "Enable changes to this skill.").Value; MageCore.modifyPlasmaBolt = SurvivorCfg.Bind("Survivors: Artificer", "Plasma Bolt Changes", true, "Enable changes to this skill.").Value; MageCore.m2RemoveNanobombGravity = SurvivorCfg.Bind("Survivors: Artificer", "Nanobomb - Remove Gravity", false, "Removes projectile drop from Nanobomb so it behaves like it did in Early Access.").Value; MageCore.buffNanoSpear = SurvivorCfg.Bind("Survivors: Artificer", "Nanospear Changes", true, "Enable changes to this skill.").Value; MageCore.ionSurgeUtility = SurvivorCfg.Bind("Survivors: Artificer", "Ion Surge - Move to Utility Slot", false, "Moves Ion Surge to the Utility slot.").Value; MageCore.ionSurgeUtilityKeepSpecial = SurvivorCfg.Bind("Survivors: Artificer", "Ion Surge - Move to Utility Slot - Keep Special", false, "If Ion Surge Utility is enabled, keep the Special version as a selectable skill.").Value; MageCore.ionSurgeShock = SurvivorCfg.Bind("Survivors: Artificer", "Ion Surge - Shock", true, "Ion Surge shocks enemies.").Value; MageCore.utilitySelfKnockback = SurvivorCfg.Bind("Survivors: Artificer", "Utility Self Knockback", false, "(Client-Side) Snapfreeze Rework and Blaze Storm apply self-knockback when used midair."); MageCore.utilitySelfKnockback.SettingChanged += MageCore.UpdatePushSetting; MageCore.iceWallRework = SurvivorCfg.Bind("Survivors: Artificer", "Snapfreeze Rework", true, "Snapfreeze can target midair enemies.").Value; IceWallDefense.enabled = SurvivorCfg.Bind("Survivors: Artificer", "Snapfreeze Defense", true, "Snapfreeze blocks ranged attacks from enemies.").Value; MageCore.enableFireUtility = SurvivorCfg.Bind("Survivors: Artificer", "Blaze Storm Utility Skill", false, "Enables this custom skill.").Value; MageCore.flamethrowerSprintCancel = SurvivorCfg.Bind("Survivors: Artificer", "Flamethrower - Sprint Cancel", true, "(Client-Side) Sprinting cancels Flamethrower."); MageCore.enableLightningSpecial = SurvivorCfg.Bind("Survivors: Artificer", "Electrocute Special Skill", false, "Enables this custom skill. May be buggy.").Value; MercCore.enabled = SurvivorCfg.Bind("Survivors: Mercenary", "Enable Changes", true, "Enable changes to this survivor.").Value; MercCore.buffDefaultShift = SurvivorCfg.Bind("Survivors: Mercenary", "Blinding Assault Changes", true, "Buff the damage of this skill.").Value; TreebotCore.enabled = SurvivorCfg.Bind("Survivors: REX", "Enable Changes", true, "Enable changes to this survivor.").Value; TreebotCore.drillChanges = SurvivorCfg.Bind("Survivors: REX", "DIRECTIVE Drill Changes", true, "Enable changes to this skill.").Value; TreebotCore.defaultUtilityHeal = SurvivorCfg.Bind("Survivors: REX", "DIRECTIVE Disperse Healing", true, "DIRECTIVE Disperse heals for 5% HP per target hit.").Value; TreebotCore.fruitChanges = SurvivorCfg.Bind("Survivors: REX", "DIRECTIVE Harvest Changes", true, "Enable changes to this skill.").Value; DropFruitOnHit.enabled = SurvivorCfg.Bind("Survivors: REX", "DIRECTIVE Harvest - Fruit On Hit", false, "Fruiting enemies have a chance to drop fruits when hit.").Value; LoaderCore.enabled = SurvivorCfg.Bind("Survivors: Loader", "Enable Changes", true, "Enable changes to this survivor.").Value; LoaderCore.modifyStats = SurvivorCfg.Bind("Survivors: Loader", "Modify Base Stats", true, "Enable base stat changes for this survivor.").Value; LoaderCore.zapFistChanges = SurvivorCfg.Bind("Survivors: Loader", "Thunder Gauntlet Changes", true, "Enable changes to this skill.").Value; LoaderCore.slamChanges = SurvivorCfg.Bind("Survivors: Loader", "Thunderslam Changes", true, "Enable changes to this skill.").Value; LoaderCore.pylonChanges = SurvivorCfg.Bind("Survivors: Loader", "M551 Pylon Changes", true, "Enable changes to this skill.").Value; CrocoCore.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Enable Changes", true, "Enable changes to this survivor. Skill options unavailable due to all the changes being too interlinked.").Value; BlightReturns.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Blight Returns", true, "Reworks Blight to be similar to Corrosive Wounds from Returns.").Value; BiggerLeapHitbox.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Extend Leap Collision Box", true, "Acrid's Shift skills have a larger collision hitbox. Damage radius remains the same.").Value; ShiftAirControl.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Leap Air Control", false, "Acrid's Shift skills gain increased air control at high move speeds (causes momentum loss).").Value; UtilityKnockdown.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Leap Knockdown", true, "Acrid's Shift skills knock airborne enemies downwards.").Value; BuffFrenziedLeap.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Frenzied Leap Changes", true, "Enable changes to this skill.").Value; BuffShiftPuddleProc.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Acid Puddle Buff", true, "Buffs proc coefficient of Acid Puddles.").Value; ContagionPassive.enabled = SurvivorCfg.Bind("Survivors: Acrid", "Contagion Passive Skill", true, "Enables the Contagion passive skill.").Value; ContagionPassive.useDebuffSpread = SurvivorCfg.Bind("Survivors: Acrid", "Contagion - Debuff Spread on Kill", false, "Contagion makes Blight and Poison spread on kill.").Value; ContagionPassive.useUniqueSpecialDebuff = SurvivorCfg.Bind("Survivors: Acrid", "Contagion - Unique Special Debuff", true, "Contagion uses a unique DoT for Epidemic.").Value; CaptainCore.enabled = SurvivorCfg.Bind("Survivors: Captain", "Enable Changes", true, "Enable changes to this survivor.").Value; Microbots.deletionRestrictions = SurvivorCfg.Bind("Survivors: Captain", "Defensive Microbots Nerf", true, "Defensive Microbots no longer deletes stationary projectiles like gas clouds and Void Reaver mortars.").Value; Microbots.droneScaling = SurvivorCfg.Bind("Survivors: Captain", "Defensive Microbots Drone Scaling", true, "Defensive Microbots scale with drone count instead of attack speed.").Value; CaptainCore.enablePrimarySkillChanges = SurvivorCfg.Bind("Survivors: Captain", "Enable Primary Skill Changes", true, "Enable primary skill changes for this survivor.").Value; FireShotgun.scalePellets = SurvivorCfg.Bind("Survivors: Captain", "Enable Primary Skill Changes - Scale Pellets with Attackspeed", true, "Vulcan Shotgun gains extra pellets with attack speed."); FireShotgun.scalePellets.SettingChanged += CaptainCore.ScalePellets_SettingChanged; CaptainCore.modifyTaser = SurvivorCfg.Bind("Survivors: Captain", "Power Taser Changes", true, "Enable changes to this skill.").Value; CaptainCore.nukeAmmopackNerf = SurvivorCfg.Bind("Survivors: Captain", "Diablo Strike Ammopack Nerf", true, "Ammopacks only restore half of Diablo Strike's charge. Intended for use with Beacon: Resupply changes.").Value; CaptainCore.nukeProc = SurvivorCfg.Bind("Survivors: Captain", "Diablo Strike Proc Coeficient", true, "Increases Diablo Strike's proc coefficient.").Value; CaptainCore.nukeFalloff = SurvivorCfg.Bind("Survivors: Captain", "Diablo Strike Remove Falloff", true, "Removes radius falloff from Diablo Strike.").Value; CaptainCore.disableNukeFriendlyFire = SurvivorCfg.Bind("Survivors: Captain", "Diablo Strike Disable Friendly Fire", false, "Diablo Strike only hurts yourself instead of all teammates.").Value; BeaconRework.healCooldown = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Healing - Enable Cooldown", true, "Allow this beacon to be re-used on a cooldown.").Value; BeaconRework.hackCooldown = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Hack - Enable Cooldown", false, "Allow this beacon to be re-used on a cooldown.").Value; BeaconRework.hackChanges = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Hack - Enable Changes", false, "Enable changes to the effect of this beacon.").Value; BeaconRework.hackDisable = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Hack - Disable", false, "Removes this Beacon from the game.").Value; BeaconRework.shockCooldown = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Shocking - Enable Cooldown", true, "Allow this beacon to be re-used on a cooldown.").Value; BeaconRework.shockChanges = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Shocking - Enable Changes", true, "Enable changes to the effect of this beacon.").Value; BeaconRework.resupplyCooldown = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Resupply - Enable Cooldown", true, "Allow this beacon to be re-used on a cooldown.").Value; BeaconRework.resupplyChanges = SurvivorCfg.Bind("Survivors: Captain", "Beacon: Resupply - Enable Changes", true, "Enable changes to the effect of this beacon.").Value; CaptainCore.beaconRework = SurvivorCfg.Bind("Survivors: Captain", "Beacon Changes", true, "Beacons can be replaced on a cooldown and reworks Supply and Hack beacons. Disabling this disables all beacon-related changes.").Value; CaptainCore.beaconRework = CaptainCore.beaconRework && (BeaconRework.healCooldown || BeaconRework.hackCooldown || BeaconRework.hackChanges || BeaconRework.shockCooldown || BeaconRework.shockChanges || BeaconRework.resupplyChanges || BeaconRework.resupplyCooldown); BeaconRework.CaptainDeployableManager.allowLysateStack = SurvivorCfg.Bind("Survivors: Captain", "Beacon Changes - Infinite Lysate Cell Stacking", false, "If Beacon Changes are enabled, allow stocks to be infinitely increased with Lysate Cells.").Value; Bandit2Core.enabled = SurvivorCfg.Bind("Survivors: Bandit", "Enable Changes", true, "Enable changes to this survivor.").Value; Bandit2Core.modifyStats = SurvivorCfg.Bind("Survivors: Bandit", "Modify Base Stats", true, "Enable base stat changes for this survivor.").Value; PersistentDesperado.enabled = SurvivorCfg.Bind("Survivors: Bandit", "Desperado Persist", false, "Desperado stacks are weaker but last between stages.").Value; PersistentDesperado.damagePerBuff = SurvivorCfg.Bind("Survivors: Bandit", "Desperado Persist - Damage Multiplier", 0.01f, "Revolver damage multiplier per Desperado stack if Desperado Persist is enabled.").Value; BackstabRework.enabled = SurvivorCfg.Bind("Survivors: Bandit", "Backstab Changes", true, "Backstabs minicrit for 50% bonus damage and crit chance is converted to crit damage.").Value; BuffHemorrhage.enableProcs = SurvivorCfg.Bind("Survivors: Bandit", "Hemmorrhage - Enable Procs", true, "Hemmorrhage damage has a low proc coefficient.").Value; BuffHemorrhage.bypassArmor = SurvivorCfg.Bind("Survivors: Bandit", "Hemmorrhage - Ignore Armor", false, "Hemmorrhage ignores positive armor.").Value; BuffHemorrhage.enableCrit = false; Bandit2Core.burstChanges = SurvivorCfg.Bind("Survivors: Bandit", "Burst Changes", true, "Enable changes to this skill.").Value; Bandit2Core.blastChanges = SurvivorCfg.Bind("Survivors: Bandit", "Blast Changes", true, "Enable changes to this skill.").Value; Bandit2Core.noKnifeCancel = SurvivorCfg.Bind("Survivors: Bandit", "Knife While Reloading", true, "Knife skills can be used without interrupting your reload.").Value; Bandit2Core.knifeChanges = SurvivorCfg.Bind("Survivors: Bandit", "Serrated Dagger Changes", true, "Enable changes to this skill.").Value; Bandit2Core.knifeThrowChanges = SurvivorCfg.Bind("Survivors: Bandit", "Serrated Shiv Changes", true, "Enable changes to this skill.").Value; Bandit2Core.utilityFix = SurvivorCfg.Bind("Survivors: Bandit", "Smokebomb Fix", true, "Fixes various bugs with Smokebomb.").Value; Bandit2Core.specialRework = SurvivorCfg.Bind("Survivors: Bandit", "Special Rework", true, "Makes Resets/Desperado a selectable passive and adds a new Special skill.").Value; VoidFiendCore.enabled = SurvivorCfg.Bind("Survivors: Void Fiend", "Enable Changes", true, "Enable changes to this survivor.").Value; VoidFiendCore.corruptOnKill = SurvivorCfg.Bind("Survivors: Void Fiend", "Corruption on Kill", true, "Gain Corruption on kill. Lowers passive Corruption gain and Corrupted form duration.").Value; VoidFiendCore.corruptMeterTweaks = SurvivorCfg.Bind("Survivors: Void Fiend", "Corruption Meter Tweaks", true, "Faster decay, slower passive buildup. Corrupted Suppress can be used as long as you have the HP for it. Meant to be used with Corrupt on Kill.").Value; VoidFiendCore.noCorruptCrit = SurvivorCfg.Bind("Survivors: Void Fiend", "No Corruption on Crit", true, "Disables Corruption gain on crit.").Value; VoidFiendCore.noCorruptHeal = SurvivorCfg.Bind("Survivors: Void Fiend", "No Corruption loss on Heal", true, "Disables Corruption loss on heal.").Value; VoidFiendCore.removeCorruptArmor = SurvivorCfg.Bind("Survivors: Void Fiend", "No Corrupt Mode Bonus Armor", true, "Disables bonus armor while Corrupted.").Value; VoidFiendCore.secondaryMultitask = SurvivorCfg.Bind("Survivors: Void Fiend", "Secondary Multitasking", true, "Drown and Suppress can be fired while charging Flood.").Value; UtilityFallImmune.enabled = SurvivorCfg.Bind("Survivors: Void Fiend", "Trespass Changes", true, "Enable changes to this skill.").Value; SeekerCore.enabled = SurvivorCfg.Bind("Survivors: Seeker", "Enable Changes", true, "Enable changes to this survivor.").Value; SeekerCore.noSelfRevive = SurvivorCfg.Bind("Survivors: Seeker", "No Self Revive", true, "Seeker no longer gains a self-revive at 7 meditate stacks.").Value; SeekerCore.unseenHandScalesDamage = SurvivorCfg.Bind("Survivors: Seeker", "Unseen Hand scales damage.", true, "Unseen Hand scales damage instead of healing.").Value; FalseSonCore.enabled = SurvivorCfg.Bind("Survivors: False Son", "Enable Changes", true, "Enable changes to this survivor.").Value; FalseSonCore.modifyBaseStats = SurvivorCfg.Bind("Survivors: False Son", "Modify Base Stats", true, "Enable base stat changes for this survivor.").Value; FalseSonCore.increaseGrowthCost = SurvivorCfg.Bind("Survivors: False Son", "Increase Growth Cost", true, "Increases health required per growth stack to compensate for the health item buffs in this mod.").Value; FalseSonCore.modifyPassive = SurvivorCfg.Bind("Survivors: False Son", "Modify Passive", true, "Increases passive armor and reduces passive health regen.").Value; FalseSonCore.buffLaser = SurvivorCfg.Bind("Survivors: False Son", "Laser of the Father Changes", true, "Enable changes to this skill.").Value; if (!SurvivorsCore.enabled) { Bandit2Core.enabled = false; CaptainCore.enabled = false; CommandoCore.enabled = false; CrocoCore.enabled = false; VoidFiendCore.enabled = false; EngiCore.enabled = false; HuntressCore.enabled = false; LoaderCore.enabled = false; MageCore.enabled = false; MercCore.enabled = false; ToolbotCore.enabled = false; TreebotCore.enabled = false; SeekerCore.enabled = false; FalseSonCore.enabled = false; } } private static void ConfigMonsters() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown MonsterCfg = new ConfigFile(Path.Combine(ConfigFolderPath, "RiskyMod_Monsters.cfg"), true); EnemiesCore.infernoCompat = MonsterCfg.Bind("Compatibility", "Inferno Compatibility", true, "Disable certain changes that may conflict with Inferno.").Value; MithrixCore.enabled = MonsterCfg.Bind("Mithrix", "Enable Changes", true, "Enable changes to this monster.").Value; MithrixTargetPrioritization.enabled = MonsterCfg.Bind("Mithrix", "Prioritize Players", true, "Mithrix always tries to prioritize targeting players when possible. May result in him completely ignoring Engi Turrets.").Value; MithrixFreezeImmune.enabled = MonsterCfg.Bind("Mithrix", "Freeze Immunity", false, "Mithrix cannot be frozen.").Value; MithrixHealthBuff.enabled = MonsterCfg.Bind("Mithrix", "Health Buff", true, "Buffs Mithrix's health.").Value; MithrixDebuffResist.enabled = MonsterCfg.Bind("Mithrix", "Debuff Resistance", true, "Attack Speed and Move Speed reduction are less effective against Mithrix.").Value; VoidlingCore.enabled = MonsterCfg.Bind("Voidling", "Enable Changes", true, "Enable changes to this monster.").Value; VoidlingStats.modifyHP = MonsterCfg.Bind("Voidling", "Reduce HP", true, "Reduces Voidling HP.").Value; VoidlingTargetPrioritization.enabled = MonsterCfg.Bind("Voidling", "Prioritize Players", true, "This monster always tries to prioritize targeting players when possible.").Value; Jellyfish.enabled = MonsterCfg.Bind("Monsters", "Jellyfish", true, "Enable changes to this monster.").Value; Imp.enabled = MonsterCfg.Bind("Monsters", "Imp", true, "Enable changes to this monster.").Value; HermitCrab.enabled = MonsterCfg.Bind("Monsters", "Hermit Crab", true, "Enable changes to this monster.").Value; Lemurian.enabled = MonsterCfg.Bind("Monsters", "Lemurian", true, "Enable changes to this monster.").Value; Mushrum.enabled = MonsterCfg.Bind("Monsters", "Mini Mushrum", true, "Enable changes to this monster.").Value; Bison.enabled = MonsterCfg.Bind("Monsters", "Bighorn Bison", true, "Enable changes to this monster.").Value; GreaterWisp.enabled = MonsterCfg.Bind("Monsters", "Greater Wisp", true, "Enable changes to this monster.").Value; Parent.enabled = MonsterCfg.Bind("Monsters", "Parent", true, "Enable changes to this monster.").Value; LunarExploder.enabled = MonsterCfg.Bind("Monsters", "Lunar Exploder", true, "Enable changes to this monster.").Value; LunarWisp.enabled = MonsterCfg.Bind("Monsters", "Lunar Wisp", true, "Enable changes to this monster.").Value; LunarWisp.removeHitscan = MonsterCfg.Bind("Monsters", "Lunar Wisp - Remove Hitscan", true, "Changes the Lunar Wisp attack from hitscan to projectile.").Value; LunarWisp.disableProjectileOnKill = MonsterCfg.Bind("Monsters", "Lunar Wisp - Disable Projectile On-Kill Effects", true, "Prevents on-kill effects from proccing when this monster's projectiles are shot down.").Value; Titan.enabled = MonsterCfg.Bind("Monsters", "Stone Titan", true, "Enable changes to this monster.").Value; BeetleQueen.enabled = MonsterCfg.Bind("Monsters", "Beetle Queen", true, "Enable changes to this monster.").Value; Vagrant.enabled = MonsterCfg.Bind("Monsters", "Wandering Vagrant", true, "Enable changes to this monster.").Value; Vagrant.disableProjectileOnKill = MonsterCfg.Bind("Monsters", "Wandering Vagrant - Disable Projectile On-Kill Effects", true, "Prevents on-kill effects from proccing when this monster's projectiles are shot down.").Value; Gravekeeper.disableProjectileOnKill = MonsterCfg.Bind("Monsters", "Grovetender - Disable Projectile On-Kill Effects", true, "Prevents on-kill effects from proccing when this monster's projectiles are shot down.").Value; SCU.enabled = MonsterCfg.Bind("Monsters", "Solus Control Unit", true, "Enable changes to this monster.").Value; Worm.enabled = MonsterCfg.Bind("Monsters", "Magma/Overloading Worm", true, "Enable changes to this monster.").Value; Aurelionite.enabled = MonsterCfg.Bind("Monsters", "Aurelionite", true, "Enable changes to this monster.").Value; Aurelionite.modifyStats = MonsterCfg.Bind("Monsters", "Aurelionite Stats", true, "Modify stats. (Separate from Aurelionite option)").Value; AWU.enabled = MonsterCfg.Bind("Monsters", "Alloy Worship Unit", true, "Enable changes to this monster.").Value; BlindPest.enabled = MonsterCfg.Bind("Monsters", "Blind Pest", true, "Enable changes to this monster.").Value; XiConstruct.enabled = MonsterCfg.Bind("Monsters", "Xi Construct", true, "Enable changes to this monster.").Value; VoidInfestor.enabled = MonsterCfg.Bind("Monsters", "Void Infestor", true, "Enable changes to this monster.").Value; VoidInfestor.noVoidAllies = MonsterCfg.Bind("Monsters", "Void Infestor - No Ally Infestation", true, "Void Infestors can't possess allies.").Value; VoidReaver.enabled = MonsterCfg.Bind("Monsters", "Void Reaver", true, "Enable changes to this monster.").Value; Child.enabled = MonsterCfg.Bind("Monsters", "Child", true, "Enable changes to this monster.").Value; Scorchling.enabled = MonsterCfg.Bind("Monsters", "Scorch Wurm", true, "Enable changes to this monster.").Value; } private static void ConfigSpawnpools() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown SpawnpoolCfg = new ConfigFile(Path.Combine(ConfigFolderPath, "RiskyMod_Spawnpools.cfg"), true); EnemiesCore.spawnpoolDLCReplacementFix = SpawnpoolCfg.Bind("General", "Fix DLC Enemy Replacements (Breaks spawnpools without SotV)", true, "Restores SotV enemy replacements.").Value; TitanicPlains.enabled = SpawnpoolCfg.Bind("Stage 1", "Titanic Plains", true, "Enable spawnpool changes on this stage.").Value; DistantRoost.enabled = SpawnpoolCfg.Bind("Stage 1", "Distant Roost", true, "Enable spawnpool changes on this stage.").Value; SnowyForest.enabled = SpawnpoolCfg.Bind("Stage 1", "Siphoned Forest", true, "Enable spawnpool changes on this stage.").Value; Lakes.enabled = SpawnpoolCfg.Bind("Stage 1", "Verdant Falls", true, "Enable spawnpool changes on this stage.").Value; VillageNight.enabled = SpawnpoolCfg.Bind("Stage 1", "Disturbed Impact", true, "Enable spawnpool changes on this stage.").Value; LakesNight.enabled = SpawnpoolCfg.Bind("Stage 1", "Viscous Falls", true, "Enable spawnpool changes on this stage.").Value; Wetland.enabled = SpawnpoolCfg.Bind("Stage 2", "Wetland Aspect", true, "Enable spawnpool changes on this stage.").Value; GooLake.enabled = SpawnpoolCfg.Bind("Stage 2", "Abandoned Aqueduct", true, "Enable spawnpool changes on this stage.").Value; DampCaveSimple.enabled = SpawnpoolCfg.Bind("Stage 4", "Abyssal Depths", true, "Enable spawnpool changes on this stage.").Value; StadiaJungle.enabled = SpawnpoolCfg.Bind("Stage 4", "Stadia Jungle", true, "Enable spawnpool changes on this stage.").Value; SirensCall.enabled = SpawnpoolCfg.Bind("Stage 4", "Sirens Call", true, "Enable spawnpool changes on this stage.").Value; SkyMeadow.enabled = SpawnpoolCfg.Bind("Stage 5", "Sky Meadow", true, "Enable spawnpool changes on this stage.").Value; HelminthRoost.enabled = SpawnpoolCfg.Bind("Stage 5", "Helminth Hatchery", true, "Enable spawnpool changes on this stage.").Value; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.RiskyLives.RiskyMod", "RiskyMod", "2.11.5")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class RiskyMod : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_LoadGameModes <>9__19_0; internal void b__19_0(orig_LoadGameModes orig) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(); simulacrumIndex = GameModeCatalog.FindGameModeIndex("InfiniteTowerRun"); classicRunIndex = GameModeCatalog.FindGameModeIndex("ClassicRun"); } } public static bool inBazaar = false; public static bool disableProcChains = true; public static ItemDef emptyItemDef = null; public static BuffDef emptyBuffDef = null; public static PluginInfo pluginInfo; public static GameModeIndex classicRunIndex; public static GameModeIndex simulacrumIndex; private static SceneDef bazaarScene = Addressables.LoadAssetAsync((object)"RoR2/Base/bazaar/bazaar.asset").WaitForCompletion(); public static PickupDropTable tier1Drops = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/dtTier1Item.asset").WaitForCompletion(); public static PickupDropTable tier2Drops = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/dtTier2Item.asset").WaitForCompletion(); public static PickupDropTable tier3Drops = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/dtTier3Item.asset").WaitForCompletion(); public static PickupDropTable lunarDrops = Addressables.LoadAssetAsync((object)"RoR2/Base/LunarChest/dtLunarChest.asset").WaitForCompletion(); public static PickupDropTable tierVoidDrops = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/dtVoidChest.asset").WaitForCompletion(); public static GameObject potentialPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/OptionPickup/OptionPickup.prefab").WaitForCompletion(); public static FileSystem fileSystem { get; private set; } public void Start() { SoftDependencies.InfernoPluginLoaded = Chainloader.PluginInfos.ContainsKey("HIFU.Inferno"); SoftDependencies.SS2OLoaded = Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.Starstorm2"); } public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown InitDependencies(); Stage.onStageStartGlobal += Stage_onStageStartGlobal; object obj = <>c.<>9__19_0; if (obj == null) { hook_LoadGameModes val = delegate(orig_LoadGameModes orig) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(); simulacrumIndex = GameModeCatalog.FindGameModeIndex("InfiniteTowerRun"); classicRunIndex = GameModeCatalog.FindGameModeIndex("ClassicRun"); }; <>c.<>9__19_0 = val; obj = (object)val; } GameModeCatalog.LoadGameModes += (hook_LoadGameModes)obj; pluginInfo = ((BaseUnityPlugin)this).Info; Assets.Init(); ConfigFiles.Init(); CheckDependencies(); ProjectileZapChainOnExplosion.Init(); ContentCore.Init(); new SharedDamageTypes(); RunFixes(); RunTweaks(); new ItemsCore(); new AlliesCore(); new VoidFieldsCore(); new MoonCore(); new VoidLocusCore(); new SurvivorsCore(); new EnemiesCore(); AddHooks(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); } private void OnLoad() { if (Chainloader.PluginInfos.ContainsKey("com.RiskySleeps.ClassicItemsReturns")) { Sacrifice.dropChance = 8f; } } private void Stage_onStageStartGlobal(Stage obj) { inBazaar = false; if ((Object)(object)SceneCatalog.GetSceneDefForCurrentScene() == (Object)(object)bazaarScene) { inBazaar = true; } } private void InitDependencies() { SoftDependencies.MithrixWankLoaded = Chainloader.PluginInfos.ContainsKey("com.RiskySleeps.MithrixWank"); SoftDependencies.LinearDamageLoaded = Chainloader.PluginInfos.ContainsKey("com.RiskyLives.LinearDamage"); SoftDependencies.EclipseRevampedLoaded = Chainloader.PluginInfos.ContainsKey("Nuxlar.EclipseRevamped"); SoftDependencies.RiskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); SoftDependencies.ArtifactOfPotentialLoaded = Chainloader.PluginInfos.ContainsKey("zombieseatflesh7.ArtifactOfPotential"); SoftDependencies.TeleporterTurretsLoaded = Chainloader.PluginInfos.ContainsKey("com.RuneFoxMods.TeleporterTurrets"); SoftDependencies.KingKombatArenaLoaded = Chainloader.PluginInfos.ContainsKey("com.Kingpinush.KingKombatArena"); SoftDependencies.ZetTweaksLoaded = Chainloader.PluginInfos.ContainsKey("com.TPDespair.ZetTweaks"); SoftDependencies.AIBlacklistLoaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.AI_Blacklist"); SoftDependencies.QueensGlandBuffLoaded = Chainloader.PluginInfos.ContainsKey("com.kking117.QueenGlandBuff"); SoftDependencies.ScepterPluginLoaded = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); SoftDependencies.ShareSuiteLoaded = Chainloader.PluginInfos.ContainsKey("com.funkfrog_sipondo.sharesuite"); SoftDependencies.RtAutoSprintLoaded = Chainloader.PluginInfos.ContainsKey("com.johnedwa.RTAutoSprintEx"); SoftDependencies.SpikestripGrooveSalad = Chainloader.PluginInfos.ContainsKey("com.groovesalad.GrooveSaladSpikestripContent"); SoftDependencies.SpikestripHeyImNoob = Chainloader.PluginInfos.ContainsKey("com.heyimnoob.NoopSpikestripContent"); SoftDependencies.SpikestripPlasmaCore = Chainloader.PluginInfos.ContainsKey("com.plasmacore.PlasmaCoreSpikestripContent"); SoftDependencies.MoreStatsLoaded = Chainloader.PluginInfos.ContainsKey("com.RiskOfBrainrot.MoreStats"); SoftDependencies.RiskyMithrixLoaded = Chainloader.PluginInfos.ContainsKey("com.RiskyLives.RiskyMithrix"); SoftDependencies.RiskySkillsLoaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.RiskySkills"); SoftDependencies.AdditiveExecutesLoaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.AdditiveExecutes"); SoftDependencies.BlightReturnsLoaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.BlightReturnsRework"); } private void CheckDependencies() { if (SoftDependencies.KingKombatArenaLoaded) { Stage.onStageStartGlobal += CheckArenaLoaded; } if (BlightReturns.enabled && SoftDependencies.BlightReturnsLoaded) { Debug.Log((object)"RiskyMod: Disabling BlightReturns because standalone plugin is loaded."); BlightReturns.enabled = false; } if (SoftDependencies.ZetTweaksLoaded) { ZetTweaksCompat(); } if (SoftDependencies.QueensGlandBuffLoaded && QueensGland.enabled) { Debug.Log((object)"RiskyMod: Disabling Queens Gland changes because QueensGlandBuff is loaded."); } bool flag = Chainloader.PluginInfos.ContainsKey("com.Moffein.NoVoidAllies"); if (flag && VoidInfestor.noVoidAllies) { Debug.Log((object)"RiskyMod: Disabling NoVoidAllies because standalone plugin is loaded."); } VoidInfestor.noVoidAllies = VoidInfestor.noVoidAllies && !flag; bool flag2 = Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.Hypercrit"); if (flag2 && CritHud.enabled) { Debug.Log((object)"RiskyMod: Disabling Ocular HUD changes because Hypercrit is loaded."); } CritHud.enabled = CritHud.enabled && !flag2; bool flag3 = Chainloader.PluginInfos.ContainsKey("com.Moffein.BackstabRework"); if (flag3 && BackstabRework.enabled) { Debug.Log((object)"RiskyMod: Disabling Bandit2 BackstabRework because standalone plugin is loaded."); } BackstabRework.enabled = BackstabRework.enabled && !flag3; if (SoftDependencies.ShareSuiteLoaded) { HandleShareSuite(); } bool flag4 = Chainloader.PluginInfos.ContainsKey("com.Moffein.InteractableLimit"); if (flag4 && SpawnLimits.enabled) { Debug.Log((object)"RiskyMod: Disabling Interactable SpawnLimits changes because InteractableLimit is loaded."); } SpawnLimits.enabled = SpawnLimits.enabled && !flag4; bool flag5 = Chainloader.PluginInfos.ContainsKey("com.Moffein.TeleExpansion"); if (flag5 && TeleExpandOnBossKill.enabled) { Debug.Log((object)"RiskyMod: Disabling TeleExpandOnBossKill because TeleExpansion is loaded."); } TeleExpandOnBossKill.enabled = TeleExpandOnBossKill.enabled && !flag5; if (flag5 && global::RiskyMod.VoidLocus.LargerHoldout.enabled) { Debug.Log((object)"RiskyMod: Disabling VoidLocus.ModifyHoldout because TeleExpansion is loaded."); } global::RiskyMod.VoidLocus.LargerHoldout.enabled = global::RiskyMod.VoidLocus.LargerHoldout.enabled && !flag5; if (flag5 && LargerHoldouts.enabled) { Debug.Log((object)"RiskyMod: Disabling Moon.ModifyHoldout because TeleExpansion is loaded."); } LargerHoldouts.enabled = LargerHoldouts.enabled && !flag5; Sacrifice.enabled = Sacrifice.enabled && !Chainloader.PluginInfos.ContainsKey("com.Moffein.SacrificeTweaks"); bool flag6 = Chainloader.PluginInfos.ContainsKey("com.score.DirectorReworkPlus"); if (flag6) { Debug.Log((object)"RiskyMod: Disabling CombatDirectorMultiplier because DirectorReworkPlus is loaded."); } CombatDirectorMultiplier.enabled = CombatDirectorMultiplier.enabled && !flag6; bool flag7 = Chainloader.PluginInfos.ContainsKey("Wolfo.DLCSpawnPoolFixer"); if (flag7) { Debug.Log((object)"RiskyMod: Disabling DLC Enemy Replacement fix because DLCSpawnPoolFixer is loaded."); } EnemiesCore.spawnpoolDLCReplacementFix = EnemiesCore.spawnpoolDLCReplacementFix && !flag7; bool flag8 = Chainloader.PluginInfos.ContainsKey("com.Moffein.TrueOSP"); if (flag8) { Debug.Log((object)"RiskyMod: Disabling True OSP because standalone plugin is loaded."); } TrueOSP.enabled = TrueOSP.enabled && !flag8; bool flag9 = Chainloader.PluginInfos.ContainsKey("com.Moffein.ArtificerPrimaryRework"); if (flag9) { Debug.Log((object)"RiskyMod: Disabling Artificer Primary changes because ArtificerPrimaryRework is loaded."); } MageCore.modifyFireBolt = MageCore.modifyFireBolt && !flag9; MageCore.modifyPlasmaBolt = MageCore.modifyPlasmaBolt && !flag9; PrimaryRework.enabled = MageCore.modifyFireBolt || MageCore.modifyPlasmaBolt; TeleExpandOnBossKill.enableDuringEclipse = TeleExpandOnBossKill.enableDuringEclipse || SoftDependencies.EclipseRevamped_CheckEclipse2Config(); if (Chainloader.PluginInfos.ContainsKey("com.Moffein.DebloatedSeeker")) { Debug.Log((object)"RiskyMod: Disabling Seeker changes because DebloatedSeeker is loaded."); SeekerCore.enabled = false; } if (SoftDependencies.RiskyMithrixLoaded) { Debug.Log((object)"RiskyMod: Disabling Mithrix changes because RiskyMithrix is loaded."); MithrixCore.enabled = false; MithrixDebuffResist.enabled = false; MithrixFreezeImmune.enabled = false; MithrixHealthBuff.enabled = false; MithrixTargetPrioritization.enabled = false; } if (SoftDependencies.RiskySkillsLoaded) { Debug.Log((object)"RiskyMod: Disabling new skills because RiskyMithrix is loaded."); if (!CommandoCore.replacePhaseRound) { CommandoCore.skillLightningRound = false; } if (!CommandoCore.replaceSuppressive) { CommandoCore.skillShrapnelBarrage = false; } } if (SoftDependencies.MithrixWankLoaded) { Debug.Log((object)"RiskyMod: Disabling Stage 5 Lunar Golems because MithrixWank is loaded."); LunarGolemSkyMeadow.enabled = false; } } private void CheckArenaLoaded(Stage obj) { if (SoftDependencies.KingKombatArenaLoaded) { SetArena(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void SetArena() { SoftDependencies.KingKombatArenaActive = KingKombatArenaMainPlugin.s_GAME_MODE_ACTIVE; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ZetTweaksCompat() { if (SoftDependencies.ZetTweaksLoaded && MegaDrone.allowRepair) { Debug.LogWarning((object)"RiskyMod: MegaDrone.allowRepair is enabled while ZetTweaks is loaded. Disable this feature in the config of ZetTweaks or RiskyMod, or else you will see duplicated MegaDrone corpses."); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void HandleAIBlacklist() { SoftDependencies.AIBlacklistUseVanillaBlacklist = AIBlacklist.useVanillaAIBlacklist; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void HandleShareSuite() { SoftDependencies.ShareSuiteCommon = ShareSuite.WhiteItemsShared.Value; SoftDependencies.ShareSuiteUncommon = ShareSuite.GreenItemsShared.Value; SoftDependencies.ShareSuiteLegendary = ShareSuite.RedItemsShared.Value; SoftDependencies.ShareSuiteBoss = ShareSuite.BossItemsShared.Value; SoftDependencies.ShareSuiteLunar = ShareSuite.LunarItemsShared.Value; SoftDependencies.ShareSuiteVoid = ShareSuite.VoidItemsShared.Value; } private void RunTweaks() { new ModdedScaling(); new MonsterGoldRewards(); new CombatDirectorMultiplier(); new LoopTeleMountainShrine(); new TeleExpandOnBossKill(); new TeleChargeDuration(); new LargeLobbyScaling(); new SpawnLimits(); new TrueOSP(); new ShieldGating(); new FreezeChampionExecute(); new PlayerControlledMonsters(); new NullifyDebuff(); new Sacrifice(); new AIBlacklistItems(); new BetterProjectileTracking(); } private void RunFixes() { new FixCrocoPoisonAchievement(); } private void AddHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(GetStatCoefficients.RecalculateStatsAPI_GetStatCoefficients); CharacterBody.RecalculateStats += new hook_RecalculateStats(RecalculateStats.CharacterBody_RecalculateStats); HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(TakeDamage.HealthComponent_TakeDamage); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(OnCharacterDeath.GlobalEventManager_OnCharacterDeath); GlobalEventManager.OnHitAllProcess += new hook_OnHitAllProcess(OnHitAll.GlobalEventManager_OnHitAll); HealthComponent.UpdateLastHitTime += new hook_UpdateLastHitTime(HealthComponent_UpdateLastHitTime.UpdateLastHitTime); TakeDamage.OnDamageTakenAttackerActions = (TakeDamage.OnDamageTakenAttacker)Delegate.Combine(TakeDamage.OnDamageTakenAttackerActions, new TakeDamage.OnDamageTakenAttacker(TakeDamage.DistractOnHit)); Language.GetLocalizedStringByToken += new hook_GetLocalizedStringByToken(LanguageModifiers.Language_GetLocalizedStringByToken); } } public class SharedDamageTypes { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__16_2; public static Func <>9__16_1; public static Manipulator <>9__16_0; internal void b__16_0(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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.75f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float damagePenalty, BlastAttack self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(self, SweetSpotModifier)) { damagePenalty *= 2f / 3f; } return damagePenalty; }); } else { Debug.LogError((object)"RiskyMod: SweetSpotModifier DamateType IL Hook failed."); } } internal bool b__16_2(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.75f); } internal float b__16_1(float damagePenalty, BlastAttack self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(self, SweetSpotModifier)) { damagePenalty *= 2f / 3f; } return damagePenalty; } } public static ModdedDamageType ResistedByAllies; public static ModdedDamageType Ignite50Chance; public static ModdedDamageType ProjectileRainForce; public static ModdedDamageType AntiFlyingForce; public static ModdedDamageType SawBarrier; public static ModdedDamageType InterruptOnHit; public static ModdedDamageType Slow50For5s; public static ModdedDamageType CrocoBlightStack; public static ModdedDamageType CrocoBlight6s; public static ModdedDamageType CrocoPoison6s; public static ModdedDamageType CaptainTaserSource; public static ModdedDamageType AlwaysIgnite; public static ModdedDamageType SweetSpotModifier; public static ModdedDamageType DontTriggerBands; public static GameObject medkitEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Medkit/MedkitHealEffect.prefab").WaitForCompletion(); public SharedDamageTypes() { //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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown ResistedByAllies = DamageAPI.ReserveDamageType(); SweetSpotModifier = DamageAPI.ReserveDamageType(); InterruptOnHit = DamageAPI.ReserveDamageType(); ProjectileRainForce = DamageAPI.ReserveDamageType(); AntiFlyingForce = DamageAPI.ReserveDamageType(); CrocoBlightStack = DamageAPI.ReserveDamageType(); CrocoBlight6s = DamageAPI.ReserveDamageType(); CrocoPoison6s = DamageAPI.ReserveDamageType(); AlwaysIgnite = DamageAPI.ReserveDamageType(); Slow50For5s = DamageAPI.ReserveDamageType(); CaptainTaserSource = DamageAPI.ReserveDamageType(); DontTriggerBands = DamageAPI.ReserveDamageType(); SawBarrier = DamageAPI.ReserveDamageType(); TakeDamage.ModifyInitialDamageActions = (TakeDamage.ModifyInitialDamage)Delegate.Combine(TakeDamage.ModifyInitialDamageActions, new TakeDamage.ModifyInitialDamage(ApplyProjectileRainForce)); TakeDamage.ModifyInitialDamageActions = (TakeDamage.ModifyInitialDamage)Delegate.Combine(TakeDamage.ModifyInitialDamageActions, new TakeDamage.ModifyInitialDamage(ApplyAntiFlyingForce)); TakeDamage.ModifyInitialDamageActions = (TakeDamage.ModifyInitialDamage)Delegate.Combine(TakeDamage.ModifyInitialDamageActions, new TakeDamage.ModifyInitialDamage(DisableBandProc)); ProcessHitEnemy.OnHitActions = (OnHit)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitActions, (Delegate?)new OnHit(ApplyInterruptOnHit)); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(ApplyCrocoBlight)); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(ApplyCrocoPoison)); ProcessHitEnemy.OnHitActions = (OnHit)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitActions, (Delegate?)new OnHit(ApplySlow50For5s)); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(ApplySawBarrierOnHit)); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(ApplyCaptainTaserSource)); TakeDamage.OnDamageTakenAttackerActions = (TakeDamage.OnDamageTakenAttacker)Delegate.Combine(TakeDamage.OnDamageTakenAttackerActions, new TakeDamage.OnDamageTakenAttacker(ApplyAlwaysIgnite)); SetupSweetSpotModifier(); } private void SetupSweetSpotModifier() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__16_0; 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 //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.75f) })) { val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)delegate(float damagePenalty, BlastAttack self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(self, SweetSpotModifier)) { damagePenalty *= 2f / 3f; } return damagePenalty; }); } else { Debug.LogError((object)"RiskyMod: SweetSpotModifier DamateType IL Hook failed."); } }; <>c.<>9__16_0 = val; obj = (object)val; } BlastAttack.HandleHits += (Manipulator)obj; } private static void ApplySawBarrierOnHit(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, SawBarrier) && Object.op_Implicit((Object)(object)attackerBody.healthComponent)) { attackerBody.healthComponent.AddBarrier(attackerBody.healthComponent.fullCombinedHealth * 0.003f); } } private static void DisableBandProc(DamageInfo damageInfo, HealthComponent self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, DontTriggerBands)) { ((ProcChainMask)(ref damageInfo.procChainMask)).AddProc((ProcType)12); } } private static void ApplyAlwaysIgnite(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, AlwaysIgnite)) { float num = 0.5f; InflictDotInfo val = default(InflictDotInfo); val.attackerObject = damageInfo.attacker; val.victimObject = ((Component)self).gameObject; val.totalDamage = damageInfo.damage * num; val.damageMultiplier = 1f; val.dotIndex = (DotIndex)1; val.maxStacksFromAttacker = null; InflictDotInfo val2 = val; if (Object.op_Implicit((Object)(object)attackerBody.inventory)) { StrengthenBurnUtils.CheckDotForUpgrade(attackerBody.inventory, ref val2); } DotController.InflictDot(ref val2); } } private static void ApplyProjectileRainForce(DamageInfo damageInfo, HealthComponent self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_00bc: 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_00c2: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) if (!DamageAPI.HasModdedDamageType(damageInfo, ProjectileRainForce) || !Object.op_Implicit((Object)(object)damageInfo.inflictor) || !Object.op_Implicit((Object)(object)damageInfo.inflictor.transform)) { return; } Vector3 val = -damageInfo.inflictor.transform.up; CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)body) && body.bodyIndex != BodyPrefabs.SolusHeartBody.bodyIndex) { Rigidbody rigidbody = body.rigidbody; if (Object.op_Implicit((Object)(object)rigidbody)) { val *= Mathf.Max(rigidbody.mass / 100f, 1f); } } damageInfo.force = 330f * val; } private static void ApplyInterruptOnHit(DamageInfo damageInfo, CharacterBody victimBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, InterruptOnHit)) { SetStateOnHurt component = ((Component)victimBody.healthComponent).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetStun(-1f); } } } private static void ApplyCrocoBlight(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0002: 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_0086: Unknown result type (might be due to invalid IL or missing references) if (!DamageAPI.HasModdedDamageType(damageInfo, CrocoBlight6s)) { return; } float num = 6f; int num2 = 1; if (DamageAPI.HasModdedDamageType(damageInfo, CrocoBlightStack)) { num2 = Mathf.CeilToInt(damageInfo.damage); } for (int i = 0; i < num2; i++) { DotController.InflictDot(((Component)victimBody).gameObject, damageInfo.attacker, damageInfo.inflictedHurtbox, (DotIndex)5, num, 1f, (uint?)null); if (i > 0 && Object.op_Implicit((Object)(object)GlobalContagionTracker.instance)) { GlobalContagionTracker.instance.Add(attackerBody, victimBody, CrocoBlight6s, num); } } } private static void ApplyCrocoPoison(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, CrocoPoison6s)) { DotController.InflictDot(((Component)victimBody).gameObject, damageInfo.attacker, damageInfo.inflictedHurtbox, (DotIndex)4, 6f, 1f, (uint?)null); } } private static void ApplyAntiFlyingForce(DamageInfo damageInfo, HealthComponent self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) if (!DamageAPI.HasModdedDamageType(damageInfo, AntiFlyingForce)) { return; } Vector3 down = Vector3.down; CharacterBody body = self.body; if (!Object.op_Implicit((Object)(object)body) || !body.isFlying || body.bodyIndex == BodyPrefabs.SolusHeartBody.bodyIndex) { return; } Rigidbody rigidbody = body.rigidbody; if (Object.op_Implicit((Object)(object)rigidbody)) { if (damageInfo.force.y > 0f) { damageInfo.force.y = 0f; } down *= Mathf.Min(4f, Mathf.Max(rigidbody.mass / 100f, 1f)); damageInfo.force += 1600f * down; } } private static void ApplySlow50For5s(DamageInfo damageInfo, CharacterBody victimBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, Slow50For5s)) { victimBody.AddTimedBuff(Buffs.Slow50, 5f); } } private static void ApplyCaptainTaserSource(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0050: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e8: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) if (!DamageAPI.HasModdedDamageType(damageInfo, CaptainTaserSource)) { return; } List list = new List(); list.Add(victimBody.healthComponent); int num = 2; float range = 15f; for (int i = 0; i < num; i++) { LightningOrb val = new LightningOrb { bouncedObjects = list, attacker = damageInfo.attacker, inflictor = damageInfo.attacker, damageValue = damageInfo.damage, procCoefficient = 1f, teamIndex = attackerBody.teamComponent.teamIndex, isCrit = damageInfo.crit, procChainMask = damageInfo.procChainMask, lightningType = (LightningType)0, damageColorIndex = (DamageColorIndex)0, bouncesRemaining = 2, targetsToFindPerBounce = 1, range = range, origin = damageInfo.position, damageType = DamageTypeCombo.op_Implicit((DamageType)16777216), speed = 120f }; HurtBox val2 = val.PickNextTarget(victimBody.corePosition); if (Object.op_Implicit((Object)(object)val2)) { ((Orb)val).target = val2; OrbManager.instance.AddOrb((Orb)(object)val); val.bouncedObjects.Add(val2.healthComponent); } } } } public class SoftDependencies { public static bool BlightReturnsLoaded = false; public static bool AdditiveExecutesLoaded = false; public static bool RiskySkillsLoaded = false; public static bool LinearDamageLoaded = false; public static bool RiskOfOptionsLoaded = false; public static bool ScepterPluginLoaded = false; public static bool AIBlacklistLoaded = false; public static bool AIBlacklistUseVanillaBlacklist = true; public static bool ZetTweaksLoaded = false; public static bool RtAutoSprintLoaded = false; public static bool QueensGlandBuffLoaded = false; public static bool ShareSuiteLoaded = false; public static bool ShareSuiteCommon = false; public static bool ShareSuiteUncommon = false; public static bool ShareSuiteLegendary = false; public static bool ShareSuiteBoss = false; public static bool ShareSuiteLunar = false; public static bool ShareSuiteVoid = false; public static bool SpikestripGrooveSalad = false; public static bool SpikestripHeyImNoob = false; public static bool SpikestripPlasmaCore = false; public static bool InfernoPluginLoaded = false; public static bool KingKombatArenaLoaded = false; public static bool KingKombatArenaActive = false; public static bool ArtifactOfPotentialLoaded = false; public static bool TeleporterTurretsLoaded = false; public static bool SS2OLoaded = false; public static bool MoreStatsLoaded = false; public static bool EclipseRevampedLoaded = false; public static bool RiskyMithrixLoaded = false; public static bool MithrixWankLoaded = false; public static void LinearDamage_DisableWatch() { if (LinearDamageLoaded) { LinearDamage_DisableWatchInternal(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void LinearDamage_DisableWatchInternal() { if (TweakBase.Instance != null && ((TweakBase)TweakBase.Instance).Enabled.Value) { ((TweakBase)TweakBase.Instance).RemoveChanges(); } } public static bool IsPotentialArtifactActive() { bool result = false; if (ArtifactOfPotentialLoaded) { result = IsPotentialArtifactActiveInternal(); } return result; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool IsPotentialArtifactActiveInternal() { return Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(PotentialArtifact.Potential); } internal static bool EclipseRevamped_CheckEclipse2Config() { if (EclipseRevampedLoaded) { return EclipseRevamped_CheckEclipse2ConfigInternal(); } return false; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool EclipseRevamped_CheckEclipse2ConfigInternal() { return Main.shouldChangeE2.Value; } } } namespace RiskyMod.VoidLocus { public class LargerHoldout { public static bool enabled = true; public LargerHoldout() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC1/DeepVoidPortalBattery/DeepVoidPortalBattery.prefab").WaitForCompletion(); HoldoutZoneController component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.baseRadius = 30f; } } } } public class RemoveFog { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_RequestFog <>9__1_0; internal FogRequest <.ctor>b__1_0(orig_RequestFog orig, VoidStageMissionController self, IZone zone) { return null; } } public static bool enabled = true; public RemoveFog() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_RequestFog val = (orig_RequestFog orig, VoidStageMissionController self, IZone zone) => null; <>c.<>9__1_0 = val; obj = (object)val; } VoidStageMissionController.RequestFog += (hook_RequestFog)obj; } } public class VoidLocusCore { public static bool enabled = true; public VoidLocusCore() { if (enabled) { new RemoveFog(); new LargerHoldout(); } } } } namespace RiskyMod.VoidFields { public class LargerHoldout { public static bool enabled = true; public LargerHoldout() { if (enabled) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/NullSafeWard/EntityStates.Missions.Arena.NullWard.NullWardBaseState.asset", "wardRadiusOn", "30"); } } } public class ReduceHoldoutCount { public static bool enabled = true; public ReduceHoldoutCount() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown if (enabled) { ArenaMissionController.Awake += new hook_Awake(SetRoundsAndOverrideRewards); ArenaMissionController.BeginRound += new hook_BeginRound(AugmentBeginRound); ArenaMissionController.AddMonsterType += new hook_AddMonsterType(PreventOnRound5); } } private void PreventOnRound5(orig_AddMonsterType orig, ArenaMissionController self) { if (self.currentRound != 5) { orig.Invoke(self); } } private void AugmentBeginRound(orig_BeginRound orig, ArenaMissionController self) { if (NetworkServer.active) { switch (self.currentRound) { case 0: self.AddItemStack(); break; case 1: self.AddMonsterType(); break; case 2: self.AddItemStack(); break; case 3: self.AddMonsterType(); break; case 4: self.AddItemStack(); break; } } orig.Invoke(self); } private void SetRoundsAndOverrideRewards(orig_Awake orig, ArenaMissionController self) { orig.Invoke(self); self.totalRoundsMax = 5; for (int i = 0; i < 5 && i < self.playerRewardOrder.Length; i++) { switch (i) { case 0: self.playerRewardOrder[i] = RiskyMod.tier1Drops; break; case 1: self.playerRewardOrder[i] = RiskyMod.tier1Drops; break; case 2: self.playerRewardOrder[i] = RiskyMod.tier2Drops; break; case 3: self.playerRewardOrder[i] = RiskyMod.tier2Drops; break; case 4: self.playerRewardOrder[i] = RiskyMod.tier3Drops; break; } } } } public class VoidFieldsCore { public static bool enabled = true; public VoidFieldsCore() { if (enabled) { new LargerHoldout(); new ReduceHoldoutCount(); } } } } namespace RiskyMod.Tweaks { public class AIBlacklistItems { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__1_0; internal void <.ctor>b__1_0(orig_Init orig) { orig.Invoke(); if (SoftDependencies.AIBlacklistUseVanillaBlacklist) { global::SneedUtils.SneedUtils.AddItemTag(Items.Icicle, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.RoboBallBuddy, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.CaptainDefenseMatrix, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.Bear, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ShockNearby, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.NovaOnHeal, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ImmuneToDebuff, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.DroneWeapons, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.FreeChest, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.RegeneratingScrap, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.PrimarySkillShuriken, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.BearVoid, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ExtraShrineItem, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ExtraStatsOnLevelUp, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.BarrageOnBoss, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.IncreasePrimaryDamage, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.LowerPricedChests, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.OnLevelUpFreeUnlock, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ItemDropChanceOnKill, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.TeleportOnLowHealth, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.DelayedDamage, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ShieldBooster, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.SharedSuffering, (ItemTag)4); } } } public static bool enabled = true; public AIBlacklistItems() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); if (SoftDependencies.AIBlacklistUseVanillaBlacklist) { global::SneedUtils.SneedUtils.AddItemTag(Items.Icicle, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.RoboBallBuddy, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.CaptainDefenseMatrix, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.Bear, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ShockNearby, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.NovaOnHeal, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ImmuneToDebuff, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.DroneWeapons, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.FreeChest, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.RegeneratingScrap, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.PrimarySkillShuriken, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.BearVoid, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ExtraShrineItem, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ExtraStatsOnLevelUp, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.BarrageOnBoss, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.IncreasePrimaryDamage, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.LowerPricedChests, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.OnLevelUpFreeUnlock, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ItemDropChanceOnKill, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.TeleportOnLowHealth, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.DelayedDamage, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.ShieldBooster, (ItemTag)4); global::SneedUtils.SneedUtils.AddItemTag(Items.SharedSuffering, (ItemTag)4); } }; <>c.<>9__1_0 = val; obj = (object)val; } ItemCatalog.Init += (hook_Init)obj; } } public class SpawnLimits { public static bool enabled = true; public static int maxVoidSeeds = 1; public SpawnLimits() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (enabled && maxVoidSeeds != 3) { Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidCamp/iscVoidCamp.asset").WaitForCompletion().maxSpawnsPerStage = maxVoidSeeds; } } } } namespace RiskyMod.Tweaks.RunScaling { public class CombatDirectorMultiplier { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Awake <>9__3_0; internal void <.ctor>b__3_0(orig_Awake orig, CombatDirector self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.gameModeIndex != RiskyMod.simulacrumIndex) { self.creditMultiplier *= directorCreditMultiplier; } orig.Invoke(self); } } public static bool enabled = true; public static float directorCreditMultiplier = 1.2f; public static float scaledGoldRatio = 1f; public CombatDirectorMultiplier() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown if (!enabled) { return; } scaledGoldRatio = 1f / directorCreditMultiplier; object obj = <>c.<>9__3_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, CombatDirector self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.gameModeIndex != RiskyMod.simulacrumIndex) { self.creditMultiplier *= directorCreditMultiplier; } orig.Invoke(self); }; <>c.<>9__3_0 = val; obj = (object)val; } CombatDirector.Awake += (hook_Awake)obj; } } public class LinearScaling { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_RecalculateDifficultyCoefficentInternal <>9__2_0; internal void <.ctor>b__2_0(orig_RecalculateDifficultyCoefficentInternal orig, Run self) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) int participatingPlayerCount = self.participatingPlayerCount; float num = self.GetRunStopwatch() * (1f / 60f); DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(self.selectedDifficulty); float num2 = 0.7f + (float)participatingPlayerCount * 0.3f; float num3 = Mathf.Pow((float)participatingPlayerCount, 0.15f); float num4 = num * (1f / 9f) * difficultyDef.scalingValue * num3; int stageClearCount = self.stageClearCount; int num5 = Mathf.FloorToInt((float)(stageClearCount / 5)); float num6 = 1f + 0.25f * (float)num5; float num7 = (num2 + num4) * num6; if (swapToExponential) { float num8 = num * 0.0506f * difficultyDef.scalingValue * num3; float num9 = (num2 + num8) * Mathf.Pow(1.15f, (float)stageClearCount); num7 = Mathf.Max(num7, num9); } self.compensatedDifficultyCoefficient = num7; self.difficultyCoefficient = num7; self.ambientLevel = Mathf.Min(3f * (num7 - num2) + 1f, 9999f); int ambientLevelFloor = self.ambientLevelFloor; self.ambientLevelFloor = Mathf.FloorToInt(self.ambientLevel); if (ambientLevelFloor != self.ambientLevelFloor && ambientLevelFloor != 0 && self.ambientLevelFloor > ambientLevelFloor) { self.OnAmbientLevelUp(); } } } public static bool enabled; public static bool swapToExponential; public LinearScaling() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__2_0; if (obj == null) { hook_RecalculateDifficultyCoefficentInternal val = delegate(orig_RecalculateDifficultyCoefficentInternal orig, Run self) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) int participatingPlayerCount = self.participatingPlayerCount; float num = self.GetRunStopwatch() * (1f / 60f); DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(self.selectedDifficulty); float num2 = 0.7f + (float)participatingPlayerCount * 0.3f; float num3 = Mathf.Pow((float)participatingPlayerCount, 0.15f); float num4 = num * (1f / 9f) * difficultyDef.scalingValue * num3; int stageClearCount = self.stageClearCount; int num5 = Mathf.FloorToInt((float)(stageClearCount / 5)); float num6 = 1f + 0.25f * (float)num5; float num7 = (num2 + num4) * num6; if (swapToExponential) { float num8 = num * 0.0506f * difficultyDef.scalingValue * num3; float num9 = (num2 + num8) * Mathf.Pow(1.15f, (float)stageClearCount); num7 = Mathf.Max(num7, num9); } self.compensatedDifficultyCoefficient = num7; self.difficultyCoefficient = num7; self.ambientLevel = Mathf.Min(3f * (num7 - num2) + 1f, 9999f); int ambientLevelFloor = self.ambientLevelFloor; self.ambientLevelFloor = Mathf.FloorToInt(self.ambientLevel); if (ambientLevelFloor != self.ambientLevelFloor && ambientLevelFloor != 0 && self.ambientLevelFloor > ambientLevelFloor) { self.OnAmbientLevelUp(); } }; <>c.<>9__2_0 = val; obj = (object)val; } Run.RecalculateDifficultyCoefficentInternal += (hook_RecalculateDifficultyCoefficentInternal)obj; } } public class LoopTeleMountainShrine { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_shrineBonusStacks") })) { val.EmitDelegate>((Func)((int orig) => orig + Mathf.FloorToInt((float)Run.instance.stageClearCount / 5f))); } else { Debug.LogError((object)"RiskyMod: LoopTeleMountainShrine IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_shrineBonusStacks"); } internal int <.ctor>b__1_1(int orig) { return orig + Mathf.FloorToInt((float)Run.instance.stageClearCount / 5f); } } public static bool enabled; public LoopTeleMountainShrine() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_shrineBonusStacks") })) { val2.EmitDelegate>((Func)((int orig) => orig + Mathf.FloorToInt((float)Run.instance.stageClearCount / 5f))); } else { Debug.LogError((object)"RiskyMod: LoopTeleMountainShrine IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } ChargingState.OnEnter += (Manipulator)obj; } } public class ModdedScaling { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.2f) })) { val.Next.Operand = 0.15f; } else { Debug.LogError((object)"RiskyMod: ModdedScaling IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.2f); } } public static bool enabled = true; public ModdedScaling() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (!enabled) { return; } if (LinearScaling.enabled) { new LinearScaling(); return; } object obj = <>c.<>9__1_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.2f) })) { val2.Next.Operand = 0.15f; } else { Debug.LogError((object)"RiskyMod: ModdedScaling IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } Run.RecalculateDifficultyCoefficentInternal += (Manipulator)obj; } } public class MonsterGoldRewards { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Start <>9__7_0; internal void <.ctor>b__7_0(orig_Start orig, CharacterBody self) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Run.instance.gameModeIndex == RiskyMod.simulacrumIndex) { return; } DeathRewards component = ((Component)self).GetComponent(); if (!Object.op_Implicit((Object)(object)component) || component.goldReward == 0) { return; } float num = ((scaleToInitialDifficulty && Object.op_Implicit((Object)(object)Stage.instance)) ? (Stage.instance.entryDifficultyCoefficient / Run.instance.difficultyCoefficient) : 1f); float num2 = ((scaleToDirectorMultiplier && (scaleToDirectorMultiplierStage1 || Run.instance.stageClearCount > 0)) ? CombatDirectorMultiplier.scaledGoldRatio : 1f); float num3 = (float)component.goldReward * num * num2; if (linearize) { float num4 = ((scaleToInitialDifficulty && Object.op_Implicit((Object)(object)Stage.instance)) ? Stage.instance.entryDifficultyCoefficient : Run.instance.difficultyCoefficient); num3 *= 1.2f * Mathf.Pow(num4, 0.25f) / (1f + inflationCoefficient * num4); } float num5 = Mathf.Floor(num3); if (num5 > 0f) { float num6 = num3 - num5; if (num6 > 0f) { goldBank += num6; } if (goldBank >= 1f) { goldBank -= 1f; num5 += 1f; } } int goldReward = (int)Mathf.Max(num5, 1f); component.goldReward = (uint)goldReward; } } public static bool enabled = true; public static bool scaleToInitialDifficulty = true; public static bool scaleToDirectorMultiplier = true; public static bool scaleToDirectorMultiplierStage1 = false; public static bool linearize = true; public static float inflationCoefficient = 0.2f; private static float goldBank = 0f; public MonsterGoldRewards() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (!enabled) { return; } Run.onRunStartGlobal += ClearGoldBank; object obj = <>c.<>9__7_0; if (obj == null) { hook_Start val = delegate(orig_Start orig, CharacterBody self) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Run.instance.gameModeIndex != RiskyMod.simulacrumIndex) { DeathRewards component = ((Component)self).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.goldReward != 0) { float num = ((scaleToInitialDifficulty && Object.op_Implicit((Object)(object)Stage.instance)) ? (Stage.instance.entryDifficultyCoefficient / Run.instance.difficultyCoefficient) : 1f); float num2 = ((scaleToDirectorMultiplier && (scaleToDirectorMultiplierStage1 || Run.instance.stageClearCount > 0)) ? CombatDirectorMultiplier.scaledGoldRatio : 1f); float num3 = (float)component.goldReward * num * num2; if (linearize) { float num4 = ((scaleToInitialDifficulty && Object.op_Implicit((Object)(object)Stage.instance)) ? Stage.instance.entryDifficultyCoefficient : Run.instance.difficultyCoefficient); num3 *= 1.2f * Mathf.Pow(num4, 0.25f) / (1f + inflationCoefficient * num4); } float num5 = Mathf.Floor(num3); if (num5 > 0f) { float num6 = num3 - num5; if (num6 > 0f) { goldBank += num6; } if (goldBank >= 1f) { goldBank -= 1f; num5 += 1f; } } int goldReward = (int)Mathf.Max(num5, 1f); component.goldReward = (uint)goldReward; } } }; <>c.<>9__7_0 = val; obj = (object)val; } CharacterBody.Start += (hook_Start)obj; } private void ClearGoldBank(Run obj) { goldBank = 0f; } } } namespace RiskyMod.Tweaks.Interactables { public class ExtraVoidSeedPerLoop { public static int maxExtraSeeds = 2; private static InteractableSpawnCard voidSeedCard = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidCamp/iscVoidCamp.asset").WaitForCompletion(); public ExtraVoidSeedPerLoop() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (maxExtraSeeds != 0) { SceneDirector.PopulateScene += new hook_PopulateScene(SceneDirector_PopulateScene); } } private void SceneDirector_PopulateScene(orig_PopulateScene orig, SceneDirector self) { voidSeedCard.maxSpawnsPerStage = (SpawnLimits.enabled ? SpawnLimits.maxVoidSeeds : 3); int num = 0; if (Object.op_Implicit((Object)(object)Run.instance)) { num = Run.instance.stageClearCount % 5; } if (maxExtraSeeds > 0) { num = Mathf.Min(num, maxExtraSeeds); } InteractableSpawnCard obj = voidSeedCard; obj.maxSpawnsPerStage += num; orig.Invoke(self); } } } namespace RiskyMod.Tweaks.Holdouts { public class LargeLobbyScaling { public static bool enabled = true; public static float increasePerPlayer = 0.1f; public static int maxIncreases = 8; public LargeLobbyScaling() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { HoldoutZoneController.DoUpdate += new Manipulator(HoldoutZoneController_DoUpdate); } } private void HoldoutZoneController_DoUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 3) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float radius, HoldoutZoneController self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Invalid comparison between Unknown and I4 if ((int)self.chargingTeam == 1) { int num = 0; foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (instance.isConnected && Object.op_Implicit((Object)(object)instance.master) && (int)instance.master.teamIndex == 1) { num++; } } if (num > 4) { radius *= 1f + (float)Mathf.Min(maxIncreases, num - 4) * increasePerPlayer; } } return radius; }); } else { Debug.LogError((object)"RiskyMod: LargeLobbyScaling IL hook failed."); } } } public class TeleChargeDuration { public static bool enabled; public TeleChargeDuration() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (enabled) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Teleporters/Teleporter1.prefab").WaitForCompletion(); HoldoutZoneController component = val.GetComponent(); component.baseChargeDuration = 120f; GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Teleporters/LunarTeleporter Variant.prefab").WaitForCompletion(); HoldoutZoneController component2 = val2.GetComponent(); component2.baseChargeDuration = 120f; } } } public class TeleExpandOnBossKill { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_UpdateMonstersClear <>9__2_0; internal void <.ctor>b__2_0(orig_UpdateMonstersClear orig, TeleporterInteraction self) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Invalid comparison between Unknown and I4 //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Invalid comparison between Unknown and I4 //IL_007d: 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) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && self.monstersCleared && Object.op_Implicit((Object)(object)self.holdoutZoneController) && (int)self.activationState == 2 && self.chargeFraction > 0.05f) { bool flag = Object.op_Implicit((Object)(object)Run.instance) && (int)Run.instance.selectedDifficulty >= 4; if ((enableDuringEclipse || !flag) && Util.GetItemCountForTeam(self.holdoutZoneController.chargingTeam, Items.FocusConvergence.itemIndex, true, true) <= 0) { self.holdoutZoneController.currentRadius = 1000000f; } } } } public static bool enabled = true; public static bool enableDuringEclipse = false; public TeleExpandOnBossKill() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__2_0; if (obj == null) { hook_UpdateMonstersClear val = delegate(orig_UpdateMonstersClear orig, TeleporterInteraction self) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Invalid comparison between Unknown and I4 //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Invalid comparison between Unknown and I4 //IL_007d: 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) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && self.monstersCleared && Object.op_Implicit((Object)(object)self.holdoutZoneController) && (int)self.activationState == 2 && self.chargeFraction > 0.05f) { bool flag = Object.op_Implicit((Object)(object)Run.instance) && (int)Run.instance.selectedDifficulty >= 4; if ((enableDuringEclipse || !flag) && Util.GetItemCountForTeam(self.holdoutZoneController.chargingTeam, Items.FocusConvergence.itemIndex, true, true) <= 0) { self.holdoutZoneController.currentRadius = 1000000f; } } }; <>c.<>9__2_0 = val; obj = (object)val; } TeleporterInteraction.UpdateMonstersClear += (hook_UpdateMonstersClear)obj; } } } namespace RiskyMod.Tweaks.CharacterMechanics { public class BetterProjectileTracking { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RefreshCandidates") })) { val.EmitDelegate>((Func)delegate(BullseyeSearch search) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) search.sortMode = (SortMode)2; return search; }); } else { Debug.LogError((object)"RiskyMod: BetterProjectileTracking IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RefreshCandidates"); } internal BullseyeSearch <.ctor>b__1_1(BullseyeSearch search) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) search.sortMode = (SortMode)2; return search; } } public static bool enabled = true; public BetterProjectileTracking() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RefreshCandidates") })) { val2.EmitDelegate>((Func)delegate(BullseyeSearch search) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) search.sortMode = (SortMode)2; return search; }); } else { Debug.LogError((object)"RiskyMod: BetterProjectileTracking IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } ProjectileDirectionalTargetFinder.SearchForTarget += (Manipulator)obj; } } public class FreezeChampionExecute { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__5_2; public static Func <>9__5_1; public static Manipulator <>9__5_0; public static Func <>9__8_5; public static Func <>9__8_2; public static Func <>9__8_6; public static Func <>9__8_7; public static Func <>9__8_10; public static Func <>9__8_8; public static Func <>9__8_11; public static hook_OnEnter <>9__9_0; public static hook_OnExit <>9__9_1; public static Func <>9__10_1; public static Func <>9__10_2; public static Func <>9__10_0; public static Func <>9__11_1; public static Func <>9__11_2; public static Func <>9__11_3; public static Func <>9__11_0; internal void b__5_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Slow80") })) { val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((bool hasBuff, CharacterModel self) => hasBuff || self.body.HasBuff(FreezeDebuff))); } else { Debug.LogError((object)"RiskyMod: FreezeChampionExecute UpdateOverlays IL Hook failed"); } } internal bool b__5_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Slow80"); } internal bool b__5_1(bool hasBuff, CharacterModel self) { return hasBuff || self.body.HasBuff(FreezeDebuff); } internal bool b__8_5(Instruction x) { return ILPatternMatchingExt.MatchCall(x, "get_isInFrozenState"); } internal bool b__8_2(bool isFrozen, HealthComponent self) { return isFrozen || (self.body.HasBuff(FreezeDebuff) && !AlliesCore.IsDrone(self)); } internal bool b__8_6(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.3f); } internal bool b__8_7(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.3f); } internal bool b__8_10(Instruction x) { return ILPatternMatchingExt.MatchCall(x, "get_isInFrozenState"); } internal bool b__8_8(bool isFrozen, HealthComponent self) { return isFrozen || self.body.HasBuff(FreezeDebuff); } internal bool b__8_11(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.3f); } internal void b__9_0(orig_OnEnter orig, FrozenState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddBuff(FreezeDebuff); } } internal void b__9_1(orig_OnExit orig, FrozenState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.HasBuff(FreezeDebuff)) { ((EntityState)self).characterBody.RemoveBuff(FreezeDebuff); } } internal bool b__10_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Frost"); } internal bool b__10_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "FreezeImmune"); } internal BuffDef b__10_0(BuffDef buff, CharacterBody body) { bool flag = !body.HasBuff(Buffs.FreezeImmune); bool flag2 = !Object.op_Implicit((Object)(object)body.healthComponent) || !body.healthComponent.isInFrozenState; if (flag && flag2) { body.AddTimedBuff(FreezeDebuff, 2f); } return buff; } internal bool b__11_1(Instruction x) { return ILPatternMatchingExt.MatchCall(x, "IsChefFrostDamage"); } internal bool b__11_2(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 1); } internal bool b__11_3(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 1); } internal CharacterBody b__11_0(CharacterBody body) { bool flag = body.HasBuff(Buffs.Oiled); bool flag2 = !body.HasBuff(Buffs.FreezeImmune); bool flag3 = !Object.op_Implicit((Object)(object)body.healthComponent) || !body.healthComponent.isInFrozenState; if (flag && flag2 && flag3) { body.AddTimedBuff(FreezeDebuff, 2f); } return body; } } public static bool enabled = true; public static BuffDef FreezeDebuff; public static float bossExecuteFractionMultiplier = 1f / 3f; public static bool nerfFreeze = false; public FreezeChampionExecute() { if (enabled) { BuildDebuff(); ModifyExecuteThreshold(); ApplyFreezeDebuff(); } } private void BuildDebuff() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown FreezeDebuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_FreezeDebuff", canStack: false, isCooldown: false, isDebuff: true, Color.white, Assets.BuffIcons.Freeze, blacklistFromNoxiousThorn: true); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ApplySlow); object obj = <>c.<>9__5_0; 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 //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Slow80") })) { val2.Index += 2; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)((bool hasBuff, CharacterModel self) => hasBuff || self.body.HasBuff(FreezeDebuff))); } else { Debug.LogError((object)"RiskyMod: FreezeChampionExecute UpdateOverlays IL Hook failed"); } }; <>c.<>9__5_0 = val; obj = (object)val; } CharacterModel.UpdateOverlays += (Manipulator)obj; } private static void ApplySlow(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(FreezeDebuff)) { args.moveSpeedReductionMultAdd += 0.8f; } } private float GetExecuteThreshold(float executeTreshold, HealthComponent self) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) float num = 1f; if (self.body.isPlayerControlled) { num = 0f; } else if (self.body.isChampion || self.body.bodyIndex == BodyPrefabs.ExhaustPortWeakpointBody.bodyIndex || nerfFreeze) { num = bossExecuteFractionMultiplier; } return executeTreshold * num; } private void ModifyExecuteThreshold() { //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 HealthComponent.TakeDamageProcess += (Manipulator)delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: 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_00fd: Unknown result type (might be due to invalid IL or missing references) bool flag2 = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "get_isInFrozenState") })) { val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)((bool isFrozen, HealthComponent self) => isFrozen || (self.body.HasBuff(FreezeDebuff) && !AlliesCore.IsDrone(self)))); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f) })) { val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)((float executeThreshold, HealthComponent self) => GetExecuteThreshold(executeThreshold, self))); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f) })) { val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)((float executeThreshold, HealthComponent self) => GetExecuteThreshold(executeThreshold, self))); flag2 = false; } } } if (flag2) { Debug.LogError((object)"RiskyMod: FreezeChampionExecute TakeDamage IL Hook failed"); } }; HealthComponent.GetHealthBarValues += (Manipulator)delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: 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) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "get_isInFrozenState") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((bool isFrozen, HealthComponent self) => isFrozen || self.body.HasBuff(FreezeDebuff))); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((float executeThreshold, HealthComponent self) => GetExecuteThreshold(executeThreshold, self))); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: FreezeChampionExecute GetHealthBarValues IL Hook failed"); } }; } private void ApplyFreezeDebuff() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown object obj = <>c.<>9__9_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, FrozenState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddBuff(FreezeDebuff); } }; <>c.<>9__9_0 = val; obj = (object)val; } FrozenState.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__9_1; if (obj2 == null) { hook_OnExit val2 = delegate(orig_OnExit orig, FrozenState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.HasBuff(FreezeDebuff)) { ((EntityState)self).characterBody.RemoveBuff(FreezeDebuff); } }; <>c.<>9__9_1 = val2; obj2 = (object)val2; } FrozenState.OnExit += (hook_OnExit)obj2; TakeDamage.OnDamageTakenActions = (TakeDamage.OnDamageTaken)Delegate.Combine(TakeDamage.OnDamageTakenActions, new TakeDamage.OnDamageTaken(ApplyDebuff)); GlobalEventManager.ProcessHitEnemy += new Manipulator(GlobalEventManager_ProcessHitEnemy); CharacterBody.HandleCascadingBuffs += new Manipulator(CharacterBody_HandleCascadingBuffs); } private void CharacterBody_HandleCascadingBuffs(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Frost") }) || !val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "FreezeImmune") })) { return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(BuffDef buff, CharacterBody body) { bool flag = !body.HasBuff(Buffs.FreezeImmune); bool flag2 = !Object.op_Implicit((Object)(object)body.healthComponent) || !body.healthComponent.isInFrozenState; if (flag && flag2) { body.AddTimedBuff(FreezeDebuff, 2f); } return buff; }); } private void GlobalEventManager_ProcessHitEnemy(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "IsChefFrostDamage") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 1) }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 1) })) { val.EmitDelegate>((Func)delegate(CharacterBody body) { bool flag = body.HasBuff(Buffs.Oiled); bool flag2 = !body.HasBuff(Buffs.FreezeImmune); bool flag3 = !Object.op_Implicit((Object)(object)body.healthComponent) || !body.healthComponent.isInFrozenState; if (flag && flag2 && flag3) { body.AddTimedBuff(FreezeDebuff, 2f); } return body; }); } else { Debug.LogError((object)"RiskyMod: FreezeChampionExecute ProcessHitEnemy IL hook failed."); } } private static void ApplyDebuff(DamageInfo damageInfo, HealthComponent self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 //IL_0032: Unknown result type (might be due to invalid IL or missing references) if ((int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)256)) == 256) { self.body.AddTimedBuff(FreezeDebuff.buffIndex, 2f * damageInfo.procCoefficient); } } } public class NullifyDebuff { public static bool enabled = true; public NullifyDebuff() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { CharacterBody.AddTimedBuff_BuffDef_float += new hook_AddTimedBuff_BuffDef_float(CharacterBody_AddTimedBuff_BuffDef_float); } } private void CharacterBody_AddTimedBuff_BuffDef_float(orig_AddTimedBuff_BuffDef_float orig, CharacterBody self, BuffDef buffDef, float duration) { orig.Invoke(self, buffDef, duration); if (NetworkServer.active && (Object)(object)buffDef == (Object)(object)Buffs.NullifyStack && !self.HasBuff(Buffs.Nullified)) { int buffCount = self.GetBuffCount(buffDef); if (buffCount >= 2) { self.ClearTimedBuffs(buffDef); self.AddTimedBuff(Buffs.Nullified, 3f); } } } } public class PlayerControlledMonsters { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_SetStunInternal <>9__1_0; public static hook_SetShockInternal <>9__1_1; public static hook_SetPainInternal <>9__1_2; internal void <.ctor>b__1_0(orig_SetStunInternal orig, SetStateOnHurt self, float duration) { if (!Object.op_Implicit((Object)(object)self.targetStateMachine) || !Object.op_Implicit((Object)(object)self.targetStateMachine.commonComponents.characterBody) || !self.targetStateMachine.commonComponents.characterBody.isPlayerControlled) { orig.Invoke(self, duration); } } internal void <.ctor>b__1_1(orig_SetShockInternal orig, SetStateOnHurt self, float duration) { if (!Object.op_Implicit((Object)(object)self.targetStateMachine) || !Object.op_Implicit((Object)(object)self.targetStateMachine.commonComponents.characterBody) || !self.targetStateMachine.commonComponents.characterBody.isPlayerControlled) { orig.Invoke(self, duration); } } internal void <.ctor>b__1_2(orig_SetPainInternal orig, SetStateOnHurt self) { if (!Object.op_Implicit((Object)(object)self.targetStateMachine) || !Object.op_Implicit((Object)(object)self.targetStateMachine.commonComponents.characterBody) || !self.targetStateMachine.commonComponents.characterBody.isPlayerControlled) { orig.Invoke(self); } } } public static bool enabled = true; public PlayerControlledMonsters() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //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_0094: Expected O, but got Unknown if (!enabled) { return; } RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(PlayerControlledMonsterStats); object obj = <>c.<>9__1_0; if (obj == null) { hook_SetStunInternal val = delegate(orig_SetStunInternal orig, SetStateOnHurt self, float duration) { if (!Object.op_Implicit((Object)(object)self.targetStateMachine) || !Object.op_Implicit((Object)(object)self.targetStateMachine.commonComponents.characterBody) || !self.targetStateMachine.commonComponents.characterBody.isPlayerControlled) { orig.Invoke(self, duration); } }; <>c.<>9__1_0 = val; obj = (object)val; } SetStateOnHurt.SetStunInternal += (hook_SetStunInternal)obj; object obj2 = <>c.<>9__1_1; if (obj2 == null) { hook_SetShockInternal val2 = delegate(orig_SetShockInternal orig, SetStateOnHurt self, float duration) { if (!Object.op_Implicit((Object)(object)self.targetStateMachine) || !Object.op_Implicit((Object)(object)self.targetStateMachine.commonComponents.characterBody) || !self.targetStateMachine.commonComponents.characterBody.isPlayerControlled) { orig.Invoke(self, duration); } }; <>c.<>9__1_1 = val2; obj2 = (object)val2; } SetStateOnHurt.SetShockInternal += (hook_SetShockInternal)obj2; object obj3 = <>c.<>9__1_2; if (obj3 == null) { hook_SetPainInternal val3 = delegate(orig_SetPainInternal orig, SetStateOnHurt self) { if (!Object.op_Implicit((Object)(object)self.targetStateMachine) || !Object.op_Implicit((Object)(object)self.targetStateMachine.commonComponents.characterBody) || !self.targetStateMachine.commonComponents.characterBody.isPlayerControlled) { orig.Invoke(self); } }; <>c.<>9__1_2 = val3; obj3 = (object)val3; } SetStateOnHurt.SetPainInternal += (hook_SetPainInternal)obj3; } private static void PlayerControlledMonsterStats(CharacterBody sender, StatHookEventArgs args) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (sender.isPlayerControlled && sender.baseRegen == 0f && sender.levelRegen == 0f && !((Enum)sender.bodyFlags).HasFlag((Enum)(object)(BodyFlags)16)) { args.baseRegenAdd += 2f + 0.5f * sender.level; args.armorAdd += 20f; } } } public class ShieldGating { public static ModdedDamageType IgnoreShieldGateDamage; public static bool enabled = true; public static bool disableIfGuardiansHeart = true; public ShieldGating() { //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) IgnoreShieldGateDamage = DamageAPI.ReserveDamageType(); if (enabled) { RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(SetupShieldGate)); } } private void SetupShieldGate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown if (disableIfGuardiansHeart && (int)ItemCatalog.FindItemIndex("CLASSICITEMSRETURNS_ITEM_GUARDIANSHEART") != -1) { Debug.LogWarning((object)"RiskyMod: Disabling ShieldGating since ClassicItemsReturns Guardian's Heart is loaded."); } else { HealthComponent.TakeDamageProcess += new Manipulator(HealthComponent_TakeDamageProcess); } } private void HealthComponent_TakeDamageProcess(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "shield"), (Instruction x) => ILPatternMatchingExt.MatchSub(x) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)delegate(float remainingDamage, HealthComponent self, DamageInfo damageInfo) { //IL_0018: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0031: 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_0040: 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_004f: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Invalid comparison between Unknown and I4 //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) if (global::SneedUtils.SneedUtils.HasShieldOnly(self.body)) { return remainingDamage; } bool flag = (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)2)) == 2 || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)262144)) == 262144 || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)64)) == 64; bool flag2 = Object.op_Implicit((Object)(object)self.body) && Object.op_Implicit((Object)(object)self.body.teamComponent) && ((int)self.body.teamComponent.teamIndex == 1 || self.body.isPlayerControlled); if (!flag && flag2) { bool flag3 = false; if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); flag3 = Object.op_Implicit((Object)(object)component) && component.isChampion; } if (!flag3 && !DamageAPI.HasModdedDamageType(damageInfo, IgnoreShieldGateDamage)) { float fixedDeltaTime = Time.fixedDeltaTime; self.body.AddTimedBuff(Buffs.HiddenInvincibility.buffIndex, fixedDeltaTime); return 0f; } } return remainingDamage; }); } else { Debug.LogError((object)"RiskyMod: ShieldGating TakeDamage IL Hook failed"); } } } public class TrueOSP { public static bool enabled = true; public static BuffDef DisableOSP; public TrueOSP() { //IL_002d: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown if (enabled) { DisableOSP = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_DisableOSPBuff", canStack: false, isCooldown: false, isDebuff: false, new Color(42f / 85f, 111f / 170f, 0.6741176f), Addressables.LoadAssetAsync((object)"RoR2/Base/ArmorReductionOnHit/bdPulverized.asset").WaitForCompletion().iconSprite); RecalculateStats.HandleRecalculateStatsActions = (RecalculateStats.HandleRecalculateStats)Delegate.Combine(RecalculateStats.HandleRecalculateStatsActions, new RecalculateStats.HandleRecalculateStats(HandleTrueOSP)); HealthComponent.TakeDamageProcess += new Manipulator(HealthComponent_TakeDamageProcess); } } private static void HandleTrueOSP(CharacterBody self) { if (!self.hasOneShotProtection) { return; } if (!global::SneedUtils.SneedUtils.HasShieldOnly(self)) { self.oneShotProtectionFraction = 0f; if (self.cursePenalty > 1f) { self.hasOneShotProtection = false; } } if (self.HasBuff(DisableOSP)) { if (NetworkServer.active && self.outOfDanger) { self.RemoveBuff(DisableOSP); } else { self.hasOneShotProtection = false; } } } private void HealthComponent_TakeDamageProcess(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_hasOneShotProtection") })) { int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((bool hasOSP, HealthComponent self) => global::SneedUtils.SneedUtils.HasShieldOnly(self.body) && hasOSP)); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "set_Networkhealth") })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)ProcTrueOSP_Health); flag = false; } } if (flag) { Debug.LogError((object)"TrueOSP IL Hook failed"); } } private float ProcTrueOSP_Health(float finalHealth, HealthComponent self, DamageInfo damageInfo) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_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_002d: Invalid comparison between Unknown and I4 if (!self.body.hasOneShotProtection || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)262144)) == 262144) { return finalHealth; } if (global::SneedUtils.SneedUtils.HasShieldOnly(self.body)) { return finalHealth; } OSPComponent oSPComponent = ((Component)self.body).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)oSPComponent)) { oSPComponent = ((Component)self.body).gameObject.AddComponent(); oSPComponent.healthComponent = self; oSPComponent.characterBody = self.body; } float num = self.fullHealth * OSPComponent.ospThreshold; if (self.health >= num && finalHealth < num) { oSPComponent.StartOSPTimer(); } if (finalHealth <= 0f && oSPComponent.TriggerOSP()) { finalHealth = 1f; } return finalHealth; } } public class OSPComponent : MonoBehaviour { public static float ospThreshold = 0.9f; public static float ospTimer = 0.5f; public static float ospInvuln = 0.5f; public CharacterBody characterBody = null; public HealthComponent healthComponent = null; private float ospStopwatch; public void Awake() { ospStopwatch = 0f; } public void FixedUpdate() { if (ospStopwatch > 0f) { ospStopwatch -= Time.fixedDeltaTime; } } public void StartOSPTimer() { if (CanTriggerOSP()) { ospStopwatch = ospTimer; } } public bool TriggerOSP() { bool result = false; if (CanTriggerOSP() && ospStopwatch > 0f) { result = true; ospStopwatch = 0f; characterBody.AddBuff(TrueOSP.DisableOSP); characterBody.AddTimedBuff(Buffs.HiddenInvincibility, ospInvuln); characterBody.outOfDangerStopwatch = 0f; } return result; } public bool CanTriggerOSP() { return !characterBody.HasBuff(TrueOSP.DisableOSP); } } } namespace RiskyMod.Tweaks.Artifact { public class Sacrifice { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_3; public static Func <>9__2_1; public static Func <>9__2_4; public static Func <>9__2_2; public static Manipulator <>9__2_0; internal void <.ctor>b__2_0(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.EmitDelegate>((Func)((float orig) => RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef) ? (dropChance * 0.5f) : dropChance)); } else { Debug.LogError((object)"SacrificeTweaks: Change Base Drop Chance IL hook failed."); } if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Util), "GetExpAdjustedDropChancePercent") })) { val.EmitDelegate>((Func)delegate(float orig) { float num = orig; if (orig > 0f) { float num2 = (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef) ? (dropChance * 0.5f) : dropChance); float num3 = num2; if (num < num2) { num = num2; } if (num > num3) { num = num3; } } return num; }); } else { Debug.LogError((object)"SacrificeTweaks: Clamp Final drop chance IL Hook failed."); } } internal bool <.ctor>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 5f); } internal float <.ctor>b__2_1(float orig) { return RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef) ? (dropChance * 0.5f) : dropChance; } internal bool <.ctor>b__2_4(Instruction x) { return ILPatternMatchingExt.MatchCall(x, typeof(Util), "GetExpAdjustedDropChancePercent"); } internal float <.ctor>b__2_2(float orig) { float num = orig; if (orig > 0f) { float num2 = (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef) ? (dropChance * 0.5f) : dropChance); float num3 = num2; if (num < num2) { num = num2; } if (num > num3) { num = num3; } } return num; } } public static bool enabled = true; public static float dropChance = 10f; public Sacrifice() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__2_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val2.EmitDelegate>((Func)((float orig) => RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef) ? (dropChance * 0.5f) : dropChance)); } else { Debug.LogError((object)"SacrificeTweaks: Change Base Drop Chance IL hook failed."); } if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Util), "GetExpAdjustedDropChancePercent") })) { val2.EmitDelegate>((Func)delegate(float orig) { float num = orig; if (orig > 0f) { float num2 = (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef) ? (dropChance * 0.5f) : dropChance); float num3 = num2; if (num < num2) { num = num2; } if (num > num3) { num = num3; } } return num; }); } else { Debug.LogError((object)"SacrificeTweaks: Clamp Final drop chance IL Hook failed."); } }; <>c.<>9__2_0 = val; obj = (object)val; } SacrificeArtifactManager.OnServerCharacterDeath += (Manipulator)obj; } } } namespace RiskyMod.Survivors { public class SurvivorsCore { public static bool enabled = true; public SurvivorsCore() { if (enabled) { new Bandit2Core(); new CaptainCore(); new CommandoCore(); new CrocoCore(); new EngiCore(); new HuntressCore(); new ToolbotCore(); new TreebotCore(); new LoaderCore(); new MageCore(); new MercCore(); new VoidFiendCore(); new SeekerCore(); new FalseSonCore(); } } } } namespace RiskyMod.Survivors.Treebot { public class DefaultUtilityHeal { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_AddDebuff <>9__0_0; internal void <.ctor>b__0_0(orig_AddDebuff orig, FireSonicBoom self, CharacterBody body) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) body.AddTimedBuff(Buffs.Weak, self.slowDuration); SetStateOnHurt component = ((Component)body.healthComponent).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetStun(-1f); } if (Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { HealOrb val = new HealOrb(); ((Orb)val).origin = body.corePosition; ((Orb)val).target = ((EntityState)self).healthComponent.body.mainHurtBox; val.healValue = 0.05f * ((EntityState)self).healthComponent.fullHealth; val.overrideDuration = Random.Range(0.3f, 0.6f); OrbManager.instance.AddOrb((Orb)(object)val); } Util.PlaySound(FirePlantSonicBoom.impactSoundString, ((EntityState)self).gameObject); } } public DefaultUtilityHeal() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown object obj = <>c.<>9__0_0; if (obj == null) { hook_AddDebuff val = delegate(orig_AddDebuff orig, FireSonicBoom self, CharacterBody body) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) body.AddTimedBuff(Buffs.Weak, self.slowDuration); SetStateOnHurt component = ((Component)body.healthComponent).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetStun(-1f); } if (Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { HealOrb val2 = new HealOrb(); ((Orb)val2).origin = body.corePosition; ((Orb)val2).target = ((EntityState)self).healthComponent.body.mainHurtBox; val2.healValue = 0.05f * ((EntityState)self).healthComponent.fullHealth; val2.overrideDuration = Random.Range(0.3f, 0.6f); OrbManager.instance.AddOrb((Orb)(object)val2); } Util.PlaySound(FirePlantSonicBoom.impactSoundString, ((EntityState)self).gameObject); }; <>c.<>9__0_0 = val; obj = (object)val; } FireSonicBoom.AddDebuff += (hook_AddDebuff)obj; } } public class DropFruitOnHit { public static bool enabled = true; public static GameObject fruitEffectPrefab; public static GameObject fruitPrefab; public DropFruitOnHit() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown if (enabled) { fruitEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotFruitDeathEffect.prefab").WaitForCompletion(); fruitPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotFruitPack.prefab").WaitForCompletion(); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(FruitOnHit)); } } private static void FruitOnHit(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0067: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (victimBody.HasBuff(Buffs.Fruiting.buffIndex) && Util.CheckRoll(15f * damageInfo.procCoefficient, attackerBody.master)) { EffectManager.SpawnEffect(fruitEffectPrefab, new EffectData { origin = victimBody.corePosition, rotation = Random.rotation }, true); GameObject val = Object.Instantiate(fruitPrefab, victimBody.corePosition + Random.insideUnitSphere * victimBody.radius * 0.5f, Random.rotation); val.GetComponent().teamIndex = attackerBody.teamComponent.teamIndex; val.GetComponentInChildren(); val.transform.localScale = new Vector3(1f, 1f, 1f); NetworkServer.Spawn(val); } } } public class ModifyFruitPickup { public static bool enabled = true; public ModifyFruitPickup() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (enabled) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotFruitPack.prefab").WaitForCompletion(); GravitatePickup componentInChildren = val.GetComponentInChildren(); Collider component = ((Component)componentInChildren).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isTrigger) { Transform transform = ((Component)component).transform; transform.localScale *= 1.6f; } HealthPickup componentInChildren2 = val.GetComponentInChildren(); componentInChildren2.fractionalHealing = 0.25f; } } } public class TreebotCore { public static bool enabled = true; public static bool drillChanges = true; public static bool defaultUtilityHeal = true; public static bool fruitChanges = true; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotBody.prefab").WaitForCompletion(); public TreebotCore() { if (enabled) { ModifySkills(bodyPrefab.GetComponent()); } } private void ModifySkills(SkillLocator sk) { ModifySecondaries(sk); ModifyUtilities(sk); ModifySpecials(sk); } private void ModifySecondaries(SkillLocator sk) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (drillChanges) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotMortarRain.prefab").WaitForCompletion(); ProjectileDotZone component = val.GetComponent(); component.overlapProcCoefficient = 0.7f; } } private void ModifyUtilities(SkillLocator sk) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (defaultUtilityHeal) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotBodySonicBoom.asset").WaitForCompletion(); val.skillDescriptionToken = "TREEBOT_UTILITY_DESCRIPTION_RISKYMOD"; new DefaultUtilityHeal(); } } private void ModifySpecials(SkillLocator sk) { //IL_0013: 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) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown if (fruitChanges) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotBodyFireFruitSeed.asset").WaitForCompletion(); val.skillDescriptionToken = "TREEBOT_SPECIAL_ALT1_DESCRIPTION_RISKYMOD"; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Treebot/EntityStates.Treebot.TreebotFireFruitSeed.asset", "baseDuration", "0.5"); GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/TreebotFruitSeedProjectile.prefab").WaitForCompletion(); new ModifyFruitPickup(); new DropFruitOnHit(); if (SoftDependencies.AdditiveExecutesLoaded) { ExecuteAPI.CalculateAdditiveExecuteThreshold = (CalculateAdditiveExecuteThresholdEventHandler)Delegate.Combine((Delegate?)(object)ExecuteAPI.CalculateAdditiveExecuteThreshold, (Delegate?)new CalculateAdditiveExecuteThresholdEventHandler(FruitExecuteAdditive)); } else { ExecuteAPI.CalculateExecuteThreshold = (CalculateExecuteThresholdEventHandler)Delegate.Combine((Delegate?)(object)ExecuteAPI.CalculateExecuteThreshold, (Delegate?)new CalculateExecuteThresholdEventHandler(FruitExecute)); } RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(FruitBuff); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(FruitHealOnHit)); } } private void FruitExecute(CharacterBody victimBody, ref float highestExecuteThreshold) { if (victimBody.HasBuff(Buffs.Fruiting) && highestExecuteThreshold < 0.23f) { highestExecuteThreshold = 0.2f; } } private void FruitExecuteAdditive(CharacterBody victimBody, ref float executeFractionAdd) { if (victimBody.HasBuff(Buffs.Fruiting)) { executeFractionAdd += 0.25f; } } private void FruitBuff(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buffs.Fruiting)) { args.moveSpeedReductionMultAdd += 0.8f; } } private void FruitHealOnHit(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_004b: 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) if (victimBody.HasBuff(Buffs.Fruiting) && Object.op_Implicit((Object)(object)attackerBody.healthComponent) && damageInfo.procCoefficient > 0f) { attackerBody.healthComponent.Heal(damageInfo.damage * 0.1f * damageInfo.procCoefficient, default(ProcChainMask), true); } } } } namespace RiskyMod.Survivors.Toolbot { public class ToolbotCore { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__14_4; public static Func <>9__14_3; public static Manipulator <>9__14_0; public static hook_OnEnter <>9__14_1; public static Func <>9__14_6; public static Func <>9__14_5; public static Manipulator <>9__14_2; internal void b__14_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "ApplyForce") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(int orig, FireBuzzsaw self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !((EntityState)self).characterMotor.isGrounded && ((EntityState)self).characterMotor.velocity.y <= 0f) { ((BaseState)self).SmallHop(((EntityState)self).characterMotor, 2.5f); } return orig; }); } else { Debug.LogError((object)"RiskyMod: Toolbot SawPhysics IL Hook failed"); } } internal bool b__14_4(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "ApplyForce"); } internal int b__14_3(int orig, FireBuzzsaw self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !((EntityState)self).characterMotor.isGrounded && ((EntityState)self).characterMotor.velocity.y <= 0f) { ((BaseState)self).SmallHop(((EntityState)self).characterMotor, 2.5f); } return orig; } internal void b__14_1(orig_OnEnter orig, FireBuzzsaw self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); DamageAPI.AddModdedDamageType(self.attack, SharedDamageTypes.SawBarrier); } internal void b__14_2(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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(FireBuzzsaw), "hitOverlapLastTick") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(bool hitEnemy, FireBuzzsaw self) { if (hitEnemy && ((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.AddBarrierAuthority(((EntityState)self).healthComponent.fullCombinedHealth * 0.003f); } return hitEnemy; }); } else { Debug.LogError((object)"RiskyMod: Toolbot SawBarrier IL Hook failed"); } } internal bool b__14_6(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, typeof(FireBuzzsaw), "hitOverlapLastTick"); } internal bool b__14_5(bool hitEnemy, FireBuzzsaw self) { if (hitEnemy && ((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.AddBarrierAuthority(((EntityState)self).healthComponent.fullCombinedHealth * 0.003f); } return hitEnemy; } } public static bool enabled = true; public static bool enableRebarChanges = true; public static bool enableScrapChanges = true; public static bool sawPhysics = true; public static bool sawBarrierOnHit = true; public static bool sawHitbox = true; public static bool enableSecondarySkillChanges = true; public static bool enablePowerModeChanges = true; public static BuffDef PowerModeBuff; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Toolbot/ToolbotBody.prefab").WaitForCompletion(); public ToolbotCore() { if (enabled) { ModifySkills(bodyPrefab.GetComponent()); } } private void ModifySkills(SkillLocator sk) { ModifyPrimaries(sk); ModifySecondaries(sk); ModifySpecials(sk); } private void ModifyPrimaries(SkillLocator sk) { RebarChanges(sk); SawChanges(sk); } private void RebarChanges(SkillLocator sk) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (enableRebarChanges) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Toolbot/ToolbotBodyFireSpear.asset").WaitForCompletion(); val.skillDescriptionToken = "TOOLBOT_PRIMARY_ALT1_DESCRIPTION_RISKYMOD"; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Toolbot/EntityStates.Toolbot.FireSpear.asset", "damageCoefficient", "6.6"); } } private void SawChanges(SkillLocator sk) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if (sawPhysics) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Toolbot/EntityStates.Toolbot.FireBuzzsaw.asset", "selfForceMagnitude", "0"); object obj = <>c.<>9__14_0; 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 //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val7 = new ILCursor(il); if (val7.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "ApplyForce") })) { val7.Emit(OpCodes.Ldarg_0); val7.EmitDelegate>((Func)delegate(int orig, FireBuzzsaw self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !((EntityState)self).characterMotor.isGrounded && ((EntityState)self).characterMotor.velocity.y <= 0f) { ((BaseState)self).SmallHop(((EntityState)self).characterMotor, 2.5f); } return orig; }); } else { Debug.LogError((object)"RiskyMod: Toolbot SawPhysics IL Hook failed"); } }; <>c.<>9__14_0 = val; obj = (object)val; } FireBuzzsaw.FixedUpdate += (Manipulator)obj; } SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Toolbot/ToolbotBodyFireBuzzsaw.asset").WaitForCompletion(); val2.cancelSprintingOnActivation = false; if (sawHitbox) { HitBoxGroup[] componentsInChildren = bodyPrefab.GetComponentsInChildren(); HitBoxGroup[] array = componentsInChildren; foreach (HitBoxGroup val3 in array) { if (val3.groupName.Contains("Buzzsaw")) { Transform transform = ((Component)val3.hitBoxes[0]).transform; transform.localScale *= 1.5f; } } } if (!sawBarrierOnHit) { return; } object obj2 = <>c.<>9__14_1; if (obj2 == null) { hook_OnEnter val4 = delegate(orig_OnEnter orig, FireBuzzsaw self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); DamageAPI.AddModdedDamageType(self.attack, SharedDamageTypes.SawBarrier); }; <>c.<>9__14_1 = val4; obj2 = (object)val4; } FireBuzzsaw.OnEnter += (hook_OnEnter)obj2; object obj3 = <>c.<>9__14_2; if (obj3 == null) { Manipulator val5 = delegate(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 val6 = new ILCursor(il); if (val6.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(FireBuzzsaw), "hitOverlapLastTick") })) { val6.Emit(OpCodes.Ldarg_0); val6.EmitDelegate>((Func)delegate(bool hitEnemy, FireBuzzsaw self) { if (hitEnemy && ((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.AddBarrierAuthority(((EntityState)self).healthComponent.fullCombinedHealth * 0.003f); } return hitEnemy; }); } else { Debug.LogError((object)"RiskyMod: Toolbot SawBarrier IL Hook failed"); } }; <>c.<>9__14_2 = val5; obj3 = (object)val5; } FireBuzzsaw.FixedUpdate += (Manipulator)obj3; val2.skillDescriptionToken = "TOOLBOT_PRIMARY_ALT3_DESCRIPTION_RISKYMOD"; } private void ModifySecondaries(SkillLocator sk) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown if (enableSecondarySkillChanges) { AimStunDrone.ModifyProjectile += new hook_ModifyProjectile(AimStunDrone_ModifyProjectile); } } private void AimStunDrone_ModifyProjectile(orig_ModifyProjectile orig, AimStunDrone self, ref FireProjectileInfo fireProjectileInfo) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, ref fireProjectileInfo); if (fireProjectileInfo.damageTypeOverride.HasValue) { DamageTypeCombo value = fireProjectileInfo.damageTypeOverride.Value; DamageAPI.AddModdedDamageType(ref value, SharedDamageTypes.AntiFlyingForce); fireProjectileInfo.damageTypeOverride = value; } } private void ModifySpecials(SkillLocator sk) { //IL_0013: 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) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown if (enablePowerModeChanges) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Toolbot/ToolbotDualWield.asset").WaitForCompletion(); BuffDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/bdSmallArmorBoost.asset").WaitForCompletion(); val.skillDescriptionToken = "TOOLBOT_SPECIAL_ALT_DESCRIPTION_RISKYMOD"; PowerModeBuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_PowerModeBuff", canStack: false, isCooldown: false, isDebuff: false, new Color(0.839f, 0.788f, 0.227f), val2.iconSprite); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(HandlePowerMode); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Toolbot/EntityStates.Toolbot.ToolbotDualWieldBase.asset", "bonusBuff", (Object)(object)PowerModeBuff); } } private void HandlePowerMode(CharacterBody sender, StatHookEventArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (sender.HasBuff(PowerModeBuff.buffIndex)) { args.armorAdd += 60f; } } } } namespace RiskyMod.Survivors.Merc { public class MercCore { public static bool enabled = true; public static bool buffDefaultShift; public MercCore() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (enabled && buffDefaultShift) { ((SkillDef)Addressables.LoadAssetAsync((object)"RoR2/Base/Merc/MercBodyAssaulter.asset").WaitForCompletion()).skillDescriptionToken = "MERC_UTILITY_DESCRIPTION_RISKYMOD"; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Merc/EntityStates.Merc.Assaulter2.asset", "damageCoefficient", "4.5"); } } } } namespace RiskyMod.Survivors.Mage { public class MageCore { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__24_2; public static Func <>9__24_1; public static Manipulator <>9__24_0; public static Func <>9__24_3; internal void b__24_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) blastAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)16777216); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Mage HandleIonSurge IL Hook failed"); } } internal bool b__24_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "Fire"); } internal BlastAttack b__24_1(BlastAttack blastAttack) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) blastAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)16777216); return blastAttack; } internal bool b__24_3(Variant v) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return ((SerializableEntityStateType)(ref v.skillDef.activationState)).stateType != typeof(FlyUpState); } } public static bool enabled = true; public static bool modifyFireBolt = true; public static bool modifyPlasmaBolt = true; public static bool m2RemoveNanobombGravity = true; public static bool buffNanoSpear = true; public static ConfigEntry flamethrowerSprintCancel; public static bool ionSurgeShock = true; public static bool ionSurgeUtility = true; public static bool ionSurgeUtilityKeepSpecial = false; public static bool enableFireUtility = true; public static bool enableLightningSpecial = true; public static bool iceWallRework = true; public static int specialLightningVariantIndex; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBody.prefab").WaitForCompletion(); public static ConfigEntry utilitySelfKnockback; public MageCore() { if (enabled) { ModifySkills(bodyPrefab.GetComponent()); } } private void ModifySkills(SkillLocator sk) { HandleIonSurge(sk); ModifyPrimaries(sk); ModifySecondaries(sk); ModifyUtilities(sk); ModifySpecials(sk); } private void ModifyPrimaries(SkillLocator sk) { new PrimaryRework(); } private void ModifySecondaries(SkillLocator sk) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (m2RemoveNanobombGravity) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageLightningBombProjectile.prefab").WaitForCompletion(); AntiGravityForce component = val.GetComponent(); component.antiGravityCoefficient = 1f; } if (buffNanoSpear) { SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyIceBomb.asset").WaitForCompletion(); val2.skillDescriptionToken = "MAGE_SECONDARY_ICE_DESCRIPTION_RISKYMOD"; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.ThrowIcebomb.asset", "maxDamageCoefficient", "16"); } } private void ModifyUtilities(SkillLocator sk) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) if (iceWallRework) { global::RiskyMod.Content.Content.entityStates.Add(typeof(PrepIceWall)); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyWall.asset").WaitForCompletion(); val.skillDescriptionToken = "MAGE_UTILITY_ICE_DESCRIPTION_RISKYMOD"; val.canceledFromSprinting = !SoftDependencies.RtAutoSprintLoaded; val.activationState = new SerializableEntityStateType(typeof(PrepIceWall)); Skills.PrepIceWall = val; } new IceWallDefense(); if (enableFireUtility) { global::RiskyMod.Content.Content.entityStates.Add(typeof(PrepFireStorm)); SkillDef val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(PrepFireStorm)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 12f; val2.beginSkillCooldownOnSkillEnd = true; val2.canceledFromSprinting = !SoftDependencies.RtAutoSprintLoaded; val2.cancelSprintingOnActivation = true; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFlamethrower.asset").WaitForCompletion().icon; val2.interruptPriority = (InterruptPriority)2; val2.isCombatSkill = true; val2.keywordTokens = new string[1] { "KEYWORD_IGNITE" }; val2.mustKeyPress = false; val2.rechargeStock = 1; val2.requiredStock = 1; val2.resetCooldownTimerOnUse = false; val2.skillDescriptionToken = "MAGE_UTILITY_FIRE_DESCRIPTION_RISKYMOD"; val2.skillNameToken = "MAGE_UTILITY_FIRE_NAME_RISKYMOD"; val2.skillName = "RiskyModFireStorm"; val2.stockToConsume = 1; global::SneedUtils.SneedUtils.FixSkillName(val2); Skills.PrepFireStorm = val2; global::RiskyMod.Content.Content.skillDefs.Add(Skills.PrepFireStorm); SkillFamily skillFamily = sk.utility.skillFamily; Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val3 = new Variant { skillDef = val2 }; ((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants[num] = val3; GameObject val4 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/ElementalRings/FireTornado.prefab").WaitForCompletion(), "RiskyMod_MageFireStorm", true); ProjectileSimple component = val4.GetComponent(); ProjectileOverlapAttack component2 = val4.GetComponent(); component2.overlapProcCoefficient = 1f; component2.resetInterval = 0.4f; component2.damageCoefficient = 1f / Mathf.Floor(component.lifetime / component2.resetInterval) * 0.5f; ProjectileDamage component3 = val4.GetComponent(); component3.damageType = DamageTypeCombo.op_Implicit((DamageType)128); component3.damageType.damageSource = (DamageSource)4; global::RiskyMod.Content.Content.projectilePrefabs.Add(val4); PrepFireStorm.projectilePrefab = val4; GameObject val5 = PrefabAPI.InstantiateClone(val4, "RiskyMod_MageFireStorm2", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(val5); FireStormExtender.projectilePrefab = val5; val4.AddComponent(); } UpdatePushSetting(null, null); } private void ModifySpecials(SkillLocator sk) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00c4: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //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_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Expected O, but got Unknown //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) flamethrowerSprintCancel.SettingChanged += ValidateFlamethrowerSprintSettings; (Skills.SpecialFlamethrowerVanilla = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFlamethrower.asset").WaitForCompletion()).canceledFromSprinting = flamethrowerSprintCancel.Value; if (enableLightningSpecial) { SpecialLightning.laserEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Junk/Mage/TracerMageLightningLaser.prefab").WaitForCompletion(), "RiskyMod_LaserBoltTracer", false); DestroyOnTimer val = SpecialLightning.laserEffectPrefab.AddComponent(); val.duration = 0.5f; global::RiskyMod.Content.Content.effectDefs.Add(new EffectDef(SpecialLightning.laserEffectPrefab)); global::RiskyMod.Content.Content.entityStates.Add(typeof(SpecialLightning)); SkillDef val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(SpecialLightning)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 5f; val2.beginSkillCooldownOnSkillEnd = true; val2.canceledFromSprinting = flamethrowerSprintCancel.Value && !SoftDependencies.RtAutoSprintLoaded; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFlyUp.asset").WaitForCompletion().icon; val2.interruptPriority = (InterruptPriority)1; val2.isCombatSkill = true; val2.keywordTokens = new string[0]; val2.mustKeyPress = true; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.skillName = "RiskymodMageSpecialSithLightning"; val2.skillNameToken = "MAGE_SPECIAL_SITHLIGHTNING_NAME_RISKYMOD"; val2.skillDescriptionToken = "MAGE_SPECIAL_SITHLIGHTNING_DESCRIPTION_RISKYMOD"; val2.stockToConsume = 1; global::SneedUtils.SneedUtils.FixSkillName(val2); global::RiskyMod.Content.Content.skillDefs.Add(val2); SpecialLightning.gauntletMissEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MuzzleflashMageLightning.prefab").WaitForCompletion(), "RiskyMod_MageSpecialLightningMiss", false); EffectComponent component = SpecialLightning.gauntletMissEffectPrefab.GetComponent(); component.soundName = "Play_item_proc_chain_lightning"; global::RiskyMod.Content.Content.effectDefs.Add(new EffectDef(SpecialLightning.gauntletMissEffectPrefab)); SpecialLightning.gauntletEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MuzzleflashMageLightningLargeWithTrail.prefab").WaitForCompletion(), "RiskyMod_MageSpecialLightning", false); component = SpecialLightning.gauntletEffectPrefab.GetComponent(); component.soundName = "Play_mage_m1_cast_lightning"; global::RiskyMod.Content.Content.effectDefs.Add(new EffectDef(SpecialLightning.gauntletEffectPrefab)); Skills.SpecialLightning = val2; Array.Resize(ref sk.special.skillFamily.variants, sk.special.skillFamily.variants.Length + 1); Variant[] variants = sk.special.skillFamily.variants; int num = sk.special.skillFamily.variants.Length - 1; Variant val3 = new Variant { skillDef = Skills.SpecialLightning, unlockableDef = null }; ((Variant)(ref val3)).viewableNode = new Node(Skills.SpecialLightning.skillName, false, (Node)null); variants[num] = val3; specialLightningVariantIndex = sk.special.skillFamily.variants.Length - 1; } if (SoftDependencies.ScepterPluginLoaded) { BuildScepterSkillDefs(sk); SetupScepter(); } } private void ValidateFlamethrowerSprintSettings(object sender, EventArgs e) { if (Object.op_Implicit((Object)(object)Skills.SpecialFlamethrowerVanilla)) { Skills.SpecialFlamethrowerVanilla.canceledFromSprinting = flamethrowerSprintCancel.Value; } if (Object.op_Implicit((Object)(object)Skills.SpecialLightning)) { Skills.SpecialLightning.canceledFromSprinting = !SoftDependencies.RtAutoSprintLoaded && flamethrowerSprintCancel.Value; } if (Object.op_Implicit((Object)(object)Skills.SpecialLightningScepter)) { Skills.SpecialLightningScepter.canceledFromSprinting = !SoftDependencies.RtAutoSprintLoaded && flamethrowerSprintCancel.Value; } } private void BuildScepterSkillDefs(SkillLocator sk) { //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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) global::RiskyMod.Content.Content.entityStates.Add(typeof(SpecialLightningScepter)); SkillDef val = ScriptableObject.CreateInstance(); val.activationState = new SerializableEntityStateType(typeof(SpecialLightningScepter)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = 5f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = flamethrowerSprintCancel.Value; val.forceSprintDuringState = false; val.fullRestockOnAssign = true; val.icon = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFlyUp.asset").WaitForCompletion().icon; val.interruptPriority = (InterruptPriority)1; val.isCombatSkill = true; val.keywordTokens = new string[0]; val.mustKeyPress = true; val.cancelSprintingOnActivation = true; val.rechargeStock = 1; val.requiredStock = 1; val.skillName = "RiskymodMageSpecialSithLightningScepter"; val.skillNameToken = "MAGE_SPECIAL_SITHLIGHTNING_SCEPTER_NAME_RISKYMOD"; val.skillDescriptionToken = "MAGE_SPECIAL_SITHLIGHTNING_SCEPTER_DESCRIPTION_RISKYMOD"; val.stockToConsume = 1; global::SneedUtils.SneedUtils.FixSkillName(val); global::RiskyMod.Content.Content.skillDefs.Add(val); Skills.SpecialLightningScepter = val; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void SetupScepter() { if (enableLightningSpecial) { ItemBase.instance.RegisterScepterSkill(Skills.SpecialLightningScepter, "MageBody", Skills.SpecialLightning); } } private void HandleIonSurge(SkillLocator sk) { //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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFlyUp.asset").WaitForCompletion(); if (ionSurgeShock) { val.skillDescriptionToken = "MAGE_SPECIAL_LIGHTNING_DESCRIPTION_RISKYMOD"; string text = "KEYWORD_SHOCKING"; val.keywordTokens = new string[1] { text }; object obj = <>c.<>9__24_0; if (obj == null) { Manipulator val2 = 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 val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val4.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) blastAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)16777216); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Mage HandleIonSurge IL Hook failed"); } }; <>c.<>9__24_0 = val2; obj = (object)val2; } FlyUpState.OnEnter += (Manipulator)obj; } if (!ionSurgeUtility) { return; } val.forceSprintDuringState = false; if (!ionSurgeUtilityKeepSpecial) { sk.special.skillFamily.variants = sk.special.skillFamily.variants.Where((Variant v) => ((SerializableEntityStateType)(ref v.skillDef.activationState)).stateType != typeof(FlyUpState)).ToArray(); } SkillFamily skillFamily = sk.utility.skillFamily; Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val3 = new Variant { skillDef = val, unlockableDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/Skills.Mage.FlyUp.asset").WaitForCompletion() }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[num] = val3; } public static void UpdatePushSetting(object sender, EventArgs e) { if (utilitySelfKnockback.Value) { if (Object.op_Implicit((Object)(object)Skills.PrepFireStorm)) { Skills.PrepFireStorm.skillDescriptionToken = "MAGE_UTILITY_FIRE_DESCRIPTION_RISKYMOD"; } if (iceWallRework && Object.op_Implicit((Object)(object)Skills.PrepIceWall)) { Skills.PrepIceWall.skillDescriptionToken = "MAGE_UTILITY_ICE_DESCRIPTION_RISKYMOD"; } } else { if (Object.op_Implicit((Object)(object)Skills.PrepFireStorm)) { Skills.PrepFireStorm.skillDescriptionToken = "MAGE_UTILITY_FIRE_DESCRIPTION_NOPUSH_RISKYMOD"; } if (iceWallRework && Object.op_Implicit((Object)(object)Skills.PrepIceWall)) { Skills.PrepIceWall.skillDescriptionToken = "MAGE_UTILITY_ICE_DESCRIPTION_NOPUSH_RISKYMOD"; } } } } public static class Skills { public static SkillDef PrepIceWall; public static SkillDef PrepFireStorm; public static SkillDef SpecialLightning; public static SkillDef SpecialLightningScepter; public static SkillDef SpecialFlamethrowerVanilla; } } namespace RiskyMod.Survivors.Mage.SkillTweaks { public class IceWallDefense { public static bool enabled = true; public static GameObject modifiedIceWallWalkerProjectile; public static GameObject modifiedIceWallPillarProjectile; public IceWallDefense() { //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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown if (enabled) { modifiedIceWallPillarProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageIcewallPillarProjectile.prefab").WaitForCompletion(), "RiskyModIceWallPillarProjectile", true); modifiedIceWallPillarProjectile.AddComponent(); global::RiskyMod.Content.Content.projectilePrefabs.Add(modifiedIceWallPillarProjectile); modifiedIceWallWalkerProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageIcewallWalkerProjectile.prefab").WaitForCompletion(), "RiskyModIceWallWalkerProjectile", true); ProjectileMageFirewallWalkerController component = modifiedIceWallWalkerProjectile.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.firePillarPrefab = modifiedIceWallPillarProjectile; } global::RiskyMod.Content.Content.projectilePrefabs.Add(modifiedIceWallWalkerProjectile); PrepIceWall.projectilePrefab = modifiedIceWallWalkerProjectile; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.PrepWall.asset", "projectilePrefab", (Object)(object)modifiedIceWallWalkerProjectile); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniImpactVFXFrozen.prefab").WaitForCompletion(), "RiskyModIceWallDeletionEffect", false); EffectComponent component2 = val.GetComponent(); component2.soundName = "Play_captain_drone_zap"; global::RiskyMod.Content.Content.effectDefs.Add(new EffectDef(val)); IceWallDefenseComponent.projectileDeletionEffectPrefab = val; } } } public class PrimaryRework { public static ModdedDamageType QuadrupleHitstunPower; public static ModdedDamageType ApplyFireboltRepeat; public static bool enabled; public PrimaryRework() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (enabled) { QuadrupleHitstunPower = DamageAPI.ReserveDamageType(); SetStateOnHurt.OnTakeDamageServer += new Manipulator(SetStateOnHurt_OnTakeDamageServer); if (MageCore.modifyFireBolt) { SetupFirebolt(); } if (MageCore.modifyPlasmaBolt) { SetupLightningBolt(); } } } private void SetStateOnHurt_OnTakeDamageServer(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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damageDealt") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)((float damageDealt, DamageReport damageReport) => (damageReport.damageInfo != null && DamageAPI.HasModdedDamageType(damageReport.damageInfo, QuadrupleHitstunPower)) ? (damageDealt * 4f) : damageDealt)); } } private void SetupFirebolt() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown ApplyFireboltRepeat = DamageAPI.ReserveDamageType(); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageFireboltBasic.prefab").WaitForCompletion(), "MoffeinArtificerPrimaryRework_Firebolt"); val.GetComponent().lifetime = 10f; val.AddComponent(); global::RiskyMod.Content.Content.projectilePrefabs.Add(val); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.FireFireBolt.asset", "damageCoefficient", "0.7"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.FireFireBolt.asset", "projectilePrefab", (Object)(object)val); FireBoltRepeatComponent.damageEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniExplosionVFXQuick.prefab").WaitForCompletion(); SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFireFirebolt.asset").WaitForCompletion(); val2.attackSpeedBuffsRestockSpeed = false; val2.skillDescriptionToken = "MAGE_PRIMARY_FIRE_DESCRIPTION_RISKYMOD"; HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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) orig.Invoke(self, damageInfo); if (NetworkServer.active && !damageInfo.rejected && DamageAPI.HasModdedDamageType(damageInfo, ApplyFireboltRepeat) && !(damageInfo.procCoefficient <= 0f)) { FireBoltRepeatComponent fireBoltRepeatComponent = ((Component)self).gameObject.AddComponent(); fireBoltRepeatComponent.attacker = damageInfo.attacker; fireBoltRepeatComponent.victim = ((Component)self).gameObject; fireBoltRepeatComponent.victimHealthComponent = self; fireBoltRepeatComponent.damage = damageInfo.damage; fireBoltRepeatComponent.damageType = damageInfo.damageType; DamageAPI.RemoveModdedDamageType(ref fireBoltRepeatComponent.damageType, ApplyFireboltRepeat); fireBoltRepeatComponent.isCrit = damageInfo.crit; fireBoltRepeatComponent.procCoefficient = damageInfo.procCoefficient; fireBoltRepeatComponent.force = ((Vector3)(ref damageInfo.force)).magnitude; } } private void SetupLightningBolt() { //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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageLightningboltBasic.prefab").WaitForCompletion(), "MoffeinArtificerPrimaryRework_Lightningbolt"); val.GetComponent().lifetime = 10f; val.AddComponent(); global::RiskyMod.Content.Content.projectilePrefabs.Add(val); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.FireLightningBolt.asset", "damageCoefficient", "0.85"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.FireLightningBolt.asset", "projectilePrefab", (Object)(object)val); SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFireLightningBolt.asset").WaitForCompletion(); val2.attackSpeedBuffsRestockSpeed = false; val2.skillDescriptionToken = "MAGE_PRIMARY_LIGHTNING_DESCRIPTION_RISKYMOD"; ProjectileImpactExplosion component = val.GetComponent(); LightningBoltTriggerComponent.lightningboltRepeatObject = Assets.assetBundle.LoadAsset("LightningboltRepeatPrefab"); LightningBoltRepeatComponent lightningBoltRepeatComponent = LightningBoltTriggerComponent.lightningboltRepeatObject.AddComponent(); lightningBoltRepeatComponent.range = 7.5f; ((ProjectileExplosion)component).blastRadius = 0f; ((ProjectileExplosion)component).blastProcCoefficient = 0f; lightningBoltRepeatComponent.activationEffectPrefab = component.impactEffect; component.impactEffect = null; ((ProjectileExplosion)component).blastDamageCoefficient = 0f; NetworkIdentity val3 = LightningBoltTriggerComponent.lightningboltRepeatObject.AddComponent(); PrefabAPI.RegisterNetworkPrefab(LightningBoltTriggerComponent.lightningboltRepeatObject); global::RiskyMod.Content.Content.networkedObjectPrefabs.Add(LightningBoltTriggerComponent.lightningboltRepeatObject); RadialForceMassLimited radialForceMassLimited = LightningBoltTriggerComponent.lightningboltRepeatObject.AddComponent(); radialForceMassLimited.radius = lightningBoltRepeatComponent.range; radialForceMassLimited.damping = 0.5f; radialForceMassLimited.forceMagnitude = -250f; radialForceMassLimited.forceCoefficientAtEdge = 0.5f; radialForceMassLimited.maxMass = 250f; radialForceMassLimited.flyingOnly = false; radialForceMassLimited.ignorePlayerControlled = true; lightningBoltRepeatComponent.whiffEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniImpactVFXLightning.prefab").WaitForCompletion(); lightningBoltRepeatComponent.activationEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/EliteLightning/LightningStakeNova.prefab").WaitForCompletion(); lightningBoltRepeatComponent.attackSound = ScriptableObject.CreateInstance(); lightningBoltRepeatComponent.attackSound.eventName = "Play_item_proc_chain_lightning"; global::RiskyMod.Content.Content.networkSoundEventDefs.Add(lightningBoltRepeatComponent.attackSound); FireLightningBolt.ModifyProjectileInfo += new hook_ModifyProjectileInfo(FireLightningBolt_ModifyProjectileInfo); } private void FireLightningBolt_ModifyProjectileInfo(orig_ModifyProjectileInfo orig, FireLightningBolt self, ref FireProjectileInfo fireProjectileInfo) { //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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, ref fireProjectileInfo); ref DamageTypeCombo? damageTypeOverride = ref fireProjectileInfo.damageTypeOverride; DamageTypeCombo? val = damageTypeOverride; DamageTypeCombo val2 = DamageTypeCombo.op_Implicit((DamageType)8); damageTypeOverride = (val.HasValue ? new DamageTypeCombo?(val.GetValueOrDefault() | val2) : null); } } } namespace RiskyMod.Survivors.Mage.Components { public class FireStormExtender : MonoBehaviour { public static int maxExtensions = 1; public static float extensionDelay = 3f; public static GameObject projectilePrefab; public float stopwatch; public int extensionCount; public void Awake() { stopwatch = 0f; extensionCount = 0; } public void FixedUpdate() { if (NetworkServer.active && extensionCount < maxExtensions) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= extensionDelay) { stopwatch -= extensionDelay; Extend(); } } } private void Extend() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_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_00cb: Unknown result type (might be due to invalid IL or missing references) extensionCount++; ProjectileDamage component = ((Component)this).GetComponent(); ProjectileController component2 = ((Component)this).GetComponent(); ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val = new FireProjectileInfo { damage = (Object.op_Implicit((Object)(object)component) ? component.damage : 0f), crit = component.crit, damageColorIndex = (DamageColorIndex)0, position = ((Component)this).transform.position, procChainMask = default(ProcChainMask), force = 0f, owner = (Object.op_Implicit((Object)(object)component2) ? component2.owner : null), projectilePrefab = projectilePrefab, rotation = Quaternion.identity }; ((FireProjectileInfo)(ref val)).speedOverride = 0f; val.target = null; instance.FireProjectile(val); } } public class IceWallDefenseComponent : MonoBehaviour { public static GameObject projectileDeletionEffectPrefab; private GameObject matrixObject; private DefenseMatrixInfo defenseMatrixInfo; private BoxCollider collider; private TeamFilter tf; public void Start() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Invalid comparison between Unknown and I4 //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)matrixObject)) { return; } tf = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)tf) && (int)tf.teamIndex != -1 && Object.op_Implicit((Object)(object)((Component)this).transform)) { GameObject val = new GameObject { layer = LayerIndex.world.intVal }; BoxCollider val2 = val.AddComponent(); val2.size = new Vector3(2.5f, 2.5f, 7f); ((Collider)val2).enabled = false; val.transform.localPosition = ((Component)this).transform.localPosition; val.transform.localRotation = ((Component)this).transform.localRotation; val.transform.localScale = ((Component)this).transform.localScale; matrixObject = val; collider = matrixObject.GetComponent(); if (Object.op_Implicit((Object)(object)collider)) { defenseMatrixInfo = new DefenseMatrixInfo((Collider[])(object)new Collider[1] { (Collider)collider }, tf.teamIndex); DefenseMatrixManager.AddMatrix(defenseMatrixInfo); } } } public void FixedUpdate() { //IL_003d: 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_004e: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)tf) || !Object.op_Implicit((Object)(object)collider)) { return; } List list = new List(); Vector3 size = collider.size; Collider[] array = Physics.OverlapBox(((Component)collider).transform.position, size, ((Component)collider).transform.rotation, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask)); Collider[] array2 = array; foreach (Collider val in array2) { ProjectileController componentInParent = ((Component)val).GetComponentInParent(); if (Object.op_Implicit((Object)(object)componentInParent) && !componentInParent.cannotBeDeleted && (!Object.op_Implicit((Object)(object)componentInParent.teamFilter) || componentInParent.teamFilter.teamIndex != tf.teamIndex)) { bool flag = false; ProjectileSimple component = ((Component)componentInParent).gameObject.GetComponent(); ProjectileCharacterController component2 = ((Component)componentInParent).gameObject.GetComponent(); if ((!Object.op_Implicit((Object)(object)component) || (Object.op_Implicit((Object)(object)component) && component.desiredForwardSpeed == 0f)) && !Object.op_Implicit((Object)(object)component2)) { flag = true; } if (!flag) { list.Add(componentInParent); } } } int count = list.Count; for (int j = 0; j < count; j++) { GameObject gameObject = ((Component)list[j]).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { if (Object.op_Implicit((Object)(object)gameObject.transform) && Object.op_Implicit((Object)(object)projectileDeletionEffectPrefab)) { EffectManager.SimpleEffect(projectileDeletionEffectPrefab, gameObject.transform.position, default(Quaternion), true); } Object.Destroy((Object)(object)gameObject); } } } public void OnDestroy() { if (defenseMatrixInfo != null) { DefenseMatrixManager.RemoveMatrix(defenseMatrixInfo); } if (Object.op_Implicit((Object)(object)matrixObject)) { Object.Destroy((Object)(object)matrixObject); } } } } namespace RiskyMod.Survivors.Mage.Components.Primaries { public class FireBoltForceAddModdedDamageType : MonoBehaviour { private void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) ProjectileDamage component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { DamageAPI.AddModdedDamageType(ref component.damageType, PrimaryRework.ApplyFireboltRepeat); DamageAPI.AddModdedDamageType(ref component.damageType, PrimaryRework.QuadrupleHitstunPower); } ProjectileImpactExplosion component2 = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { ((ProjectileExplosion)component2).blastProcCoefficient = 1f; } Object.Destroy((Object)(object)this); } } public class FireBoltRepeatComponent : MonoBehaviour { public static GameObject damageEffectPrefab; public float damage; public bool isCrit; public GameObject attacker; public GameObject victim; public HealthComponent victimHealthComponent; public DamageTypeCombo damageType; public float procCoefficient; public TeamIndex teamIndex; public float force; public float delayBetweenHits = 0.2f; public int totalHits = 4; private float delayTimer = 0f; public void Start() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) teamIndex = (TeamIndex)(-1); if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { delayBetweenHits = 0.2f / component.attackSpeed; totalHits = Mathf.Max(totalHits, Mathf.FloorToInt((float)totalHits * component.attackSpeed)); if (Object.op_Implicit((Object)(object)component.teamComponent)) { teamIndex = component.teamComponent.teamIndex; } } } totalHits--; delayTimer = delayBetweenHits; } private void FixedUpdate() { if (!NetworkServer.active) { return; } if (totalHits <= 0) { Object.Destroy((Object)(object)this); return; } if (delayTimer <= 0f) { delayTimer += delayBetweenHits; TriggerAttackServer(); } delayTimer -= Time.fixedDeltaTime; } private void TriggerAttackServer() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { totalHits--; Vector3 position = ((Component)this).transform.position; if (Object.op_Implicit((Object)(object)victimHealthComponent) && Object.op_Implicit((Object)(object)victimHealthComponent.body) && Object.op_Implicit((Object)(object)victimHealthComponent.body.mainHurtBox)) { position = ((Component)victimHealthComponent.body.mainHurtBox).transform.position; } BlastAttack val = new BlastAttack { baseDamage = damage, radius = 2.5f, position = position, crit = isCrit, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, attacker = attacker, inflictor = attacker, baseForce = force, damageType = damageType, falloffModel = (FalloffModel)0, teamIndex = teamIndex }; val.Fire(); EffectManager.SpawnEffect(damageEffectPrefab, new EffectData { origin = position, scale = 2.5f }, true); } } } public class LightningBoltTriggerComponent : MonoBehaviour { public static GameObject lightningboltRepeatObject; public float damage; public bool isCrit; public GameObject attacker; public TeamIndex teamIndex; public DamageTypeCombo damageType; private void Start() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) ProjectileDamage component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { damage = component.damage; isCrit = component.crit; damageType = component.damageType; } else { damage = 0f; } ProjectileController component2 = ((Component)this).GetComponent(); attacker = component2.owner; TeamFilter component3 = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { teamIndex = component3.teamIndex; } else { teamIndex = (TeamIndex)(-1); } ProjectileImpactExplosion component4 = ((Component)this).GetComponent(); ((ProjectileExplosion)component4).OnProjectileExplosion = (Action)Delegate.Combine(((ProjectileExplosion)component4).OnProjectileExplosion, new Action(SpawnLightningObject)); } private void SpawnLightningObject(BlastAttack attack, Result result) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(lightningboltRepeatObject, attack.position, Quaternion.identity); LightningBoltRepeatComponent component = val.GetComponent(); component.attacker = attacker; component.isCrit = isCrit; component.damage = damage; component.teamIndex = teamIndex; component.damageType = damageType; NetworkServer.Spawn(val); } } public class LightningBoltRepeatComponent : MonoBehaviour { public NetworkSoundEventDef attackSound; public GameObject activationEffectPrefab; public GameObject whiffEffectPrefab; public float range; public float delayBetweenHits = 0.2f; public int totalHits = 4; private float delayTimer = 0f; public float damage; public bool isCrit; public GameObject attacker; public TeamIndex teamIndex; public DamageTypeCombo damageType; private void Start() { //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_007c: 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_0099: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { delayBetweenHits = 0.2f / component.attackSpeed; totalHits = Mathf.Max(totalHits, Mathf.FloorToInt((float)totalHits * component.attackSpeed)); } } if (NetworkServer.active) { EffectManager.SpawnEffect(activationEffectPrefab, new EffectData { origin = ((Component)this).transform.position, scale = range }, true); } } private void FixedUpdate() { if (!NetworkServer.active) { return; } if (totalHits <= 0) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if (delayTimer <= 0f) { delayTimer += delayBetweenHits; TriggerAttackServer(); } delayTimer -= Time.fixedDeltaTime; } private void TriggerAttackServer() { //IL_002c: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } totalHits--; List list = global::SneedUtils.SneedUtils.FindEnemiesInSphere(range, ((Component)this).transform.position, teamIndex); EffectManager.SimpleSoundEffect(attackSound.index, ((Component)this).transform.position, true); bool flag = false; foreach (HealthComponent item in list) { if (Object.op_Implicit((Object)(object)item.body) && Object.op_Implicit((Object)(object)item.body.mainHurtBox) && ((Behaviour)item.body.mainHurtBox).isActiveAndEnabled) { LightningOrb val = new LightningOrb { attacker = attacker, inflictor = ((Component)this).gameObject, damageValue = damage, procCoefficient = 1f, teamIndex = teamIndex, isCrit = isCrit, procChainMask = default(ProcChainMask), lightningType = (LightningType)0, damageColorIndex = (DamageColorIndex)0, bouncesRemaining = 0, targetsToFindPerBounce = 1, range = range, origin = ((Component)this).transform.position, damageType = damageType, speed = 120f, target = item.body.mainHurtBox }; DamageAPI.AddModdedDamageType(ref val.damageType, PrimaryRework.QuadrupleHitstunPower); OrbManager.instance.AddOrb((Orb)(object)val); flag = true; } } if (!flag) { EffectManager.SimpleEffect(whiffEffectPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, true); } } } } namespace RiskyMod.Survivors.Loader { public class PylonMagnet { public PylonMagnet() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) GameObject go = Addressables.LoadAssetAsync((object)"RoR2/Base/Loader/LoaderPylon.prefab").WaitForCompletion(); go = BuildProjectile(go); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Loader/EntityStates.Loader.ThrowPylon.asset", "projectilePrefab", (Object)(object)go); } private GameObject BuildProjectile(GameObject go) { RadialForceMassLimited radialForceMassLimited = go.AddComponent(); radialForceMassLimited.radius = 25f; radialForceMassLimited.damping = 0.5f; radialForceMassLimited.forceMagnitude = -250f; radialForceMassLimited.forceCoefficientAtEdge = 0.5f; radialForceMassLimited.maxMass = 250f; radialForceMassLimited.flyingOnly = true; radialForceMassLimited.ignorePlayerControlled = true; go.AddComponent(); return go; } } public class PylonPulseController : MonoBehaviour { public static float initialDelay = 1.65f; public static float timeBetweenShocks = 1f; public static float pulseDuration = 0.4f; public RadialForceMassLimited radialForce; public float stopwatch; public float pulseTimer; private bool hasStarted = false; public void Awake() { radialForce = ((Component)this).GetComponent(); pulseTimer = 0f; stopwatch = 0f; ((Behaviour)radialForce).enabled = false; } public void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (!hasStarted) { if (stopwatch > initialDelay) { hasStarted = true; ((Behaviour)radialForce).enabled = true; stopwatch = 0f; StartPulse(); } return; } if (pulseTimer > 0f) { pulseTimer -= Time.fixedDeltaTime; if (pulseTimer <= 0f) { EndPulse(); } } if (stopwatch > timeBetweenShocks) { stopwatch -= timeBetweenShocks; StartPulse(); } } public void StartPulse() { pulseTimer = pulseDuration; radialForce.forceMagnitude = -750f; } public void EndPulse() { radialForce.forceMagnitude = -150f; } } public class SlamDamageType { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_2; public static Func <>9__0_1; public static Manipulator <>9__0_0; internal void <.ctor>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack orig) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(orig, SharedDamageTypes.AntiFlyingForce); return orig; }); } else { Debug.LogError((object)"RiskyMod: Loader SlamDamageType IL Hook failed"); } } internal bool <.ctor>b__0_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "Fire"); } internal BlastAttack <.ctor>b__0_1(BlastAttack orig) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(orig, SharedDamageTypes.AntiFlyingForce); return orig; } } public SlamDamageType() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown object obj = <>c.<>9__0_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val2.EmitDelegate>((Func)delegate(BlastAttack orig) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(orig, SharedDamageTypes.AntiFlyingForce); return orig; }); } else { Debug.LogError((object)"RiskyMod: Loader SlamDamageType IL Hook failed"); } }; <>c.<>9__0_0 = val; obj = (object)val; } GroundSlam.DetonateAuthority += (Manipulator)obj; } } public class SlamScrapBarrier { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_2; public static Func <>9__0_1; public static Manipulator <>9__0_0; internal void <.ctor>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "DetonateAuthority") })) { int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(Result result, GroundSlam self) { //IL_0001: 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_003f: 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) if (result.hitCount > 0 && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.AddBarrierAuthority(LoaderMeleeAttack.barrierPercentagePerHit * ((EntityState)self).healthComponent.fullBarrier); } return result; }); } else { Debug.LogError((object)"RiskyMod: Loader SlamScrapBarrier IL Hook failed"); } } internal bool <.ctor>b__0_2(Instruction x) { return ILPatternMatchingExt.MatchCall(x, "DetonateAuthority"); } internal Result <.ctor>b__0_1(Result result, GroundSlam self) { //IL_0001: 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_003f: 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) if (result.hitCount > 0 && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.AddBarrierAuthority(LoaderMeleeAttack.barrierPercentagePerHit * ((EntityState)self).healthComponent.fullBarrier); } return result; } } public SlamScrapBarrier() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown object obj = <>c.<>9__0_0; 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 //IL_004d: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "DetonateAuthority") })) { int index = val2.Index; val2.Index = index + 1; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)delegate(Result result, GroundSlam self) { //IL_0001: 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_003f: 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) if (result.hitCount > 0 && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.AddBarrierAuthority(LoaderMeleeAttack.barrierPercentagePerHit * ((EntityState)self).healthComponent.fullBarrier); } return result; }); } else { Debug.LogError((object)"RiskyMod: Loader SlamScrapBarrier IL Hook failed"); } }; <>c.<>9__0_0 = val; obj = (object)val; } GroundSlam.FixedUpdate += (Manipulator)obj; } } public class LoaderCore { public static bool enabled = true; public static bool modifyStats = true; public static bool zapFistChanges = true; public static bool pylonChanges = true; public static bool slamChanges = true; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Loader/LoaderBody.prefab").WaitForCompletion(); private CharacterBody loaderBody; public LoaderCore() { if (enabled) { loaderBody = bodyPrefab.GetComponent(); SkillLocator component = bodyPrefab.GetComponent(); ModifyStats(loaderBody); ModifySkills(component); } } private void ModifyStats(CharacterBody cb) { if (modifyStats) { cb.baseMaxHealth = 140f; cb.baseArmor = 0f; cb.levelMaxHealth = 42f; } } private void ModifySkills(SkillLocator sk) { ModifyUtilities(sk); ModifySpecials(sk); } private void ModifyUtilities(SkillLocator sk) { if (zapFistChanges) { new ZapConePosition(); } } private void ModifySpecials(SkillLocator sk) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (pylonChanges) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Loader/ThrowPylon.asset").WaitForCompletion(); val.skillDescriptionToken = "LOADER_SPECIAL_DESCRIPTION_RISKYMOD"; val.keywordTokens = new string[1] { "KEYWORD_MAGNETIC_RISKYMOD" }; new PylonMagnet(); } if (slamChanges) { new BiggerSlamHitbox(); new SlamScrapBarrier(); new SlamDamageType(); } } } public class BiggerSlamHitbox { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_FixedUpdate <>9__1_0; internal void <.ctor>b__1_0(orig_FixedUpdate orig, GroundSlam self) { //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 (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !self.detonateNextFrame && !((BaseCharacterController)((EntityState)self).characterMotor).Motor.GroundingStatus.IsStableOnGround && ((EntityState)self).fixedAge >= GroundSlam.minimumDuration && global::SneedUtils.SneedUtils.IsEnemyInSphere(5f, ((EntityState)self).characterBody.footPosition, ((BaseState)self).GetTeam(), airborneOnly: true)) { self.detonateNextFrame = true; } } } public static bool enabled = true; public BiggerSlamHitbox() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_FixedUpdate val = delegate(orig_FixedUpdate orig, GroundSlam self) { //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 (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !self.detonateNextFrame && !((BaseCharacterController)((EntityState)self).characterMotor).Motor.GroundingStatus.IsStableOnGround && ((EntityState)self).fixedAge >= GroundSlam.minimumDuration && global::SneedUtils.SneedUtils.IsEnemyInSphere(5f, ((EntityState)self).characterBody.footPosition, ((BaseState)self).GetTeam(), airborneOnly: true)) { self.detonateNextFrame = true; } }; <>c.<>9__1_0 = val; obj = (object)val; } GroundSlam.FixedUpdate += (hook_FixedUpdate)obj; } } public class ZapConePosition { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_2; public static Func <>9__0_1; public static Manipulator <>9__0_0; internal void <.ctor>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "FireProjectile") })) { val.EmitDelegate>((Func)delegate(FireProjectileInfo projectileInfo) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) ref Vector3 position = ref projectileInfo.position; Vector3 val2 = position; Vector3 eulerAngles = ((Quaternion)(ref projectileInfo.rotation)).eulerAngles; position = val2 - ((Vector3)(ref eulerAngles)).normalized; return projectileInfo; }); } else { Debug.LogError((object)"RiskyMod: Loader ZapConePosition IL Hook failed"); } } internal bool <.ctor>b__0_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "FireProjectile"); } internal FireProjectileInfo <.ctor>b__0_1(FireProjectileInfo projectileInfo) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) ref Vector3 position = ref projectileInfo.position; Vector3 val = position; Vector3 eulerAngles = ((Quaternion)(ref projectileInfo.rotation)).eulerAngles; position = val - ((Vector3)(ref eulerAngles)).normalized; return projectileInfo; } } public ZapConePosition() { //IL_0032: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown object obj = <>c.<>9__0_0; 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 val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "FireProjectile") })) { val3.EmitDelegate>((Func)delegate(FireProjectileInfo projectileInfo) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) ref Vector3 position = ref projectileInfo.position; Vector3 val4 = position; Vector3 eulerAngles = ((Quaternion)(ref projectileInfo.rotation)).eulerAngles; position = val4 - ((Vector3)(ref eulerAngles)).normalized; return projectileInfo; }); } else { Debug.LogError((object)"RiskyMod: Loader ZapConePosition IL Hook failed"); } }; <>c.<>9__0_0 = val; obj = (object)val; } SwingZapFist.OnMeleeHitAuthority += (Manipulator)obj; GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Loader/LoaderZapCone.prefab").WaitForCompletion(); ProjectileProximityBeamController component = val2.GetComponent(); component.attackRange += 1f; } } } namespace RiskyMod.Survivors.Huntress { public class ArrowRainBuff { public static bool enabled = true; public static GameObject arrowRainObject; public static GameObject arrowRainScepterObject; public ArrowRainBuff() { //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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown if (enabled) { arrowRainObject = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressArrowRain.prefab").WaitForCompletion(), "RiskyModArrowRainProjectile", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(arrowRainObject); ProjectileDotZone component = arrowRainObject.GetComponent(); component.overlapProcCoefficient = 0.7f; component.damageCoefficient = 1f / 3f; HitBox componentInChildren = arrowRainObject.GetComponentInChildren(); Transform transform = ((Component)componentInChildren).transform; transform.localPosition += 0.5f * Vector3.up; ((Component)componentInChildren).transform.localScale = new Vector3(((Component)componentInChildren).transform.localScale.x, 2f * ((Component)componentInChildren).transform.localScale.y, ((Component)componentInChildren).transform.localScale.z); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Huntress/EntityStates.Huntress.ArrowRain.asset", "damageCoefficient", "4.2"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Huntress/EntityStates.Huntress.ArrowRain.asset", "projectilePrefab", (Object)(object)arrowRainObject); ArrowRain.DoFireArrowRain += new Manipulator(ArrowRain_DoFireArrowRain); } } private void ArrowRain_DoFireArrowRain(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "FireProjectile") })) { val.EmitDelegate>((Func)delegate(DamageTypeCombo? combo) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (combo.HasValue) { DamageTypeCombo value = combo.Value; ref DamageType damageType = ref value.damageType; damageType = (DamageType)((uint)damageType | 8u); value.damageSource = (DamageSource)8; DamageAPI.AddModdedDamageType(ref value, SharedDamageTypes.ProjectileRainForce); return value; } return combo; }); } else { Debug.LogError((object)"RiskyMod: ArrowRain_DoFireArrowRain IL Hook failed."); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ScepterProjectileSetup() { //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_0048: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: 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_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) arrowRainScepterObject = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressArrowRain.prefab").WaitForCompletion(), "RiskyModArrowRainScepterProjectile", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(arrowRainScepterObject); arrowRainScepterObject.transform.localScale = new Vector3(arrowRainScepterObject.transform.localScale.x * 1.5f, arrowRainScepterObject.transform.localScale.y, arrowRainScepterObject.transform.localScale.z * 1.5f); ProjectileDotZone component = arrowRainScepterObject.GetComponent(); component.overlapProcCoefficient = 0.7f; component.damageCoefficient = 1f / 3f; HitBox componentInChildren = arrowRainScepterObject.GetComponentInChildren(); Transform transform = ((Component)componentInChildren).transform; transform.localPosition += 0.5f * Vector3.up; ((Component)componentInChildren).transform.localScale = new Vector3(((Component)componentInChildren).transform.localScale.x, 2f * ((Component)componentInChildren).transform.localScale.y, ((Component)componentInChildren).transform.localScale.z); ProjectileDamage component2 = arrowRainScepterObject.GetComponent(); component2.damageType |= DamageTypeCombo.op_Implicit((DamageType)128); ProjectileDotZone component3 = arrowRainScepterObject.GetComponent(); component3.lifetime *= 1.5f; Transform val = arrowRainScepterObject.transform.Find("FX"); Transform val2 = val.Find("ArrowsFalling"); ((Renderer)((Component)val2).GetComponent()).material.SetVector("_TintColor", new Vector4(3f, 0.1f, 0.04f, 1.5f)); Transform val3 = val.Find("ImpaledArrow"); ((Renderer)((Component)val3).GetComponent()).material.SetVector("_TintColor", new Vector4(3f, 0.1f, 0.04f, 1.5f)); Transform val4 = val.Find("RadiusIndicator"); ((Renderer)((Component)val4).GetComponent()).material.SetVector("_TintColor", new Vector4(3f, 0.1f, 0.04f, 1.25f)); Transform val5 = val.Find("ImpactFlashes"); MainModule main = ((Component)val5).GetComponent().main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(1f, 0.7f, 0.4f)); ((Renderer)((Component)val5).GetComponent()).material.SetVector("_TintColor", new Vector4(3f, 0.1f, 0.04f, 1.5f)); Transform val6 = val5.Find("Point Light"); ((Component)val6).GetComponent().color = new Color(1f, 0.5f, 0.3f); ((Component)val6).GetComponent().range = 15f; ((Component)val6).gameObject.SetActive(true); ArrowRainScepter.projectilePrefab = arrowRainScepterObject; } } public class HuntressCore { public static bool enabled = true; public static bool strafeChanges = true; public static bool flurryChanges = true; public static bool laserGlaiveChanges = true; public static bool blinkChanges = true; public static bool arrowRainChanges = true; public static bool ballistaChanges = true; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressBody.prefab").WaitForCompletion(); public HuntressCore() { if (enabled) { ModifySkills(bodyPrefab.GetComponent()); } } private void ModifySkills(SkillLocator sk) { ModifyPrimaries(sk); ModifySecondaries(sk); ModifyUtilities(sk); ModifySpecials(sk); } private void ModifyPrimaries(SkillLocator sk) { //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_0019: 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) HuntressTrackingSkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressBodyFireSeekingArrow.asset").WaitForCompletion(); HuntressTrackingSkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/FireFlurrySeekingArrow.asset").WaitForCompletion(); if (strafeChanges) { ((SkillDef)val).skillDescriptionToken = "HUNTRESS_PRIMARY_DESCRIPTION_RISKYMOD"; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Huntress/EntityStates.Huntress.HuntressWeapon.FireSeekingArrow.asset", "orbDamageCoefficient", "2"); } if (flurryChanges) { ((SkillDef)val2).skillDescriptionToken = "HUNTRESS_PRIMARY_ALT_DESCRIPTION_RISKYMOD"; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Huntress/EntityStates.Huntress.HuntressWeapon.FireFlurrySeekingArrow.asset", "orbDamageCoefficient", "1.2"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Huntress/EntityStates.Huntress.HuntressWeapon.FireFlurrySeekingArrow.asset", "orbProcCoefficient", "1"); } } private void ModifySecondaries(SkillLocator sk) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (laserGlaiveChanges) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressBodyGlaive.asset").WaitForCompletion(); val.baseRechargeInterval = 6f; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Huntress/EntityStates.Huntress.HuntressWeapon.ThrowGlaive.asset", "baseDuration", "0.8"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Huntress/EntityStates.Huntress.HuntressWeapon.ThrowGlaive.asset", "glaiveProcCoefficient", "1"); } } private void ModifyUtilities(SkillLocator sk) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (blinkChanges) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressBodyBlink.asset").WaitForCompletion(); val.baseRechargeInterval = 5f; } } private void ModifySpecials(SkillLocator sk) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) if (arrowRainChanges) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressBodyArrowRain.asset").WaitForCompletion(); val.baseRechargeInterval = 10f; val.beginSkillCooldownOnSkillEnd = true; val.skillDescriptionToken = "HUNTRESS_SPECIAL_DESCRIPTION_RISKYMOD"; Skills.ArrowRain = val; new ArrowRainBuff(); if (SoftDependencies.ScepterPluginLoaded) { BuildScepterSkillDefs(sk); SetupScepter(); } } if (ballistaChanges) { SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/AimArrowSnipe.asset").WaitForCompletion(); val2.baseRechargeInterval = 10f; val2.beginSkillCooldownOnSkillEnd = true; } } private void BuildScepterSkillDefs(SkillLocator sk) { //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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Huntress/HuntressBodyArrowRain.asset").WaitForCompletion(); ArrowRainBuff.ScepterProjectileSetup(); global::RiskyMod.Content.Content.entityStates.Add(typeof(BeginArrowRainScepter)); global::RiskyMod.Content.Content.entityStates.Add(typeof(ArrowRainScepter)); ArrowRainScepter.muzzleFlashEffect = (GameObject)global::SneedUtils.SneedUtils.GetAddressableEntityStateFieldObject("RoR2/Base/Huntress/EntityStates.Huntress.ArrowRain.asset", "muzzleFlashEffect"); ArrowRainScepter.areaIndicatorPrefab = (GameObject)global::SneedUtils.SneedUtils.GetAddressableEntityStateFieldObject("RoR2/Base/Huntress/EntityStates.Huntress.ArrowRain.asset", "areaIndicatorPrefab"); SkillDef val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(BeginArrowRainScepter)); val2.activationStateMachineName = val.activationStateMachineName; val2.baseMaxStock = 1; val2.baseRechargeInterval = 10f; val2.beginSkillCooldownOnSkillEnd = val.beginSkillCooldownOnSkillEnd; val2.canceledFromSprinting = val.canceledFromSprinting; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = Assets.ScepterSkillIcons.HuntressArrowRainScepter; val2.interruptPriority = val.interruptPriority; val2.isCombatSkill = true; val2.keywordTokens = new string[0]; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.skillName = "ArrowRainScepter"; val2.skillNameToken = "ANCIENTSCEPTER_HUNTRESS_RAINNAME"; val2.skillDescriptionToken = "HUNTRESS_SPECIAL_SCEPTER_DESCRIPTION_RISKYMOD"; val2.stockToConsume = 1; global::RiskyMod.Content.Content.skillDefs.Add(val2); Skills.ArrowRainScepter = val2; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void SetupScepter() { ItemBase.instance.RegisterScepterSkill(Skills.ArrowRainScepter, "HuntressBody", Skills.ArrowRain); } } public static class Skills { public static SkillDef ArrowRain; public static SkillDef ArrowRainScepter; } } namespace RiskyMod.Survivors.Engi { public class BubbleDefenseMatrix { public class BubbleShieldDefenseComponent : MonoBehaviour { public static GameObject deletionEffectPrefab; public DefenseMatrixInfo info; public float radius = 0f; public TeamIndex teamIndex; public Vector3 colliderOrigin; private void FixedUpdate() { DeleteProjectilesServer(); } private void DeleteProjectilesServer() { //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) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || radius <= 0f) { return; } List instancesList = InstanceTracker.GetInstancesList(); List list = new List(); float num = radius * radius; foreach (ProjectileController item in instancesList) { if (item.cannotBeDeleted || item.teamFilter.teamIndex == teamIndex) { continue; } Vector3 val = ((Component)item).transform.position - colliderOrigin; if (!(((Vector3)(ref val)).sqrMagnitude > num)) { ProjectileSimple component = ((Component)item).gameObject.GetComponent(); ProjectileCharacterController component2 = ((Component)item).gameObject.GetComponent(); if ((Object.op_Implicit((Object)(object)component) && (!Object.op_Implicit((Object)(object)component) || component.desiredForwardSpeed != 0f)) || Object.op_Implicit((Object)(object)component2)) { list.Add(item); } } } foreach (ProjectileController item2 in list) { EffectManager.SimpleEffect(deletionEffectPrefab, ((Component)item2).transform.position, ((Component)item2).transform.rotation, true); Object.Destroy((Object)(object)((Component)item2).gameObject); } } } public static bool enabled = true; public BubbleDefenseMatrix() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown if (enabled) { Deployed.FixedUpdate += new hook_FixedUpdate(Deployed_FixedUpdate); Deployed.OnExit += new hook_OnExit(Deployed_OnExit); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Engi/EngiGrenadeExplosion.prefab").WaitForCompletion(), "RiskyModBubbleShieldDeletionEffect", false); val.GetComponent().soundName = "Play_captain_drone_zap"; global::RiskyMod.Content.Content.effectDefs.Add(new EffectDef(val)); BubbleShieldDefenseComponent.deletionEffectPrefab = val; } } private void Deployed_OnExit(orig_OnExit orig, Deployed self) { orig.Invoke(self); BubbleShieldDefenseComponent component = ((EntityState)self).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.info != null) { DefenseMatrixManager.RemoveMatrix(component.info); } } private void Deployed_FixedUpdate(orig_FixedUpdate orig, Deployed self) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) bool hasDeployed = self.hasDeployed; orig.Invoke(self); if (hasDeployed || !self.hasDeployed) { return; } TeamFilter component = ((EntityState)self).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } ChildLocator component2 = ((EntityState)self).GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { return; } BubbleShieldDefenseComponent bubbleShieldDefenseComponent = ((EntityState)self).GetComponent(); if (!Object.op_Implicit((Object)(object)bubbleShieldDefenseComponent)) { bubbleShieldDefenseComponent = ((EntityState)self).gameObject.AddComponent(); } bubbleShieldDefenseComponent.teamIndex = component.teamIndex; GameObject gameObject = ((Component)component2.FindChild(Deployed.childLocatorString)).gameObject; Collider[] componentsInChildren = gameObject.GetComponentsInChildren(); Collider[] array = componentsInChildren; foreach (Collider val in array) { ((Component)val).gameObject.layer = LayerIndex.world.intVal; val.enabled = false; } SphereCollider[] componentsInChildren2 = gameObject.GetComponentsInChildren(); SphereCollider[] array2 = componentsInChildren2; foreach (SphereCollider val2 in array2) { if (val2.radius > bubbleShieldDefenseComponent.radius) { bubbleShieldDefenseComponent.radius = val2.radius; bubbleShieldDefenseComponent.colliderOrigin = ((Component)val2).transform.position; } } bubbleShieldDefenseComponent.info = new DefenseMatrixInfo(componentsInChildren, component.teamIndex); DefenseMatrixManager.AddMatrix(bubbleShieldDefenseComponent.info); } } public class EngiCore { public static bool enabled = true; public static bool harpoonRangeTweak = true; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Engi/EngiBody.prefab").WaitForCompletion(); public EngiCore() { if (enabled) { ModifySkills(bodyPrefab.GetComponent()); } } private void ModifySkills(SkillLocator sk) { ModifySecondaries(sk); ModifyUtilities(sk); ModifySpecials(sk); } private void ModifySecondaries(SkillLocator sk) { new PressureMines(); } private void ModifyUtilities(SkillLocator sk) { new BubbleDefenseMatrix(); if (harpoonRangeTweak) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Engi/EntityStates.Engi.EngiMissilePainter.Paint.asset", "maxDistance", "2000"); } } private void ModifySpecials(SkillLocator sk) { new TurretChanges(); } } public class PressureMines { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_target") })) { val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((bool hasTarget, WaitForTarget self) => hasTarget && ((object)((BaseMineState)self).armingStateMachine.state).GetType() == typeof(MineArmingFull))); } else { Debug.LogError((object)"RiskyMod: Engi PressureMines IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_target"); } internal bool <.ctor>b__1_1(bool hasTarget, WaitForTarget self) { return hasTarget && ((object)((BaseMineState)self).armingStateMachine.state).GetType() == typeof(MineArmingFull); } } public static bool enabled = true; public PressureMines() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_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 if (!enabled) { return; } global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Engi/EntityStates.Engi.EngiWeapon.FireMines.asset", "force", "1333.333333334"); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Engi/EngiBodyPlaceMine.asset").WaitForCompletion(); val.skillDescriptionToken = "ENGI_SECONDARY_DESCRIPTION_RISKYMOD"; object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_target") })) { val3.Index += 2; val3.Emit(OpCodes.Ldarg_0); val3.EmitDelegate>((Func)((bool hasTarget, WaitForTarget self) => hasTarget && ((object)((BaseMineState)self).armingStateMachine.state).GetType() == typeof(MineArmingFull))); } else { Debug.LogError((object)"RiskyMod: Engi PressureMines IL Hook failed"); } }; <>c.<>9__1_0 = val2; obj = (object)val2; } WaitForTarget.FixedUpdate += (Manipulator)obj; } } public class TurretChanges { public static bool normalizeStats = true; public TurretChanges() { if (normalizeStats) { ModifyTurret(); ModifyWalkerTurret(); } } private void ModifyTurret() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Engi/EngiTurretBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.damage = 12f; component.levelDamage = component.damage * 0.2f; component.regen = 1f; component.levelRegen = component.regen * 0.2f; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Engi/EntityStates.EngiTurret.EngiTurretWeapon.FireGauss.asset", "damageCoefficient", "0.933333333"); } private void ModifyWalkerTurret() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Engi/EngiWalkerTurretBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.damage = 12f; component.levelDamage = component.damage * 0.2f; component.regen = 1f; component.levelRegen = component.regen * 0.2f; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Engi/EntityStates.EngiTurret.EngiTurretWeapon.FireBeam.asset", "damageCoefficient", "2.666666667"); } } } namespace RiskyMod.Survivors.DLC2.Seeker { public class SeekerCore { public static bool enabled; public static bool noSelfRevive; public static bool unseenHandScalesDamage; public SeekerCore() { if (enabled) { DisableSelfRevive(); UnseenHandScalesDamage(); } } private void DisableSelfRevive() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (!noSelfRevive) { return; } SeekerController.UnlockGateEffects += new Manipulator(SeekerController_UnlockGateEffects); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Seeker/SeekerBodyMeditate.asset").WaitForCompletion(); for (int i = 0; i < val.keywordTokens.Length; i++) { if (val.keywordTokens[i] == "KEYWORD_LOWHEALTHPROTECTION") { val.keywordTokens[i] = "KEYWORD_LOWHEALTHPROTECTION_RISKYMOD"; break; } } } private void SeekerController_UnlockGateEffects(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(CharacterMaster), "seekerSelfRevive") })) { val.EmitDelegate>((Func)((bool x) => false)); } else { Debug.LogError((object)"RiskyMod: Seeker DisableSelfRevive IL hook failed."); } } private void UnseenHandScalesDamage() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) if (!unseenHandScalesDamage) { return; } GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Seeker/UnseenHandMovingProjectile.prefab").WaitForCompletion(), "RiskyModUnseenHandMovingProjectile", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(val); UnseenHandHealingProjectile component = val.GetComponent(); component.chakraIncrease = 0f; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/Seeker/EntityStates.Seeker.UnseenHand.asset", "fistProjectilePrefab", (Object)(object)val); UnseenHand.FixedUpdate += new Manipulator(UnseenHand_FixedUpdate); SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Seeker/SeekerBodyUnseenHand.asset").WaitForCompletion(); for (int i = 0; i < val2.keywordTokens.Length; i++) { if (val2.keywordTokens[i] == "SEEKER_SECONDARY_TRANQUILITY_DESCRIPTION") { val2.keywordTokens[i] = "SEEKER_SECONDARY_TRANQUILITY_DESCRIPTION_RISKYMOD"; break; } } } private void UnseenHand_FixedUpdate(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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(BaseState), "damageStat") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float damage, UnseenHand self) { float num = 1f; if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { num += (float)((EntityState)self).characterBody.GetBuffCount(Buffs.ChakraBuff) / 6f; } return damage * num; }); } else { Debug.LogError((object)"RiskyMod: Seeker Unseen Hand IL Hook failed."); } } } } namespace RiskyMod.Survivors.DLC2.FalseSon { public class FalseSonCore { public static bool enabled; public static bool modifyBaseStats; public static bool increaseGrowthCost; public static bool modifyPassive; public static bool buffLaser; public FalseSonCore() { if (enabled) { ModifyBody(); ModifyPassive(); BuffLaser(); } } private void ModifyBody() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/FalseSon/FalseSonBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); if (modifyBaseStats) { component.baseMaxHealth = 160f; component.levelMaxHealth = 48f; } FalseSonController component2 = ((Component)component).GetComponent(); if (increaseGrowthCost) { component2.growthStartCost = 24f; component2.defaultGrowthLevelCostIncrease = 8f; } } private void ModifyPassive() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown if (modifyPassive) { Addressables.LoadAssetAsync((object)"RoR2/DLC2/FalseSon/FalseSonBodyTheTamperedHeart.asset").WaitForCompletion().skillDescriptionToken = "FALSESON_PASSIVE_DESCRIPTION_RISKYMOD"; CharacterBody.ComputeTamperedHeartBonus += new Manipulator(IncreaseArmor); CharacterBody.ComputeTamperedHeartBonus += new Manipulator(DisableVanillaRegen); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(Buffs.TamperingMSAndHRBonus); if (buffCount > 0) { args.baseRegenAdd += 0.8f * (float)buffCount; args.levelRegenAdd += 0.16f * (float)buffCount; } } private void DisableVanillaRegen(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(FalseSonController), "tamperedHeartHealthRegen") })) { val.EmitDelegate>((Func)((float x) => 0f)); } else { Debug.LogError((object)"RiskyMod: FalseSon ReduceRegen IL hook failed."); } } private void IncreaseArmor(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(FalseSonController), "tamperedHeartArmor") })) { val.EmitDelegate>((Func)((float x) => 5f)); } else { Debug.LogError((object)"RiskyMod: FalseSon ReduceRegen IL hook failed."); } } private void BuffLaser() { if (buffLaser) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.LaserFather.asset", "baseChargeDuration", "1.5"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.LaserFather.asset", "baseDuration", "2.25"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.LaserFatherCharged.asset", "minimumDuration", "2.25"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.LaserFatherCharged.asset", "maximumDuration", "3"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.LaserFatherCharged.asset", "baseFireFrequency", "10.666666667"); } } } } namespace RiskyMod.Survivors.DLC1.VoidFiend { public class UtilityFallImmune { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static StatHookEventHandler <>9__2_0; public static hook_TakeDamageProcess <>9__2_1; public static hook_FixedUpdate <>9__2_2; public static hook_OnExit <>9__2_3; internal void <.ctor>b__2_0(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(UtilityBuff)) { args.moveSpeedMultAdd += 0.3f; } } internal void <.ctor>b__2_1(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)2097152) && self.body.HasBuff(UtilityBuff)) { damageInfo.rejected = true; damageInfo.damage = 0f; } orig.Invoke(self, damageInfo); } internal void <.ctor>b__2_2(orig_FixedUpdate orig, CharacterMotor self) { orig.Invoke(self); if (NetworkServer.active && self.isGrounded && self.body.HasBuff(UtilityBuff)) { self.body.RemoveBuff(UtilityBuff); } } internal void <.ctor>b__2_3(orig_OnExit orig, VoidBlinkBase self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !((EntityState)self).characterMotor.isGrounded && !((EntityState)self).characterBody.HasBuff(UtilityBuff)) { ((EntityState)self).characterBody.AddBuff(UtilityBuff); } } } public static bool enabled = true; public static BuffDef UtilityBuff; public UtilityFallImmune() { //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_0043: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown if (!enabled) { return; } BuffDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/SprintOutOfCombat/bdWhipBoost.asset").WaitForCompletion(); UtilityBuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyModVoidFiendFallImmuneBuff", canStack: false, isCooldown: false, isDebuff: false, new Color(0.376f, 0.843f, 0.898f), val.iconSprite); object obj = <>c.<>9__2_0; if (obj == null) { StatHookEventHandler val2 = delegate(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(UtilityBuff)) { args.moveSpeedMultAdd += 0.3f; } }; <>c.<>9__2_0 = val2; obj = (object)val2; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; object obj2 = <>c.<>9__2_1; if (obj2 == null) { hook_TakeDamageProcess val3 = delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)2097152) && self.body.HasBuff(UtilityBuff)) { damageInfo.rejected = true; damageInfo.damage = 0f; } orig.Invoke(self, damageInfo); }; <>c.<>9__2_1 = val3; obj2 = (object)val3; } HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)obj2; object obj3 = <>c.<>9__2_2; if (obj3 == null) { hook_FixedUpdate val4 = delegate(orig_FixedUpdate orig, CharacterMotor self) { orig.Invoke(self); if (NetworkServer.active && self.isGrounded && self.body.HasBuff(UtilityBuff)) { self.body.RemoveBuff(UtilityBuff); } }; <>c.<>9__2_2 = val4; obj3 = (object)val4; } CharacterMotor.FixedUpdate += (hook_FixedUpdate)obj3; object obj4 = <>c.<>9__2_3; if (obj4 == null) { hook_OnExit val5 = delegate(orig_OnExit orig, VoidBlinkBase self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !((EntityState)self).characterMotor.isGrounded && !((EntityState)self).characterBody.HasBuff(UtilityBuff)) { ((EntityState)self).characterBody.AddBuff(UtilityBuff); } }; <>c.<>9__2_3 = val5; obj4 = (object)val5; } VoidBlinkBase.OnExit += (hook_OnExit)obj4; } } public class VoidFiendCore { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnable <>9__12_0; public static hook_OnCharacterHealServer <>9__12_1; public static hook_OnDamageDealtServer <>9__12_2; public static StatHookEventHandler <>9__12_3; internal void b__12_0(orig_OnEnable orig, VoidSurvivorController self) { orig.Invoke(self); self.corruptionPerSecondInCombat = 1.6666666f; self.corruptionPerSecondOutOfCombat = 1.6666666f; self.corruptionFractionPerSecondWhileCorrupted = -1f / 12f; } internal void b__12_1(orig_OnCharacterHealServer orig, VoidSurvivorController self, HealthComponent healthComponent, float amount, ProcChainMask proc) { } internal void b__12_2(orig_OnDamageDealtServer orig, VoidSurvivorController self, DamageReport damageReport) { } internal void b__12_3(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buffs.VoidSurvivorCorruptMode)) { args.armorAdd -= 100f; } } } public static bool enabled = true; public static bool corruptMeterTweaks = true; public static bool corruptOnKill = true; public static bool noCorruptHeal = true; public static bool noCorruptCrit = true; public static bool removeCorruptArmor = true; public static bool secondaryMultitask = true; public static BodyIndex bodyIndex; public static GameObject bodyPrefab; public VoidFiendCore() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab").WaitForCompletion(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); ModifySkills(bodyPrefab.GetComponent()); } } private void OnLoad() { //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) bodyIndex = BodyCatalog.FindBodyIndex("VoidSurvivorBody"); } private void ModifySkills(SkillLocator sk) { ModifyPassive(sk); ModifySecondaries(sk); ModifyUtilities(sk); } private void ModifyPassive(SkillLocator sk) { //IL_0040: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown if (corruptMeterTweaks) { object obj = <>c.<>9__12_0; if (obj == null) { hook_OnEnable val = delegate(orig_OnEnable orig, VoidSurvivorController self) { orig.Invoke(self); self.corruptionPerSecondInCombat = 1.6666666f; self.corruptionPerSecondOutOfCombat = 1.6666666f; self.corruptionFractionPerSecondWhileCorrupted = -1f / 12f; }; <>c.<>9__12_0 = val; obj = (object)val; } VoidSurvivorController.OnEnable += (hook_OnEnable)obj; } if (corruptOnKill) { SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorPassive.asset").WaitForCompletion(); val2.keywordTokens = new string[1] { "KEYWORD_VOIDCORRUPTION_RISKYMOD" }; AssistManager.HandleAssistCompatibleActions = (HandleAssistCompatible)Delegate.Combine((Delegate?)(object)AssistManager.HandleAssistCompatibleActions, (Delegate?)new HandleAssistCompatible(CorruptionAssist)); GlobalEventManager.onCharacterDeathGlobal += CorruptionOnKill; } if (noCorruptHeal) { object obj2 = <>c.<>9__12_1; if (obj2 == null) { hook_OnCharacterHealServer val3 = delegate { }; <>c.<>9__12_1 = val3; obj2 = (object)val3; } VoidSurvivorController.OnCharacterHealServer += (hook_OnCharacterHealServer)obj2; } if (noCorruptCrit) { object obj3 = <>c.<>9__12_2; if (obj3 == null) { hook_OnDamageDealtServer val4 = delegate { }; <>c.<>9__12_2 = val4; obj3 = (object)val4; } VoidSurvivorController.OnDamageDealtServer += (hook_OnDamageDealtServer)obj3; } if (!removeCorruptArmor) { return; } object obj4 = <>c.<>9__12_3; if (obj4 == null) { StatHookEventHandler val5 = delegate(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buffs.VoidSurvivorCorruptMode)) { args.armorAdd -= 100f; } }; <>c.<>9__12_3 = val5; obj4 = (object)val5; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj4; } private void CorruptionAssist(CharacterBody attackerBody, CharacterBody victimBody, DamageType? assistDamageType, DamageTypeExtended? assistDamageTypeExtended, DamageSource? assistDamageSource, HashSet assistModdedDamageTypes, CharacterBody killerBody, DamageInfo damageInfo) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)attackerBody == (Object)(object)killerBody) && attackerBody.bodyIndex == bodyIndex) { VoidSurvivorController component = ((Component)attackerBody).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddCorruption(4f); } } } private void CorruptionOnKill(DamageReport report) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)report.attacker) && report.attackerBodyIndex == bodyIndex) { VoidSurvivorController component = report.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddCorruption(4f); } } } private void ModifySecondaries(SkillLocator sk) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) if (secondaryMultitask) { EntityStateMachine val = bodyPrefab.AddComponent(); val.customName = "RightArmCannon"; val.initialStateType = new SerializableEntityStateType(typeof(BaseState)); val.mainStateType = new SerializableEntityStateType(typeof(BaseState)); NetworkStateMachine component = bodyPrefab.GetComponent(); component.stateMachines = component.stateMachines.Append(val).ToArray(); SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/ChargeMegaBlaster.asset").WaitForCompletion(); val2.activationStateMachineName = "RightArmCannon"; SkillDef val3 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/FireCorruptDisk.asset").WaitForCompletion(); val3.activationStateMachineName = "RightArmCannon"; } } private void ModifyUtilities(SkillLocator sk) { new UtilityFallImmune(); } } } namespace RiskyMod.Survivors.Croco { public class CrocoCore { public static bool enabled = true; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoBody.prefab").WaitForCompletion(); public CrocoCore() { if (enabled) { new UtilityKnockdown(); new BuffFrenziedLeap(); new BuffShiftPuddleProc(); new BiggerLeapHitbox(); new ShiftAirControl(); new ContagionPassive(); new BlightReturns(); } } } } namespace RiskyMod.Survivors.Croco.Tweaks { public class BiggerLeapHitbox { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_FixedUpdate <>9__1_0; internal void <.ctor>b__1_0(orig_FixedUpdate orig, BaseLeap self) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !self.detonateNextFrame && (!((BaseCharacterController)((EntityState)self).characterMotor).Motor.GroundingStatus.IsStableOnGround || ((BaseCharacterController)((EntityState)self).characterMotor).Motor.LastGroundingStatus.IsStableOnGround) && ((EntityState)self).fixedAge >= BaseLeap.minimumDuration && global::SneedUtils.SneedUtils.IsEnemyInSphere(4f, ((EntityState)self).characterBody.footPosition, ((BaseState)self).GetTeam(), airborneOnly: true)) { self.detonateNextFrame = true; } } } public static bool enabled = true; public BiggerLeapHitbox() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_FixedUpdate val = delegate(orig_FixedUpdate orig, BaseLeap self) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && !self.detonateNextFrame && (!((BaseCharacterController)((EntityState)self).characterMotor).Motor.GroundingStatus.IsStableOnGround || ((BaseCharacterController)((EntityState)self).characterMotor).Motor.LastGroundingStatus.IsStableOnGround) && ((EntityState)self).fixedAge >= BaseLeap.minimumDuration && global::SneedUtils.SneedUtils.IsEnemyInSphere(4f, ((EntityState)self).characterBody.footPosition, ((BaseState)self).GetTeam(), airborneOnly: true)) { self.detonateNextFrame = true; } }; <>c.<>9__1_0 = val; obj = (object)val; } BaseLeap.FixedUpdate += (hook_FixedUpdate)obj; } } public class BlightReturns { public static bool enabled; public static float damageMultPerBuff = 0.05f; public BlightReturns() { //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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown if (enabled) { Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoPassiveBlight.asset").WaitForCompletion().skillDescriptionToken = "CROCO_PASSIVE_ALT_DESCRIPTION_RISKYMOD"; if (SoftDependencies.LinearDamageLoaded) { ModifyFinalDamage.ModifyFinalDamageActions = (ModifyFinalDamageDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageActions, (Delegate?)new ModifyFinalDamageDelegate(ModifyFinalDamage_Additive)); } else { ModifyFinalDamage.ModifyFinalDamageActions = (ModifyFinalDamageDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageActions, (Delegate?)new ModifyFinalDamageDelegate(ModifyFinalDamage)); } DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new hook_AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1(ModifyBlight); GlobalEventManager.ProcessHitEnemy += new Manipulator(GlobalEventManager_ProcessHitEnemy); } } private void GlobalEventManager_ProcessHitEnemy(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damageType"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1048576) }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.EmitDelegate>((Func)((float x) => 10f)); } } private void ModifyFinalDamage(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 //IL_0045: Unknown result type (might be due to invalid IL or missing references) int buffCount = victimBody.GetBuffCount(Buffs.Blight); if (buffCount > 0) { damageModifierArgs.damageMultFinal *= 1f + damageMultPerBuff * (float)buffCount; if ((int)damageInfo.dotIndex != 5) { damageInfo.damageColorIndex = (DamageColorIndex)9; } } } private void ModifyFinalDamage_Additive(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_003f: Unknown result type (might be due to invalid IL or missing references) int buffCount = victimBody.GetBuffCount(Buffs.Blight); if (buffCount > 0) { damageModifierArgs.damageMultAdd += damageMultPerBuff * (float)buffCount; if ((int)damageInfo.dotIndex != 5) { damageInfo.damageColorIndex = (DamageColorIndex)9; } } } private void ModifyBlight(orig_AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 orig, DotController self, GameObject attackerObject, float duration, HurtBox hitHurtBox, DotIndex dotIndex, float damageMultiplier, uint? maxStacksFromAttacker, float? totalDamage, DotIndex? preUpgradeDotIndex) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I4 //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Invalid comparison between Unknown and I4 //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) if ((int)dotIndex == 5) { foreach (DotStack dotStack in self.dotStackList) { if ((Object)(object)dotStack.attackerObject == (Object)(object)attackerObject && dotStack.dotIndex == dotIndex) { damageMultiplier = 0f; break; } } } orig.Invoke(self, attackerObject, duration, hitHurtBox, dotIndex, damageMultiplier, maxStacksFromAttacker, totalDamage, preUpgradeDotIndex); if ((int)dotIndex != 5) { return; } for (int i = 0; i < self.dotStackList.Count; i++) { if ((int)self.dotStackList[i].dotIndex == 5) { self.dotStackList[i].timer = Mathf.Max(self.dotStackList[i].timer, duration); } } } } public class BuffFrenziedLeap { public static bool enabled = true; public BuffFrenziedLeap() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown if (enabled) { SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoChainableLeap.asset").WaitForCompletion(); val.baseRechargeInterval = 6f; val.skillDescriptionToken = "CROCO_UTILITY_ALT1_DESCRIPTION_RISKYMOD"; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Croco/EntityStates.Croco.ChainableLeap.asset", "refundPerHit", "0"); ChainableLeap.DoImpactAuthority += new Manipulator(ChainableLeap_DoImpactAuthority); } } private void ChainableLeap_DoImpactAuthority(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 0) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(Result result, ChainableLeap self) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0065: Unknown result type (might be due to invalid IL or missing references) ((EntityState)self).skillLocator.primary.RunRecharge((float)result.hitCount); ((EntityState)self).skillLocator.secondary.RunRecharge((float)result.hitCount); ((EntityState)self).skillLocator.utility.RunRecharge((float)result.hitCount); ((EntityState)self).skillLocator.special.RunRecharge((float)result.hitCount); return result; }); } else { Debug.LogError((object)"RiskyMod: Croco ChainableLeap IL Hook failed"); } } } public class BuffShiftPuddleProc { public static bool enabled = true; public BuffShiftPuddleProc() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoLeapAcid.prefab").WaitForCompletion(); val.GetComponent().overlapProcCoefficient = 0.7f; } } } public class ShiftAirControl { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "airControl") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float airControl, BaseLeap self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { float num = ((EntityState)self).characterBody.moveSpeed / (((EntityState)self).characterBody.baseMoveSpeed * ((!((EntityState)self).characterBody.isSprinting) ? 1f : ((EntityState)self).characterBody.sprintingSpeedMultiplier)); num = Mathf.Min(num, 3f); airControl *= num; } return airControl; }); } else { Debug.LogError((object)"RiskyMod: Croco ShiftAirControl IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "airControl"); } internal float <.ctor>b__1_1(float airControl, BaseLeap self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { float num = ((EntityState)self).characterBody.moveSpeed / (((EntityState)self).characterBody.baseMoveSpeed * ((!((EntityState)self).characterBody.isSprinting) ? 1f : ((EntityState)self).characterBody.sprintingSpeedMultiplier)); num = Mathf.Min(num, 3f); airControl *= num; } return airControl; } } public static bool enabled = true; public ShiftAirControl() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "airControl") })) { val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)delegate(float airControl, BaseLeap self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { float num = ((EntityState)self).characterBody.moveSpeed / (((EntityState)self).characterBody.baseMoveSpeed * ((!((EntityState)self).characterBody.isSprinting) ? 1f : ((EntityState)self).characterBody.sprintingSpeedMultiplier)); num = Mathf.Min(num, 3f); airControl *= num; } return airControl; }); } else { Debug.LogError((object)"RiskyMod: Croco ShiftAirControl IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } BaseLeap.OnEnter += (Manipulator)obj; } } public class UtilityKnockdown { public static bool enabled = true; public UtilityKnockdown() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { BaseLeap.DetonateAuthority += new Manipulator(BaseLeap_DetonateAuthority); } } private void BaseLeap_DetonateAuthority(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(BlastAttack blastAttack, BaseLeap self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(blastAttack, SharedDamageTypes.AntiFlyingForce); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Croco UtilityKnockdown BaseLeap IL Hook failed"); } } } } namespace RiskyMod.Survivors.Croco.Contagion { public class ContagionPassive { public static bool enabled = true; public static bool useDebuffSpread; public static bool useUniqueSpecialDebuff; public static SkillDef passiveSkillDef; public static ModdedDamageType contagionDamageType; private static SkillFamily passiveSkillFamily = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoBodyPassiveFamily.asset").WaitForCompletion(); public static BodyIndex bodyIndex; public ContagionPassive() { //IL_0019: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown if (enabled) { contagionDamageType = DamageAPI.ReserveDamageType(); HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); CreateSkillDef(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CrocoDamageTypeController.GetDamageType += new hook_GetDamageType(CrocoDamageTypeController_GetDamageType); Slash.OnEnter += new hook_OnEnter(Slash_OnEnter); new ModifySpecial(); if (useDebuffSpread) { GlobalContagionTracker.Init(); } } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected I4, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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: Invalid comparison between Unknown and I4 //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(ref damageInfo.damageType, contagionDamageType) && ((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased) { DamageSource damageSource = damageInfo.damageType.damageSource; DamageSource val = damageSource; switch (val - 1) { default: if ((int)val == 8) { if (useUniqueSpecialDebuff) { DamageAPI.AddModdedDamageType(damageInfo, ModifySpecial.EpidemicDamage); } else { damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)1048576); } } break; case 0: damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)4096); break; case 1: case 3: damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)1048576); break; case 2: break; } } orig.Invoke(self, damageInfo); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (sender.bodyIndex == bodyIndex && Object.op_Implicit((Object)(object)sender.skillLocator) && HasPassive(sender.skillLocator)) { float num = sender.level - 1f; args.baseDamageAdd -= 3f + num * 0.6f; } } private void OnLoad() { //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) bodyIndex = BodyCatalog.FindBodyIndex("CrocoBody"); } private void Slash_OnEnter(orig_OnEnter orig, Slash self) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.isComboFinisher && Object.op_Implicit((Object)(object)((EntityState)self).skillLocator) && ((BasicMeleeAttack)self).overlapAttack != null && HasPassive(((EntityState)self).skillLocator)) { DamageAPI.AddModdedDamageType(((BasicMeleeAttack)self).overlapAttack, contagionDamageType); } } private void CreateSkillDef() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) passiveSkillDef = ScriptableObject.CreateInstance(); passiveSkillDef.skillName = "RiskyModCrocoPassiveContagion"; passiveSkillDef.interruptPriority = (InterruptPriority)0; passiveSkillDef.icon = Assets.assetBundle.LoadAsset("AcridRiskyPassive.png"); passiveSkillDef.skillNameToken = "CROCO_PASSIVE_CONTAGION_NAME_RISKYMOD"; passiveSkillDef.skillDescriptionToken = (useDebuffSpread ? "CROCO_PASSIVE_CONTAGION_DESCRIPTION_RISKYMOD" : "CROCO_PASSIVE_CONTAGION_DESCRIPTION_RISKYMOD_NOSPREAD"); passiveSkillDef.keywordTokens = new string[4] { "KEYWORD_CONTAGION_PRIMARY_RISKYMOD", "KEYWORD_CONTAGION_SECONDARY_RISKYMOD", "KEYWORD_CONTAGION_UTILITY_RISKYMOD", useUniqueSpecialDebuff ? "KEYWORD_CONTAGION_SPECIAL_RISKYMOD" : "KEYWORD_CONTAGION_SPECIAL_RISKYMOD_BLIGHT" }; ((Object)passiveSkillDef).name = passiveSkillDef.skillName; global::RiskyMod.Content.Content.skillDefs.Add(passiveSkillDef); global::SneedUtils.SneedUtils.AddSkillToFamily(passiveSkillFamily, passiveSkillDef); } private DamageTypeCombo CrocoDamageTypeController_GetDamageType(orig_GetDamageType orig, CrocoDamageTypeController self) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self.passiveSkillSlot) && (Object)(object)self.passiveSkillSlot.skillDef == (Object)(object)passiveSkillDef) { DamageTypeCombo generic = DamageTypeCombo.Generic; DamageAPI.AddModdedDamageType(ref generic, contagionDamageType); return generic; } return orig.Invoke(self); } public static bool HasPassive(SkillLocator skillLocator) { if (Object.op_Implicit((Object)(object)skillLocator)) { GenericSkill[] allSkills = skillLocator.allSkills; foreach (GenericSkill val in allSkills) { if ((Object)(object)val.skillFamily == (Object)(object)passiveSkillFamily) { return (Object)(object)val.skillDef == (Object)(object)passiveSkillDef; } } } return false; } } public class ModifySpecial { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnClientBuffsChanged <>9__5_0; internal void b__5_0(orig_OnClientBuffsChanged orig, CharacterBody self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.HasBuff(EpidemicDebuff.buffIndex) && !Object.op_Implicit((Object)(object)((Component)self).GetComponent())) { ((Component)self).gameObject.AddComponent(); } } } public static ModdedDamageType EpidemicDamage; public static BuffDef EpidemicDebuff; public ModifySpecial() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoDiseaseProjectile.prefab").WaitForCompletion(); val.AddComponent(); SetupDamageType(); SetupEpidemicVFX(); } private void SetupDamageType() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) EpidemicDamage = DamageAPI.ReserveDamageType(); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(ApplyEpidemic)); EpidemicDebuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_EpidemicDebuff", canStack: true, isCooldown: false, isDebuff: true, new Color(81f / 85f, 0.7921569f, 0.41960785f), Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/bdEntangle.asset").WaitForCompletion().iconSprite, blacklistFromNoxiousThorn: true); } private static void ApplyEpidemic(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (!DamageAPI.HasModdedDamageType(damageInfo, EpidemicDamage)) { return; } EpidemicDamageController epidemicDamageController = ((Component)victimBody).gameObject.AddComponent(); epidemicDamageController.Setup(attackerBody, victimBody, damageInfo); if (Object.op_Implicit((Object)(object)attackerBody.master)) { PlayerStatsComponent playerStatsComponent = attackerBody.master.playerStatsComponent; if (Object.op_Implicit((Object)(object)playerStatsComponent)) { playerStatsComponent.currentStats.PushStatValue(StatDef.totalCrocoInfectionsInflicted, 1uL); } } } private void SetupEpidemicVFX() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__5_0; if (obj == null) { hook_OnClientBuffsChanged val = delegate(orig_OnClientBuffsChanged orig, CharacterBody self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.HasBuff(EpidemicDebuff.buffIndex) && !Object.op_Implicit((Object)(object)((Component)self).GetComponent())) { ((Component)self).gameObject.AddComponent(); } }; <>c.<>9__5_0 = val; obj = (object)val; } CharacterBody.OnClientBuffsChanged += (hook_OnClientBuffsChanged)obj; } } } namespace RiskyMod.Survivors.Croco.Contagion.Components { public class EpidemicDamageController : MonoBehaviour { public static float baseLingerDuration = 1f; public static GameObject impactEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoDiseaseImpactEffect.prefab").WaitForCompletion(); public float timeBetweenTicks = 0.5f; public CharacterBody owner; public CharacterBody victim; private int ticksRemaining; private float stopwatch; private float lingerStopwatch; private bool scepter = false; private bool victimKilled = false; public bool crit = false; public float damage = 0f; private void Awake() { if (!NetworkServer.active) { Object.Destroy((Object)(object)this); return; } stopwatch = 0f; lingerStopwatch = 0f; ticksRemaining = 5 * ((!scepter) ? 1 : 2); } public void Setup(CharacterBody attackerBody, CharacterBody victimBody, DamageInfo damageInfo, bool isScepter = false) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) owner = attackerBody; victim = victimBody; damage = damageInfo.damage; crit = damageInfo.crit; victim.AddBuff(ModifySpecial.EpidemicDebuff.buffIndex); if (isScepter) { SetScepter(); } } private void FixedUpdate() { //IL_0019: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_0177: 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) if (Object.op_Implicit((Object)(object)victim) && !victim.HasBuff(ModifySpecial.EpidemicDebuff.buffIndex)) { victim.AddBuff(ModifySpecial.EpidemicDebuff.buffIndex); } if (ticksRemaining > 0) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= timeBetweenTicks) { stopwatch -= timeBetweenTicks; ticksRemaining--; if (Object.op_Implicit((Object)(object)owner) && Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)victim.healthComponent)) { DamageInfo val = new DamageInfo { attacker = ((Component)owner).gameObject, inflictor = ((Component)owner).gameObject, damage = damage, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), crit = crit, dotIndex = (DotIndex)(-1), force = 300f * Vector3.down, position = victim.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 0.5f }; val.damageType.damageSource = (DamageSource)8; victim.healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)victim).gameObject); EffectManager.SimpleImpactEffect(impactEffect, victim.corePosition, Vector3.up, true); } } } else { lingerStopwatch += Time.fixedDeltaTime; } victimKilled = !Object.op_Implicit((Object)(object)victim) || !Object.op_Implicit((Object)(object)victim.healthComponent) || !victim.healthComponent.alive; if (lingerStopwatch >= baseLingerDuration || victimKilled) { Object.Destroy((Object)(object)this); } } private void OnDestroy() { //IL_0019: 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) if (Object.op_Implicit((Object)(object)victim) && victim.HasBuff(ModifySpecial.EpidemicDebuff.buffIndex)) { victim.RemoveBuff(ModifySpecial.EpidemicDebuff.buffIndex); } } public void SetScepter() { ticksRemaining = 11; scepter = true; } } public class EpidemicVFXController : MonoBehaviour { private CharacterBody body; private BurnEffectController burnEffectController; private void Awake() { body = ((Component)this).GetComponent(); burnEffectController = null; if (!Object.op_Implicit((Object)(object)body)) { Object.Destroy((Object)(object)this); } } private void FixedUpdate() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body)) { if (body.HasBuff(ModifySpecial.EpidemicDebuff.buffIndex)) { if (!Object.op_Implicit((Object)(object)burnEffectController) && Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform)) { burnEffectController = ((Component)this).gameObject.AddComponent(); burnEffectController.effectType = BurnEffectController.poisonEffect; burnEffectController.target = ((Component)body.modelLocator.modelTransform).gameObject; } } else if (Object.op_Implicit((Object)(object)burnEffectController)) { Object.Destroy((Object)(object)burnEffectController); burnEffectController = null; } } else { Object.Destroy((Object)(object)this); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)burnEffectController)) { Object.Destroy((Object)(object)burnEffectController); burnEffectController = null; } } } public class FixEpidemicDamageSource : MonoBehaviour { private void Start() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) ProjectileDamage component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.damageType.damageSource == 2) { component.damageType.damageSource = (DamageSource)8; } Object.Destroy((Object)(object)this); } } public class GlobalContagionTracker : MonoBehaviour { public class CrocoPoison { public CharacterBody attackerBody; public CharacterBody victimBody; public float duration; public ModdedDamageType damageType; public int stacks; public CrocoPoison(CharacterBody attacker, CharacterBody victim, ModdedDamageType dt, float dur) { //IL_0017: 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) attackerBody = attacker; victimBody = victim; damageType = dt; duration = dur; stacks = 1; } } public static GlobalContagionTracker instance; public static float spreadRange = 30f; private List poisonList; internal static void Init() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown Run.onRunStartGlobal += InitPoisonTracker; ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(TrackPoison)); } private static void InitPoisonTracker(Run self) { if (NetworkServer.active) { instance = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)instance)) { instance = ((Component)self).gameObject.AddComponent(); } } } private static void TrackPoison(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_008e: 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) if (attackerBody.bodyIndex == ContagionPassive.bodyIndex && ContagionPassive.HasPassive(attackerBody.skillLocator)) { bool flag = DamageAPI.HasModdedDamageType(damageInfo, SharedDamageTypes.CrocoBlight6s); bool flag2 = DamageAPI.HasModdedDamageType(damageInfo, SharedDamageTypes.CrocoPoison6s); bool flag3 = ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)1048576); bool flag4 = ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)4096); if (flag3 || flag) { instance.Add(attackerBody, victimBody, SharedDamageTypes.CrocoBlight6s, flag ? 6f : 5f); } if (flag4 || flag2) { instance.Add(attackerBody, victimBody, SharedDamageTypes.CrocoPoison6s, flag2 ? 6f : 10f); } } } public void Add(CharacterBody attackerBody, CharacterBody victimBody, ModdedDamageType damageType, float duration) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) CrocoPoison crocoPoison = poisonList.Find((CrocoPoison x) => (Object)(object)x.victimBody == (Object)(object)victimBody && x.damageType == damageType); if (crocoPoison != null) { crocoPoison.attackerBody = attackerBody; crocoPoison.duration = duration; crocoPoison.stacks++; } else { poisonList.Add(new CrocoPoison(attackerBody, victimBody, damageType, duration)); } } private void Awake() { poisonList = new List(); } private void FixedUpdate() { //IL_014b: Unknown result type (might be due to invalid IL or missing references) if (poisonList.Count <= 0) { return; } List list = new List(); List list2 = new List(); foreach (CrocoPoison poison in poisonList) { poison.duration -= Time.fixedDeltaTime; if (poison.duration >= 0f && Object.op_Implicit((Object)(object)poison.victimBody) && Object.op_Implicit((Object)(object)poison.victimBody.healthComponent)) { if (!poison.victimBody.healthComponent.alive) { list.Add(poison); } } else { list2.Add(poison); } } foreach (CrocoPoison item in list2) { poisonList.Remove(item); } foreach (CrocoPoison item2 in list) { poisonList.Remove(item2); TriggerPoisonSpread(item2.attackerBody, item2.victimBody, item2.damageType, item2.stacks); } } public static void TriggerPoisonSpread(CharacterBody attackerBody, CharacterBody victimBody, ModdedDamageType damageType, int stacks) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)victimBody) && Object.op_Implicit((Object)(object)attackerBody)) { LightningOrb val = new LightningOrb(); ((Orb)val).arrivalTime = OrbManager.instance.time + 0.4f; val.bouncedObjects = new List(); val.targetsToFindPerBounce = 1; val.canBounceOnSameTarget = false; val.attacker = ((Component)attackerBody).gameObject; val.inflictor = ((Component)attackerBody).gameObject; val.teamIndex = attackerBody.teamComponent.teamIndex; val.damageValue = stacks; val.damageCoefficientPerBounce = 1f; val.procCoefficient = 0.5f; val.isCrit = attackerBody.RollCrit(); ((Orb)val).origin = victimBody.corePosition; val.bouncesRemaining = 0; val.lightningType = (LightningType)7; val.damageColorIndex = (DamageColorIndex)4; val.damageType = DamageTypeCombo.op_Implicit((DamageType)2049); val.range = spreadRange; DamageAPI.AddModdedDamageType(val, damageType); if (damageType == SharedDamageTypes.CrocoBlight6s) { DamageAPI.AddModdedDamageType(val, SharedDamageTypes.CrocoBlightStack); } if (Crowbar.enabled) { DamageAPI.AddModdedDamageType(val, Crowbar.IgnoreCrowbar); } DamageAPI.AddModdedDamageType(val, SharedDamageTypes.DontTriggerBands); val.bouncedObjects.Add(victimBody.healthComponent); ((Orb)val).target = val.PickNextTarget(victimBody.corePosition); OrbManager.instance.AddOrb((Orb)(object)val); } } } } namespace RiskyMod.Survivors.Commando { public class CommandoCore { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__14_0; internal void b__14_0(orig_OnEnter orig, DodgeState self) { orig.Invoke(self); if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).skillLocator)) { ((EntityState)self).skillLocator.primary.RunRecharge(1f); ((EntityState)self).skillLocator.secondary.RunRecharge(1f); ((EntityState)self).skillLocator.special.RunRecharge(1f); } } } public static bool enabled = true; public static bool phaseRoundChanges = true; public static bool skillLightningRound = true; public static bool skillShrapnelBarrage = true; public static bool replacePhaseRound = false; public static bool replaceSuppressive = false; public static bool rollChanges = true; public static bool suppressiveChanges = true; public static bool grenadeChanges = true; public static bool grenadeRemoveFalloff = true; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(); public CommandoCore() { if (enabled) { ModifySkills(bodyPrefab.GetComponent()); } } private void ModifySkills(SkillLocator sk) { ModifySecondaries(sk); ModifyUtilities(sk); ModifySpecials(sk); } private void ModifySecondaries(SkillLocator sk) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) SkillDef phaseRoundDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodyFireFMJ.asset").WaitForCompletion(); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodyFireShotgunBlast.asset").WaitForCompletion(); if (phaseRoundChanges) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Commando/EntityStates.Commando.CommandoWeapon.FireFMJ.asset", "projectilePrefab", (Object)(object)BuildPhaseRoundProjectile()); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Commando/EntityStates.Commando.CommandoWeapon.FireFMJ.asset", "damageCoefficient", "4.5"); phaseRoundDef.skillDescriptionToken = "COMMANDO_SECONDARY_DESCRIPTION_RISKYMOD"; } phaseRoundDef.mustKeyPress = false; val.mustKeyPress = false; if (!skillLightningRound) { return; } global::RiskyMod.Content.Content.entityStates.Add(typeof(FireLightningRound)); SkillDef val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(FireLightningRound)); val2.activationStateMachineName = "Weapon"; val2.attackSpeedBuffsRestockSpeed = false; val2.cancelSprintingOnActivation = true; val2.fullRestockOnAssign = true; val2.baseMaxStock = 1; val2.baseRechargeInterval = 3f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.isCombatSkill = true; val2.interruptPriority = (InterruptPriority)1; val2.mustKeyPress = false; val2.skillName = "RiskyModLightningRound"; ((Object)val2).name = val2.skillName; val2.skillNameToken = "COMMANDO_SECONDARY_LIGHTNING_NAME_RISKYMOD"; val2.skillDescriptionToken = "COMMANDO_SECONDARY_LIGHTNING_DESCRIPTION_RISKYMOD"; val2.icon = phaseRoundDef.icon; if (!replacePhaseRound) { val2.icon = Assets.assetBundle.LoadAsset("CommandoLightningRound.png"); } global::RiskyMod.Content.Content.skillDefs.Add(val2); FireLightningRound.lightningProjectilePrefab = BuildPhaseLightningProjectile(); Skills.PhaseLightning = val2; if (replacePhaseRound) { SkillFamily val3 = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodySecondaryFamily.asset").WaitForCompletion(); List list = val3.variants.Where((Variant variant) => (Object)(object)variant.skillDef != (Object)(object)phaseRoundDef).ToList(); Variant val4 = default(Variant); val4.skillDef = val2; val4.unlockableName = ""; ((Variant)(ref val4)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); Variant item = val4; list.Insert(0, item); val3.variants = list.ToArray(); } else { global::SneedUtils.SneedUtils.AddSkillToFamily(Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodySecondaryFamily.asset").WaitForCompletion(), Skills.PhaseLightning); } } private void ModifyUtilities(SkillLocator sk) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0048: Expected O, but got Unknown if (!rollChanges) { return; } SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodyRoll.asset").WaitForCompletion(); val.skillDescriptionToken = "COMMANDO_UTILITY_DESCRIPTION_RISKYMOD"; object obj = <>c.<>9__14_0; if (obj == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, DodgeState self) { orig.Invoke(self); if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).skillLocator)) { ((EntityState)self).skillLocator.primary.RunRecharge(1f); ((EntityState)self).skillLocator.secondary.RunRecharge(1f); ((EntityState)self).skillLocator.special.RunRecharge(1f); } }; <>c.<>9__14_0 = val2; obj = (object)val2; } DodgeState.OnEnter += (hook_OnEnter)obj; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Commando/EntityStates.Commando.DodgeState.asset", "initialSpeedCoefficient", "7.25"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Commando/EntityStates.Commando.DodgeState.asset", "finalSpeedCoefficient", "3.625"); } private void ModifySpecials(SkillLocator sk) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00b4: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: 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_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) SkillDef barrageDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodyBarrage.asset").WaitForCompletion(); if (suppressiveChanges) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Junk/CommandoPerformanceTest/EntityStates.Commando.CommandoWeapon.FireBarrage.asset", "baseBulletCount", "8"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Junk/CommandoPerformanceTest/EntityStates.Commando.CommandoWeapon.FireBarrage.asset", "damageCoefficient", "1.2"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Junk/CommandoPerformanceTest/EntityStates.Commando.CommandoWeapon.FireBarrage.asset", "baseDurationBetweenShots", "0.09"); barrageDef.baseRechargeInterval = 7f; barrageDef.interruptPriority = (InterruptPriority)2; barrageDef.mustKeyPress = false; barrageDef.skillDescriptionToken = "COMMANDO_SPECIAL_DESCRIPTION_RISKYMOD"; FireBarrage.FireBullet += new Manipulator(BulletAttackHooks.RemoveBulletFalloff); FireBarrage.GetMinimumInterruptPriority += new hook_GetMinimumInterruptPriority(FireBarrage_GetMinimumInterruptPriority); } if (grenadeChanges) { GameObject val = BuildGrenadeProjectile(); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Commando/EntityStates.Commando.CommandoWeapon.ThrowGrenade.asset", "projectilePrefab", (Object)(object)val); ThrowGrenadeScepter.projectilePrefab = val; } if (skillShrapnelBarrage) { SkillDef val2 = ScriptableObject.CreateInstance(); global::RiskyMod.Content.Content.entityStates.Add(typeof(ShrapnelBarrage)); val2.activationState = new SerializableEntityStateType(typeof(ShrapnelBarrage)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 7f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = barrageDef.icon; if (!replaceSuppressive) { val2.icon = Assets.assetBundle.LoadAsset("CommandoShrapnelBarrage.png"); } val2.interruptPriority = (InterruptPriority)2; val2.isCombatSkill = true; val2.keywordTokens = new string[1] { "KEYWORD_STUNNING" }; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.skillName = "RiskyModShrapnelBarrage"; val2.skillNameToken = "COMMANDO_SPECIAL_EXPL_NAME_RISKYMOD"; val2.skillDescriptionToken = "COMMANDO_SPECIAL_EXPL_DESCRIPTION_RISKYMOD"; val2.stockToConsume = 1; ((Object)val2).name = val2.skillName; global::RiskyMod.Content.Content.skillDefs.Add(val2); Skills.ShrapnelBarrage = val2; if (replaceSuppressive) { SkillFamily val3 = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodySpecialFamily.asset").WaitForCompletion(); List list = val3.variants.Where((Variant variant) => (Object)(object)variant.skillDef != (Object)(object)barrageDef).ToList(); Variant val4 = default(Variant); val4.skillDef = val2; val4.unlockableName = ""; ((Variant)(ref val4)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); Variant item = val4; list.Insert(0, item); val3.variants = list.ToArray(); } else { global::SneedUtils.SneedUtils.AddSkillToFamily(Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoBodySpecialFamily.asset").WaitForCompletion(), val2); } } if (SoftDependencies.ScepterPluginLoaded) { BuildScepterSkillDefs(sk); SetupScepter(); } } private InterruptPriority FireBarrage_GetMinimumInterruptPriority(orig_GetMinimumInterruptPriority orig, FireBarrage self) { //IL_002a: 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_002d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).inputBank) && ((EntityState)self).inputBank.skill4.down) { return (InterruptPriority)3; } return (InterruptPriority)1; } private void BuildScepterSkillDefs(SkillLocator sk) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) if (skillShrapnelBarrage) { SkillDef val = ScriptableObject.CreateInstance(); global::RiskyMod.Content.Content.entityStates.Add(typeof(ShrapnelBarrageScepter)); val.activationState = new SerializableEntityStateType(typeof(ShrapnelBarrageScepter)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = 7f; val.beginSkillCooldownOnSkillEnd = false; val.canceledFromSprinting = false; val.forceSprintDuringState = false; val.fullRestockOnAssign = true; val.icon = Assets.ScepterSkillIcons.CommandoBarrageScepter; if (!replaceSuppressive) { val.icon = Assets.assetBundle.LoadAsset("CommandoShrapnelBarrageScepter.png"); } val.interruptPriority = (InterruptPriority)2; val.isCombatSkill = true; val.keywordTokens = new string[1] { "KEYWORD_STUNNING" }; val.mustKeyPress = false; val.cancelSprintingOnActivation = true; val.rechargeStock = 1; val.requiredStock = 1; val.skillName = "RiskyModShrapnelBarrageScepter"; val.skillNameToken = "COMMANDO_SPECIAL_EXPL_SCEPTER_NAME_RISKYMOD"; val.skillDescriptionToken = "COMMANDO_SPECIAL_EXPL_SCEPTER_DESCRIPTION_RISKYMOD"; val.stockToConsume = 1; ((Object)val).name = val.skillName; global::RiskyMod.Content.Content.skillDefs.Add(val); Skills.ShrapnelBarrageScepter = val; } if (grenadeChanges) { SkillDef val2 = ScriptableObject.CreateInstance(); global::RiskyMod.Content.Content.entityStates.Add(typeof(ThrowGrenadeScepter)); val2.activationState = new SerializableEntityStateType(typeof(ThrowGrenadeScepter)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 2; val2.baseRechargeInterval = 5f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = Assets.ScepterSkillIcons.CommandoGrenadeScepter; val2.interruptPriority = (InterruptPriority)2; val2.isCombatSkill = true; val2.keywordTokens = new string[0]; val2.mustKeyPress = true; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.skillName = "GrenadeScepter"; val2.skillNameToken = "COMMANDO_SPECIAL_ALT1_SCEPTER_NAME_RISKYMOD"; val2.skillDescriptionToken = "COMMANDO_SPECIAL_ALT1_SCEPTER_DESCRIPTION_RISKYMOD"; val2.stockToConsume = 1; global::RiskyMod.Content.Content.skillDefs.Add(val2); Skills.GrenadeScepter = val2; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void SetupScepter() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if (skillShrapnelBarrage) { ItemBase.instance.RegisterScepterSkill(Skills.ShrapnelBarrageScepter, "CommandoBody", Skills.ShrapnelBarrage); } if (grenadeChanges) { ItemBase.instance.RegisterScepterSkill(Skills.GrenadeScepter, "CommandoBody", Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/ThrowGrenade.asset").WaitForCompletion()); } } private GameObject BuildGrenadeProjectile() { //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_0056: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_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_004b: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(), "RiskyModFragProjectile", true); ProjectileImpactExplosion component = val.GetComponent(); component.destroyOnWorld = false; component.destroyOnEnemy = true; ((ProjectileExplosion)component).blastRadius = 12f; if (grenadeRemoveFalloff) { ((ProjectileExplosion)component).falloffModel = (FalloffModel)0; } else { ((ProjectileExplosion)component).falloffModel = (FalloffModel)2; ProjectileDamage component2 = val.GetComponent(); DamageAPI.AddModdedDamageType(ref component2.damageType, SharedDamageTypes.SweetSpotModifier); component2.damageType |= DamageTypeCombo.op_Implicit((DamageSource)2); } val.AddComponent(); global::RiskyMod.Content.Content.projectilePrefabs.Add(val); return val; } private GameObject BuildPhaseLightningProjectile() { //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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/FMJRamping.prefab").WaitForCompletion(), "RiskyModPhaseLightning", true); ProjectileProximityBeamController val2 = val.GetComponent(); if (!Object.op_Implicit((Object)(object)val2)) { val2 = val.AddComponent(); } val2.attackFireCount = 1; val2.attackInterval = 0.06f; val2.attackRange = 10f; val2.listClearInterval = 10f; val2.minAngleFilter = 0f; val2.maxAngleFilter = 180f; val2.procCoefficient = 0.5f; val2.damageCoefficient = 1f / 3f; val2.bounces = 0; val2.lightningType = (LightningType)0; ProjectileSimple component = val.GetComponent(); component.lifetime = 10f; ProjectileDamage component2 = val.GetComponent(); component2.damageType = DamageTypeCombo.op_Implicit((DamageSource)2) | DamageTypeCombo.op_Implicit((DamageTypeExtended)8192); ProjectileOverlapAttack component3 = val.GetComponent(); component3.onServerHit = null; global::RiskyMod.Content.Content.projectilePrefabs.Add(val); return val; } private GameObject BuildPhaseRoundProjectile() { //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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0068: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/FMJRamping.prefab").WaitForCompletion(), "RiskyModPhaseRound", true); GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/FMJRampingGhost.prefab").WaitForCompletion(), "RiskyModPhaseRoundGhost", false); val.transform.localScale = Vector3.one * 2f; val2.transform.localScale = Vector3.one * 2f; val.GetComponent().ghostPrefab = val2; ProjectileSimple component = val.GetComponent(); component.lifetime = 10f; global::RiskyMod.Content.Content.projectilePrefabs.Add(val); return val; } } public class Skills { public static SkillDef PhaseLightning; public static SkillDef ShrapnelBarrage; public static SkillDef ShrapnelBarrageScepter; public static SkillDef GrenadeScepter; } public class GrenadeImpactComponent : MonoBehaviour { private ProjectileImpactExplosion pie; public void Awake() { pie = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)pie)) { Object.Destroy((Object)(object)this); } } public void FixedUpdate() { if (pie.stopwatchAfterImpact > 0f) { pie.destroyOnEnemy = false; Object.Destroy((Object)(object)this); } } } } namespace RiskyMod.Survivors.Captain { public class BeaconRework { public static class Skills { public static SkillDef BeaconResupply; public static SkillDef BeaconHacking; public static SkillDef BeaconRecharge; } public class CaptainDeployableManager : MonoBehaviour { public SkillLocator skillLocator; public CharacterBody body; public GenericSkill Beacon1; public GenericSkill Beacon2; public Queue Beacon1Deployables; public Queue Beacon2Deployables; public static bool allowLysateStack; private void Awake() { body = ((Component)this).GetComponent(); Beacon1Deployables = new Queue(); Beacon2Deployables = new Queue(); } private void Start() { skillLocator = ((Component)this).GetComponent(); Beacon1 = skillLocator.FindSkill("SupplyDrop1"); Beacon2 = skillLocator.FindSkill("SupplyDrop2"); } public void AddBeacon(GameObject newBeacon, GenericSkill skill) { if (!NetworkServer.active) { return; } int num = 0; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { num = body.inventory.GetItemCount(Items.EquipmentMagazineVoid); } int num2 = 1 + num; if (!allowLysateStack && num2 >= 2) { num2 = 2; } if ((Object)(object)skill == (Object)(object)Beacon1) { if (Beacon1Deployables.Count >= num2) { GameObject val = Beacon1Deployables.Dequeue(); Object.Destroy((Object)(object)val); } Beacon1Deployables.Enqueue(newBeacon); } else if ((Object)(object)skill == (Object)(object)Beacon2) { if (Beacon2Deployables.Count >= num2) { GameObject val2 = Beacon2Deployables.Dequeue(); Object.Destroy((Object)(object)val2); } Beacon2Deployables.Enqueue(newBeacon); } } private void OnDestroy() { while (Beacon1Deployables.Count > 0) { Object.Destroy((Object)(object)Beacon1Deployables.Dequeue()); } while (Beacon2Deployables.Count > 0) { Object.Destroy((Object)(object)Beacon2Deployables.Dequeue()); } } } public class HackMarker : MonoBehaviour { public static float costMult = 0.5f; public int newCost; public GameObject owner; public PurchaseInteraction purchaseInteraction; public void FixedUpdate() { if (!Object.op_Implicit((Object)(object)owner)) { if (Object.op_Implicit((Object)(object)purchaseInteraction)) { purchaseInteraction.cost = Mathf.FloorToInt((float)purchaseInteraction.cost / costMult); } Object.Destroy((Object)(object)this); } } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__11_4; public static Func <>9__11_3; public static Manipulator <>9__11_0; public static Func <>9__11_6; public static Func <>9__11_5; public static Manipulator <>9__11_1; public static RecalculateStats.HandleRecalculateStats <>9__11_2; public static hook_SetSkillOverride <>9__13_0; public static Func <>9__15_2; public static Func <>9__15_1; public static Manipulator <>9__15_0; public static Func <>9__17_0; public static Func <>9__17_1; public static hook_PurchaseInteractionIsValidTarget <>9__17_2; public static Func <>9__17_6; public static Func <>9__17_4; public static Func <>9__17_7; public static Func <>9__17_5; public static Manipulator <>9__17_3; internal void <.ctor>b__11_0(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_master") })) { val.EmitDelegate>((Func)((CharacterMaster characterMaster) => null)); } else { Debug.LogError((object)"RiskyMod: BeaconRework Deployable IL Hook failed"); } } internal bool <.ctor>b__11_4(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_master"); } internal CharacterMaster <.ctor>b__11_3(CharacterMaster characterMaster) { return null; } internal void <.ctor>b__11_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "Spawn") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(GameObject beacon, CallSupplyDropBase self) { CaptainDeployableManager component = ((EntityState)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddBeacon(beacon, ((BaseSkillState)self).activatorSkillSlot); } return beacon; }); } else { Debug.LogError((object)"RiskyMod: BeaconRework IL Hook failed"); } } internal bool <.ctor>b__11_6(Instruction x) { return ILPatternMatchingExt.MatchCall(x, "Spawn"); } internal GameObject <.ctor>b__11_5(GameObject beacon, CallSupplyDropBase self) { CaptainDeployableManager component = ((EntityState)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddBeacon(beacon, ((BaseSkillState)self).activatorSkillSlot); } return beacon; } internal void <.ctor>b__11_2(CharacterBody self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (self.bodyIndex == CaptainCore.CaptainIndex && self.skillLocator.special.bonusStockFromBody > 0) { int num = Mathf.CeilToInt((float)self.skillLocator.special.bonusStockFromBody / 2f); int bonusStockFromBody = self.skillLocator.special.bonusStockFromBody - num; self.skillLocator.FindSkill("SupplyDrop1").SetBonusStockFromBody(num); self.skillLocator.FindSkill("SupplyDrop2").SetBonusStockFromBody(bonusStockFromBody); } } internal void b__13_0(orig_SetSkillOverride orig, CaptainSupplyDropController self, ref SkillDef currentSkillDef, SkillDef newSkillDef, GenericSkill component) { newSkillDef = currentSkillDef; orig.Invoke(self, ref currentSkillDef, newSkillDef, component); } internal void b__15_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(blastAttack, SharedDamageTypes.Slow50For5s); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: BeaconRework Shock IL Hook failed"); } } internal bool b__15_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "Fire"); } internal BlastAttack b__15_1(BlastAttack blastAttack) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(blastAttack, SharedDamageTypes.Slow50For5s); return blastAttack; } internal bool b__17_0(Variant v) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return ((SerializableEntityStateType)(ref v.skillDef.activationState)).stateType != typeof(CallSupplyDropHacking); } internal bool b__17_1(Variant v) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return ((SerializableEntityStateType)(ref v.skillDef.activationState)).stateType != typeof(CallSupplyDropHacking); } internal bool b__17_2(orig_PurchaseInteractionIsValidTarget orig, PurchaseInteraction purchaseInteraction) { return orig.Invoke(purchaseInteraction) && !Object.op_Implicit((Object)(object)((Component)purchaseInteraction).GetComponent()); } internal void b__17_3(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "set_Networkcost") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(int newCost, UnlockTargetState self) { newCost = self.target.cost; HackMarker component = ((Component)self.target).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self.target).gameObject.AddComponent(); component.purchaseInteraction = self.target; component.owner = ((EntityState)self).gameObject; component.newCost = Math.Max(1, Mathf.CeilToInt((float)self.target.cost * HackMarker.costMult)); newCost = component.newCost; } return newCost; }); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "AttemptInteraction") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((GameObject gameObject, UnlockTargetState self) => (self.target.cost > 0) ? null : gameObject)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: BeaconRework Hack UnlockTargetState IL Hook failed"); } } internal bool b__17_6(Instruction x) { return ILPatternMatchingExt.MatchCall(x, "set_Networkcost"); } internal int b__17_4(int newCost, UnlockTargetState self) { newCost = self.target.cost; HackMarker component = ((Component)self.target).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self.target).gameObject.AddComponent(); component.purchaseInteraction = self.target; component.owner = ((EntityState)self).gameObject; component.newCost = Math.Max(1, Mathf.CeilToInt((float)self.target.cost * HackMarker.costMult)); newCost = component.newCost; } return newCost; } internal bool b__17_7(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "AttemptInteraction"); } internal GameObject b__17_5(GameObject gameObject, UnlockTargetState self) { if (self.target.cost > 0) { return null; } return gameObject; } } public static bool healCooldown = true; public static bool hackCooldown = true; public static bool shockCooldown = true; public static bool resupplyCooldown = true; public static bool hackDisable = false; public static bool hackChanges = true; public static bool shockChanges = true; public static bool resupplyChanges = true; public static SkillFamily BeaconFamily1 = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainSupplyDrop1SkillFamily.asset").WaitForCompletion(); public static SkillFamily BeaconFamily2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainSupplyDrop2SkillFamily.asset").WaitForCompletion(); public BeaconRework(SkillLocator sk) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown Skills.BeaconResupply = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CallSupplyDropEquipmentRestock.asset").WaitForCompletion(); Skills.BeaconHacking = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CallSupplyDropHacking.asset").WaitForCompletion(); if (resupplyCooldown) { AddCooldown(Skills.BeaconResupply, 60f); } if (hackCooldown) { AddCooldown(Skills.BeaconHacking, 60f); } if (healCooldown) { AddCooldown("RoR2/Base/Captain/CallSupplyDropHealing.asset", 60f); } else { Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CallSupplyDropHealing.asset").WaitForCompletion().skillDescriptionToken = "CAPTAIN_SUPPLY_HEAL_DESCRIPTION_RISKYMOD_PERMANENT"; } if (shockCooldown) { AddCooldown("RoR2/Base/Captain/CallSupplyDropShocking.asset", 60f); } else { Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CallSupplyDropShocking.asset").WaitForCompletion().skillDescriptionToken = "CAPTAIN_SUPPLY_SHOCKING_DESCRIPTION_RISKYMOD_PERMANENT"; } SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/PrepSupplyDrop.asset").WaitForCompletion(); val.skillDescriptionToken = "CAPTAIN_SPECIAL_DESCRIPTION_RISKYMOD"; object obj = <>c.<>9__11_0; if (obj == null) { Manipulator val2 = 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 val5 = new ILCursor(il); if (val5.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_master") })) { val5.EmitDelegate>((Func)((CharacterMaster characterMaster) => null)); } else { Debug.LogError((object)"RiskyMod: BeaconRework Deployable IL Hook failed"); } }; <>c.<>9__11_0 = val2; obj = (object)val2; } CallSupplyDropBase.OnEnter += (Manipulator)obj; CaptainCore.bodyPrefab.AddComponent(); object obj2 = <>c.<>9__11_1; if (obj2 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "Spawn") })) { val4.Emit(OpCodes.Ldarg_0); val4.EmitDelegate>((Func)delegate(GameObject beacon, CallSupplyDropBase self) { CaptainDeployableManager component = ((EntityState)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddBeacon(beacon, ((BaseSkillState)self).activatorSkillSlot); } return beacon; }); } else { Debug.LogError((object)"RiskyMod: BeaconRework IL Hook failed"); } }; <>c.<>9__11_1 = val3; obj2 = (object)val3; } CallSupplyDropBase.OnEnter += (Manipulator)obj2; RecalculateStats.HandleRecalculateStatsActions = (RecalculateStats.HandleRecalculateStats)Delegate.Combine(RecalculateStats.HandleRecalculateStatsActions, (RecalculateStats.HandleRecalculateStats)delegate(CharacterBody self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (self.bodyIndex == CaptainCore.CaptainIndex && self.skillLocator.special.bonusStockFromBody > 0) { int num = Mathf.CeilToInt((float)self.skillLocator.special.bonusStockFromBody / 2f); int bonusStockFromBody = self.skillLocator.special.bonusStockFromBody - num; self.skillLocator.FindSkill("SupplyDrop1").SetBonusStockFromBody(num); self.skillLocator.FindSkill("SupplyDrop2").SetBonusStockFromBody(bonusStockFromBody); } }); ModifyBeacons(sk); } private void AddCooldown(string address, float cooldown) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) SkillDef sd = Addressables.LoadAssetAsync((object)address).WaitForCompletion(); AddCooldown(sd, cooldown); } private void AddCooldown(SkillDef sd, float cooldown) { //IL_0031: 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_003c: Expected O, but got Unknown sd.rechargeStock = 1; sd.baseRechargeInterval = cooldown; sd.baseMaxStock = 1; sd.beginSkillCooldownOnSkillEnd = false; object obj = <>c.<>9__13_0; if (obj == null) { hook_SetSkillOverride val = delegate(orig_SetSkillOverride orig, CaptainSupplyDropController self, ref SkillDef currentSkillDef, SkillDef newSkillDef, GenericSkill component) { newSkillDef = currentSkillDef; orig.Invoke(self, ref currentSkillDef, newSkillDef, component); }; <>c.<>9__13_0 = val; obj = (object)val; } CaptainSupplyDropController.SetSkillOverride += (hook_SetSkillOverride)obj; } private void ModifyBeacons(SkillLocator sk) { ModifyBeaconResupply(sk); ModifyBeaconHacking(sk); ModifyBeaconShocking(sk); } private void ModifyBeaconShocking(SkillLocator sk) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown if (!shockChanges) { return; } global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Captain/EntityStates.CaptainSupplyDrop.ShockZoneMainState.asset", "shockRadius", "15"); object obj = <>c.<>9__15_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val2.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(blastAttack, SharedDamageTypes.Slow50For5s); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: BeaconRework Shock IL Hook failed"); } }; <>c.<>9__15_0 = val; obj = (object)val; } ShockZoneMainState.Shock += (Manipulator)obj; } private void ModifyBeaconResupply(SkillLocator sk) { //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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CallSupplyDropEquipmentRestock.asset").WaitForCompletion(); if (!resupplyChanges) { string skillDescriptionToken = (resupplyCooldown ? "CAPTAIN_SUPPLY_EQUIPMENT_RESTOCK_DESCRIPTION_RISKYMOD" : "CAPTAIN_SUPPLY_EQUIPMENT_RESTOCK_DESCRIPTION_RISKYMOD_PERMANENT"); val.skillDescriptionToken = skillDescriptionToken; return; } GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainSupplyDrop, EquipmentRestock.prefab").WaitForCompletion(), "RiskyMod_CaptainSupplyEquipmentRestock", true); EntityStateMachine component = val2.GetComponent(); component.mainStateType = new SerializableEntityStateType(typeof(BeaconSkillRestoreMain)); global::RiskyMod.Content.Content.entityStates.Add(typeof(BeaconSkillRestoreMain)); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Captain/EntityStates.Captain.Weapon.CallSupplyDropEquipmentRestock.asset", "supplyDropPrefab", (Object)(object)val2); string skillDescriptionToken2 = (resupplyCooldown ? "CAPTAIN_SUPPLY_SKILL_RESTOCK_DESCRIPTION_RISKYMOD" : "CAPTAIN_SUPPLY_SKILL_RESTOCK_DESCRIPTION_RISKYMOD_PERMANENT"); val.skillDescriptionToken = skillDescriptionToken2; } private void ModifyBeaconHacking(SkillLocator sk) { //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_00b6: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown if (hackDisable) { BeaconFamily1.variants = BeaconFamily1.variants.Where((Variant v) => ((SerializableEntityStateType)(ref v.skillDef.activationState)).stateType != typeof(CallSupplyDropHacking)).ToArray(); BeaconFamily2.variants = BeaconFamily2.variants.Where((Variant v) => ((SerializableEntityStateType)(ref v.skillDef.activationState)).stateType != typeof(CallSupplyDropHacking)).ToArray(); } else if (hackChanges) { string skillDescriptionToken = (hackCooldown ? "CAPTAIN_SUPPLY_PRICE_REDUCTION_DESCRIPTION_RISKYMOD" : "CAPTAIN_SUPPLY_PRICE_REDUCTION_DESCRIPTION_RISKYMOD_PERMANENT"); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CallSupplyDropHacking.asset").WaitForCompletion(); val.skillDescriptionToken = skillDescriptionToken; object obj = <>c.<>9__17_2; if (obj == null) { hook_PurchaseInteractionIsValidTarget val2 = (orig_PurchaseInteractionIsValidTarget orig, PurchaseInteraction purchaseInteraction) => orig.Invoke(purchaseInteraction) && !Object.op_Implicit((Object)(object)((Component)purchaseInteraction).GetComponent()); <>c.<>9__17_2 = val2; obj = (object)val2; } HackingMainState.PurchaseInteractionIsValidTarget += (hook_PurchaseInteractionIsValidTarget)obj; object obj2 = <>c.<>9__17_3; if (obj2 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val5 = new ILCursor(il); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "set_Networkcost") })) { val5.Emit(OpCodes.Ldarg_0); val5.EmitDelegate>((Func)delegate(int newCost, UnlockTargetState self) { newCost = self.target.cost; HackMarker component = ((Component)self.target).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self.target).gameObject.AddComponent(); component.purchaseInteraction = self.target; component.owner = ((EntityState)self).gameObject; component.newCost = Math.Max(1, Mathf.CeilToInt((float)self.target.cost * HackMarker.costMult)); newCost = component.newCost; } return newCost; }); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "AttemptInteraction") })) { val5.Emit(OpCodes.Ldarg_0); val5.EmitDelegate>((Func)((GameObject gameObject, UnlockTargetState self) => (self.target.cost > 0) ? null : gameObject)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: BeaconRework Hack UnlockTargetState IL Hook failed"); } }; <>c.<>9__17_3 = val3; obj2 = (object)val3; } UnlockTargetState.OnEnter += (Manipulator)obj2; } else { string skillDescriptionToken2 = (hackCooldown ? "CAPTAIN_SUPPLY_HACKING_DESCRIPTION" : "CAPTAIN_SUPPLY_HACKING_DESCRIPTION_RISKYMOD_PERMANENT"); SkillDef val4 = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CallSupplyDropHacking.asset").WaitForCompletion(); val4.skillDescriptionToken = skillDescriptionToken2; } } } public class CaptainCore { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_ApplyAmmoPack <>9__10_0; internal void <.ctor>b__10_0(orig_ApplyAmmoPack orig, GenericSkill self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (beaconRework && (self.skillName == "SupplyDrop1" || self.skillName == "SupplyDrop2")) { return; } if (nukeAmmopackNerf) { SerializableEntityStateType activationState = self.activationState; if (((SerializableEntityStateType)(ref activationState)).stateType == typeof(SetupAirstrikeAlt)) { if (self.stock < self.maxStock) { self.rechargeStopwatch += Mathf.Max(20f, 0.5f * self.finalRechargeInterval); } return; } } orig.Invoke(self); } } public static bool enabled = true; public static bool enablePrimarySkillChanges = true; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainBody.prefab").WaitForCompletion(); public static bool modifyTaser = true; public static bool nukeAmmopackNerf = true; public static bool nukeProc = true; public static bool nukeFalloff = true; public static bool disableNukeFriendlyFire = false; public static bool beaconRework = true; public static BodyIndex CaptainIndex; public CaptainCore() { //IL_0091: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) if (!enabled) { return; } if (Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.Admiral")) { Debug.LogWarning((object)"RiskyMod: Loading CaptainCore while Admiral is installed, there may be conflicts. Check your RiskyMod/Admiral config files and adjust accordingly."); } new Microbots(); ModifySkills(bodyPrefab.GetComponent()); if (nukeAmmopackNerf || beaconRework) { object obj = <>c.<>9__10_0; if (obj == null) { hook_ApplyAmmoPack val = delegate(orig_ApplyAmmoPack orig, GenericSkill self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (!beaconRework || (!(self.skillName == "SupplyDrop1") && !(self.skillName == "SupplyDrop2"))) { if (nukeAmmopackNerf) { SerializableEntityStateType activationState = self.activationState; if (((SerializableEntityStateType)(ref activationState)).stateType == typeof(SetupAirstrikeAlt)) { if (self.stock < self.maxStock) { self.rechargeStopwatch += Mathf.Max(20f, 0.5f * self.finalRechargeInterval); } return; } } orig.Invoke(self); } }; <>c.<>9__10_0 = val; obj = (object)val; } GenericSkill.ApplyAmmoPack += (hook_ApplyAmmoPack)obj; } GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainAirstrikeAltProjectile.prefab").WaitForCompletion(); ProjectileImpactExplosion component = val2.GetComponent(); if (nukeProc) { ((ProjectileExplosion)component).blastProcCoefficient = 3f; } if (nukeFalloff) { ((ProjectileExplosion)component).falloffModel = (FalloffModel)0; } if (disableNukeFriendlyFire) { ((ProjectileExplosion)component).blastAttackerFiltering = (AttackerFiltering)3; } RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); } private void OnLoad() { //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) CaptainIndex = BodyCatalog.FindBodyIndex("CaptainBody"); } private void ModifySkills(SkillLocator sk) { ModifyPrimaries(sk); ModifySecondaries(sk); ModifyBeacons(sk); } private void ModifyPrimaries(SkillLocator sk) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if (enablePrimarySkillChanges) { global::RiskyMod.Content.Content.entityStates.Add(typeof(ChargeShotgun)); global::RiskyMod.Content.Content.entityStates.Add(typeof(FireShotgun)); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainShotgun.asset").WaitForCompletion(); SkillDef val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(ChargeShotgun)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 0f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = val.icon; val2.interruptPriority = (InterruptPriority)0; val2.isCombatSkill = true; val2.keywordTokens = new string[0]; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.skillName = "ChargeShotgun"; val2.skillNameToken = "CAPTAIN_PRIMARY_NAME"; val2.skillDescriptionToken = "CAPTAIN_PRIMARY_DESCRIPTION_RISKYMOD"; val2.stockToConsume = 1; global::SneedUtils.SneedUtils.FixSkillName(val2); global::RiskyMod.Content.Content.skillDefs.Add(val2); Skills.Shotgun = val2; CaptainAutoFire.targetSkills.Add(val2); global::SneedUtils.SneedUtils.ReplaceSkillDef(sk.primary.skillFamily, val, Skills.Shotgun); } } public static void ScalePellets_SettingChanged(object sender, EventArgs e) { if (Object.op_Implicit((Object)(object)Skills.Shotgun)) { Skills.Shotgun.skillDescriptionToken = (FireShotgun.scalePellets.Value ? "CAPTAIN_PRIMARY_DESCRIPTION_RISKYMOD" : "CAPTAIN_PRIMARY_DESCRIPTION_VANILLA_RISKYMOD"); } } private void ModifySecondaries(SkillLocator sk) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) if (modifyTaser) { new TaserRework(); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainTazer.asset").WaitForCompletion(); val.skillDescriptionToken = "CAPTAIN_SECONDARY_DESCRIPTION_RISKYMOD"; } } private void ModifyBeacons(SkillLocator sk) { if (beaconRework) { new BeaconRework(sk); } } } public class Skills { public static SkillDef Shotgun; } public class Microbots { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_DeleteNearbyProjectile <>9__2_0; internal bool <.ctor>b__2_0(orig_DeleteNearbyProjectile orig, DefenseMatrixOn self) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown Vector3 val = (Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)self).attachedBody) ? ((BaseBodyAttachmentState)self).attachedBody.corePosition : Vector3.zero); TeamIndex val2 = (TeamIndex)((!Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)self).attachedBody)) ? (-1) : ((int)((BaseBodyAttachmentState)self).attachedBody.teamComponent.teamIndex)); float num = DefenseMatrixOn.projectileEraserRadius * DefenseMatrixOn.projectileEraserRadius; int num2 = 0; int itemStack = self.GetItemStack(); bool result = false; List instancesList = InstanceTracker.GetInstancesList(); List list = new List(); int i = 0; for (int count = instancesList.Count; i < count; i++) { if (num2 >= itemStack) { break; } ProjectileController val3 = instancesList[i]; if (val3.cannotBeDeleted || val3.teamFilter.teamIndex == val2) { continue; } Vector3 val4 = ((Component)val3).transform.position - val; if (((Vector3)(ref val4)).sqrMagnitude < num) { bool flag = true; ProjectileSimple component = ((Component)val3).gameObject.GetComponent(); ProjectileCharacterController component2 = ((Component)val3).gameObject.GetComponent(); if ((!Object.op_Implicit((Object)(object)component) || (Object.op_Implicit((Object)(object)component) && component.desiredForwardSpeed == 0f)) && !Object.op_Implicit((Object)(object)component2)) { flag = false; } if (flag) { list.Add(val3); num2++; } } } int j = 0; for (int count2 = list.Count; j < count2; j++) { ProjectileController val5 = list[j]; if (Object.op_Implicit((Object)(object)val5)) { result = true; Vector3 position = ((Component)val5).transform.position; Vector3 start = val; if (Object.op_Implicit((Object)(object)DefenseMatrixOn.tracerEffectPrefab)) { EffectData val6 = new EffectData { origin = position, start = start }; EffectManager.SpawnEffect(DefenseMatrixOn.tracerEffectPrefab, val6, true); } EntityState.Destroy((Object)(object)((Component)val5).gameObject); } } return result; } } public static bool deletionRestrictions = true; public static bool droneScaling = true; public Microbots() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (deletionRestrictions) { object obj = <>c.<>9__2_0; if (obj == null) { hook_DeleteNearbyProjectile val = delegate(orig_DeleteNearbyProjectile orig, DefenseMatrixOn self) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown Vector3 val3 = (Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)self).attachedBody) ? ((BaseBodyAttachmentState)self).attachedBody.corePosition : Vector3.zero); TeamIndex val4 = (TeamIndex)((!Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)self).attachedBody)) ? (-1) : ((int)((BaseBodyAttachmentState)self).attachedBody.teamComponent.teamIndex)); float num = DefenseMatrixOn.projectileEraserRadius * DefenseMatrixOn.projectileEraserRadius; int num2 = 0; int itemStack = self.GetItemStack(); bool result = false; List instancesList = InstanceTracker.GetInstancesList(); List list = new List(); int i = 0; for (int count = instancesList.Count; i < count; i++) { if (num2 >= itemStack) { break; } ProjectileController val5 = instancesList[i]; if (!val5.cannotBeDeleted && val5.teamFilter.teamIndex != val4) { Vector3 val6 = ((Component)val5).transform.position - val3; if (((Vector3)(ref val6)).sqrMagnitude < num) { bool flag = true; ProjectileSimple component = ((Component)val5).gameObject.GetComponent(); ProjectileCharacterController component2 = ((Component)val5).gameObject.GetComponent(); if ((!Object.op_Implicit((Object)(object)component) || (Object.op_Implicit((Object)(object)component) && component.desiredForwardSpeed == 0f)) && !Object.op_Implicit((Object)(object)component2)) { flag = false; } if (flag) { list.Add(val5); num2++; } } } } int j = 0; for (int count2 = list.Count; j < count2; j++) { ProjectileController val7 = list[j]; if (Object.op_Implicit((Object)(object)val7)) { result = true; Vector3 position = ((Component)val7).transform.position; Vector3 start = val3; if (Object.op_Implicit((Object)(object)DefenseMatrixOn.tracerEffectPrefab)) { EffectData val8 = new EffectData { origin = position, start = start }; EffectManager.SpawnEffect(DefenseMatrixOn.tracerEffectPrefab, val8, true); } EntityState.Destroy((Object)(object)((Component)val7).gameObject); } } return result; }; <>c.<>9__2_0 = val; obj = (object)val; } DefenseMatrixOn.DeleteNearbyProjectile += (hook_DeleteNearbyProjectile)obj; } if (droneScaling) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); Hook val2 = new Hook((MethodBase)Reflection.GetMethodCached(typeof(DefenseMatrixOn), "get_rechargeFrequency"), Reflection.GetMethodCached(typeof(Microbots), "MicrobotsAttackSpeedHook")); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.CaptainDefenseMatrix); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.CaptainDefenseMatrix); } private static float MicrobotsAttackSpeedHook(DefenseMatrixOn self) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Invalid comparison between Unknown and I4 //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Invalid comparison between Unknown and I4 //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) float num = 1f; if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.master)) { ItemIndex val = ItemCatalog.FindItemIndex("DronemeldInternalStackItem"); ItemIndex val2 = ItemCatalog.FindItemIndex("MinionMeldInternalStackItem"); foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if (!Object.op_Implicit((Object)(object)readOnlyInstances.minionOwnership) || !((Object)(object)readOnlyInstances.minionOwnership.ownerMaster == (Object)(object)((EntityState)self).characterBody.master)) { continue; } CharacterBody body = readOnlyInstances.GetBody(); if (!Object.op_Implicit((Object)(object)body) || body.isPlayerControlled) { continue; } if ((int)(body.bodyFlags = (BodyFlags)(body.bodyFlags & 2)) != 2) { continue; } int num2 = 1; if (Object.op_Implicit((Object)(object)body.inventory)) { if ((int)val != -1) { num2 += body.inventory.GetItemCountEffective(val); } if ((int)val2 != -1) { num2 += body.inventory.GetItemCountEffective(val2); } num2 += body.inventory.GetItemCountEffective(Items.DroneUpgradeHidden); } num += 0.2f * (float)num2; } } return DefenseMatrixOn.baseRechargeFrequency / num; } } public class TaserRework { public TaserRework() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0089: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainTazer.prefab").WaitForCompletion(), "RiskyModCaptainTazer", true); Object.Destroy((Object)(object)val.GetComponent()); ProjectileSingleTargetImpact val2 = val.AddComponent(); val2.destroyOnWorld = false; val2.destroyWhenNotAlive = true; val2.impactEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainTazerNova.prefab").WaitForCompletion(); global::RiskyMod.Content.Content.projectilePrefabs.Add(val); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Captain/EntityStates.Captain.Weapon.FireTazer.asset", "projectilePrefab", (Object)(object)val); ProjectileDamage component = val.GetComponent(); component.damageType = DamageTypeCombo.op_Implicit((DamageType)16777216) | DamageTypeCombo.op_Implicit((DamageSource)2); DamageAPI.AddModdedDamageType(ref component.damageType, SharedDamageTypes.Slow50For5s); DamageAPI.AddModdedDamageType(ref component.damageType, SharedDamageTypes.CaptainTaserSource); FireTazer.Fire += new Manipulator(FireTazer_Fire); } private void FireTazer_Fire(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "FireProjectile") })) { val.EmitDelegate>((Func)delegate(FireProjectileInfo info) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (info.damageTypeOverride.HasValue) { DamageTypeCombo value = info.damageTypeOverride.Value; DamageAPI.AddModdedDamageType(ref value, SharedDamageTypes.Slow50For5s); DamageAPI.AddModdedDamageType(ref value, SharedDamageTypes.CaptainTaserSource); info.damageTypeOverride = value; } return info; }); } else { Debug.LogError((object)"RiskyMod: FireTazer_Fire IL Hook failed."); } } } } namespace RiskyMod.Survivors.Bandit2 { public class BackstabRework { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ConvertCritChanceToCritDamage") })) { val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(int cdCount, CharacterBody self) { //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_0013: Unknown result type (might be due to invalid IL or missing references) if (cdCount < 1 && self.bodyIndex == Bandit2Core.bodyIndex && ((Enum)self.bodyFlags).HasFlag((Enum)(object)(BodyFlags)128)) { cdCount = 1; } return cdCount; }); } else { Debug.LogError((object)"RiskyMod: BackstabRework IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ConvertCritChanceToCritDamage"); } internal int <.ctor>b__1_1(int cdCount, CharacterBody self) { //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_0013: Unknown result type (might be due to invalid IL or missing references) if (cdCount < 1 && self.bodyIndex == Bandit2Core.bodyIndex && ((Enum)self.bodyFlags).HasFlag((Enum)(object)(BodyFlags)128)) { cdCount = 1; } return cdCount; } } public static bool enabled = true; public BackstabRework() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ConvertCritChanceToCritDamage") })) { val2.Index += 2; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)delegate(int cdCount, CharacterBody self) { //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_0013: Unknown result type (might be due to invalid IL or missing references) if (cdCount < 1 && self.bodyIndex == Bandit2Core.bodyIndex && ((Enum)self.bodyFlags).HasFlag((Enum)(object)(BodyFlags)128)) { cdCount = 1; } return cdCount; }); } else { Debug.LogError((object)"RiskyMod: BackstabRework IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (sender.bodyIndex == Bandit2Core.bodyIndex && ((Enum)sender.bodyFlags).HasFlag((Enum)(object)(BodyFlags)128)) { args.critDamageMultAdd -= 0.5f; } } } public class Bandit2Core { public static class Buffs { public static BuffDef Standoff1; public static BuffDef Standoff2; public static BuffDef Standoff3; public static BuffDef Standoff4; public static BuffDef Standoff5; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_FireShiv <>9__22_0; internal void b__22_0(orig_FireShiv orig, Bandit2FireShiv self) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Bandit2FireShiv.muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(Bandit2FireShiv.muzzleEffectPrefab, ((EntityState)self).gameObject, Bandit2FireShiv.muzzleString, false); } if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); if ((Object)(object)self.projectilePrefab != (Object)null) { FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = self.projectilePrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.owner = ((EntityState)self).gameObject; val.damage = ((BaseState)self).damageStat * self.damageCoefficient; val.force = self.force; val.crit = ((BaseState)self).RollCrit(); val.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)134217760); FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); ProjectileManager.instance.FireProjectile(val2); } } } } public static BuffDef SpecialDebuff; public static ModdedDamageType RackEmUpDamage; public static ModdedDamageType StandoffDamage; public static bool enabled = true; public static bool modifyStats = true; public static bool blastChanges = true; public static bool burstChanges = true; public static bool knifeChanges = true; public static bool knifeThrowChanges = true; public static bool noKnifeCancel = true; public static bool utilityChanges = true; public static bool utilityFix = true; public static bool specialRework = true; public static BodyIndex bodyIndex; public static GameObject bodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2Body.prefab").WaitForCompletion(); public Bandit2Core() { if (enabled) { new PersistentDesperado(); ModifyStats(bodyPrefab.GetComponent()); ModifySkills(bodyPrefab.GetComponent()); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); } } private void OnLoad() { //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) bodyIndex = BodyCatalog.FindBodyIndex("Bandit2Body"); } private void ModifyStats(CharacterBody cb) { if (modifyStats) { cb.baseMaxHealth = 100f; cb.levelMaxHealth = 30f; } } private void ModifySkills(SkillLocator sk) { ModifyPassives(sk); ModifyPrimaries(sk); ModifySecondaries(sk); ModifyUtilities(sk); ModifySpecials(sk); } private void ModifyPassives(SkillLocator sk) { if (BackstabRework.enabled) { new BackstabRework(); sk.passiveSkill.skillDescriptionToken = "BANDIT2_PASSIVE_DESCRIPTION_RISKYMOD"; } } private void ModifyPrimaries(SkillLocator sk) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) global::RiskyMod.Content.Content.entityStates.Add(typeof(EnterReload)); global::RiskyMod.Content.Content.entityStates.Add(typeof(Reload)); if (burstChanges) { global::RiskyMod.Content.Content.entityStates.Add(typeof(FirePrimaryShotgun)); ReloadSkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/FireShotgun2.asset").WaitForCompletion(); ((SkillDef)val).activationState = new SerializableEntityStateType(typeof(FirePrimaryShotgun)); ((SkillDef)val).skillDescriptionToken = "BANDIT2_PRIMARY_DESC_RISKYMOD"; val.reloadState = new SerializableEntityStateType(typeof(EnterReload)); ((SkillDef)val).mustKeyPress = false; } if (blastChanges) { global::RiskyMod.Content.Content.entityStates.Add(typeof(FirePrimaryRifle)); ReloadSkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2Blast.asset").WaitForCompletion(); ((SkillDef)val2).activationState = new SerializableEntityStateType(typeof(FirePrimaryRifle)); ((SkillDef)val2).skillDescriptionToken = "BANDIT2_PRIMARY_ALT_DESC_RISKYMOD"; val2.reloadState = new SerializableEntityStateType(typeof(EnterReload)); ((SkillDef)val2).mustKeyPress = false; } } private void ModifySecondaries(SkillLocator sk) { //IL_003b: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown if (BuffHemorrhage.enabled) { new BuffHemorrhage(); } if (noKnifeCancel) { EntityStateMachine val = bodyPrefab.AddComponent(); val.customName = "KnifeArm"; val.initialStateType = new SerializableEntityStateType(typeof(BaseState)); val.mainStateType = new SerializableEntityStateType(typeof(BaseState)); NetworkStateMachine component = bodyPrefab.GetComponent(); component.stateMachines = component.stateMachines.Append(val).ToArray(); } if (knifeChanges) { SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/SlashBlade.asset").WaitForCompletion(); if (noKnifeCancel) { val2.activationStateMachineName = "KnifeArm"; } } if (!knifeThrowChanges) { return; } SkillDef val3 = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2SerratedShivs.asset").WaitForCompletion(); val3.keywordTokens = new string[2] { "KEYWORD_STUNNING", "KEYWORD_SUPERBLEED" }; val3.skillDescriptionToken = "BANDIT2_SECONDARY_ALT_DESCRIPTION_RISKYMOD"; if (noKnifeCancel) { val3.activationStateMachineName = "KnifeArm"; } object obj = <>c.<>9__22_0; if (obj == null) { hook_FireShiv val4 = delegate(orig_FireShiv orig, Bandit2FireShiv self) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Bandit2FireShiv.muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(Bandit2FireShiv.muzzleEffectPrefab, ((EntityState)self).gameObject, Bandit2FireShiv.muzzleString, false); } if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); if ((Object)(object)self.projectilePrefab != (Object)null) { FireProjectileInfo val5 = default(FireProjectileInfo); val5.projectilePrefab = self.projectilePrefab; val5.position = ((Ray)(ref aimRay)).origin; val5.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val5.owner = ((EntityState)self).gameObject; val5.damage = ((BaseState)self).damageStat * self.damageCoefficient; val5.force = self.force; val5.crit = ((BaseState)self).RollCrit(); val5.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)134217760); FireProjectileInfo val6 = val5; ProjectileManager.instance.FireProjectile(val6); ProjectileManager.instance.FireProjectile(val6); } } }; <>c.<>9__22_0 = val4; obj = (object)val4; } Bandit2FireShiv.FireShiv += (hook_FireShiv)obj; } private void ModifyUtilities(SkillLocator sk) { //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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/ThrowSmokebomb.asset").WaitForCompletion(); if (utilityFix) { global::RiskyMod.Content.Content.entityStates.Add(typeof(ThrowSmokebomb)); global::RiskyMod.Content.Content.entityStates.Add(typeof(StealthMode)); val.activationState = new SerializableEntityStateType(typeof(ThrowSmokebomb)); val.mustKeyPress = false; val.interruptPriority = (InterruptPriority)1; } if (utilityChanges) { val.baseRechargeInterval = 7f; } } private void ModifySpecials(SkillLocator sk) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) if (specialRework) { RackEmUpDamage = DamageAPI.ReserveDamageType(); StandoffDamage = DamageAPI.ReserveDamageType(); SpecialDamageType(sk); SpecialDebuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyModBanditRevolver", canStack: true, isCooldown: false, isDebuff: true, new Color(41f / 51f, 41f / 85f, 43f / 51f), Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/bdBanditSkull.asset").WaitForCompletion().iconSprite); new SpecialDamageTweaks(); global::RiskyMod.Content.Content.entityStates.Add(typeof(BaseSidearmState)); global::RiskyMod.Content.Content.entityStates.Add(typeof(ExitSidearm)); global::RiskyMod.Content.Content.entityStates.Add(typeof(PrepLightsOut)); global::RiskyMod.Content.Content.entityStates.Add(typeof(FireLightsOut)); global::RiskyMod.Content.Content.entityStates.Add(typeof(PrepRackEmUp)); global::RiskyMod.Content.Content.entityStates.Add(typeof(FireRackEmUp)); SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/ResetRevolver.asset").WaitForCompletion(); val.activationState = new SerializableEntityStateType(typeof(PrepLightsOut)); val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.skillDescriptionToken = "BANDIT2_SPECIAL_DESCRIPTION_RISKYMOD"; val.mustKeyPress = false; val.interruptPriority = (InterruptPriority)1; Skills.LightsOut = val; SkillDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/SkullRevolver.asset").WaitForCompletion(); val2.activationState = new SerializableEntityStateType(typeof(PrepRackEmUp)); val2.beginSkillCooldownOnSkillEnd = true; val2.canceledFromSprinting = false; val2.mustKeyPress = false; val2.skillNameToken = "BANDIT2_SPECIAL_ALT_NAME_RISKYMOD"; val2.skillDescriptionToken = "BANDIT2_SPECIAL_ALT_DESCRIPTION_RISKYMOD"; val2.interruptPriority = (InterruptPriority)1; Skills.RackEmUp = val2; if (SoftDependencies.ScepterPluginLoaded) { BuildScepterSkillDefs(sk); SetupScepter(); } } } public static void ApplyStandoff(CharacterBody body) { int num = 0; if (body.HasBuff(Buffs.Standoff5)) { num = 5; } else if (body.HasBuff(Buffs.Standoff4)) { num = 4; } else if (body.HasBuff(Buffs.Standoff3)) { num = 3; } else if (body.HasBuff(Buffs.Standoff2)) { num = 2; } else if (body.HasBuff(Buffs.Standoff1)) { num = 1; } body.ClearTimedBuffs(Buffs.Standoff1); body.ClearTimedBuffs(Buffs.Standoff2); body.ClearTimedBuffs(Buffs.Standoff3); body.ClearTimedBuffs(Buffs.Standoff4); body.ClearTimedBuffs(Buffs.Standoff5); if (num < 5) { num++; } BuffDef val = null; switch (num) { case 5: val = Buffs.Standoff5; break; case 4: val = Buffs.Standoff4; break; case 3: val = Buffs.Standoff3; break; case 2: val = Buffs.Standoff2; break; case 1: val = Buffs.Standoff1; break; } if (Object.op_Implicit((Object)(object)val)) { global::SneedUtils.SneedUtils.AddCooldownBuff(body, val, 15); } } private void BuildScepterSkillDefs(SkillLocator sk) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) SkillDef val = ScriptableObject.CreateInstance(); global::RiskyMod.Content.Content.entityStates.Add(typeof(PrepLightsOutScepter)); global::RiskyMod.Content.Content.entityStates.Add(typeof(FireLightsOutScepter)); val.activationState = new SerializableEntityStateType(typeof(PrepLightsOutScepter)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = 4f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.forceSprintDuringState = false; val.fullRestockOnAssign = true; val.icon = Assets.ScepterSkillIcons.LightsOutScepter; val.interruptPriority = (InterruptPriority)1; val.isCombatSkill = true; val.keywordTokens = new string[1] { "KEYWORD_SLAYER" }; val.mustKeyPress = false; val.cancelSprintingOnActivation = true; val.rechargeStock = 1; val.requiredStock = 1; val.skillName = "LightsOutScepter"; val.skillNameToken = "BANDIT2_SPECIAL_SCEPTER_NAME_RISKYMOD"; val.skillDescriptionToken = "BANDIT2_SPECIAL_SCEPTER_DESCRIPTION_RISKYMOD"; val.stockToConsume = 1; global::SneedUtils.SneedUtils.FixSkillName(val); global::RiskyMod.Content.Content.skillDefs.Add(val); Skills.LightsOutScepter = val; SkillDef val2 = ScriptableObject.CreateInstance(); global::RiskyMod.Content.Content.entityStates.Add(typeof(PrepRackEmUpScepter)); global::RiskyMod.Content.Content.entityStates.Add(typeof(FireRackEmUpScepter)); val2.activationState = new SerializableEntityStateType(typeof(PrepRackEmUpScepter)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 4f; val2.beginSkillCooldownOnSkillEnd = true; val2.canceledFromSprinting = false; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = Assets.ScepterSkillIcons.RackEmUpScepter; val2.interruptPriority = (InterruptPriority)1; val2.isCombatSkill = true; val2.keywordTokens = new string[1] { "KEYWORD_SLAYER" }; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.skillName = "RackEmUpScepter"; val2.skillNameToken = "BANDIT2_SPECIAL_ALT_SCEPTER_NAME_RISKYMOD"; val2.skillDescriptionToken = "BANDIT2_SPECIAL_ALT_SCEPTER_DESCRIPTION_RISKYMOD"; val2.stockToConsume = 1; global::SneedUtils.SneedUtils.FixSkillName(val2); global::RiskyMod.Content.Content.skillDefs.Add(val2); Skills.RackEmUpScepter = val2; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void SetupScepter() { ItemBase.instance.RegisterScepterSkill(Skills.LightsOutScepter, "Bandit2Body", Skills.LightsOut); ItemBase.instance.RegisterScepterSkill(Skills.RackEmUpScepter, "Bandit2Body", Skills.RackEmUp); } private void SpecialDamageType(SkillLocator sk) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Expected O, but got Unknown //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Expected O, but got Unknown //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) bodyPrefab.AddComponent(); GenericSkill val = bodyPrefab.AddComponent(); val.loadoutTitleToken = "BANDIT2_REVOLVER_LOADOUT_TITLE_RISKYMOD"; SkillDef val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(BaseState)); val2.activationStateMachineName = "Weapon"; val2.skillDescriptionToken = "BANDIT2_REVOLVER_DESCRIPTION_RISKYMOD"; val2.skillName = "Gunslinger"; val2.skillNameToken = "BANDIT2_REVOLVER_NAME_RISKYMOD"; val2.keywordTokens = new string[0]; val2.icon = Assets.SkillIcons.Bandit2Gunslinger; Skills.Gunslinger = val2; global::SneedUtils.SneedUtils.FixSkillName(val2); global::RiskyMod.Content.Content.skillDefs.Add(Skills.Gunslinger); SkillDef val3 = ScriptableObject.CreateInstance(); val3.activationState = new SerializableEntityStateType(typeof(BaseState)); val3.activationStateMachineName = "Weapon"; val3.skillDescriptionToken = (PersistentDesperado.enabled ? "BANDIT2_REVOLVER_ALT_PERSIST_DESCRIPTION_RISKYMOD" : "BANDIT2_REVOLVER_ALT_DESCRIPTION_RISKYMOD"); val3.skillName = "DesperadoKillStack"; val3.skillNameToken = "BANDIT2_SPECIAL_ALT_NAME"; val3.icon = Assets.SkillIcons.Bandit2Desperado; Skills.DesperadoKillStack = val3; global::SneedUtils.SneedUtils.FixSkillName(val3); global::RiskyMod.Content.Content.skillDefs.Add(Skills.DesperadoKillStack); SkillDef val4 = ScriptableObject.CreateInstance(); val4.activationState = new SerializableEntityStateType(typeof(BaseState)); val4.activationStateMachineName = "Weapon"; val4.skillDescriptionToken = "BANDIT2_REVOLVER_STANDOFF_DESCRIPTION_RISKYMOD"; val4.skillName = "Standoff"; val4.skillNameToken = "BANDIT2_REVOLVER_STANDOFF_NAME_RISKYMOD"; val4.keywordTokens = new string[0]; val4.icon = Assets.SkillIcons.Bandit2Standoff; Skills.Standoff = val4; global::SneedUtils.SneedUtils.FixSkillName(val4); global::RiskyMod.Content.Content.skillDefs.Add(Skills.Standoff); BuildStandoff(); SkillFamily val5 = ScriptableObject.CreateInstance(); val5.variants = (Variant[])(object)new Variant[1]; Variant[] variants = val5.variants; Variant val6 = new Variant { skillDef = Skills.Gunslinger, unlockableDef = null }; ((Variant)(ref val6)).viewableNode = new Node(Skills.Gunslinger.skillName, false, (Node)null); variants[0] = val6; Array.Resize(ref val5.variants, val5.variants.Length + 1); Variant[] variants2 = val5.variants; int num = val5.variants.Length - 1; val6 = new Variant { skillDef = Skills.DesperadoKillStack, unlockableDef = null }; ((Variant)(ref val6)).viewableNode = new Node(Skills.DesperadoKillStack.skillName, false, (Node)null); variants2[num] = val6; Array.Resize(ref val5.variants, val5.variants.Length + 1); Variant[] variants3 = val5.variants; int num2 = val5.variants.Length - 1; val6 = new Variant { skillDef = Skills.Standoff, unlockableDef = null }; ((Variant)(ref val6)).viewableNode = new Node(Skills.Standoff.skillName, false, (Node)null); variants3[num2] = val6; global::RiskyMod.Content.Content.skillFamilies.Add(val5); val._skillFamily = val5; } private void BuildStandoff() { //IL_0009: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown Buffs.Standoff1 = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_StandoffBuff1", canStack: true, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.Standoff1); Buffs.Standoff2 = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_StandoffBuff2", canStack: true, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.Standoff2); Buffs.Standoff3 = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_StandoffBuff3", canStack: true, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.Standoff3); Buffs.Standoff4 = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_StandoffBuff4", canStack: true, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.Standoff4); Buffs.Standoff5 = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_StandoffBuff5", canStack: true, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.Standoff5); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(StandoffBuffStats); } private void StandoffBuffStats(CharacterBody sender, StatHookEventArgs args) { float num = 0f; if (sender.HasBuff(Buffs.Standoff5)) { num = 5f; } else if (sender.HasBuff(Buffs.Standoff4)) { num = 4f; } else if (sender.HasBuff(Buffs.Standoff3)) { num = 3f; } else if (sender.HasBuff(Buffs.Standoff2)) { num = 2f; } else if (sender.HasBuff(Buffs.Standoff1)) { num = 1f; } args.damageMultAdd += num * 0.2f; } } public class Skills { public static SkillDef Gunslinger; public static SkillDef DesperadoKillStack; public static SkillDef Standoff; public static SkillDef LightsOut; public static SkillDef RackEmUp; public static SkillDef LightsOutScepter; public static SkillDef RackEmUpScepter; } public class BuffHemorrhage { public static bool enabled = true; public static bool enableProcs = true; public static bool bypassArmor = false; public static bool enableCrit = false; public BuffHemorrhage() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown if (enabled && (enableProcs || enableCrit)) { if (bypassArmor) { TweakBase.Instance.AddHook(); } else { TweakBase.Instance.RemoveHook(); } HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) bool flag = false; if ((int)damageInfo.dotIndex == 6 && ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)67108864) && !((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)131072) && damageInfo.procCoefficient == 0f) { if (enableProcs) { damageInfo.procCoefficient = 0.5f; flag = true; } if (enableCrit) { float num = (BackstabRework.enabled ? 1.5f : 2f); damageInfo.damage /= num; damageInfo.crit = true; } } orig.Invoke(self, damageInfo); if (flag) { GlobalEventManager.instance.OnHitEnemy(damageInfo, ((Component)self).gameObject); } } } public class PersistentDesperado { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_1; public static Manipulator <>9__2_0; internal void <.ctor>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.1f) })) { val.Next.Operand = damagePerBuff; } else { Debug.LogError((object)"RiskyMod: PersistentDesperado IL Hook failed"); } } internal bool <.ctor>b__2_1(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.1f); } } public static bool enabled = true; public static float damagePerBuff = 0.01f; public PersistentDesperado() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_004e: 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: Expected O, but got Unknown if (!enabled) { return; } GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath); CharacterBody.Start += new hook_Start(CharacterBody_Start); object obj = <>c.<>9__2_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.1f) })) { val2.Next.Operand = damagePerBuff; } else { Debug.LogError((object)"RiskyMod: PersistentDesperado IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } FireSidearmSkullRevolver.ModifyBullet += (Manipulator)obj; } private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attackerBody) && damageReport.attackerBody.bodyIndex == Bandit2Core.bodyIndex) { UpdateDesperado(damageReport.attackerBody); } } private void CharacterBody_Start(orig_Start orig, CharacterBody self) { orig.Invoke(self); UpdateDesperado(self); } private void UpdateDesperado(CharacterBody self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (self.bodyIndex != Bandit2Core.bodyIndex || !Object.op_Implicit((Object)(object)self.master)) { return; } DesperadoTracker desperadoTracker = ((Component)self.master).GetComponent(); if (!Object.op_Implicit((Object)(object)desperadoTracker)) { desperadoTracker = ((Component)self.master).gameObject.AddComponent(); } int buffCount = self.GetBuffCount(Buffs.BanditSkull); if (buffCount > desperadoTracker.count) { desperadoTracker.count = buffCount; return; } int num = desperadoTracker.count - buffCount; for (int i = 0; i < num; i++) { self.AddBuff(Buffs.BanditSkull); } } public static float GetDesperadoMult(CharacterBody cb) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) int buffCount = cb.GetBuffCount(Buffs.BanditSkull.buffIndex); if (enabled) { return 1f + (float)buffCount * damagePerBuff; } return 1f + (float)buffCount * 0.1f; } } public class DesperadoTracker : MonoBehaviour { public int count = 0; } public class SpecialDamageTweaks { private static GameObject skullEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2KillEffect.prefab").WaitForCompletion(); public SpecialDamageTweaks() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown ProcessHitEnemy.OnHitActions = (OnHit)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitActions, (Delegate?)new OnHit(ApplyBuff)); TakeDamage.ModifyInitialDamageActions = (TakeDamage.ModifyInitialDamage)Delegate.Combine(TakeDamage.ModifyInitialDamageActions, new TakeDamage.ModifyInitialDamage(RackEmUpBonus)); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(ProcStandoffOnKill); ProcessHitEnemy.PreOnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.PreOnHitAttackerActions, (Delegate?)new OnHitAttacker(AddStandoffAssist)); AssistManager.HandleDirectAssistActions = (HandleDirectAssist)Delegate.Combine((Delegate?)(object)AssistManager.HandleDirectAssistActions, (Delegate?)new HandleDirectAssist(HandleStandoffAssist)); } private void HandleStandoffAssist(Assist assist, CharacterBody killerBody, DamageInfo damageInfo) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown if (assist.damageType.HasValue || !assist.moddedDamageTypes.Contains(Bandit2Core.StandoffDamage) || assist.moddedDamageTypes.Count != 1) { return; } bool flag = DamageAPI.HasModdedDamageType(damageInfo, Bandit2Core.StandoffDamage); if (!flag || !((Object)(object)killerBody == (Object)(object)assist.attackerBody)) { Bandit2Core.ApplyStandoff(assist.attackerBody); if (!flag && !((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)268435456)) { EffectManager.SpawnEffect(skullEffect, new EffectData { origin = damageInfo.position }, true); } } } private void AddStandoffAssist(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, Bandit2Core.StandoffDamage)) { Assist val = new Assist(attackerBody, victimBody, AssistManager.GetDirectAssistDurationForAttacker(((Component)attackerBody).gameObject)); val.moddedDamageTypes.Add(Bandit2Core.StandoffDamage); AssistManager.instance.AddDirectAssist(val); } } private void ProcStandoffOnKill(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown orig.Invoke(self, damageReport); if (damageReport.damageInfo != null && DamageAPI.HasModdedDamageType(damageReport.damageInfo, Bandit2Core.StandoffDamage) && Object.op_Implicit((Object)(object)damageReport.attackerBody)) { Bandit2Core.ApplyStandoff(damageReport.attackerBody); if (!((Enum)damageReport.damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)268435456)) { EffectManager.SpawnEffect(skullEffect, new EffectData { origin = damageReport.damageInfo.position }, true); } } } private static void RackEmUpBonus(DamageInfo damageInfo, HealthComponent self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, Bandit2Core.RackEmUpDamage)) { float num = 1f + (float)self.body.GetBuffCount(Bandit2Core.SpecialDebuff) * (FireRackEmUp.bonusDamageCoefficient / FireRackEmUp.damageCoefficient); damageInfo.damage *= num; } } private static void ApplyBuff(DamageInfo damageInfo, CharacterBody victimBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, Bandit2Core.RackEmUpDamage)) { float num = 0.5f; int num2 = victimBody.GetBuffCount(Bandit2Core.SpecialDebuff) + 1; victimBody.ClearTimedBuffs(Bandit2Core.SpecialDebuff); for (int i = 0; i < num2; i++) { victimBody.AddTimedBuff(Bandit2Core.SpecialDebuff, num); } } } } } namespace RiskyMod.Survivors.Bandit2.Components { public class DesperadoPersistComponent : MonoBehaviour { public int stacks = 0; private bool addedHook; private void Awake() { addedHook = false; if (!PersistentDesperado.enabled) { addedHook = true; Stage.onServerStageBegin += Stage_onServerStageBegin; } } private void Stage_onServerStageBegin(Stage obj) { stacks = 0; } private void OnDestroy() { if (addedHook) { Stage.onServerStageBegin -= Stage_onServerStageBegin; } } } [RequireComponent(typeof(CharacterBody), typeof(SkillLocator))] public class SpecialDamageController : MonoBehaviour { private SkillLocator sk; private CharacterBody cb; private GenericSkill passiveSkillSlot; public void Awake() { //IL_003d: 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_0044: Unknown result type (might be due to invalid IL or missing references) sk = ((Component)this).GetComponent(); cb = ((Component)this).GetComponent(); for (int i = 0; i < sk.allSkills.Length; i++) { Variant[] variants = sk.allSkills[i].skillFamily.variants; foreach (Variant val in variants) { if ((Object)(object)val.skillDef == (Object)(object)Skills.Gunslinger) { passiveSkillSlot = sk.allSkills[i]; break; } } } } public SkillDef GetPassiveSkillDef() { return passiveSkillSlot.skillDef; } } } namespace RiskyMod.SharedHooks { public static class BulletAttackHooks { public static void RemoveBulletFalloff(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(BulletAttack), "Fire") })) { val.EmitDelegate>((Func)delegate(BulletAttack orig) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) orig.falloffModel = (FalloffModel)0; return orig; }); } } public static void AddBulletFalloff(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(BulletAttack), "Fire") })) { val.EmitDelegate>((Func)delegate(BulletAttack orig) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) orig.falloffModel = (FalloffModel)1; return orig; }); } } } public class GetStatCoefficients { public delegate void HandleStatsInventory(CharacterBody sender, StatHookEventArgs args, Inventory inventory); public static HandleStatsInventory HandleStatsInventoryActions; public static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory) && HandleStatsInventoryActions != null) { HandleStatsInventoryActions(sender, args, sender.inventory); } } } public class HealthComponent_UpdateLastHitTime { public delegate void UpdateLastHitTimeDelegate(HealthComponent self, float damageValue, Vector3 damagePosition, bool damageIsSilent, GameObject attacker); public delegate void UpdateLastHitTimeInventoryDelegate(HealthComponent self, float damageValue, Vector3 damagePosition, bool damageIsSilent, GameObject attacker, Inventory inventory); public static UpdateLastHitTimeDelegate UpdateLastHitTimeActions; public static UpdateLastHitTimeInventoryDelegate UpdateLastHitTimeInventoryActions; public static void UpdateLastHitTime(orig_UpdateLastHitTime orig, HealthComponent self, float damageValue, Vector3 damagePosition, bool damageIsSilent, GameObject attacker, bool delayedDamage, bool firstHitOfDelayedDamage) { //IL_0004: 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_0077: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageValue, damagePosition, damageIsSilent, attacker, delayedDamage, firstHitOfDelayedDamage); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body) && damageValue > 0f) { UpdateLastHitTimeActions?.Invoke(self, damageValue, damagePosition, damageIsSilent, attacker); if (Object.op_Implicit((Object)(object)self.body.inventory) && UpdateLastHitTimeInventoryActions != null) { UpdateLastHitTimeInventoryActions(self, damageValue, damagePosition, damageIsSilent, attacker, self.body.inventory); } } } } internal class LanguageModifiers { internal delegate void ModifyLanguageToken(LanguageModifier langMod); internal class LanguageModifier { public string token; public string local; } internal static ModifyLanguageToken ModifyLanguageTokenActions; internal static string Language_GetLocalizedStringByToken(orig_GetLocalizedStringByToken orig, Language self, string token) { string text = orig.Invoke(self, token); if (ModifyLanguageTokenActions != null) { LanguageModifier languageModifier = new LanguageModifier { token = token, local = text }; ModifyLanguageTokenActions(languageModifier); text = languageModifier.local; } return text; } } public class OnCharacterDeath { public delegate void OnCharacterDeathInventory(GlobalEventManager self, DamageReport damageReport, CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody); public static OnCharacterDeathInventory OnCharacterDeathInventoryActions; public static void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { orig.Invoke(self, damageReport); if (!NetworkServer.active) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterMaster attackerMaster = damageReport.attackerMaster; if (!Object.op_Implicit((Object)(object)attackerBody) || !Object.op_Implicit((Object)(object)attackerMaster)) { return; } CharacterBody victimBody = damageReport.victimBody; if (Object.op_Implicit((Object)(object)victimBody)) { if (Object.op_Implicit((Object)(object)Crowbar.crowbarManager)) { Crowbar.crowbarManager.Remove(victimBody.healthComponent); } Inventory val = (Object.op_Implicit((Object)(object)attackerMaster) ? attackerMaster.inventory : null); if (Object.op_Implicit((Object)(object)val)) { OnCharacterDeathInventoryActions?.Invoke(self, damageReport, attackerBody, val, victimBody); } } } } public class OnHitAll { public delegate void OnHitAllDelegate(GlobalEventManager self, DamageInfo damageInfo, GameObject hitObject); public static OnHitAllDelegate HandleOnHitAllActions; public static void GlobalEventManager_OnHitAll(orig_OnHitAllProcess orig, GlobalEventManager self, DamageInfo damageInfo, GameObject hitObject) { orig.Invoke(self, damageInfo, hitObject); if (NetworkServer.active && damageInfo.procCoefficient != 0f && !damageInfo.rejected && HandleOnHitAllActions != null) { HandleOnHitAllActions(self, damageInfo, hitObject); } } } public class RecalculateStats { public delegate void HandleRecalculateStats(CharacterBody self); public delegate void HandleRecalculateStatsInventory(CharacterBody self, Inventory inventory); public static HandleRecalculateStats HandleRecalculateStatsActions; public static HandleRecalculateStatsInventory HandleRecalculateStatsInventoryActions; public static void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (HandleRecalculateStatsActions != null) { HandleRecalculateStatsActions(self); } if (Object.op_Implicit((Object)(object)self.inventory) && HandleRecalculateStatsInventoryActions != null) { HandleRecalculateStatsInventoryActions(self, self.inventory); } } } public class TakeDamage { public delegate void OnPercentHpLost(DamageInfo damageInfo, HealthComponent self, Inventory inventory, float percentHpLost); public delegate void OnHpLostAttacker(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody, Inventory inventory, float hpLost); public delegate void ModifyInitialDamage(DamageInfo damageInfo, HealthComponent self); public delegate void ModifyInitialDamageAttacker(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody); public delegate void ModifyInitialDamageAttackerInventory(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody, Inventory attackerInventory); public delegate void OnDamageTaken(DamageInfo damageInfo, HealthComponent self); public delegate void OnDamageTakenAttacker(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody); public delegate void TakeDamageEnd(DamageInfo damageInfo, HealthComponent self); public static OnPercentHpLost OnPercentHpLostActions; public static OnHpLostAttacker OnHpLostAttackerActions; public static ModifyInitialDamage ModifyInitialDamageActions; public static ModifyInitialDamageAttacker ModifyInitialDamageAttackerActions; public static ModifyInitialDamageAttackerInventory ModifyInitialDamageAttackerInventoryActions; public static OnDamageTaken OnDamageTakenActions; public static OnDamageTakenAttacker OnDamageTakenAttackerActions; public static TakeDamageEnd TakeDamageEndActions; public static List distractOnHitBodies = new List(); public static void DistractOnHit(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) if (!self.body.isChampion && Object.op_Implicit((Object)(object)self.body.master) && self.body.master.aiComponents.Length != 0 && distractOnHitBodies.Contains(attackerBody.bodyIndex)) { BaseAI[] aiComponents = self.body.master.aiComponents; foreach (BaseAI val in aiComponents) { val.currentEnemy.gameObject = ((Component)attackerBody).gameObject; val.currentEnemy.bestHurtBox = attackerBody.mainHurtBox; val.enemyAttention = val.enemyAttentionDuration; val.targetRefreshTimer = 5f; val.BeginSkillDriver(val.EvaluateSkillDrivers()); } } } public static void HealthComponent_TakeDamage(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { float combinedHealth = self.combinedHealth; CharacterBody val = null; if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { val = damageInfo.attacker.GetComponent(); } Inventory val2 = null; if (Object.op_Implicit((Object)(object)val)) { val2 = val.inventory; } ModifyInitialDamageActions?.Invoke(damageInfo, self); if (Object.op_Implicit((Object)(object)val)) { ModifyInitialDamageAttackerActions?.Invoke(damageInfo, self, val); if (Object.op_Implicit((Object)(object)val2)) { ModifyInitialDamageAttackerInventoryActions?.Invoke(damageInfo, self, val, val2); } } orig.Invoke(self, damageInfo); if (!NetworkServer.active || damageInfo.rejected || !self.alive) { return; } OnDamageTakenActions?.Invoke(damageInfo, self); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)val)) { OnDamageTakenAttackerActions?.Invoke(damageInfo, self, val); } Inventory inventory = self.body.inventory; if (Object.op_Implicit((Object)(object)inventory)) { float num = combinedHealth - Mathf.Max(self.combinedHealth, 0f); if (num > 0f) { if (Object.op_Implicit((Object)(object)val)) { OnHpLostAttackerActions?.Invoke(damageInfo, self, val, inventory, num); } float num2 = num / self.fullCombinedHealth; num2 = Mathf.Max(num2, damageInfo.damage / self.fullCombinedHealth); OnPercentHpLostActions?.Invoke(damageInfo, self, inventory, 100f * num2); } } TakeDamageEndActions?.Invoke(damageInfo, self); } } } namespace RiskyMod.Moon { public class LargerHoldouts { public static bool enabled = true; public LargerHoldouts() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //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) if (!enabled) { return; } HoldoutZoneController.Start += new hook_Start(ModifyMoonHoldout); GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/moon2/MoonBatteryDesignPulse.prefab").WaitForCompletion(); if (Object.op_Implicit((Object)(object)val)) { PulseController component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.finalRadius = 30f; } } } private void ModifyMoonHoldout(orig_Start orig, HoldoutZoneController self) { if (self.inBoundsObjectiveToken.Contains("OBJECTIVE_MOON_BATTERY")) { self.baseRadius = 30f; } orig.Invoke(self); } } public class LessPillars { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Awake <>9__1_0; internal void <.ctor>b__1_0(orig_Awake orig, MoonBatteryMissionController self) { orig.Invoke(self); self._numRequiredBatteries = 2; } } public static bool enabled = true; public LessPillars() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, MoonBatteryMissionController self) { orig.Invoke(self); self._numRequiredBatteries = 2; }; <>c.<>9__1_0 = val; obj = (object)val; } MoonBatteryMissionController.Awake += (hook_Awake)obj; } } public class MoonCore { public static bool enabled = true; public MoonCore() { if (enabled) { new LessPillars(); new LargerHoldouts(); } } } } namespace RiskyMod.MonoBehaviours { [RequireComponent(typeof(ProjectileController), typeof(ProjectileExplosion), typeof(ProjectileDamage))] public class ProjectileZapChainOnExplosion : MonoBehaviour { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnBlastAttackResult <>9__1_0; internal void b__1_0(orig_OnBlastAttackResult orig, ProjectileExplosion self, BlastAttack blastAttack, Result result) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, blastAttack, result); ProjectileZapChainOnExplosion component = ((Component)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (!component.requireHit || result.hitCount > 0)) { component.Fire(); } } } private static bool initialized; private ProjectileController projectileController; private ProjectileDamage projectileDamage; private ProjectileExplosion projectileExplosion; public float damageCoefficient; public float procCoefficient; public float range; public int initialTargets; public int targetsPerBounce; public int maxBounces; public bool requireHit; public static void Init() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (initialized) { return; } initialized = true; object obj = <>c.<>9__1_0; if (obj == null) { hook_OnBlastAttackResult val = delegate(orig_OnBlastAttackResult orig, ProjectileExplosion self, BlastAttack blastAttack, Result result) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, blastAttack, result); ProjectileZapChainOnExplosion component = ((Component)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (!component.requireHit || result.hitCount > 0)) { component.Fire(); } }; <>c.<>9__1_0 = val; obj = (object)val; } ProjectileExplosion.OnBlastAttackResult += (hook_OnBlastAttackResult)obj; } public void Awake() { projectileController = ((Component)this).GetComponent(); projectileDamage = ((Component)this).GetComponent(); projectileExplosion = ((Component)this).GetComponent(); } public unsafe void Fire() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got I4 //IL_010b: Unknown result type (might be due to invalid IL or missing references) List bouncedObjects = new List(); for (int i = 0; i < initialTargets; i++) { ? val = new LightningOrb { bouncedObjects = bouncedObjects, attacker = projectileController.owner, inflictor = projectileController.owner, damageValue = projectileDamage.damage * damageCoefficient, procCoefficient = procCoefficient }; ? val2 = val; int num; if (!Object.op_Implicit((Object)(object)projectileController.teamFilter)) { num = -1; val = num; num = (int)val; } else { val = projectileController.teamFilter.teamIndex; num = (int)val; } ((LightningOrb)val2).teamIndex = (TeamIndex)val; ((LightningOrb)num).isCrit = projectileDamage.crit; Unsafe.Write(&((LightningOrb)num).procChainMask, default(ProcChainMask)); Unsafe.Write(&((LightningOrb)num).lightningType, (LightningType)0); Unsafe.Write(&((LightningOrb)num).damageColorIndex, (DamageColorIndex)0); ((LightningOrb)num).bouncesRemaining = maxBounces; ((LightningOrb)num).targetsToFindPerBounce = 2; ((LightningOrb)num).range = range; Unsafe.Write(&((Orb)num).origin, ((Component)this).transform.position); Unsafe.Write(&((LightningOrb)num).damageType, projectileDamage.damageType); ((LightningOrb)num).speed = 120f; LightningOrb val3 = (LightningOrb)(object)num; HurtBox val4 = val3.PickNextTarget(((Component)this).transform.position); if (Object.op_Implicit((Object)(object)val4)) { ((Orb)val3).target = val4; OrbManager.instance.AddOrb((Orb)(object)val3); val3.bouncedObjects.Add(val4.healthComponent); } } } } public class RadialForceMassLimited : MonoBehaviour { public TeamIndex teamIndex = (TeamIndex)(-1); public float maxMass; public float radius; public float damping = 0.2f; public float forceMagnitude; public float forceCoefficientAtEdge = 0.5f; public TetherVfxOrigin tetherVfxOrigin; public bool flyingOnly = false; public bool ignorePlayerControlled = false; private SphereSearch sphereSearch; public void Awake() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown sphereSearch = new SphereSearch(); } public void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) LightningBoltRepeatComponent component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { teamIndex = component.teamIndex; } if ((int)teamIndex == -1) { TeamFilter component2 = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { teamIndex = component2.teamIndex; } } } public void FixedUpdate() { List list = CollectionPool>.RentCollection(); SearchForTargets(list); int i = 0; for (int count = list.Count; i < count; i++) { ApplyPullToHurtBox(list[i]); } if (Object.op_Implicit((Object)(object)tetherVfxOrigin)) { List list2 = CollectionPool>.RentCollection(); int j = 0; for (int count2 = list.Count; j < count2; j++) { HurtBox val = list[j]; if (!Object.op_Implicit((Object)(object)val)) { continue; } Transform item = ((Component)val).transform; HealthComponent healthComponent = val.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { Transform coreTransform = healthComponent.body.coreTransform; if (Object.op_Implicit((Object)(object)coreTransform)) { item = coreTransform; } } list2.Add(item); } tetherVfxOrigin.SetTetheredTransforms(list2); CollectionPool>.ReturnCollection(list2); } CollectionPool>.ReturnCollection(list); } public void SearchForTargets(List dest) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = radius; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)0; sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamIndex)); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); sphereSearch.GetHurtBoxes(dest); sphereSearch.ClearCandidates(); } public void ApplyPullToHurtBox(HurtBox hurtBox) { //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: 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_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) bool flag = Object.op_Implicit((Object)(object)hurtBox) && Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body); bool flag2 = false; bool flag3 = false; bool flag4 = false; if (flag) { flag2 = Object.op_Implicit((Object)(object)hurtBox.healthComponent.body.rigidbody); if (flag2) { flag3 = hurtBox.healthComponent.body.rigidbody.mass <= maxMass; } if (hurtBox.healthComponent.body.isFlying || (Object.op_Implicit((Object)(object)hurtBox.healthComponent.body.characterMotor) && !hurtBox.healthComponent.body.characterMotor.isGrounded)) { flag4 = true; } } if (!flag || !flag2 || !flag3 || (flyingOnly && !flag4)) { return; } HealthComponent healthComponent = hurtBox.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent) || !NetworkServer.active) { return; } bool flag5 = Object.op_Implicit((Object)(object)healthComponent.body) && healthComponent.body.isPlayerControlled; if (!ignorePlayerControlled || !flag5) { CharacterMotor characterMotor = healthComponent.body.characterMotor; Vector3 val = ((Component)hurtBox).transform.position - ((Component)this).transform.position; float num = 1f - Mathf.Clamp(((Vector3)(ref val)).magnitude / radius, 0f, 1f - forceCoefficientAtEdge); val = ((Vector3)(ref val)).normalized * forceMagnitude * (1f - num); Vector3 velocity; float mass; if (Object.op_Implicit((Object)(object)characterMotor)) { velocity = characterMotor.velocity; mass = characterMotor.mass; } else { Rigidbody rigidbody = healthComponent.body.rigidbody; velocity = rigidbody.velocity; mass = rigidbody.mass; } velocity.y += Physics.gravity.y * Time.fixedDeltaTime; healthComponent.TakeDamageForce(val - velocity * (damping * mass * num), true, false); } } } [RequireComponent(typeof(BuffWard))] public class WardHeal : MonoBehaviour { private float stopwatch; private BuffWard ward; public float healFraction = 0.01f; public float healInterval = 1f; private void Awake() { ward = ((Component)this).GetComponent(); stopwatch = 0f; } private void FixedUpdate() { if (NetworkServer.active) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= healInterval) { stopwatch -= healInterval; Heal(); } } } private void Heal() { //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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_008c: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)ward)) { return; } float radiusSqr = ward.calculatedRadius * ward.calculatedRadius; Vector3 position = ((Component)this).transform.position; if (ward.invertTeamFilter) { TeamIndex val = (TeamIndex)0; while ((int)val < 5) { if (val != ward.teamFilter.teamIndex) { HealTeam(TeamComponent.GetTeamMembers(val), radiusSqr, position); } val = (TeamIndex)(sbyte)(val + 1); } } else { HealTeam(TeamComponent.GetTeamMembers(ward.teamFilter.teamIndex), radiusSqr, position); } } private void HealTeam(ReadOnlyCollection recipients, float radiusSqr, Vector3 currentPosition) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Invalid comparison between Unknown and I4 //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) foreach (TeamComponent recipient in recipients) { Vector3 val = ((Component)recipient).transform.position - currentPosition; if ((int)ward.shape == 1) { val.y = 0f; } if (((Vector3)(ref val)).sqrMagnitude <= radiusSqr) { CharacterBody component = ((Component)recipient).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && (!ward.requireGrounded || !Object.op_Implicit((Object)(object)component.characterMotor) || component.characterMotor.isGrounded)) { component.healthComponent.HealFraction(healFraction, default(ProcChainMask)); } } } } } } namespace RiskyMod.Items { public class ItemsCore { public delegate void ModifyItemDef(); [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__22_0; internal void b__22_0(orig_Init orig) { orig.Invoke(); if (ModifyItemDefActions != null) { ModifyItemDefActions(); } ItemDef[] changedItemPickups = ItemsCore.changedItemPickups; foreach (ItemDef val in changedItemPickups) { val.pickupToken += "_RISKYMOD"; } ItemDef[] changedItemDescs = ItemsCore.changedItemDescs; foreach (ItemDef val2 in changedItemDescs) { val2.descriptionToken += "_RISKYMOD"; } EquipmentDef[] changedEquipPickups = ItemsCore.changedEquipPickups; foreach (EquipmentDef val3 in changedEquipPickups) { val3.pickupToken += "_RISKYMOD"; } EquipmentDef[] changedEquipDescs = ItemsCore.changedEquipDescs; foreach (EquipmentDef val4 in changedEquipDescs) { val4.descriptionToken += "_RISKYMOD"; } } } public static bool enabled = true; public static bool uncommonEnabled = true; public static bool commonEnabled = true; public static bool legendaryEnabled = true; public static bool bossEnabled = true; public static bool lunarEnabled = true; public static bool voidEnabled = true; public static bool equipmentEnabled = true; public static bool foodEnabled = true; public static ItemDef[] changedItemPickups = (ItemDef[])(object)new ItemDef[0]; public static ItemDef[] changedItemDescs = (ItemDef[])(object)new ItemDef[0]; public static EquipmentDef[] changedEquipPickups = (EquipmentDef[])(object)new EquipmentDef[0]; public static EquipmentDef[] changedEquipDescs = (EquipmentDef[])(object)new EquipmentDef[0]; public static ModifyItemDef ModifyItemDefActions; public ItemsCore() { ModifyItemTokens(); if (enabled) { ModifyCommon(); ModifyUncommon(); ModifyLegendary(); ModifyVoid(); ModifyBoss(); ModifyLunar(); ModifyFood(); ModifyEquipment(); } } private void ModifyCommon() { if (commonEnabled) { new BisonSteak(); new MonsterTooth(); new CritGlasses(); new Fireworks(); new StickyBomb(); new Crowbar(); new Warbanner(); new Gasoline(); new TougherTimes(); new StunGrenade(); new DelicateWatch(); new PowerElixir(); new EclipseLite(); new HikersBoots(); } } private void ModifyUncommon() { if (uncommonEnabled) { new Chronobauble(); new LeechingSeed(); new AtG(); new ElementalBands(); new Bandolier(); new Stealthkit(); new WillOWisp(); new SquidPolyp(); new Ukulele(); new Razorwire(); new RoseBuckler(); new Guillotine(); new Berzerker(); new WarHorn(); new Infusion(); new RedWhip(); new Daisy(); new Harpoon(); new Ignition(); new BreachingFin(); new NoxiousThorn(); new Dynamite(); new KineticDampener(); } } private void ModifyLegendary() { if (legendaryEnabled) { new Tesla(); new FrostRelic(); new CeremonialDagger(); new HeadHunter(); new Headstompers(); new Behemoth(); new HappiestMask(); new Clover(); new Aegis(); new Raincoat(); new Scorpion(); new SpareDroneParts(); new LaserScope(); new Overspill(); new GrowthNectar(); new NetworkedSuffering(); } } private void ModifyVoid() { if (voidEnabled) { new Dungus(); new VoidLens(); new SaferSpaces(); new PlasmaShrimp(); new VoidWisp(); new Polylute(); new VoidRing(); new Zoea(); } } private void ModifyBoss() { if (bossEnabled) { new QueensGland(); new MoltenPerf(); new ChargedPerf(); new Shatterspleen(); new Knurl(); new Disciple(); new GenesisLoop(); new EmpathyCores(); new DefenseNucleus(); new HalcyonSeed(); new PrisonMatrix(); } } private void ModifyLunar() { if (lunarEnabled) { new ShapedGlass(); new Transcendence(); new BrittleCrown(); new Meteorite(); } } private void ModifyEquipment() { if (equipmentEnabled) { new CritHud(); new VolcanicEgg(); new BFG(); new Capacitor(); new Backup(); new SuperLeech(); new Chrysalis(); new Goobo(); } } private void ModifyFood() { if (foodEnabled) { new QuickFix(); new SearedSteak(); } } private void ModifyItemTokens() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__22_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); if (ModifyItemDefActions != null) { ModifyItemDefActions(); } ItemDef[] array = changedItemPickups; foreach (ItemDef val2 in array) { val2.pickupToken += "_RISKYMOD"; } ItemDef[] array2 = changedItemDescs; foreach (ItemDef val3 in array2) { val3.descriptionToken += "_RISKYMOD"; } EquipmentDef[] array3 = changedEquipPickups; foreach (EquipmentDef val4 in array3) { val4.pickupToken += "_RISKYMOD"; } EquipmentDef[] array4 = changedEquipDescs; foreach (EquipmentDef val5 in array4) { val5.descriptionToken += "_RISKYMOD"; } }; <>c.<>9__22_0 = val; obj = (object)val; } ItemCatalog.Init += (hook_Init)obj; } public static void ChangeEquipmentCooldown(EquipmentDef ed, float cooldown) { ed.cooldown = cooldown; } } } namespace RiskyMod.Items.Uncommon { public class AtG { public static bool enabled = true; public static bool useOrb = false; public static bool alwaysOrb = false; public static float initialDamageCoefficient = 3f; public static float stackDamageCoefficient = 2.1f; public static float projectileDamageTreshold = 4f; public static GameObject missilePrefab; public AtG() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); float initialDamage = initialDamageCoefficient - stackDamageCoefficient; GlobalEventManager.ProcessHitEnemy += (Manipulator)delegate(ILContext il) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); int num = 1; int masterLoc = -1; if (val.TryGotoNext(new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_master"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref masterLoc) }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Missile") })) { val.Emit(OpCodes.Ldloc, num); val.Emit(OpCodes.Ldloc, masterLoc); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)delegate(ItemDef item, CharacterBody victimBody, CharacterMaster master, DamageInfo damageInfo) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 if (useOrb && (int)master.teamIndex == 1) { if (alwaysOrb) { item = RiskyMod.emptyItemDef; } else if (Object.op_Implicit((Object)(object)victimBody.healthComponent) && victimBody.healthComponent.alive) { CharacterBody body = master.GetBody(); if (Object.op_Implicit((Object)(object)body) && damageInfo.damage / body.damage < projectileDamageTreshold) { item = RiskyMod.emptyItemDef; } } } return item; }); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f) })) { val.Next.Operand = stackDamageCoefficient; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + initialDamage)); if (RiskyMod.disableProcChains && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(CommonAssets), "missilePrefab") })) { index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)((GameObject projectilePrefab) => missilePrefab)); } flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: AtG IL Hook failed"); } }; if (useOrb) { ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(AtGOrb)); } if (RiskyMod.disableProcChains) { missilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Common/MissileProjectile.prefab").WaitForCompletion(), "RiskyMod_ATGProjectile", true); ProjectileController component = missilePrefab.GetComponent(); component.procCoefficient = 0f; global::RiskyMod.Content.Content.projectilePrefabs.Add(missilePrefab); } else { missilePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/MissileProjectile.prefab").WaitForCompletion(); } } private static void AtGOrb(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0162: 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_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) if (((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)1) || !Object.op_Implicit((Object)(object)attackerBody.inventory)) { return; } Inventory inventory = attackerBody.inventory; if (!Object.op_Implicit((Object)(object)attackerBody.teamComponent) || (int)attackerBody.teamComponent.teamIndex != 1) { return; } int itemCount = inventory.GetItemCount(Items.Missile); if (itemCount <= 0 || !(damageInfo.damage / attackerBody.damage < projectileDamageTreshold) || !Util.CheckRoll(10f * damageInfo.procCoefficient, attackerBody.master)) { return; } float num = initialDamageCoefficient + stackDamageCoefficient * (float)(itemCount - 1); float num2 = Util.OnHitProcDamage(damageInfo.damage, attackerBody.damage, num); int itemCount2 = inventory.GetItemCount(Items.MoreMissile); if (itemCount2 > 1) { num2 *= 1f + 0.5f * (float)(itemCount2 - 1); } _ = attackerBody.aimOrigin; if (1 == 0) { return; } HurtBox mainHurtBox = victimBody.mainHurtBox; int num3 = ((itemCount2 <= 0) ? 1 : 3); for (int i = 0; i < num3; i++) { MicroMissileOrb val = new MicroMissileOrb(); ((Orb)val).origin = attackerBody.aimOrigin; ((GenericDamageOrb)val).damageValue = num2; ((GenericDamageOrb)val).isCrit = damageInfo.crit; ((GenericDamageOrb)val).teamIndex = attackerBody.teamComponent.teamIndex; ((GenericDamageOrb)val).attacker = damageInfo.attacker; ((GenericDamageOrb)val).procChainMask = damageInfo.procChainMask; ((ProcChainMask)(ref ((GenericDamageOrb)val).procChainMask)).AddProc((ProcType)1); ((GenericDamageOrb)val).procCoefficient = (RiskyMod.disableProcChains ? 0f : 1f); ((GenericDamageOrb)val).damageColorIndex = (DamageColorIndex)3; HurtBox mainHurtBox2 = victimBody.mainHurtBox; if (Object.op_Implicit((Object)(object)mainHurtBox2)) { ((Orb)val).target = mainHurtBox; OrbManager.instance.AddOrb((Orb)(object)val); } } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Missile); } } public class Bandolier { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_ApplyAmmoPack <>9__1_0; internal void <.ctor>b__1_0(orig_ApplyAmmoPack orig, GenericSkill self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.characterBody)) { bool flag = Object.op_Implicit((Object)(object)self.characterBody.skillLocator) && (Object)(object)self == (Object)(object)self.characterBody.skillLocator.primary; bool flag2 = ((ToolbotCore.enablePowerModeChanges && self.characterBody.HasBuff(ToolbotCore.PowerModeBuff)) || (!ToolbotCore.enablePowerModeChanges && self.characterBody.HasBuff(Buffs.SmallArmorBoost))) && self.skillName == "StunDrone"; bool flag3 = self.HasSkillOverrideOfPriority((SkillOverridePriority)4); if ((flag && !flag3) || flag2) { self.Reset(); } } } } public static bool enabled = true; public Bandolier() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown if (!enabled) { return; } GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandolier/AmmoPack.prefab").WaitForCompletion(); DestroyOnTimer component = val.GetComponent(); component.duration = 14f; BeginRapidlyActivatingAndDeactivating component2 = val.GetComponent(); component2.delayBeforeBeginningBlinking = component.duration - 2f; GravitatePickup componentInChildren = val.GetComponentInChildren(); Collider component3 = ((Component)componentInChildren).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component3) && component3.isTrigger) { Transform transform = ((Component)component3).transform; transform.localScale *= 2f; } object obj = <>c.<>9__1_0; if (obj == null) { hook_ApplyAmmoPack val2 = delegate(orig_ApplyAmmoPack orig, GenericSkill self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.characterBody)) { bool flag = Object.op_Implicit((Object)(object)self.characterBody.skillLocator) && (Object)(object)self == (Object)(object)self.characterBody.skillLocator.primary; bool flag2 = ((ToolbotCore.enablePowerModeChanges && self.characterBody.HasBuff(ToolbotCore.PowerModeBuff)) || (!ToolbotCore.enablePowerModeChanges && self.characterBody.HasBuff(Buffs.SmallArmorBoost))) && self.skillName == "StunDrone"; bool flag3 = self.HasSkillOverrideOfPriority((SkillOverridePriority)4); if ((flag && !flag3) || flag2) { self.Reset(); } } }; <>c.<>9__1_0 = val2; obj = (object)val2; } GenericSkill.ApplyAmmoPack += (hook_ApplyAmmoPack)obj; } } public class Berzerker { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_2; public static Manipulator <>9__2_0; public static Func <>9__2_4; public static Func <>9__2_3; public static Manipulator <>9__2_1; internal void <.ctor>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "WarCryOnMultiKill") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Berzerker AddMultiKill IL Hook failed"); } } internal bool <.ctor>b__2_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "WarCryOnMultiKill"); } internal void <.ctor>b__2_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "WarCryBuff") })) { val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((bool hasWarCry, CharacterBody self) => hasWarCry || self.HasBuff(berzerkBuff))); } else { Debug.LogError((object)"RiskyMod: Berzerker OnClientBuffsChanged IL Hook failed"); } } internal bool <.ctor>b__2_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "WarCryBuff"); } internal bool <.ctor>b__2_3(bool hasWarCry, CharacterBody self) { return hasWarCry || self.HasBuff(berzerkBuff); } } public static bool enabled = true; public static BuffDef berzerkBuff; public Berzerker() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_004d: 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_0058: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__2_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "WarCryOnMultiKill") })) { val4.Remove(); val4.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Berzerker AddMultiKill IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } CharacterBody.AddMultiKill += (Manipulator)obj; berzerkBuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_BerzerkBuff", canStack: true, isCooldown: false, isDebuff: false, new Color(0.8235294f, 10f / 51f, 0.08627451f), Addressables.LoadAssetAsync((object)"RoR2/Base/WarCryOnMultiKill/bdWarCryBuff.asset").WaitForCompletion().iconSprite); OnCharacterDeath.OnCharacterDeathInventoryActions = (OnCharacterDeath.OnCharacterDeathInventory)Delegate.Combine(OnCharacterDeath.OnCharacterDeathInventoryActions, new OnCharacterDeath.OnCharacterDeathInventory(ProcItem)); AssistManager.HandleAssistInventoryCompatibleActions = (HandleAssistInventoryCompatible)Delegate.Combine((Delegate?)(object)AssistManager.HandleAssistInventoryCompatibleActions, (Delegate?)new HandleAssistInventoryCompatible(HandleAssist)); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(HandleStats); object obj2 = <>c.<>9__2_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "WarCryBuff") })) { val3.Index += 2; val3.Emit(OpCodes.Ldarg_0); val3.EmitDelegate>((Func)((bool hasWarCry, CharacterBody self) => hasWarCry || self.HasBuff(berzerkBuff))); } else { Debug.LogError((object)"RiskyMod: Berzerker OnClientBuffsChanged IL Hook failed"); } }; <>c.<>9__2_1 = val2; obj2 = (object)val2; } CharacterBody.OnClientBuffsChanged += (Manipulator)obj2; } private void HandleAssist(CharacterBody attackerBody, CharacterBody victimBody, DamageType? assistDamageType, DamageTypeExtended? assistDamageTypeExtended, DamageSource? assistDamageSource, HashSet assistModdedDamageTypes, Inventory attackerInventory, CharacterBody killerBody, DamageInfo damageInfo) { if (!((Object)(object)attackerBody == (Object)(object)killerBody)) { OnKillEffect(attackerBody, attackerInventory); } } private void ProcItem(GlobalEventManager self, DamageReport damageReport, CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { OnKillEffect(attackerBody, attackerInventory); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.WarCryOnMultiKill); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.WarCryOnMultiKill); } private void HandleStats(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(berzerkBuff); if (buffCount > 0) { args.moveSpeedMultAdd += 0.15f * (float)buffCount; args.attackSpeedMultAdd += 0.15f * (float)buffCount; } } private void OnKillEffect(CharacterBody attackerBody, Inventory attackerInventory) { int itemCount = attackerInventory.GetItemCount(Items.WarCryOnMultiKill); if (itemCount > 0) { int val = 1 + 2 * itemCount; int num = Math.Min(attackerBody.GetBuffCount(berzerkBuff) + 1, val); attackerBody.ClearTimedBuffs(berzerkBuff); for (int i = 0; i < num; i++) { attackerBody.AddTimedBuff(berzerkBuff, 6f); } } } } public class Chronobauble { public static bool enabled = true; private const float attackSpeedReductionFactor = 0.25f; public Chronobauble() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ChronobaubleDebuff); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.SlowOnHit); } private static void ChronobaubleDebuff(CharacterBody sender, StatHookEventArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (sender.HasBuff(Buffs.Slow60.buffIndex)) { args.attackSpeedReductionMultAdd += 0.25f; args.moveSpeedReductionMultAdd += 0.2f; args.cooldownMultAdd += 0.2f; } } } public class Daisy { public static bool enabled = true; public static bool disableHealPulse = true; public Daisy() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); HoldoutZoneController.Start += new hook_Start(spawnOnHoldout); BrotherEncounterPhaseBaseState.FixedUpdate += new hook_FixedUpdate(SpawnOnMithrix); Phase1.OnEnter += new hook_OnEnter(Phase1_OnEnter); if (disableHealPulse) { TeleporterHealNovaGeneratorMain.Pulse += new hook_Pulse(DisableHealPulse); } } } private void spawnOnHoldout(orig_Start orig, HoldoutZoneController self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!NetworkServer.active || !((Object)(object)self != (Object)null) || !Object.op_Implicit((Object)(object)((Component)self).gameObject) || !Object.op_Implicit((Object)(object)((Component)self).transform)) { return; } int itemCountForTeam = Util.GetItemCountForTeam((TeamIndex)1, Items.TPHealingNova.itemIndex, false, true); if (itemCountForTeam > 0) { DaisyBehavior component = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self).gameObject.AddComponent(); component.wardOrigin = ((Component)self).transform; component.holdout = self; } } } private void SpawnOnMithrix(orig_FixedUpdate orig, BrotherEncounterPhaseBaseState self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); int itemCountForTeam = Util.GetItemCountForTeam((TeamIndex)1, Items.TPHealingNova.itemIndex, false, true); if (itemCountForTeam <= 0 || !Object.op_Implicit((Object)(object)((EntityState)self).gameObject) || !Object.op_Implicit((Object)(object)((BrotherEncounterBaseState)self).childLocator)) { return; } Transform val = ((BrotherEncounterBaseState)self).childLocator.FindChild("CenterOrbEffect"); if (Object.op_Implicit((Object)(object)val)) { DaisyBehavior component = ((EntityState)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = ((EntityState)self).gameObject.AddComponent(); component.wardOrigin = val; } } } private void DisableHealPulse(orig_Pulse orig, TeleporterHealNovaGeneratorMain self) { } private void Phase1_OnEnter(orig_OnEnter orig, Phase1 self) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!NetworkServer.active || !Object.op_Implicit((Object)(object)((FSBFEncounterBaseState)self).meridianEventTriggerInteraction) || !Object.op_Implicit((Object)(object)((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.falseSonEntryFXPosition)) { return; } int itemCountForTeam = Util.GetItemCountForTeam((TeamIndex)1, Items.TPHealingNova.itemIndex, false, true); if (itemCountForTeam > 0) { DaisyBehavior component = ((EntityState)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = ((EntityState)self).gameObject.AddComponent(); component.wardOrigin = ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.falseSonEntryFXPosition; } } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.TPHealingNova); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.TPHealingNova); } } public class DaisyBehavior : MonoBehaviour { public static GameObject wardPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineHealing/ShrineHealingWard.prefab").WaitForCompletion(); public GameObject wardInstance; public HealingWard healingWard; public Transform wardOrigin; public HoldoutZoneController holdout; public int daisyCount => Util.GetItemCountForTeam((TeamIndex)1, Items.TPHealingNova.itemIndex, false, true); public void FixedUpdate() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if (Object.op_Implicit((Object)(object)holdout) && holdout.charge >= 1f) { if (Object.op_Implicit((Object)(object)wardInstance)) { Object.Destroy((Object)(object)wardInstance); wardInstance = null; } return; } if (!Object.op_Implicit((Object)(object)wardInstance) && (Object)(object)wardOrigin != (Object)null) { wardInstance = Object.Instantiate(wardPrefab, wardOrigin.position, wardOrigin.rotation); wardInstance.GetComponent().teamIndex = (TeamIndex)1; healingWard = wardInstance.GetComponent(); NetworkServer.Spawn(wardInstance); } if (Object.op_Implicit((Object)(object)healingWard)) { int num = Mathf.Max(0, daisyCount - 1); healingWard.Networkradius = 16f; float num2 = 0.05f + (float)num * 0.025f; healingWard.healFraction = num2 * healingWard.interval; } } } public class ElementalBands { public static bool enabled = true; public static float initialDamageCoefficientFire = 2.5f; public static float stackDamageCoefficientFire = 1.5f; public static float initialDamageCoefficientIce = 2f; public static float stackDamageCoefficientIce = 1.2f; public ElementalBands() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); float initialDamageFire = initialDamageCoefficientFire - stackDamageCoefficientFire; float initialDamageIce = initialDamageCoefficientIce - stackDamageCoefficientIce; GlobalEventManager.ProcessHitEnemy += (Manipulator)delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "IceRing") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 2.5f) })) { val.Next.Operand = stackDamageCoefficientIce; val.Index += 4; val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + initialDamageIce)); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/FireTornado") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f) })) { val.Next.Operand = stackDamageCoefficientFire; val.Index += 4; val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + initialDamageFire)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: ElementalBands IL Hook failed"); } }; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.IceRing); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.FireRing); } } public class Guillotine { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_1; public static Manipulator <>9__2_0; internal void <.ctor>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExecuteLowHealthElite") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Guillotine IL Hook failed"); } } internal bool <.ctor>b__2_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExecuteLowHealthElite"); } } public static bool enabled = true; public static bool reduceVFX = true; public Guillotine() { //IL_004d: 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_0058: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__2_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExecuteLowHealthElite") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Guillotine IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } CharacterBody.OnInventoryChanged += (Manipulator)obj; if (SoftDependencies.LinearDamageLoaded) { ModifyFinalDamage.ModifyFinalDamageAttackerActions = (ModifyFinalDamageAttackerDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageAttackerActions, (Delegate?)new ModifyFinalDamageAttackerDelegate(ModifyFinalDamage_Additive)); } else { ModifyFinalDamage.ModifyFinalDamageAttackerActions = (ModifyFinalDamageAttackerDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageAttackerActions, (Delegate?)new ModifyFinalDamageAttackerDelegate(ModifyFinalDamage)); } } private void ModifyFinalDamage(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Invalid comparison between Unknown and I4 //IL_00a2: 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_010d: 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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)attackerBody.inventory) || !Object.op_Implicit((Object)(object)victimBody.healthComponent)) { return; } int itemCount = attackerBody.inventory.GetItemCount(Items.ExecuteLowHealthElite); if (itemCount <= 0) { return; } HealthComponent healthComponent = victimBody.healthComponent; if (healthComponent.combinedHealth <= healthComponent.fullCombinedHealth * 0.5f) { damageModifierArgs.damageMultFinal *= 1f + 0.3f * (float)itemCount; if ((int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)5; } if (damageInfo.procCoefficient > 0f && (!reduceVFX || Random.Range(0f, 100f) <= 100f * damageInfo.damage / (healthComponent.fullCombinedHealth * 0.3f * 0.1f))) { EffectManager.SpawnEffect(AssetReferences.executeEffectPrefab, new EffectData { origin = victimBody.corePosition, scale = victimBody.radius * 0.3f * damageInfo.procCoefficient }, true); } } } private void ModifyFinalDamage_Additive(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody, CharacterBody attackerBody) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Invalid comparison between Unknown and I4 //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)attackerBody.inventory) || !Object.op_Implicit((Object)(object)victimBody.healthComponent)) { return; } int itemCount = attackerBody.inventory.GetItemCount(Items.ExecuteLowHealthElite); if (itemCount <= 0) { return; } HealthComponent healthComponent = victimBody.healthComponent; if (healthComponent.combinedHealth <= healthComponent.fullCombinedHealth * 0.5f) { damageModifierArgs.damageMultAdd += 0.3f * (float)itemCount; if ((int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)5; } if (damageInfo.procCoefficient > 0f && (!reduceVFX || Random.Range(0f, 100f) <= 100f * damageInfo.damage / (healthComponent.fullCombinedHealth * 0.3f * 0.1f))) { EffectManager.SpawnEffect(AssetReferences.executeEffectPrefab, new EffectData { origin = victimBody.corePosition, scale = victimBody.radius * 0.3f * damageInfo.procCoefficient }, true); } } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.ExecuteLowHealthElite); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ExecuteLowHealthElite); global::SneedUtils.SneedUtils.RemoveItemTag(Items.ExecuteLowHealthElite, (ItemTag)4); } } public class Infusion { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_2; public static Manipulator <>9__3_0; public static Func <>9__3_4; public static Func <>9__3_3; public static Manipulator <>9__3_1; internal void <.ctor>b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Infusion") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Infusion OnCharacterDeath IL Hook failed"); } } internal bool <.ctor>b__3_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Infusion"); } internal void <.ctor>b__3_1(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[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_infusionBonus") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(int infusionBonus, CharacterBody self) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = infusionBonus; int num3 = 0; while (num2 > 0f) { float num4 = 100f + 150f * (float)num3; if (num2 <= num4) { num += 100f * num2 / num4; num2 = 0f; } else { num2 -= num4; num += 100f; num3++; } } int num5 = Mathf.FloorToInt(num); if (NetworkServer.active && useBuff) { int buffCount = self.GetBuffCount(InfusionBuff.buffIndex); if (Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.Infusion) > 0) { if (num5 != buffCount) { if (num5 > buffCount) { for (int i = 0; i < num5 - buffCount; i++) { self.AddBuff(InfusionBuff); } } else { for (int j = 0; j < buffCount - num5; j++) { self.RemoveBuff(InfusionBuff); } } } } else { for (int k = 0; k < buffCount; k++) { self.RemoveBuff(InfusionBuff); } } } return num5; }); } else { Debug.LogError((object)"RiskyMod: Infusion IL Hook failed"); } } internal bool <.ctor>b__3_4(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_infusionBonus"); } internal int <.ctor>b__3_3(int infusionBonus, CharacterBody self) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = infusionBonus; int num3 = 0; while (num2 > 0f) { float num4 = 100f + 150f * (float)num3; if (num2 <= num4) { num += 100f * num2 / num4; num2 = 0f; } else { num2 -= num4; num += 100f; num3++; } } int num5 = Mathf.FloorToInt(num); if (NetworkServer.active && useBuff) { int buffCount = self.GetBuffCount(InfusionBuff.buffIndex); if (Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.Infusion) > 0) { if (num5 != buffCount) { if (num5 > buffCount) { for (int i = 0; i < num5 - buffCount; i++) { self.AddBuff(InfusionBuff); } } else { for (int j = 0; j < buffCount - num5; j++) { self.RemoveBuff(InfusionBuff); } } } } else { for (int k = 0; k < buffCount; k++) { self.RemoveBuff(InfusionBuff); } } } return num5; } } public static bool useBuff = true; public static bool enabled = true; public static BuffDef InfusionBuff; public Infusion() { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); ((VanillaTweakBase)VanillaTweakBase.Instance).SetEnabled(false); object obj = <>c.<>9__3_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Infusion") })) { val4.Remove(); val4.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Infusion OnCharacterDeath IL Hook failed"); } }; <>c.<>9__3_0 = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; AssistManager.HandleAssistInventoryCompatibleActions = (HandleAssistInventoryCompatible)Delegate.Combine((Delegate?)(object)AssistManager.HandleAssistInventoryCompatibleActions, (Delegate?)new HandleAssistInventoryCompatible(AssistEffect)); InfusionBuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_InfusionBuff", canStack: true, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.Infusion); object obj2 = <>c.<>9__3_1; if (obj2 == null) { Manipulator val2 = delegate(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 val3 = new ILCursor(il); if (val3.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_infusionBonus") })) { val3.Emit(OpCodes.Ldarg_0); val3.EmitDelegate>((Func)delegate(int infusionBonus, CharacterBody self) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = infusionBonus; int num3 = 0; while (num2 > 0f) { float num4 = 100f + 150f * (float)num3; if (num2 <= num4) { num += 100f * num2 / num4; num2 = 0f; } else { num2 -= num4; num += 100f; num3++; } } int num5 = Mathf.FloorToInt(num); if (NetworkServer.active && useBuff) { int buffCount = self.GetBuffCount(InfusionBuff.buffIndex); if (Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.Infusion) > 0) { if (num5 != buffCount) { if (num5 > buffCount) { for (int i = 0; i < num5 - buffCount; i++) { self.AddBuff(InfusionBuff); } } else { for (int j = 0; j < buffCount - num5; j++) { self.RemoveBuff(InfusionBuff); } } } } else { for (int k = 0; k < buffCount; k++) { self.RemoveBuff(InfusionBuff); } } } return num5; }); } else { Debug.LogError((object)"RiskyMod: Infusion IL Hook failed"); } }; <>c.<>9__3_1 = val2; obj2 = (object)val2; } CharacterBody.RecalculateStats += (Manipulator)obj2; OnCharacterDeath.OnCharacterDeathInventoryActions = (OnCharacterDeath.OnCharacterDeathInventory)Delegate.Combine(OnCharacterDeath.OnCharacterDeathInventoryActions, new OnCharacterDeath.OnCharacterDeathInventory(ProcOnKill)); } private void ProcOnKill(GlobalEventManager self, DamageReport damageReport, CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { OnKillEffect(attackerBody, attackerInventory, victimBody); } private void AssistEffect(CharacterBody attackerBody, CharacterBody victimBody, DamageType? assistDamageType, DamageTypeExtended? assistDamageTypeExtended, DamageSource? assistDamageSource, HashSet assistModdedDamageTypes, Inventory attackerInventory, CharacterBody killerBody, DamageInfo damageInfo) { if (!((Object)(object)attackerBody == (Object)(object)killerBody)) { OnKillEffect(attackerBody, attackerInventory, victimBody); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.Infusion); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Infusion); } private void OnKillEffect(CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) int itemCount = attackerInventory.GetItemCount(Items.Infusion); if (itemCount > 0 && !((Enum)victimBody.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4) && !Object.op_Implicit((Object)(object)((Component)victimBody).GetComponent())) { InfusionOrb val = new InfusionOrb(); ((Orb)val).origin = victimBody.corePosition; ((Orb)val).target = Util.FindBodyMainHurtBox(attackerBody); val.maxHpValue = itemCount; OrbManager.instance.AddOrb((Orb)(object)val); } } } public class LeechingSeed { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Seed") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: LeechingSeed IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Seed"); } } public static bool enabled = true; public LeechingSeed() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Seed") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: LeechingSeed IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(HealOnHitInitialDamage)); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Seed); } private static void HealOnHitInitialDamage(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)6) || !Object.op_Implicit((Object)(object)attackerBody.inventory)) { return; } int itemCount = attackerBody.inventory.GetItemCount(Items.Seed); if (itemCount > 0) { float num = 0.01f * (float)itemCount; float num2 = 1f + damageInfo.damage * num * damageInfo.procCoefficient; if (Object.op_Implicit((Object)(object)victimBody.healthComponent)) { num2 = Mathf.Min(num2, victimBody.healthComponent.fullCombinedHealth * num); } ((ProcChainMask)(ref damageInfo.procChainMask)).AddProc((ProcType)6); attackerBody.healthComponent.Heal(num2, damageInfo.procChainMask, true); } } } public class Razorwire { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnInventoryChanged <>9__1_0; internal void <.ctor>b__1_0(orig_OnInventoryChanged orig, HealthComponent self) { orig.Invoke(self); self.itemCounts.thorns = 0; } } public static bool enabled = true; public Razorwire() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { hook_OnInventoryChanged val = delegate(orig_OnInventoryChanged orig, HealthComponent self) { orig.Invoke(self); self.itemCounts.thorns = 0; }; <>c.<>9__1_0 = val; obj = (object)val; } HealthComponent.OnInventoryChanged += (hook_OnInventoryChanged)obj; TakeDamage.OnPercentHpLostActions = (TakeDamage.OnPercentHpLost)Delegate.Combine(TakeDamage.OnPercentHpLostActions, new TakeDamage.OnPercentHpLost(OnHpLost)); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Thorns); } private void OnHpLost(DamageInfo damageInfo, HealthComponent self, Inventory inventory, float percentHpLost) { //IL_0076: 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_00b6: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) int itemCount = inventory.GetItemCount(Items.Thorns); if (itemCount > 0 && !((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)15)) { int num = 1 + 2 * itemCount; bool flag = inventory.GetItemCount(Items.InvadingDoppelganger) > 0; bool isCrit = self.body.RollCrit(); int num2 = itemCount - 1; float damageValue = (1.6f + 0.8f * (float)num2) * self.body.damage; float num3 = (((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)67108864) ? 0.2f : 0.5f); float radius = 25f; TeamIndex teamIndex = self.body.teamComponent.teamIndex; HurtBox[] hurtBoxes = new SphereSearch { origin = damageInfo.position, radius = radius, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, queryTriggerInteraction = (QueryTriggerInteraction)0 }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); for (int i = 0; i < Mathf.Min(num, hurtBoxes.Length); i++) { LightningOrb val = new LightningOrb(); val.attacker = ((Component)self).gameObject; val.bouncedObjects = null; val.bouncesRemaining = 0; val.damageCoefficientPerBounce = 1f; val.damageColorIndex = (DamageColorIndex)3; val.damageValue = damageValue; val.isCrit = isCrit; val.lightningType = (LightningType)6; ((Orb)val).origin = damageInfo.position; val.procChainMask = default(ProcChainMask); ((ProcChainMask)(ref val.procChainMask)).AddProc((ProcType)15); val.procCoefficient = (flag ? 0f : (RiskyMod.disableProcChains ? num3 : 0.5f)); val.range = 0f; val.teamIndex = teamIndex; ((Orb)val).target = hurtBoxes[i]; OrbManager.instance.AddOrb((Orb)(object)val); } } } } public class RedWhip { public static bool enabled = true; public RedWhip() { if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStats)); } } private static void HandleStats(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { int itemCount = inventory.GetItemCount(Items.SprintOutOfCombat); if (itemCount > 0) { args.moveSpeedMultAdd += 0.1f * (float)itemCount; } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.SprintOutOfCombat); } } public class RoseBuckler { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "SprintArmor") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: RoseBuckler IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "SprintArmor"); } } public static bool enabled = true; public RoseBuckler() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "SprintArmor") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: RoseBuckler IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStatsInventory)); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.SprintArmor); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.SprintArmor); global::SneedUtils.SneedUtils.RemoveItemTag(Items.SprintArmor, (ItemTag)8); } private void HandleStatsInventory(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { int itemCount = sender.inventory.GetItemCount(Items.SprintArmor); if (itemCount > 0) { args.armorAdd += 10f * (float)itemCount * (sender.isSprinting ? 3f : 1f); } } } public class SquidPolyp { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__9_1; public static Manipulator <>9__9_0; internal void <.ctor>b__9_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Squid") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: SquidPolyp IL Hook failed"); } } internal bool <.ctor>b__9_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Squid"); } } public static bool enabled = true; public static GameObject procEffectPrefab; public static bool scaleCount = false; public static bool ignoreAllyCap = true; public static bool weakToMithrix = true; public static bool shareCountWithMinions = true; public static bool cannotCopy = false; public static BodyIndex squidTurretBodyIndex; public static CharacterSpawnCard squidTurretCard = Addressables.LoadAssetAsync((object)"RoR2/Base/Squid/cscSquidTurret.asset").WaitForCompletion(); public SquidPolyp() { //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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__9_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Squid") })) { val3.Remove(); val3.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: SquidPolyp IL Hook failed"); } }; <>c.<>9__9_0 = val; obj = (object)val; } GlobalEventManager.OnInteractionBegin += (Manipulator)obj; procEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/goolake/ClayGooOrbImpact.prefab").WaitForCompletion(), "RiskyMod_SquidPolypProc", false); EffectComponent component = procEffectPrefab.GetComponent(); component.soundName = "Play_treeBot_m2_launch"; global::RiskyMod.Content.Content.effectDefs.Add(new EffectDef(procEffectPrefab)); TakeDamage.OnPercentHpLostActions = (TakeDamage.OnPercentHpLost)Delegate.Combine(TakeDamage.OnPercentHpLostActions, new TakeDamage.OnPercentHpLost(OnHpLost)); GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Squid/SquidTurretBody.prefab").WaitForCompletion(); CharacterBody component2 = val2.GetComponent(); component2.baseMaxHealth = 100f; component2.levelMaxHealth = component2.baseMaxHealth * 0.3f; component2.baseArmor = 20f; if (weakToMithrix) { TakeDamage.ModifyInitialDamageAttackerActions = (TakeDamage.ModifyInitialDamageAttacker)Delegate.Combine(TakeDamage.ModifyInitialDamageAttackerActions, new TakeDamage.ModifyInitialDamageAttacker(WeakToMithrixHook)); } } private void OnLoad() { //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_0028: Unknown result type (might be due to invalid IL or missing references) squidTurretBodyIndex = BodyCatalog.FindBodyIndex("SquidTurretBody"); if (enabled && ItemsCore.enabled) { TakeDamage.distractOnHitBodies.Add(squidTurretBodyIndex); } } private void WeakToMithrixHook(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (self.body.bodyIndex == squidTurretBodyIndex && (attackerBody.bodyIndex == MithrixCore.brotherBodyIndex || attackerBody.bodyIndex == MithrixCore.brotherHurtBodyIndex)) { damageInfo.damage *= 2f; } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.Squid); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Squid); if (SoftDependencies.AIBlacklistUseVanillaBlacklist) { global::SneedUtils.SneedUtils.AddItemTag(Items.Squid, (ItemTag)4); } if (cannotCopy) { global::SneedUtils.SneedUtils.AddItemTag(Items.Squid, (ItemTag)13); } } private static void OnHpLost(DamageInfo damageInfo, HealthComponent self, Inventory inventory, float percentHpLost) { //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //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_015c: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) int polypCount = inventory.GetItemCount(Items.Squid); if (polypCount <= 0 || !(percentHpLost > 0f)) { return; } float num = Mathf.Max(5f, 100f * percentHpLost / 75f); if (!Util.CheckRoll(num, self.body.master)) { return; } SquidMinionComponent sq = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)sq)) { sq = ((Component)self).gameObject.AddComponent(); } if (!sq.CanSpawnSquid()) { return; } EffectManager.SimpleEffect(procEffectPrefab, self.body.corePosition, Quaternion.identity, true); SpawnCard val = (SpawnCard)(object)squidTurretCard; DirectorPlacementRule val2 = new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 5f, maxDistance = 25f, position = self.body.corePosition }; DirectorSpawnRequest val3 = new DirectorSpawnRequest(val, val2, RoR2Application.rng); val3.teamIndexOverride = self.body.teamComponent.teamIndex; val3.summonerBodyObject = ((Component)self).gameObject; val3.ignoreTeamMemberLimit = ignoreAllyCap; val3.onSpawnedServer = (Action)Delegate.Combine(val3.onSpawnedServer, (Action)delegate(SpawnResult result) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Invalid comparison between Unknown and I4 if (result.success) { CharacterMaster component = result.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component.inventory)) { if (component.inventory.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component.inventory.GiveItemPermanent(Items.UseAmbientLevel, 1); } if (self.itemCounts.invadingDoppelganger > 0) { component.inventory.GiveItemPermanent(Items.InvadingDoppelganger, 1); component.inventory.GiveItemPermanent(Items.HealthDecay, 10); } else { component.inventory.GiveItemPermanent(Items.BoostAttackSpeed, 10 * (polypCount - 1)); if (Object.op_Implicit((Object)(object)self.body.teamComponent) && (int)self.body.teamComponent.teamIndex == 1 && !SoftDependencies.KingKombatArenaActive) { component.inventory.GiveItemPermanent(Items.BoostHp, 30 + 20 * (polypCount - 1)); component.inventory.GiveItemPermanent(Items.HealthDecay, 40); } else { component.inventory.GiveItemPermanent(Items.BoostHp, 5 * (polypCount - 1)); component.inventory.GiveItemPermanent(Items.HealthDecay, 20); } } } sq.AddSquid(result.spawnedInstance); } }); DirectorCore.instance.TrySpawnObject(val3); } } public class SquidMinionComponent : MonoBehaviour { public List squidList; private Inventory inventory = null; private bool isMinion; private CharacterBody cb; public void Awake() { if (squidList == null) { squidList = new List(); } isMinion = false; cb = ((Component)this).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)cb) && Object.op_Implicit((Object)(object)cb.inventory)) { inventory = cb.inventory; } } public void Start() { isMinion = Object.op_Implicit((Object)(object)cb) && Object.op_Implicit((Object)(object)cb.master) && Object.op_Implicit((Object)(object)cb.master.minionOwnership) && (Object)(object)cb.master.minionOwnership.ownerMaster != (Object)null; if (!isMinion || !SquidPolyp.shareCountWithMinions) { return; } CharacterBody body = cb.master.minionOwnership.ownerMaster.GetBody(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { cb = body; inventory = body.inventory; SquidMinionComponent squidMinionComponent = ((Component)body).GetComponent(); if (!Object.op_Implicit((Object)(object)squidMinionComponent)) { squidMinionComponent = ((Component)body).gameObject.AddComponent(); } if (squidMinionComponent.squidList == null) { squidMinionComponent.squidList = squidList; } else { squidList = squidMinionComponent.squidList; } } } public bool CanSpawnSquid() { if (SquidPolyp.scaleCount) { return squidList.Count < 2 + (Object.op_Implicit((Object)(object)inventory) ? inventory.GetItemCountEffective(Items.Squid) : (-2)); } return squidList.Count < 3; } public void FixedUpdate() { if (NetworkServer.active) { UpdateSquids(); } } private void UpdateSquids() { List list = new List(); foreach (GameObject squid in squidList) { if (!Object.op_Implicit((Object)(object)squid.gameObject)) { list.Add(squid); } } if (list.Count <= 0) { return; } foreach (GameObject item in list) { squidList.Remove(item); } list.Clear(); } public void AddSquid(GameObject go) { squidList.Add(go); } } public class Stealthkit { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Start <>9__2_0; internal void <.ctor>b__2_0(orig_Start orig, PhasingBodyBehavior self) { Object.Destroy((Object)(object)self); } } public static bool enabled = true; public static GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Phasing/ProcStealthkit.prefab").WaitForCompletion(); public Stealthkit() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__2_0; if (obj == null) { hook_Start val = delegate(orig_Start orig, PhasingBodyBehavior self) { Object.Destroy((Object)(object)self); }; <>c.<>9__2_0 = val; obj = (object)val; } PhasingBodyBehavior.Start += (hook_Start)obj; TakeDamage.OnPercentHpLostActions = (TakeDamage.OnPercentHpLost)Delegate.Combine(TakeDamage.OnPercentHpLostActions, new TakeDamage.OnPercentHpLost(OnHpLost)); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.Phasing); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Phasing); global::SneedUtils.SneedUtils.RemoveItemTag(Items.Phasing, (ItemTag)16); } private void OnHpLost(DamageInfo damageInfo, HealthComponent self, Inventory inventory, float percentHpLost) { //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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown int itemCount = inventory.GetItemCount(Items.Phasing); if (itemCount > 0 && percentHpLost > 0f) { float num = Mathf.Max(5f, 100f * percentHpLost / 75f); if (Util.CheckRoll(num, self.body.master)) { float num2 = 1.5f + (float)itemCount * 1.5f; self.body.AddTimedBuff(Buffs.Cloak, num2); self.body.AddTimedBuff(Buffs.CloakSpeed, num2); EffectManager.SpawnEffect(effectPrefab, new EffectData { origin = self.body.transform.position, rotation = Quaternion.identity }, true); } } } } public class Ukulele { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_3; public static Func <>9__1_4; public static Func <>9__1_5; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ChainLightning") }) && val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "position"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "PickNextTarget") })) { val.EmitDelegate>((Func)delegate(LightningOrb orb) { orb.range = 25f; return orb; }); } else { Debug.LogError((object)"RiskyMod: Ukulele IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ChainLightning"); } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "position"); } internal bool <.ctor>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "PickNextTarget"); } internal LightningOrb <.ctor>b__1_1(LightningOrb orb) { orb.range = 25f; return orb; } } public static bool enabled = true; public Ukulele() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ChainLightning") }) && val2.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "position"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "PickNextTarget") })) { val2.EmitDelegate>((Func)delegate(LightningOrb orb) { orb.range = 25f; return orb; }); } else { Debug.LogError((object)"RiskyMod: Ukulele IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ChainLightning); } } public class WarHorn { public static bool enabled = true; public WarHorn() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(HandleStats); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.EnergizedOnEquipmentUse); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.EnergizedOnEquipmentUse); } private void HandleStats(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buffs.Energized)) { args.moveSpeedMultAdd += 0.5f; } } } public class WillOWisp { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_4; public static Func <>9__1_5; public static Func <>9__1_1; public static Func <>9__1_6; public static Func <>9__1_2; public static Func <>9__1_7; public static Func <>9__1_3; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown int num = 1; int num2 = 0; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExplodeOnDeath") })) { if (RiskyMod.disableProcChains) { num++; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "position") })) { int index = val.Index; val.Index = index - 1; val.EmitDelegate>((Func)delegate(DelayBlast db) { db.procCoefficient = 0f; return db; }); num2++; } } if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "radius") })) { val.EmitDelegate>((Func)((float oldRadius) => 16f)); num2++; } if (RiskyMod.disableProcChains) { num++; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "falloffModel") })) { val.EmitDelegate>((Func)((FalloffModel f) => (FalloffModel)0)); num2++; } } } if (num != num2) { Debug.LogError((object)"RiskyMod: WillOWisp IL Hook failed"); } } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExplodeOnDeath"); } internal bool <.ctor>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "position"); } internal DelayBlast <.ctor>b__1_1(DelayBlast db) { db.procCoefficient = 0f; return db; } internal bool <.ctor>b__1_6(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "radius"); } internal float <.ctor>b__1_2(float oldRadius) { return 16f; } internal bool <.ctor>b__1_7(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "falloffModel"); } internal FalloffModel <.ctor>b__1_3(FalloffModel f) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (FalloffModel)0; } } public static bool enabled = true; public WillOWisp() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown int num = 1; int num2 = 0; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExplodeOnDeath") })) { if (RiskyMod.disableProcChains) { num++; if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "position") })) { int index = val2.Index; val2.Index = index - 1; val2.EmitDelegate>((Func)delegate(DelayBlast db) { db.procCoefficient = 0f; return db; }); num2++; } } if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "radius") })) { val2.EmitDelegate>((Func)((float oldRadius) => 16f)); num2++; } if (RiskyMod.disableProcChains) { num++; if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "falloffModel") })) { val2.EmitDelegate>((Func)((FalloffModel f) => (FalloffModel)0)); num2++; } } } if (num != num2) { Debug.LogError((object)"RiskyMod: WillOWisp IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ExplodeOnDeath); } } } namespace RiskyMod.Items.Lunar { public class BrittleCrown { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_2; public static Func <>9__3_3; public static Func <>9__3_1; public static Manipulator <>9__3_0; internal void <.ctor>b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "GoldOnHit") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 30f) })) { int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)delegate(float chance, DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { float num = damageInfo.damage / component.damage; float num2 = num - minDamageCoefficient; if (num2 > 0f) { chance += Mathf.Lerp(0f, 70f, num2 / (maxDamageCoefficient - minDamageCoefficient)); } } } return chance; }); } else { Debug.LogError((object)"RiskyMod: BrittleCrown IL Hook failed"); } } internal bool <.ctor>b__3_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "GoldOnHit"); } internal bool <.ctor>b__3_3(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 30f); } internal float <.ctor>b__3_1(float chance, DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { float num = damageInfo.damage / component.damage; float num2 = num - minDamageCoefficient; if (num2 > 0f) { chance += Mathf.Lerp(0f, 70f, num2 / (maxDamageCoefficient - minDamageCoefficient)); } } } return chance; } } public static bool enabled = true; public static float minDamageCoefficient = 2f; public static float maxDamageCoefficient = 12f; public BrittleCrown() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__3_0; 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 //IL_0080: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "GoldOnHit") }) && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 30f) })) { int index = val2.Index; val2.Index = index + 1; val2.Emit(OpCodes.Ldarg_1); val2.EmitDelegate>((Func)delegate(float chance, DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { float num = damageInfo.damage / component.damage; float num2 = num - minDamageCoefficient; if (num2 > 0f) { chance += Mathf.Lerp(0f, 70f, num2 / (maxDamageCoefficient - minDamageCoefficient)); } } } return chance; }); } else { Debug.LogError((object)"RiskyMod: BrittleCrown IL Hook failed"); } }; <>c.<>9__3_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; } } public class Meteorite { public static bool enabled = true; public Meteorite() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { MeteorStormController.DetonateMeteor += new Manipulator(MeteorStormController_DetonateMeteor); } } private void MeteorStormController_DetonateMeteor(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(BlastAttack), "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack orig) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) orig.falloffModel = (FalloffModel)2; DamageAPI.AddModdedDamageType(orig, SharedDamageTypes.SweetSpotModifier); return orig; }); } else { Debug.LogError((object)"RiskyMod: Meteor IL Hook failed"); } } } public class ShapedGlass { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "LunarDagger") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: ShapedGlass IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "LunarDagger"); } } public static bool enabled = true; public ShapedGlass() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "LunarDagger") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: ShapedGlass IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStatsInventory)); ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.LunarDagger); } private void HandleStatsInventory(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { int itemCount = sender.inventory.GetItemCount(Items.LunarDagger); if (itemCount > 0) { args.damageMultAdd += (float)itemCount; args.baseCurseAdd += (float)itemCount; } } } public class Transcendence { public static bool enabled = true; public Transcendence() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); if (!SoftDependencies.MoreStatsLoaded) { CharacterBody.UpdateOutOfCombatAndDanger += new Manipulator(CharacterBody_UpdateOutOfCombatAndDanger); } else { MoreStatsCompat(); } } } private void CharacterBody_UpdateOutOfCombatAndDanger(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "outOfDangerStopwatch"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 7f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float outOfDangerDelay, CharacterBody self) { if (Object.op_Implicit((Object)(object)self.inventory)) { int num = self.inventory.GetItemCount(Items.ShieldOnly) - 1; if (num > 0) { outOfDangerDelay += 1f * (float)num; } } return outOfDangerDelay; }); } else { Debug.LogError((object)"RiskyMod: Transcendence IL Hook failed"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void MoreStatsCompat() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(StatHooks_GetMoreStatCoefficients); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void StatHooks_GetMoreStatCoefficients(CharacterBody sender, MoreStatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int num = sender.inventory.GetItemCount(Items.ShieldOnly) - 1; if (num > 0) { args.shieldDelaySecondsIncreaseAddPreMult += 1f * (float)num; } } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.ShieldOnly); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ShieldOnly); } } } namespace RiskyMod.Items.Legendary { public class Aegis { public static bool enabled = true; public Aegis() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); HealthComponent.GetBarrierDecayRate += new Manipulator(HealthComponent_GetBarrierDecayRate); } } private void HealthComponent_GetBarrierDecayRate(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[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "Lerp") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float decayRate, HealthComponent self) { int barrierOnOverHeal = self.itemCounts.barrierOnOverHeal; return decayRate / (1f + (float)barrierOnOverHeal); }); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.BarrierOnOverHeal); } } public class Behemoth { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_3; public static Func <>9__1_4; public static Func <>9__1_5; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Behemoth") }) && val.TryGotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x) })) { val.Emit(OpCodes.Ldloc, 5); val.EmitDelegate>((Func)delegate(float origRadius, int itemCount) { float num = 0f; for (int i = 0; i < itemCount; i++) { num += Mathf.Max(1.25f, 4f * Mathf.Pow(0.625f, (float)i)); } return num; }); flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: Behemoth IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Behemoth"); } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <.ctor>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchAdd(x); } internal float <.ctor>b__1_1(float origRadius, int itemCount) { float num = 0f; for (int i = 0; i < itemCount; i++) { num += Mathf.Max(1.25f, 4f * Mathf.Pow(0.625f, (float)i)); } return num; } } public static bool enabled; public Behemoth() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Behemoth") }) && val2.TryGotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x) })) { val2.Emit(OpCodes.Ldloc, 5); val2.EmitDelegate>((Func)delegate(float origRadius, int itemCount) { float num = 0f; for (int i = 0; i < itemCount; i++) { num += Mathf.Max(1.25f, 4f * Mathf.Pow(0.625f, (float)i)); } return num; }); flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: Behemoth IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.OnHitAllProcess += (Manipulator)obj; } } public class CeremonialDagger { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_2; public static Func <>9__2_1; public static Manipulator <>9__2_0; internal void <.ctor>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(CommonAssets), "daggerPrefab") })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)((GameObject oldPrefab) => daggerPrefab)); } else { Debug.LogError((object)"RiskyMod: CeremonialDagger IL Hook failed"); } } internal bool <.ctor>b__2_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(CommonAssets), "daggerPrefab"); } internal GameObject <.ctor>b__2_1(GameObject oldPrefab) { return daggerPrefab; } } public static bool enabled = true; public static GameObject daggerPrefab; public CeremonialDagger() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown if (!enabled || !RiskyMod.disableProcChains) { return; } object obj = <>c.<>9__2_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(CommonAssets), "daggerPrefab") })) { int index = val2.Index; val2.Index = index + 1; val2.EmitDelegate>((Func)((GameObject oldPrefab) => daggerPrefab)); } else { Debug.LogError((object)"RiskyMod: CeremonialDagger IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; daggerPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Dagger/DaggerProjectile.prefab").WaitForCompletion(); ProjectileController component = daggerPrefab.GetComponent(); component.procCoefficient = 0f; } } public class Clover { public static bool enabled = true; public static float luckCap = 1f; public Clover() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown if (enabled) { Util.CheckRoll_float_float_CharacterMaster += new hook_CheckRoll_float_float_CharacterMaster(CapLuck); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ConvertLuckToStatBonus); } } private static bool CapLuck(orig_CheckRoll_float_float_CharacterMaster orig, float percentChance, float luck, CharacterMaster effectOriginMaster) { return orig.Invoke(percentChance, Mathf.Min(luck, luckCap), effectOriginMaster); } private static void ConvertLuckToStatBonus(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.master) && sender.master.luck > luckCap) { float num = sender.master.luck - luckCap; float num2 = num * 0.4f; float num3 = num * 40f; args.healthMultAdd += num2; args.moveSpeedMultAdd += num2; args.regenMultAdd += num2; args.damageMultAdd += num2; args.critAdd += num3; args.armorAdd += num3; } } } public class FrostRelic { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Awake <>9__1_0; public static hook_FixedUpdate <>9__1_1; public static hook_UpdateRadius <>9__1_2; internal void <.ctor>b__1_0(orig_Awake orig, IcicleAuraController self) { orig.Invoke(self); if (RiskyMod.disableProcChains) { self.icicleProcCoefficientPerTick = 0f; } self.icicleDuration = 6f; } internal void <.ctor>b__1_1(orig_FixedUpdate orig, IcicleAuraController self) { int num = 1; if (Object.op_Implicit((Object)(object)self.cachedOwnerInfo.characterBody) && Object.op_Implicit((Object)(object)self.cachedOwnerInfo.characterBody.inventory)) { num = self.cachedOwnerInfo.characterBody.inventory.GetItemCount(Items.Icicle); } self.icicleDamageCoefficientPerTick = 2f + (float)num; orig.Invoke(self); } internal void <.ctor>b__1_2(orig_UpdateRadius orig, IcicleAuraController self) { if (Object.op_Implicit((Object)(object)self.owner)) { if (self.finalIcicleCount > 0) { float num = self.icicleBaseRadius + (float)self.baseIcicleMax * self.icicleRadiusPerIcicle; float num2 = (Object.op_Implicit((Object)(object)self.cachedOwnerInfo.characterBody) ? (self.cachedOwnerInfo.characterBody.radius + self.icicleBaseRadius + self.icicleRadiusPerIcicle * (float)self.finalIcicleCount) : 0f); self.actualRadius = Mathf.Min(num, num2); } else { self.actualRadius = 0f; } } } } public static bool enabled = true; public FrostRelic() { //IL_004d: 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_0058: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, IcicleAuraController self) { orig.Invoke(self); if (RiskyMod.disableProcChains) { self.icicleProcCoefficientPerTick = 0f; } self.icicleDuration = 6f; }; <>c.<>9__1_0 = val; obj = (object)val; } IcicleAuraController.Awake += (hook_Awake)obj; object obj2 = <>c.<>9__1_1; if (obj2 == null) { hook_FixedUpdate val2 = delegate(orig_FixedUpdate orig, IcicleAuraController self) { int num3 = 1; if (Object.op_Implicit((Object)(object)self.cachedOwnerInfo.characterBody) && Object.op_Implicit((Object)(object)self.cachedOwnerInfo.characterBody.inventory)) { num3 = self.cachedOwnerInfo.characterBody.inventory.GetItemCount(Items.Icicle); } self.icicleDamageCoefficientPerTick = 2f + (float)num3; orig.Invoke(self); }; <>c.<>9__1_1 = val2; obj2 = (object)val2; } IcicleAuraController.FixedUpdate += (hook_FixedUpdate)obj2; object obj3 = <>c.<>9__1_2; if (obj3 == null) { hook_UpdateRadius val3 = delegate(orig_UpdateRadius orig, IcicleAuraController self) { if (Object.op_Implicit((Object)(object)self.owner)) { if (self.finalIcicleCount > 0) { float num = self.icicleBaseRadius + (float)self.baseIcicleMax * self.icicleRadiusPerIcicle; float num2 = (Object.op_Implicit((Object)(object)self.cachedOwnerInfo.characterBody) ? (self.cachedOwnerInfo.characterBody.radius + self.icicleBaseRadius + self.icicleRadiusPerIcicle * (float)self.finalIcicleCount) : 0f); self.actualRadius = Mathf.Min(num, num2); } else { self.actualRadius = 0f; } } }; <>c.<>9__1_2 = val3; obj3 = (object)val3; } IcicleAuraController.UpdateRadius += (hook_UpdateRadius)obj3; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Icicle); } } public class HappiestMask { public class GhostOnKillBehavior : ItemBehavior { private List activeGhosts; private void Awake() { activeGhosts = new List(); } private void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) bool flag = base.body.HasBuff(GhostCooldown.buffIndex); bool flag2 = base.body.HasBuff(GhostReady.buffIndex); if (!flag && !flag2) { base.body.AddBuff(GhostReady.buffIndex); } if (flag2 && flag) { base.body.RemoveBuff(GhostReady.buffIndex); } UpdateGhosts(); } private void UpdateGhosts() { List list = new List(); foreach (CharacterBody activeGhost in activeGhosts) { if (!Object.op_Implicit((Object)(object)activeGhost) || !Object.op_Implicit((Object)(object)activeGhost.healthComponent) || !activeGhost.healthComponent.alive) { list.Add(activeGhost); } } foreach (CharacterBody item in list) { activeGhosts.Remove(item); } } public bool CanSpawnGhost() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) int itemCount = base.body.inventory.GetItemCount(Items.GhostOnKill.itemIndex); if (itemCount <= 0) { return false; } if (noGhostLimit) { return true; } int num = 3; if (scaleCount) { num += itemCount - 1; } return activeGhosts.Count < num; } public void AddGhost(CharacterBody cb) { activeGhosts.Add(cb); } } public class FixHealth : MonoBehaviour { private void Start() { if (NetworkServer.active) { HealthComponent component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.Networkhealth = component.fullHealth; } } Object.Destroy((Object)(object)this); } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__6_1; public static Manipulator <>9__6_0; internal void <.ctor>b__6_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "GhostOnKill") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Harpoon IL Hook failed"); } } internal bool <.ctor>b__6_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "GhostOnKill"); } } public static bool enabled = true; public static BuffDef GhostCooldown; public static BuffDef GhostReady; public static bool scaleCount = false; public static bool noGhostLimit = false; public static List blacklistedBodies; public HappiestMask() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0058: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__6_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "GhostOnKill") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Harpoon IL Hook failed"); } }; <>c.<>9__6_0 = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; GhostReady = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_GhostReady", canStack: false, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.HappiestMaskReady); GhostCooldown = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_GhostCooldown", canStack: true, isCooldown: true, isDebuff: false, Color.white, Assets.BuffIcons.HappiestMaskCooldown); OnCharacterDeath.OnCharacterDeathInventoryActions = (OnCharacterDeath.OnCharacterDeathInventory)Delegate.Combine(OnCharacterDeath.OnCharacterDeathInventoryActions, new OnCharacterDeath.OnCharacterDeathInventory(TriggerMaskGhost)); CharacterBody.onBodyInventoryChangedGlobal += CharacterBody_onBodyInventoryChangedGlobal; RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); } private void OnLoad() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) blacklistedBodies = new List(); blacklistedBodies.Add(BodyPrefabs.MinorConstructAttachableBody.bodyIndex); blacklistedBodies.Add(BodyPrefabs.SolusWingBody.bodyIndex); blacklistedBodies.Add(BodyPrefabs.SolusHeartBody.bodyIndex); blacklistedBodies.Add(BodyPrefabs.SolusMineBody.bodyIndex); } private void CharacterBody_onBodyInventoryChangedGlobal(CharacterBody self) { if (NetworkServer.active && Object.op_Implicit((Object)(object)self.inventory)) { self.AddItemBehavior(self.inventory.GetItemCountEffective(Items.GhostOnKill)); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.GhostOnKill); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.GhostOnKill); } private static void TriggerMaskGhost(GlobalEventManager self, DamageReport damageReport, CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00ea: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_0141: Unknown result type (might be due to invalid IL or missing references) int itemCountEffective = attackerInventory.GetItemCountEffective(Items.GhostOnKill); if (itemCountEffective <= 0 || ((Enum)victimBody.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4) || !attackerBody.HasBuff(GhostReady.buffIndex) || attackerBody.HasBuff(GhostCooldown.buffIndex) || blacklistedBodies.Contains(victimBody.bodyIndex) || (victimBody.bodyIndex == BodyPrefabs.VoidInfestorBody.bodyIndex && Run.instance.gameModeIndex == GameModeCatalog.FindGameModeIndex("InfiniteTowerRun"))) { return; } TeamIndex val = (TeamIndex)((!Object.op_Implicit((Object)(object)attackerBody.teamComponent)) ? (-1) : ((int)attackerBody.teamComponent.teamIndex)); TeamIndex val2 = (TeamIndex)((!Object.op_Implicit((Object)(object)victimBody.teamComponent)) ? (-1) : ((int)victimBody.teamComponent.teamIndex)); if ((int)val != 1 && (int)val2 == 1 && !victimBody.isPlayerControlled) { return; } GhostOnKillBehavior component = ((Component)attackerBody).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.CanSpawnGhost()) { component.AddGhost(SpawnMaskGhost(victimBody, attackerBody, itemCountEffective)); for (int i = 1; i <= 20; i++) { attackerBody.AddTimedBuff(GhostCooldown.buffIndex, (float)i); } } } public static CharacterBody SpawnMaskGhost(CharacterBody targetBody, CharacterBody ownerBody, int itemCount) { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Invalid comparison between Unknown and I4 //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: 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) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'HappiestMask SpawnMaskGhost' called on client"); return null; } if (!Object.op_Implicit((Object)(object)targetBody)) { return null; } GameObject bodyPrefab = BodyCatalog.FindBodyPrefab(targetBody); if (!Object.op_Implicit((Object)(object)bodyPrefab)) { return null; } CharacterMaster val = MasterCatalog.allAiMasters.FirstOrDefault((Func)((CharacterMaster master) => (Object)(object)master.bodyPrefab == (Object)(object)bodyPrefab)); if (!Object.op_Implicit((Object)(object)val)) { return null; } MasterSummon val2 = new MasterSummon(); val2.masterPrefab = ((Component)val).gameObject; val2.ignoreTeamMemberLimit = true; val2.position = targetBody.footPosition; CharacterDirection component = ((Component)targetBody).GetComponent(); val2.rotation = (Object.op_Implicit((Object)(object)component) ? Quaternion.Euler(0f, component.yaw, 0f) : targetBody.transform.rotation); val2.summonerBodyObject = (Object.op_Implicit((Object)(object)ownerBody) ? ((Component)ownerBody).gameObject : null); val2.inventoryToCopy = targetBody.inventory; val2.useAmbientLevel = null; CharacterMaster val3 = val2.Perform(); if (!Object.op_Implicit((Object)(object)val3)) { return null; } Inventory inventory = val3.inventory; if (Object.op_Implicit((Object)(object)inventory)) { if (inventory.GetItemCountPermanent(Items.Ghost) <= 0) { inventory.GiveItemPermanent(Items.Ghost, 1); } if (inventory.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { inventory.GiveItemPermanent(Items.UseAmbientLevel, 1); } if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)ownerBody.teamComponent) && (int)ownerBody.teamComponent.teamIndex == 1) { inventory.GiveItemPermanent(Items.BoostDamage.itemIndex, 32 + 18 * itemCount); inventory.GiveItemPermanent(Items.HealthDecay.itemIndex, 30 * itemCount); } else { int num = 10 + 10 * itemCount; inventory.GiveItemPermanent(Items.HealthDecay.itemIndex, num); MasterSuicideOnTimer val4 = ((Component)val3).gameObject.AddComponent(); val4.lifeTimer = num; } } CharacterBody body = val3.GetBody(); if (Object.op_Implicit((Object)(object)body)) { ((Component)body).gameObject.AddComponent(); EntityStateMachine[] components = ((Component)body).GetComponents(); foreach (EntityStateMachine val5 in components) { val5.initialStateType = val5.mainStateType; } } return body; } } public class HeadHunter { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_1; public static Manipulator <>9__3_0; internal void <.ctor>b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "HeadHunter") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Headhunter OnCharacterDeath IL Hook failed"); } } internal bool <.ctor>b__3_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "HeadHunter"); } } public static bool enabled = true; public static bool perfectedTweak = true; public static BuffDef Perfected2; public HeadHunter() { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); ((VanillaTweakBase)VanillaTweakBase.Instance).SetEnabled(false); object obj = <>c.<>9__3_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "HeadHunter") })) { val3.Remove(); val3.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Headhunter OnCharacterDeath IL Hook failed"); } }; <>c.<>9__3_0 = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; AssistManager.HandleAssistInventoryCompatibleActions = (HandleAssistInventoryCompatible)Delegate.Combine((Delegate?)(object)AssistManager.HandleAssistInventoryCompatibleActions, (Delegate?)new HandleAssistInventoryCompatible(AssistEffect)); OnCharacterDeath.OnCharacterDeathInventoryActions = (OnCharacterDeath.OnCharacterDeathInventory)Delegate.Combine(OnCharacterDeath.OnCharacterDeathInventoryActions, new OnCharacterDeath.OnCharacterDeathInventory(ProcItem)); if (SoftDependencies.LinearDamageLoaded) { ModifyFinalDamage.ModifyFinalDamageAttackerActions = (ModifyFinalDamageAttackerDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageAttackerActions, (Delegate?)new ModifyFinalDamageAttackerDelegate(ModifyFinalDamage_Additive)); } else { ModifyFinalDamage.ModifyFinalDamageAttackerActions = (ModifyFinalDamageAttackerDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageAttackerActions, (Delegate?)new ModifyFinalDamageAttackerDelegate(ModifyFinalDamage)); } if (perfectedTweak) { BuffDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/EliteLunar/bdEliteLunar.asset").WaitForCompletion(); Perfected2 = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_Perfected2", canStack: false, isCooldown: false, isDebuff: false, val2.buffColor, val2.iconSprite); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(OnHit)); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(HandlePerfected2Stats); } } private void ModifyFinalDamage(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Invalid comparison between Unknown and I4 //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (!victimBody.isElite || !Object.op_Implicit((Object)(object)attackerBody.inventory)) { return; } int itemCount = attackerBody.inventory.GetItemCount(Items.HeadHunter); if (itemCount > 0) { damageModifierArgs.damageMultFinal *= 1.3f; if ((int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)5; } } } private void ModifyFinalDamage_Additive(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Invalid comparison between Unknown and I4 //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (!victimBody.isElite || !Object.op_Implicit((Object)(object)attackerBody.inventory)) { return; } int itemCount = attackerBody.inventory.GetItemCount(Items.HeadHunter); if (itemCount > 0) { damageModifierArgs.damageMultAdd += 0.3f; if ((int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)5; } } } private void OnHit(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (attackerBody.HasBuff(Perfected2.buffIndex)) { victimBody.AddTimedBuff(Buffs.Cripple, 3f); } } private void ProcItem(GlobalEventManager self, DamageReport damageReport, CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { OnKillEffect(attackerBody, attackerInventory, victimBody); } private void AssistEffect(CharacterBody attackerBody, CharacterBody victimBody, DamageType? assistDamageType, DamageTypeExtended? assistDamageTypeExtended, DamageSource? assistDamageSource, HashSet assistModdedDamageTypes, Inventory attackerInventory, CharacterBody killerBody, DamageInfo damageInfo) { if (!((Object)(object)attackerBody == (Object)(object)killerBody)) { OnKillEffect(attackerBody, attackerInventory, victimBody); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.HeadHunter); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.HeadHunter); } private void HandlePerfected2Stats(CharacterBody sender, StatHookEventArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) if (sender.HasBuff(Perfected2.buffIndex)) { args.baseShieldAdd += sender.baseMaxHealth * 0.25f; args.levelShieldAdd += sender.baseMaxShield * 0.25f; args.healthMultAdd += 0.25f; args.moveSpeedMultAdd += 0.35f; } } private void OnKillEffect(CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if (!victimBody.isElite) { return; } int itemCount = attackerInventory.GetItemCount(Items.HeadHunter); if (itemCount <= 0) { return; } float num = 5f + 5f * (float)itemCount; for (int i = 0; i < BuffCatalog.eliteBuffIndices.Length; i++) { BuffIndex val = BuffCatalog.eliteBuffIndices[i]; if (victimBody.HasBuff(val)) { attackerBody.AddTimedBuff((val != Buffs.AffixLunar.buffIndex) ? val : Perfected2.buffIndex, num); } } } } public class Headstompers { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__5_0; public static hook_OnExit <>9__5_1; public static Func <>9__5_4; public static Func <>9__5_3; public static Manipulator <>9__5_2; public static hook_OnEnter <>9__6_0; public static hook_FixedUpdate <>9__6_1; public static hook_OnExit <>9__6_2; public static hook_FixedUpdate <>9__6_3; internal void <.ctor>b__5_0(orig_OnEnter orig, BaseHeadstompersState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.bodyMotor)) { self.bodyMotor.airControl = 1f; } } internal void <.ctor>b__5_1(orig_OnExit orig, BaseHeadstompersState self) { if (Object.op_Implicit((Object)(object)self.bodyMotor)) { self.bodyMotor.airControl = 0.25f; } orig.Invoke(self); } internal void <.ctor>b__5_2(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.Emit(OpCodes.Ldloc_0); val.EmitDelegate>((Func)delegate(BlastAttack blastAttack, Inventory inventory) { int itemCount = inventory.GetItemCount(Items.FallBoots); blastAttack.baseDamage += blastAttack.baseDamage * 0.6f * (float)(itemCount - 1); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Headstompers IL Hook failed"); } } internal bool <.ctor>b__5_4(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "Fire"); } internal BlastAttack <.ctor>b__5_3(BlastAttack blastAttack, Inventory inventory) { int itemCount = inventory.GetItemCount(Items.FallBoots); blastAttack.baseDamage += blastAttack.baseDamage * 0.6f * (float)(itemCount - 1); return blastAttack; } internal void b__6_0(orig_OnEnter orig, HeadstompersCooldown self) { orig.Invoke(self); self.duration = HeadstompersCooldown.baseDuration; if (!NetworkServer.active || !Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body)) { return; } if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersActive); } if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersPending)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersPending); } int num = 0; float num2 = self.duration; while (num2 > 0f) { float num3 = 1f; if (num2 > num3) { num2 -= num3; } else { num3 = num2; num2 = 0f; } float num4 = (float)num + num3; ((BaseHeadstompersState)self).body.AddTimedBuff(HeadstompersCooldown, num4); num++; } } internal void b__6_1(orig_FixedUpdate orig, HeadstompersCooldown self) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown orig.Invoke(self); if (!Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body)) { return; } if (!((BaseHeadstompersState)self).body.HasBuff(HeadstompersCooldown)) { if (((EntityState)self).isAuthority) { if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersPending)) { ((EntityState)self).outer.SetNextState((EntityState)new HeadstompersIdle()); } } else if (NetworkServer.active && !((BaseHeadstompersState)self).body.HasBuff(HeadstompersPending)) { ((BaseHeadstompersState)self).body.AddBuff(HeadstompersPending); } } else if (NetworkServer.active && ((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersActive); } } internal void b__6_2(orig_OnExit orig, BaseHeadstompersState self) { if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body)) { if (self.body.HasBuff(HeadstompersCooldown)) { self.body.ClearTimedBuffs(HeadstompersCooldown); } if (self.body.HasBuff(HeadstompersActive)) { self.body.RemoveBuff(HeadstompersActive); } if (self.body.HasBuff(HeadstompersPending)) { self.body.RemoveBuff(HeadstompersPending); } } orig.Invoke(self); } internal void b__6_3(orig_FixedUpdate orig, HeadstompersIdle self) { orig.Invoke(self); if (!NetworkServer.active || !Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body) || !Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body.inventory)) { return; } if (((BaseHeadstompersState)self).body.inventory.GetItemCount(Items.FallBoots) > 0) { if (!((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.AddBuff(HeadstompersActive); } } else if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersActive); } } } public static bool useBuff = true; public static bool enabled = true; public static BuffDef HeadstompersActive; public static BuffDef HeadstompersPending; public static BuffDef HeadstompersCooldown; public Headstompers() { //IL_0041: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); HeadstompersActive = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyModHeadstompersActive", canStack: false, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.HeadstomperActive); HeadstompersPending = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyModHeadstompersPending", canStack: false, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.HeadstomperActive); HeadstompersCooldown = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyModHeadstompersCooldown", canStack: true, isCooldown: true, isDebuff: false, new Color(0.8f, 0.8f, 0.8f), Assets.BuffIcons.HeadstomperCooldown); object obj = <>c.<>9__5_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, BaseHeadstompersState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.bodyMotor)) { self.bodyMotor.airControl = 1f; } }; <>c.<>9__5_0 = val; obj = (object)val; } BaseHeadstompersState.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__5_1; if (obj2 == null) { hook_OnExit val2 = delegate(orig_OnExit orig, BaseHeadstompersState self) { if (Object.op_Implicit((Object)(object)self.bodyMotor)) { self.bodyMotor.airControl = 0.25f; } orig.Invoke(self); }; <>c.<>9__5_1 = val2; obj2 = (object)val2; } BaseHeadstompersState.OnExit += (hook_OnExit)obj2; SetupCooldownBehavior(); object obj3 = <>c.<>9__5_2; if (obj3 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val4.Emit(OpCodes.Ldloc_0); val4.EmitDelegate>((Func)delegate(BlastAttack blastAttack, Inventory inventory) { int itemCount = inventory.GetItemCount(Items.FallBoots); blastAttack.baseDamage += blastAttack.baseDamage * 0.6f * (float)(itemCount - 1); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Headstompers IL Hook failed"); } }; <>c.<>9__5_2 = val3; obj3 = (object)val3; } HeadstompersFall.DoStompExplosionAuthority += (Manipulator)obj3; } private void SetupCooldownBehavior() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //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_007b: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown if (!useBuff) { return; } object obj = <>c.<>9__6_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, HeadstompersCooldown self) { orig.Invoke(self); self.duration = HeadstompersCooldown.baseDuration; if (NetworkServer.active && Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body)) { if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersActive); } if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersPending)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersPending); } int num = 0; float num2 = self.duration; while (num2 > 0f) { float num3 = 1f; if (num2 > num3) { num2 -= num3; } else { num3 = num2; num2 = 0f; } float num4 = (float)num + num3; ((BaseHeadstompersState)self).body.AddTimedBuff(HeadstompersCooldown, num4); num++; } } }; <>c.<>9__6_0 = val; obj = (object)val; } HeadstompersCooldown.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__6_1; if (obj2 == null) { hook_FixedUpdate val2 = delegate(orig_FixedUpdate orig, HeadstompersCooldown self) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown orig.Invoke(self); if (Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body)) { if (!((BaseHeadstompersState)self).body.HasBuff(HeadstompersCooldown)) { if (((EntityState)self).isAuthority) { if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersPending)) { ((EntityState)self).outer.SetNextState((EntityState)new HeadstompersIdle()); } } else if (NetworkServer.active && !((BaseHeadstompersState)self).body.HasBuff(HeadstompersPending)) { ((BaseHeadstompersState)self).body.AddBuff(HeadstompersPending); } } else if (NetworkServer.active && ((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersActive); } } }; <>c.<>9__6_1 = val2; obj2 = (object)val2; } HeadstompersCooldown.FixedUpdate += (hook_FixedUpdate)obj2; object obj3 = <>c.<>9__6_2; if (obj3 == null) { hook_OnExit val3 = delegate(orig_OnExit orig, BaseHeadstompersState self) { if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body)) { if (self.body.HasBuff(HeadstompersCooldown)) { self.body.ClearTimedBuffs(HeadstompersCooldown); } if (self.body.HasBuff(HeadstompersActive)) { self.body.RemoveBuff(HeadstompersActive); } if (self.body.HasBuff(HeadstompersPending)) { self.body.RemoveBuff(HeadstompersPending); } } orig.Invoke(self); }; <>c.<>9__6_2 = val3; obj3 = (object)val3; } BaseHeadstompersState.OnExit += (hook_OnExit)obj3; object obj4 = <>c.<>9__6_3; if (obj4 == null) { hook_FixedUpdate val4 = delegate(orig_FixedUpdate orig, HeadstompersIdle self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body) && Object.op_Implicit((Object)(object)((BaseHeadstompersState)self).body.inventory)) { if (((BaseHeadstompersState)self).body.inventory.GetItemCount(Items.FallBoots) > 0) { if (!((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.AddBuff(HeadstompersActive); } } else if (((BaseHeadstompersState)self).body.HasBuff(HeadstompersActive)) { ((BaseHeadstompersState)self).body.RemoveBuff(HeadstompersActive); } } }; <>c.<>9__6_3 = val4; obj4 = (object)val4; } HeadstompersIdle.FixedUpdate += (hook_FixedUpdate)obj4; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.FallBoots); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.FallBoots); } } public class Tesla { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Func <>9__1_2; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown bool flag = true; bool flag2 = true; ILCursor val = new ILCursor(il); if (RiskyMod.disableProcChains && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "procCoefficient") })) { int index = val.Index; val.Index = index - 1; val.Next.Operand = 0f; flag = false; } if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "range") })) { int index = val.Index; val.Index = index - 1; val.Next.Operand = 25f; flag2 = false; } if (flag || flag2) { Debug.LogError((object)"RiskyMod: Tesla IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "procCoefficient"); } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "range"); } } public static bool enabled = true; public Tesla() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown bool flag = true; bool flag2 = true; ILCursor val2 = new ILCursor(il); if (RiskyMod.disableProcChains && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "procCoefficient") })) { int index = val2.Index; val2.Index = index - 1; val2.Next.Operand = 0f; flag = false; } if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "range") })) { int index = val2.Index; val2.Index = index - 1; val2.Next.Operand = 25f; flag2 = false; } if (flag || flag2) { Debug.LogError((object)"RiskyMod: Tesla IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } ShockNearbyBodyBehavior.FixedUpdate += (Manipulator)obj; } } } namespace RiskyMod.Items.Equipment { public class Backup { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_FireDroneBackup <>9__4_0; internal bool <.ctor>b__4_0(orig_FireDroneBackup orig, EquipmentSlot self) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) int num = 4; float num2 = 25f; if (NetworkServer.active) { BackupTracker backupTracker = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)backupTracker)) { backupTracker = ((Component)self).gameObject.AddComponent(); } if (!backupTracker.canSpawn) { return false; } Ray aimRay = self.GetAimRay(); Quaternion val = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); float y = ((Quaternion)(ref val)).eulerAngles.y; float num3 = 3f; int num4 = 0; DegreeSlices val2 = new DegreeSlices(num, 0.5f); Enumerator enumerator = ((DegreeSlices)(ref val2)).GetEnumerator(); try { while (((Enumerator)(ref enumerator)).MoveNext()) { float current = ((Enumerator)(ref enumerator)).Current; if (!backupTracker.canSpawn) { continue; } Quaternion val3 = Quaternion.Euler(0f, y + current, 0f); Quaternion val4 = Quaternion.Euler(0f, y + current + 180f, 0f); Vector3 position = ((Component)self).transform.position + val3 * (Vector3.forward * num3); CharacterMaster val5 = new MasterSummon { masterPrefab = backupMaster, position = position, rotation = val3, summonerBodyObject = ((Component)self).gameObject, ignoreTeamMemberLimit = ignoreTeamLimit, useAmbientLevel = true }.Perform(); if (Object.op_Implicit((Object)(object)val5)) { num4++; CharacterBody body = val5.GetBody(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.healthComponent)) { MasterSuicideOnTimer val6 = ((Component)val5).gameObject.AddComponent(); val6.lifeTimer = num2 + Random.Range(0f, 3f); backupTracker.AddHealthcomponent(body.healthComponent); } } } } finally { ((IDisposable)(Enumerator)(ref enumerator)).Dispose(); } if (num4 < num) { float num5 = 1f - (float)num4 / (float)num; if (Object.op_Implicit((Object)(object)self.inventory) && self.equipmentIndex == Equipment.DroneBackup.equipmentIndex) { self.inventory.DeductActiveEquipmentCooldown(num5 * self.inventory.CalculateEquipmentCooldownScale()); } } } self.subcooldownTimer = 0.5f; return true; } } public static bool enabled = true; public static bool ignoreTeamLimit = true; public static BodyIndex BackupDroneIndex; public static GameObject backupMaster = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/DroneBackupMaster.prefab").WaitForCompletion(); public Backup() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__4_0; if (obj == null) { hook_FireDroneBackup val = delegate(orig_FireDroneBackup orig, EquipmentSlot self) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) int num = 4; float num2 = 25f; if (NetworkServer.active) { BackupTracker backupTracker = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)backupTracker)) { backupTracker = ((Component)self).gameObject.AddComponent(); } if (!backupTracker.canSpawn) { return false; } Ray aimRay = self.GetAimRay(); Quaternion val2 = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); float y = ((Quaternion)(ref val2)).eulerAngles.y; float num3 = 3f; int num4 = 0; DegreeSlices val3 = new DegreeSlices(num, 0.5f); Enumerator enumerator = ((DegreeSlices)(ref val3)).GetEnumerator(); try { while (((Enumerator)(ref enumerator)).MoveNext()) { float current = ((Enumerator)(ref enumerator)).Current; if (backupTracker.canSpawn) { Quaternion val4 = Quaternion.Euler(0f, y + current, 0f); Quaternion val5 = Quaternion.Euler(0f, y + current + 180f, 0f); Vector3 position = ((Component)self).transform.position + val4 * (Vector3.forward * num3); CharacterMaster val6 = new MasterSummon { masterPrefab = backupMaster, position = position, rotation = val4, summonerBodyObject = ((Component)self).gameObject, ignoreTeamMemberLimit = ignoreTeamLimit, useAmbientLevel = true }.Perform(); if (Object.op_Implicit((Object)(object)val6)) { num4++; CharacterBody body = val6.GetBody(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.healthComponent)) { MasterSuicideOnTimer val7 = ((Component)val6).gameObject.AddComponent(); val7.lifeTimer = num2 + Random.Range(0f, 3f); backupTracker.AddHealthcomponent(body.healthComponent); } } } } } finally { ((IDisposable)(Enumerator)(ref enumerator)).Dispose(); } if (num4 < num) { float num5 = 1f - (float)num4 / (float)num; if (Object.op_Implicit((Object)(object)self.inventory) && self.equipmentIndex == Equipment.DroneBackup.equipmentIndex) { self.inventory.DeductActiveEquipmentCooldown(num5 * self.inventory.CalculateEquipmentCooldownScale()); } } } self.subcooldownTimer = 0.5f; return true; }; <>c.<>9__4_0 = val; obj = (object)val; } EquipmentSlot.FireDroneBackup += (hook_FireDroneBackup)obj; RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); } private void OnLoad() { //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) BackupDroneIndex = BodyCatalog.FindBodyIndex("BackupDroneBody"); } } public class BackupTracker : MonoBehaviour { public static int maxCount = 8; private List droneList; public bool canSpawn => droneList.Count < maxCount; public void FixedUpdate() { if (droneList.Count <= 0) { return; } List list = new List(); foreach (HealthComponent drone in droneList) { if (!Object.op_Implicit((Object)(object)drone) || !drone.alive) { list.Add(drone); } } if (list.Count <= 0) { return; } foreach (HealthComponent item in list) { droneList.Remove(item); } } public void AddHealthcomponent(HealthComponent h) { droneList.Add(h); } public void Awake() { droneList = new List(); } } public class BFG { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__1_0; internal void <.ctor>b__1_0(orig_Init orig) { orig.Invoke(); ArrayUtils.ArrayAppend(ref ItemsCore.changedEquipDescs, ref Equipment.BFG); } } public static bool enabled = true; public BFG() { //IL_0040: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); ArrayUtils.ArrayAppend(ref ItemsCore.changedEquipDescs, ref Equipment.BFG); }; <>c.<>9__1_0 = val; obj = (object)val; } EquipmentCatalog.Init += (hook_Init)obj; ItemsCore.ChangeEquipmentCooldown(Addressables.LoadAssetAsync((object)"RoR2/Base/BFG/BFG.asset").WaitForCompletion(), 120f); } } public class Capacitor { public static bool enabled = true; public Capacitor() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { ItemsCore.ChangeEquipmentCooldown(Addressables.LoadAssetAsync((object)"RoR2/Base/Lightning/Lightning.asset").WaitForCompletion(), 30f); } } } public class Chrysalis { public static bool enabled = true; public Chrysalis() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { ItemsCore.ChangeEquipmentCooldown(Addressables.LoadAssetAsync((object)"RoR2/Base/Jetpack/Jetpack.asset").WaitForCompletion(), 45f); } } } public class CritHud { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__1_0; public static Func <>9__1_2; public static Manipulator <>9__1_1; internal void <.ctor>b__1_0(orig_Init orig) { orig.Invoke(); ArrayUtils.ArrayAppend(ref ItemsCore.changedEquipDescs, ref Equipment.CritOnUse); } internal void <.ctor>b__1_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "FullCrit") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyBuffDef"); } else { Debug.LogError((object)"RiskyMod: CritHud IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "FullCrit"); } } public static bool enabled = true; public CritHud() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); ArrayUtils.ArrayAppend(ref ItemsCore.changedEquipDescs, ref Equipment.CritOnUse); }; <>c.<>9__1_0 = val; obj = (object)val; } EquipmentCatalog.Init += (hook_Init)obj; object obj2 = <>c.<>9__1_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "FullCrit") })) { val3.Remove(); val3.Emit(OpCodes.Ldsfld, "emptyBuffDef"); } else { Debug.LogError((object)"RiskyMod: CritHud IL Hook failed"); } }; <>c.<>9__1_1 = val2; obj2 = (object)val2; } CharacterBody.RecalculateStats += (Manipulator)obj2; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buffs.FullCrit)) { args.critAdd += 100f; float num = sender.crit - 100f; if (num > 0f) { args.critDamageMultAdd += num * 0.01f; } } } } public class SuperLeech { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "LifeSteal") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyBuffDef"); } else { Debug.LogError((object)"RiskyMod: SuperLeech IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "LifeSteal"); } } public static bool enabled = true; public SuperLeech() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "LifeSteal") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyBuffDef"); } else { Debug.LogError((object)"RiskyMod: SuperLeech IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; TakeDamage.OnHpLostAttackerActions = (TakeDamage.OnHpLostAttacker)Delegate.Combine(TakeDamage.OnHpLostAttackerActions, new TakeDamage.OnHpLostAttacker(HealOnHit)); } private void HealOnHit(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody, Inventory inventory, float hpLost) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (attackerBody.HasBuff(Buffs.LifeSteal)) { hpLost = Mathf.Max(hpLost, damageInfo.damage); float num = hpLost * 0.2f; attackerBody.healthComponent.Heal(num * damageInfo.procCoefficient, damageInfo.procChainMask, true); } } } public class VolcanicEgg { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__1_0; internal void <.ctor>b__1_0(orig_Init orig) { orig.Invoke(); ArrayUtils.ArrayAppend(ref ItemsCore.changedEquipDescs, ref Equipment.FireBallDash); } } public static bool enabled = true; public VolcanicEgg() { //IL_0040: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); ArrayUtils.ArrayAppend(ref ItemsCore.changedEquipDescs, ref Equipment.FireBallDash); }; <>c.<>9__1_0 = val; obj = (object)val; } EquipmentCatalog.Init += (hook_Init)obj; GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/FireBallDash/FireballVehicle.prefab").WaitForCompletion(); FireballVehicle component = val2.GetComponent(); component.blastRadius = 14f; component.blastDamageCoefficient = 12f; component.overlapDamageCoefficient = 6f; component.blastDamageType = DamageTypeCombo.op_Implicit((DamageType)160); } } } namespace RiskyMod.Items.DLC3.Uncommon { public class Dynamite { public static bool enabled = true; public Dynamite() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { LanguageModifiers.ModifyLanguageTokenActions = (LanguageModifiers.ModifyLanguageToken)Delegate.Combine(LanguageModifiers.ModifyLanguageTokenActions, new LanguageModifiers.ModifyLanguageToken(ModifyLang)); DroneDynamiteBehaviour.FixedUpdate += new Manipulator(DroneDynamiteBehaviour_FixedUpdate); } } private void DroneDynamiteBehaviour_FixedUpdate(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.85f) })) { val.EmitDelegate>((Func)((float orig) => 1.2f)); } else { Debug.LogError((object)"RiskyMod: Dynamite IL hook failed."); } } private void ModifyLang(LanguageModifiers.LanguageModifier langMod) { if (langMod.token == "ITEM_DRONESDROPDYNAMITE_DESC") { langMod.local = langMod.local.Replace("85", "120"); } } } public class KineticDampener { public static bool enabled; public KineticDampener() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //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 if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats); HealthComponent.GetShieldBoosterDamage += new Manipulator(HealthComponent_GetShieldBoosterDamage); HealthComponent.TakeDamageProcess += new Manipulator(HealthComponent_TakeDamageProcess); } } private void HealthComponent_TakeDamageProcess(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "GetShieldBoosterDamage") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack blast) { blast.radius = 20f; return blast; }); } else { Debug.LogError((object)"RiskyMod: KineticDampener TakeDamageProcess IL hook failed."); } } private void HealthComponent_GetShieldBoosterDamage(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.1f) })) { val.EmitDelegate>((Func)((float orig) => 0.5f)); } else { Debug.LogError((object)"RiskyMod: KineticDampener GetShieldBoosterDamage IL hook failed."); } } private void CharacterBody_RecalculateStats(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown ILCursor val = new ILCursor(il); bool flag = true; int loc = -1; if (val.TryGotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ShieldBooster"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "GetItemCountEffective"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc) }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, loc) }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.04f) })) { val.EmitDelegate>((Func)((float orig) => 0.1f)); flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: KineticDampener RecalculateStats IL hook failed."); } } private void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ShieldBooster); } } } namespace RiskyMod.Items.DLC3.Legendary { public class NetworkedSuffering { public static bool enabled = true; public NetworkedSuffering() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { LanguageModifiers.ModifyLanguageTokenActions = (LanguageModifiers.ModifyLanguageToken)Delegate.Combine(LanguageModifiers.ModifyLanguageTokenActions, new LanguageModifiers.ModifyLanguageToken(ModifyLang)); SharedSufferingManager.OnEnable += new hook_OnEnable(SharedSufferingManager_OnEnable); } } private void SharedSufferingManager_OnEnable(orig_OnEnable orig, SharedSufferingManager self) { orig.Invoke(self); self._damageSentToPool = 0.25f; } private void ModifyLang(LanguageModifiers.LanguageModifier langMod) { if (langMod.token == "ITEM_SHAREDSUFFERING_DESC") { langMod.local = langMod.local.Replace("45", "25"); } } } } namespace RiskyMod.Items.DLC3.Food { public class QuickFix { public static bool enabled = true; public QuickFix() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { LanguageModifiers.ModifyLanguageTokenActions = (LanguageModifiers.ModifyLanguageToken)Delegate.Combine(LanguageModifiers.ModifyLanguageTokenActions, new LanguageModifiers.ModifyLanguageToken(ModifyLang)); CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats); } } private void CharacterBody_RecalculateStats(ILContext il) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown bool flag = true; int loc = -1; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BonusHealthBoost"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "GetItemCountEffective"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc) }) && val.TryGotoNext(new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.15f), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, loc) })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)((float orig) => 0.25f)); flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: Quick Fix IL hook failed."); } } private void ModifyLang(LanguageModifiers.LanguageModifier langMod) { if (langMod.token == "ITEM_BONUSHEALTHBOOST_DESC") { langMod.local = langMod.local.Replace("15", "25"); } } } public class SearedSteak { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "CookedSteak") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: SearedSteak IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "CookedSteak"); } } public static bool enabled = true; public SearedSteak() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "CookedSteak") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: SearedSteak IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStatsInventory)); } private void HandleStatsInventory(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { int itemCountEffective = sender.inventory.GetItemCountEffective(Items.CookedSteak); if (itemCountEffective > 0) { args.baseHealthAdd += sender.levelMaxHealth * (float)itemCountEffective * 1.5f; args.healthMultAdd += 0.05f * (float)itemCountEffective; } } private void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.CookedSteak); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.CookedSteak); } } } namespace RiskyMod.Items.DLC3.Common { public class EclipseLite { public static bool enabled = true; public EclipseLite() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { LanguageModifiers.ModifyLanguageTokenActions = (LanguageModifiers.ModifyLanguageToken)Delegate.Combine(LanguageModifiers.ModifyLanguageTokenActions, new LanguageModifiers.ModifyLanguageToken(ModifyLang)); CharacterBody.OnSkillCooldown += new Manipulator(CharacterBody_OnSkillCooldown); } } private void CharacterBody_OnSkillCooldown(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BarrierOnCooldown") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.0025f) })) { val.EmitDelegate>((Func)((float orig) => 0.005f)); } else { Debug.LogError((object)"RiskyMod: EclipseLite IL hook failed."); } } private void ModifyLang(LanguageModifiers.LanguageModifier langMod) { if (langMod.token == "ITEM_BARRIERONCOOLDOWN_DESC") { langMod.local = langMod.local.Replace("25", "5"); } } } public class HikersBoots { public static bool enabled = true; public HikersBoots() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { GlobalEventManager.ProcessHitEnemy += new Manipulator(GlobalEventManager_ProcessHitEnemy); LanguageModifiers.ModifyLanguageTokenActions = (LanguageModifiers.ModifyLanguageToken)Delegate.Combine(LanguageModifiers.ModifyLanguageTokenActions, new LanguageModifiers.ModifyLanguageToken(ModifyLang)); } } private void GlobalEventManager_ProcessHitEnemy(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); bool flag = true; if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "CritChanceAndDamage") })) { val.EmitDelegate>((Func)((BuffDef x) => null)); if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "CritChanceAndDamage"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "GetBuffCount") })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)delegate(CharacterBody body) { body.SetTimedBuffDurationIfPresent(Buffs.CritChanceAndDamage, 7f, true); return body; }); if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "CritChanceAndDamage"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 10f) })) { val.EmitDelegate>((Func)((float x) => 7f)); flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: HikersBoots IL Hook failed."); } } private void ModifyLang(LanguageModifiers.LanguageModifier langMod) { if (langMod.token == "ITEM_CRITATLOWERELEVATION_DESC") { string[] array = langMod.local.Split("10"); string text = array[0]; for (int i = 1; i < array.Length; i++) { text = ((i + 1 != array.Length) ? (text + "10") : (text + "7")); text += array[i]; } langMod.local = text; } } } } namespace RiskyMod.Items.DLC3.Boss { public class PrisonMatrix { public static bool enabled = true; public PrisonMatrix() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStatsInventory)); CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats); } } private void CharacterBody_RecalculateStats(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "PowerCubeBuff") })) { val.EmitDelegate>((Func)((BuffDef x) => null)); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchRet(x) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(CharacterBody body) { body.armor *= 1.5f; }); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Prison Matrix IL Hook failed."); } } private void HandleStatsInventory(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { if (sender.inventory.GetItemCountEffective(Items.PowerCube) > 0) { args.armorAdd += 10f; } } private void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.PowerCube); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.PowerCube); } } } namespace RiskyMod.Items.DLC2 { public class BreachingFin { public static bool enabled = true; public BreachingFin() { if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); FinReproc.damageBuffPerStack = 0.15f; } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.KnockBackHitEnemies); } } public class GrowthNectar { public static bool enabled = true; public GrowthNectar() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats); } } private void CharacterBody_RecalculateStats(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "BoostAllStatsBuff") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.04f) })) { val.EmitDelegate>((Func)((float x) => 0.05f)); } else { Debug.LogError((object)"RiskyMod: Growth Nectar IL Hook failed."); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.BoostAllStats); } } public class NoxiousThorn { public static bool enabled = true; public NoxiousThorn() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); CharacterBody.TriggerEnemyDebuffs += new Manipulator(CharacterBody_TriggerEnemyDebuffs); } } private void CharacterBody_TriggerEnemyDebuffs(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RefreshCandidates") })) { val.EmitDelegate>((Func)delegate(SphereSearch search) { search.radius = 25f; return search; }); } else { Debug.LogError((object)"RiskyMod: NoxiousThorn IL hook failed."); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.TriggerEnemyDebuffs); } } public class Overspill { public static bool enabled = true; public Overspill() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (enabled && RiskyMod.disableProcChains) { MeteorAttackOnHighDamageBodyBehavior.DetonateRunicLensMeteor += new Manipulator(MeteorAttackOnHighDamageBodyBehavior_DetonateRunicLensMeteor); } } private void MeteorAttackOnHighDamageBodyBehavior_DetonateRunicLensMeteor(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack ba) { ba.procCoefficient = 0f; return ba; }); } else { Debug.LogError((object)"RiskyMod: Overspill IL Hook failed."); } } } } namespace RiskyMod.Items.DLC1.Void { public class Dungus { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_2; public static Func <>9__3_3; public static Func <>9__3_1; public static Manipulator <>9__3_0; internal void <.ctor>b__3_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f) })) { val.Next.Operand = stackHealPercent * 0.5f; if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val.EmitDelegate>((Func)((float healPercent) => healPercent + (baseHealPercent - stackHealPercent) * 0.5f)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Dungus IL Hook failed"); } } internal bool <.ctor>b__3_2(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.01f); } internal bool <.ctor>b__3_3(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal float <.ctor>b__3_1(float healPercent) { return healPercent + (baseHealPercent - stackHealPercent) * 0.5f; } } public static bool enabled = true; public static float baseHealPercent = 0.012f; public static float stackHealPercent = 0.006f; public Dungus() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__3_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f) })) { val2.Next.Operand = stackHealPercent * 0.5f; if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val2.EmitDelegate>((Func)((float healPercent) => healPercent + (baseHealPercent - stackHealPercent) * 0.5f)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Dungus IL Hook failed"); } }; <>c.<>9__3_0 = val; obj = (object)val; } MushroomVoidBehavior.FixedUpdate += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.MushroomVoid); } } public class PlasmaShrimp { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_3; public static Func <>9__1_5; public static Func <>9__1_6; public static Func <>9__1_1; public static Func <>9__1_7; public static Func <>9__1_2; public static Func <>9__1_8; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass1_0 CS$<>8__locals0 = new <>c__DisplayClass1_0(); bool flag = true; ILCursor val = new ILCursor(il); CS$<>8__locals0.masterLoc = -1; if (val.TryGotoNext(new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_master"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref CS$<>8__locals0.masterLoc) }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MissileVoid") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "shield") })) { val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldloc, CS$<>8__locals0.masterLoc); val.EmitDelegate>((Func)delegate(float origShield, DamageInfo damageInfo, CharacterMaster master) { if (origShield <= 0f) { return origShield; } bool flag2 = true; if (damageInfo.procCoefficient < 1f) { flag2 = Util.CheckRoll(100f * damageInfo.procCoefficient, master); } return flag2 ? origShield : 0f; }); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.4f) })) { val.Next.Operand = 0.28f; val.Index += 4; val.EmitDelegate>((Func)((float damage) => damage + 0.12f)); if (RiskyMod.disableProcChains && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "procCoefficient") })) { int index = val.Index; val.Index = index - 1; val.Next.Operand = 0f; } flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: PlasmaShrimp IL Hook failed"); } } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_master"); } internal bool <.ctor>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MissileVoid"); } internal bool <.ctor>b__1_6(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "shield"); } internal float <.ctor>b__1_1(float origShield, DamageInfo damageInfo, CharacterMaster master) { if (origShield <= 0f) { return origShield; } bool flag = true; if (damageInfo.procCoefficient < 1f) { flag = Util.CheckRoll(100f * damageInfo.procCoefficient, master); } return flag ? origShield : 0f; } internal bool <.ctor>b__1_7(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.4f); } internal float <.ctor>b__1_2(float damage) { return damage + 0.12f; } internal bool <.ctor>b__1_8(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "procCoefficient"); } } [CompilerGenerated] private sealed class <>c__DisplayClass1_0 { public int masterLoc; internal bool <.ctor>b__4(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, ref masterLoc); } } public static bool enabled = true; public PlasmaShrimp() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val2 = new ILCursor(il); int masterLoc = -1; if (val2.TryGotoNext(new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_master"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref masterLoc) }) && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MissileVoid") }) && val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "shield") })) { val2.Emit(OpCodes.Ldarg_1); val2.Emit(OpCodes.Ldloc, masterLoc); val2.EmitDelegate>((Func)delegate(float origShield, DamageInfo damageInfo, CharacterMaster master) { if (origShield <= 0f) { return origShield; } bool flag2 = true; if (damageInfo.procCoefficient < 1f) { flag2 = Util.CheckRoll(100f * damageInfo.procCoefficient, master); } return flag2 ? origShield : 0f; }); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.4f) })) { val2.Next.Operand = 0.28f; val2.Index += 4; val2.EmitDelegate>((Func)((float damage) => damage + 0.12f)); if (RiskyMod.disableProcChains && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "procCoefficient") })) { int index = val2.Index; val2.Index = index - 1; val2.Next.Operand = 0f; } flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: PlasmaShrimp IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.MissileVoid); } } public class Polylute { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Func <>9__1_3; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "totalStrikes") })) { val.EmitDelegate>((Func)((int strikes) => 2 * strikes / 3 + 1)); if (RiskyMod.disableProcChains && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.2f) })) { val.Next.Operand = 0f; } flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: Polylute IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "totalStrikes"); } internal int <.ctor>b__1_1(int strikes) { return 2 * strikes / 3 + 1; } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.2f); } } public static bool enabled = true; public Polylute() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "totalStrikes") })) { val2.EmitDelegate>((Func)((int strikes) => 2 * strikes / 3 + 1)); if (RiskyMod.disableProcChains && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.2f) })) { val2.Next.Operand = 0f; } flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: Polylute IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ChainLightningVoid); } } public class SaferSpaces { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_2; public static Func <>9__2_3; public static Func <>9__2_4; public static Func <>9__2_1; public static Func <>9__2_5; public static Func <>9__2_6; public static Manipulator <>9__2_0; internal void <.ctor>b__2_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "body"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "BearVoidReady"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RemoveBuff") })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)delegate(CharacterBody body) { if (addIframes) { body.AddTimedBuff(Buffs.HiddenInvincibility, 0.1f); } return body; }); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f) })) { val.Next.Operand = 20f; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f) })) { val.Next.Operand = 20f; flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: SaferSpaces IL Hook failed"); } } internal bool <.ctor>b__2_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "body"); } internal bool <.ctor>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "BearVoidReady"); } internal bool <.ctor>b__2_4(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RemoveBuff"); } internal CharacterBody <.ctor>b__2_1(CharacterBody body) { if (addIframes) { body.AddTimedBuff(Buffs.HiddenInvincibility, 0.1f); } return body; } internal bool <.ctor>b__2_5(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 15f); } internal bool <.ctor>b__2_6(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 15f); } } public static bool enabled = true; public static bool addIframes = false; public SaferSpaces() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "body"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "BearVoidReady"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RemoveBuff") })) { int index = val2.Index; val2.Index = index + 1; val2.EmitDelegate>((Func)delegate(CharacterBody body) { if (addIframes) { body.AddTimedBuff(Buffs.HiddenInvincibility, 0.1f); } return body; }); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f) })) { val2.Next.Operand = 20f; if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f) })) { val2.Next.Operand = 20f; flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: SaferSpaces IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.BearVoid); } } public class VoidLens { public class VoidLensDamageManager : MonoBehaviour { private class QueuedDamage { public float timer; public DamageInfo damageInfo; public Vector3 origVictimPosition; public Vector3 direction; public HealthComponent victim; } public static VoidLensDamageManager instance; private List queuedDamages = new List(); private void OnDestroy() { if ((Object)(object)instance == (Object)(object)this) { instance = null; } } private void FixedUpdate() { if (!NetworkServer.active || queuedDamages.Count <= 0) { return; } bool flag = true; for (int i = 0; i < queuedDamages.Count; i++) { QueuedDamage queuedDamage = queuedDamages[i]; queuedDamage.timer -= Time.fixedDeltaTime; if (queuedDamage.timer <= 0f) { flag = true; if (Object.op_Implicit((Object)(object)queuedDamage.victim) && queuedDamage.victim.alive) { ProcessDamage(queuedDamage); } } } if (!flag) { return; } for (int num = queuedDamages.Count - 1; num >= 0; num--) { if (queuedDamages[num].timer <= 0f) { queuedDamages.RemoveAt(num); } } } private void ProcessDamage(QueuedDamage queued) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_0057: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)GlobalEventManager.instance) && Object.op_Implicit((Object)(object)queued.victim)) { if (Object.op_Implicit((Object)(object)queued.damageInfo.inflictedHurtbox)) { queued.damageInfo.position = ((Component)queued.damageInfo.inflictedHurtbox).transform.position; } else { queued.damageInfo.position = ((Component)queued.victim).transform.position + (queued.damageInfo.position - queued.origVictimPosition); } if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleEffect(effectPrefab, queued.damageInfo.position, Util.QuaternionSafeLookRotation(queued.direction), true); } queued.victim.TakeDamage(queued.damageInfo); GlobalEventManager.instance.OnHitEnemy(queued.damageInfo, ((Component)queued.victim).gameObject); } } public void EnqueueDamage(DamageInfo damage, HealthComponent victim) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: 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_002a: 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_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_0040: 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) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) DamageInfo val = new DamageInfo { attacker = damage.attacker, crit = damage.crit, canRejectForce = damage.canRejectForce, damage = damage.damage, damageColorIndex = (DamageColorIndex)9, damageType = damage.damageType, delayedDamageSecondHalf = damage.delayedDamageSecondHalf, dotIndex = damage.dotIndex, firstHitOfDelayedDamageSecondHalf = damage.firstHitOfDelayedDamageSecondHalf, force = damage.force, inflictedHurtbox = damage.inflictedHurtbox, inflictor = damage.inflictor, physForceFlags = damage.physForceFlags, procChainMask = default(ProcChainMask), position = damage.position, procCoefficient = damage.procCoefficient }; ProcTypeAPI.AddModdedProc(ref val.procChainMask, VoidLensRepeat); queuedDamages.Add(new QueuedDamage { victim = victim, damageInfo = val, origVictimPosition = ((Component)victim).transform.position, timer = 0.2f }); } public void ClearDamageQueue() { queuedDamages.Clear(); } } public static bool enabled = true; public static ModdedProcType VoidLensRepeat; public static GameObject effectPrefab; public VoidLens() { //IL_0019: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown if (enabled) { VoidLensRepeat = ProcTypeAPI.ReserveProcType(); Run.onRunStartGlobal += Run_onRunStartGlobal; Stage.onServerStageComplete += Stage_onServerStageComplete; GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; ModifyFinalDamage.ModifyFinalDamageAttackerActions = (ModifyFinalDamageAttackerDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageAttackerActions, (Delegate?)new ModifyFinalDamageAttackerDelegate(LowerCritDamageAttacker)); GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(GiveCrit)); HealthComponent.TakeDamageProcess += new Manipulator(RemoveVanillaEffect); ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); BuildVfx(); } } private void RemoveVanillaEffect(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "CritGlassesVoid") })) { val.EmitDelegate>((Func)((ItemDef item) => null)); } else { Debug.LogError((object)"RiskyMod: CritGlassesVoid IL Hook failed."); } } private void GiveCrit(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { args.critAdd += 10f * (float)inventory.GetItemCountEffective(Items.CritGlassesVoid); } private void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.CritGlassesVoid); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.CritGlassesVoid); } private void BuildVfx() { //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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC1/CritGlassesVoid/CritGlassesVoidExecuteEffect.prefab").WaitForCompletion(), "RiskyModVoidCritEffect", false); Object.Destroy((Object)(object)val.GetComponent()); val.GetComponent().soundName = ""; Transform child = val.transform.GetChild(4); Transform child2 = val.transform.GetChild(5); Transform val2 = val.transform.Find("OmniSparks"); Transform val3 = val.transform.Find("Small Stars"); Transform val4 = val.transform.Find("Shards"); Transform val5 = val.transform.Find("Ring"); Transform val6 = val.transform.Find("Point Light"); Transform val7 = val.transform.Find("PP"); Transform val8 = val.transform.Find("FakeDamageNumbers"); Transform val9 = val.transform.Find("SoftGlow"); ((Component)child).transform.localScale = 0.5f * Vector3.up; ((Component)child2).transform.localScale = 0.5f * Vector3.up; ((Component)val2).transform.localScale = 0.5f * Vector3.one; ((Component)val5).transform.localScale = 0.25f * Vector3.one; ((Component)val3).transform.localScale = 0.25f * Vector3.one; ((Component)val4).transform.localScale = 0.25f * Vector3.one; Object.Destroy((Object)(object)((Component)val6).gameObject); Object.Destroy((Object)(object)((Component)val9).gameObject); Object.Destroy((Object)(object)((Component)val7).gameObject); Object.Destroy((Object)(object)((Component)val8).gameObject); global::RiskyMod.Content.Content.effectDefs.Add(new EffectDef(val)); effectPrefab = val; } private void LowerCritDamageAttacker(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody, CharacterBody attackerBody) { if (damageInfo.crit && Object.op_Implicit((Object)(object)attackerBody.inventory) && attackerBody.inventory.GetItemCountEffective(Items.CritGlassesVoid) > 0) { damageModifierArgs.damageMultFinal *= 0.5f; } } private void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (!damageReport.damageInfo.rejected && damageReport.damageInfo.crit && damageReport.damageInfo.procCoefficient > 0f && damageReport.damageInfo.damage > 0f && !ProcTypeAPI.HasModdedProc(damageReport.damageInfo.procChainMask, VoidLensRepeat) && Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.attackerBody.inventory) && damageReport.attackerBody.inventory.GetItemCountEffective(Items.CritGlassesVoid) > 0 && Object.op_Implicit((Object)(object)damageReport.victimBody) && Object.op_Implicit((Object)(object)damageReport.victimBody.healthComponent) && damageReport.victimBody.healthComponent.alive && Object.op_Implicit((Object)(object)VoidLensDamageManager.instance)) { VoidLensDamageManager.instance.EnqueueDamage(damageReport.damageInfo, damageReport.victimBody.healthComponent); } } private void Stage_onServerStageComplete(Stage obj) { if (Object.op_Implicit((Object)(object)VoidLensDamageManager.instance)) { VoidLensDamageManager.instance.ClearDamageQueue(); } } private void Run_onRunStartGlobal(Run run) { if (Object.op_Implicit((Object)(object)VoidLensDamageManager.instance)) { Object.Destroy((Object)(object)VoidLensDamageManager.instance); } VoidLensDamageManager component = ((Component)run).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { VoidLensDamageManager.instance = ((Component)run).gameObject.AddComponent(); } else { VoidLensDamageManager.instance = component; } } } public class VoidRing { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_3; public static Func <>9__1_4; public static Func <>9__1_5; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElementalRingVoidReady") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 20f) })) { val.Next.Operand = 15f; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f) })) { val.Next.Operand = 1.2f; if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + 0.8f)); flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: VoidRing IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElementalRingVoidReady"); } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 20f); } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1f); } internal bool <.ctor>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal float <.ctor>b__1_1(float damageCoefficient) { return damageCoefficient + 0.8f; } } public static bool enabled = true; public VoidRing() { //IL_003b: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC1/ElementalRingVoid/ElementalRingVoidBlackHole.prefab").WaitForCompletion(); ProjectileExplosion component = val.GetComponent(); component.falloffModel = (FalloffModel)0; if (RiskyMod.disableProcChains) { component.blastProcCoefficient = 0f; } object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElementalRingVoidReady") }) && val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 20f) })) { val3.Next.Operand = 15f; if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f) })) { val3.Next.Operand = 1.2f; if (val3.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val3.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + 0.8f)); flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: VoidRing IL Hook failed"); } }; <>c.<>9__1_0 = val2; obj = (object)val2; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; } private void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ElementalRingVoid); } } public class VoidWisp { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_3; public static Func <>9__1_4; public static Func <>9__1_1; public static Func <>9__1_5; public static Func <>9__1_2; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExplodeOnDeathVoid") })) { if (RiskyMod.disableProcChains && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "position") })) { int index = val.Index; val.Index = index - 1; val.EmitDelegate>((Func)delegate(DelayBlast db) { db.procCoefficient = 0f; return db; }); } if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "radius") })) { val.EmitDelegate>((Func)((float oldRadius) => 12f)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: VoidWisp IL Hook failed"); } } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExplodeOnDeathVoid"); } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "position"); } internal DelayBlast <.ctor>b__1_1(DelayBlast db) { db.procCoefficient = 0f; return db; } internal bool <.ctor>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "radius"); } internal float <.ctor>b__1_2(float oldRadius) { return 12f; } } public static bool enabled = true; public VoidWisp() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ExplodeOnDeathVoid") })) { if (RiskyMod.disableProcChains && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "position") })) { int index = val2.Index; val2.Index = index - 1; val2.EmitDelegate>((Func)delegate(DelayBlast db) { db.procCoefficient = 0f; return db; }); } if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "radius") })) { val2.EmitDelegate>((Func)((float oldRadius) => 12f)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: VoidWisp IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ExplodeOnDeathVoid); } } public class Zoea { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_5; public static Func <>9__3_4; public static Manipulator <>9__3_0; public static hook_GetMaxProjectiles <>9__3_1; public static hook_GetDeployableSameSlotLimit <>9__3_2; public static hook_OnMasterSpawned <>9__3_3; internal void <.ctor>b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject") })) { val.EmitDelegate>((Func)delegate(DirectorSpawnRequest directorSpawnRequest) { directorSpawnRequest.ignoreTeamMemberLimit = ignoreAllyCap; return directorSpawnRequest; }); } else { Debug.LogError((object)"RiskyMod: Zoea IL Hook failed"); } } internal bool <.ctor>b__3_5(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject"); } internal DirectorSpawnRequest <.ctor>b__3_4(DirectorSpawnRequest directorSpawnRequest) { directorSpawnRequest.ignoreTeamMemberLimit = ignoreAllyCap; return directorSpawnRequest; } internal int <.ctor>b__3_1(orig_GetMaxProjectiles orig, Inventory inventory) { return (!RiskyMod.inBazaar) ? Math.Min(orig.Invoke(inventory), maxAllyCount) : 0; } internal int <.ctor>b__3_2(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I4 //IL_0035: Unknown result type (might be due to invalid IL or missing references) if ((int)slot == 18) { return (!RiskyMod.inBazaar) ? Math.Min(self.inventory.GetItemCountEffective(Items.VoidMegaCrabItem), maxAllyCount) : 0; } return orig.Invoke(self, slot); } internal void <.ctor>b__3_3(orig_OnMasterSpawned orig, VoidMegaCrabItemBehavior self, SpawnResult spawnResult) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, spawnResult); if (!spawnResult.success || !Object.op_Implicit((Object)(object)spawnResult.spawnedInstance)) { return; } Inventory component = spawnResult.spawnedInstance.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } if (component.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component.GiveItemPermanent(Items.UseAmbientLevel, 1); } if (enabled && Object.op_Implicit((Object)(object)((ItemBehavior)self).body) && Object.op_Implicit((Object)(object)((ItemBehavior)self).body.inventory)) { int num = ((ItemBehavior)self).stack - maxAllyCount; if (num > 0) { int num2 = 3 * num; component.GiveItemPermanent(Items.BoostDamage, num2); } } } } public static bool enabled = true; public static bool ignoreAllyCap = true; public static int maxAllyCount = 6; public Zoea() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown if (ignoreAllyCap) { object obj = <>c.<>9__3_0; 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 val5 = new ILCursor(il); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject") })) { val5.EmitDelegate>((Func)delegate(DirectorSpawnRequest directorSpawnRequest) { directorSpawnRequest.ignoreTeamMemberLimit = ignoreAllyCap; return directorSpawnRequest; }); } else { Debug.LogError((object)"RiskyMod: Zoea IL Hook failed"); } }; <>c.<>9__3_0 = val; obj = (object)val; } VoidMegaCrabItemBehavior.FixedUpdate += (Manipulator)obj; } if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj2 = <>c.<>9__3_1; if (obj2 == null) { hook_GetMaxProjectiles val2 = (orig_GetMaxProjectiles orig, Inventory inventory) => (!RiskyMod.inBazaar) ? Math.Min(orig.Invoke(inventory), maxAllyCount) : 0; <>c.<>9__3_1 = val2; obj2 = (object)val2; } VoidMegaCrabItemBehavior.GetMaxProjectiles += (hook_GetMaxProjectiles)obj2; object obj3 = <>c.<>9__3_2; if (obj3 == null) { hook_GetDeployableSameSlotLimit val3 = (orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) => ((int)slot == 18) ? ((!RiskyMod.inBazaar) ? Math.Min(self.inventory.GetItemCountEffective(Items.VoidMegaCrabItem), maxAllyCount) : 0) : orig.Invoke(self, slot); <>c.<>9__3_2 = val3; obj3 = (object)val3; } CharacterMaster.GetDeployableSameSlotLimit += (hook_GetDeployableSameSlotLimit)obj3; } object obj4 = <>c.<>9__3_3; if (obj4 == null) { hook_OnMasterSpawned val4 = delegate(orig_OnMasterSpawned orig, VoidMegaCrabItemBehavior self, SpawnResult spawnResult) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, spawnResult); if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance)) { Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (component.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component.GiveItemPermanent(Items.UseAmbientLevel, 1); } if (enabled && Object.op_Implicit((Object)(object)((ItemBehavior)self).body) && Object.op_Implicit((Object)(object)((ItemBehavior)self).body.inventory)) { int num = ((ItemBehavior)self).stack - maxAllyCount; if (num > 0) { int num2 = 3 * num; component.GiveItemPermanent(Items.BoostDamage, num2); } } } } }; <>c.<>9__3_3 = val4; obj4 = (object)val4; } VoidMegaCrabItemBehavior.OnMasterSpawned += (hook_OnMasterSpawned)obj4; } private static void ModifyItem() { global::SneedUtils.SneedUtils.AddItemTag(Items.VoidMegaCrabItem, (ItemTag)13); } } } namespace RiskyMod.Items.DLC1.Uncommon { public class Harpoon { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_1; public static Manipulator <>9__3_0; internal void <.ctor>b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MoveSpeedOnKill") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Harpoon IL Hook failed"); } } internal bool <.ctor>b__3_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MoveSpeedOnKill"); } } public static bool enabled = true; private static GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MoveSpeedOnKill/MoveSpeedOnKillActivate.prefab").WaitForCompletion(); public static BuffDef ReturnsHarpoonBuff; public Harpoon() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0093: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00c6: 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_00ed: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown if (!enabled) { return; } ((VanillaTweakBase)VanillaTweakBase.Instance).SetEnabled(false); BuffDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MoveSpeedOnKill/bdKillMoveSpeed.asset").WaitForCompletion(); object obj = <>c.<>9__3_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MoveSpeedOnKill") })) { val3.Remove(); val3.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Harpoon IL Hook failed"); } }; <>c.<>9__3_0 = val2; obj = (object)val2; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); AssistManager.HandleAssistInventoryCompatibleActions = (HandleAssistInventoryCompatible)Delegate.Combine((Delegate?)(object)AssistManager.HandleAssistInventoryCompatibleActions, (Delegate?)new HandleAssistInventoryCompatible(HandleAssist)); OnCharacterDeath.OnCharacterDeathInventoryActions = (OnCharacterDeath.OnCharacterDeathInventory)Delegate.Combine(OnCharacterDeath.OnCharacterDeathInventoryActions, new OnCharacterDeath.OnCharacterDeathInventory(ProcItem)); ReturnsHarpoonBuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_ReturnsHarpoonBuff", canStack: true, isCooldown: false, isDebuff: false, val.buffColor, val.iconSprite); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void ProcItem(GlobalEventManager self, DamageReport damageReport, CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { OnKillEffect(attackerBody, attackerInventory); } private void HandleAssist(CharacterBody attackerBody, CharacterBody victimBody, DamageType? assistDamageType, DamageTypeExtended? assistDamageTypeExtended, DamageSource? assistDamageSource, HashSet assistModdedDamageTypes, Inventory attackerInventory, CharacterBody killerBody, DamageInfo damageInfo) { if (!((Object)(object)attackerBody == (Object)(object)killerBody)) { OnKillEffect(attackerBody, attackerInventory); } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(ReturnsHarpoonBuff)) { args.moveSpeedMultAdd += 0.5f; } } private static void OnKillEffect(CharacterBody attackerBody, Inventory attackerInventory) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) int itemCount = attackerInventory.GetItemCount(Items.MoveSpeedOnKill); if (itemCount <= 0) { return; } int num = itemCount; int buffCount = attackerBody.GetBuffCount(ReturnsHarpoonBuff); global::SneedUtils.SneedUtils.AddCooldownBuff(attackerBody, ReturnsHarpoonBuff, Mathf.Min(25, num + buffCount), 0.5f); EffectData val = new EffectData(); val.origin = attackerBody.corePosition; CharacterMotor characterMotor = attackerBody.characterMotor; bool flag = false; if (Object.op_Implicit((Object)(object)characterMotor)) { Vector3 moveDirection = characterMotor.moveDirection; if (moveDirection != Vector3.zero) { val.rotation = Util.QuaternionSafeLookRotation(moveDirection); flag = true; } } if (!flag) { val.rotation = attackerBody.transform.rotation; } EffectManager.SpawnEffect(effectPrefab, val, true); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.MoveSpeedOnKill); } } public class Ignition { public static bool enabled = true; public Ignition() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); ProcessHitEnemy.OnHitAttackerActions = (OnHitAttacker)Delegate.Combine((Delegate?)(object)ProcessHitEnemy.OnHitAttackerActions, (Delegate?)new OnHitAttacker(BurnChance)); } } private void BurnChance(DamageInfo damageInfo, CharacterBody victimBody, CharacterBody attackerBody) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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) if (Object.op_Implicit((Object)(object)attackerBody.inventory) && attackerBody.inventory.GetItemCount(Items.StrengthenBurn) > 0 && Util.CheckRoll(5f * damageInfo.procCoefficient, attackerBody.master)) { InflictDotInfo val = default(InflictDotInfo); val.victimObject = ((Component)victimBody).gameObject; val.attackerObject = damageInfo.attacker; val.totalDamage = damageInfo.damage * 0.5f; val.dotIndex = (DotIndex)1; val.damageMultiplier = 1f; InflictDotInfo val2 = val; StrengthenBurnUtils.CheckDotForUpgrade(attackerBody.inventory, ref val2); DotController.InflictDot(ref val2); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.StrengthenBurn); } } } namespace RiskyMod.Items.DLC1.Legendary { public class LaserScope { public static bool enabled = true; public LaserScope() { if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(AddCrit)); } } private void AddCrit(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { if (inventory.GetItemCount(Items.CritDamage) > 0) { args.critAdd += 5f; } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.CritDamage); } } public class Raincoat { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__3_0; public static hook_FixedUpdate <>9__3_1; public static Func <>9__3_4; public static Func <>9__3_3; public static Func <>9__3_5; public static Manipulator <>9__3_2; internal void <.ctor>b__3_0(orig_Init orig) { orig.Invoke(); Buffs.ImmuneToDebuffCooldown.iconSprite = Assets.BuffIcons.RaincoatCooldown; Buffs.ImmuneToDebuffReady.iconSprite = Assets.BuffIcons.RaincoatReady; } internal void <.ctor>b__3_1(orig_FixedUpdate orig, ImmuneToDebuffBehavior self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)self).body) && ((BaseItemBodyBehavior)self).body.HasBuff(DebuffImmune)) { self.isProtected = true; } } internal void <.ctor>b__3_2(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.1f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float origBarrier, CharacterBody body) { if (!body.HasBuff(DebuffImmune)) { body.AddTimedBuff(DebuffImmune, 0.5f); } return 0.25f; }); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.Next.Operand = 5.5f; flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Raincoat IL Hook failed."); } } internal bool <.ctor>b__3_4(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.1f); } internal float <.ctor>b__3_3(float origBarrier, CharacterBody body) { if (!body.HasBuff(DebuffImmune)) { body.AddTimedBuff(DebuffImmune, 0.5f); } return 0.25f; } internal bool <.ctor>b__3_5(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 5f); } } public static bool enabled = true; public static bool replaceIcons = false; public static BuffDef DebuffImmune; public Raincoat() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_009d: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown if (replaceIcons) { object obj = <>c.<>9__3_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); Buffs.ImmuneToDebuffCooldown.iconSprite = Assets.BuffIcons.RaincoatCooldown; Buffs.ImmuneToDebuffReady.iconSprite = Assets.BuffIcons.RaincoatReady; }; <>c.<>9__3_0 = val; obj = (object)val; } BuffCatalog.Init += (hook_Init)obj; } if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); BuffDef val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/bdSmallArmorBoost.asset").WaitForCompletion(); DebuffImmune = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_RaincoatDebuffImmuneBuff", canStack: false, isCooldown: false, isDebuff: false, (Color)(replaceIcons ? Color.white : new Color(0.839f, 0.788f, 0.227f)), replaceIcons ? Assets.BuffIcons.RaincoatActive : val2.iconSprite); object obj2 = <>c.<>9__3_1; if (obj2 == null) { hook_FixedUpdate val3 = delegate(orig_FixedUpdate orig, ImmuneToDebuffBehavior self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)self).body) && ((BaseItemBodyBehavior)self).body.HasBuff(DebuffImmune)) { self.isProtected = true; } }; <>c.<>9__3_1 = val3; obj2 = (object)val3; } ImmuneToDebuffBehavior.FixedUpdate += (hook_FixedUpdate)obj2; object obj3 = <>c.<>9__3_2; if (obj3 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val5 = new ILCursor(il); if (val5.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.1f) })) { val5.Emit(OpCodes.Ldarg_0); val5.EmitDelegate>((Func)delegate(float origBarrier, CharacterBody body) { if (!body.HasBuff(DebuffImmune)) { body.AddTimedBuff(DebuffImmune, 0.5f); } return 0.25f; }); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val5.Next.Operand = 5.5f; flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Raincoat IL Hook failed."); } }; <>c.<>9__3_2 = val4; obj3 = (object)val4; } ImmuneToDebuffBehavior.TryApplyOverride += (Manipulator)obj3; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.ImmuneToDebuff); } } public class Scorpion { public static bool enabled = true; public Scorpion() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(Buffs.PermanentDebuff); args.armorAdd += (float)buffCount; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.PermanentDebuffOnHit); } } public class SpareDroneParts { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_3; public static Func <>9__2_2; public static Manipulator <>9__2_0; public static Func <>9__2_5; public static Func <>9__2_4; public static Manipulator <>9__2_1; internal void <.ctor>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject") })) { val.EmitDelegate>((Func)delegate(DirectorSpawnRequest spawnRequest) { spawnRequest.ignoreTeamMemberLimit = true; return spawnRequest; }); } else { Debug.LogError((object)"RiskyMod: SpareDroneParts DroneWeaponsBehavior.TrySpawnDrone IL Hook failed"); } } internal bool <.ctor>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject"); } internal DirectorSpawnRequest <.ctor>b__2_2(DirectorSpawnRequest spawnRequest) { spawnRequest.ignoreTeamMemberLimit = true; return spawnRequest; } internal void <.ctor>b__2_1(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[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_damage") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)((float bodyDamage, DamageInfo damageInfo) => damageInfo.damage)); } else { Debug.LogError((object)"RiskyMod: SpareDroneParts DroneWeaponsBoostBehavior.OnEnemyHit IL Hook failed"); } } internal bool <.ctor>b__2_5(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_damage"); } internal float <.ctor>b__2_4(float bodyDamage, DamageInfo damageInfo) { return damageInfo.damage; } } public static bool ignoreAllyCap = true; public static bool enabled = true; public SpareDroneParts() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_00a0: 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_00ab: Expected O, but got Unknown if (ignoreAllyCap) { object obj = <>c.<>9__2_0; 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 val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject") })) { val4.EmitDelegate>((Func)delegate(DirectorSpawnRequest spawnRequest) { spawnRequest.ignoreTeamMemberLimit = true; return spawnRequest; }); } else { Debug.LogError((object)"RiskyMod: SpareDroneParts DroneWeaponsBehavior.TrySpawnDrone IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } DroneWeaponsBehavior.TrySpawnDrone += (Manipulator)obj; } if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyDroneParts)); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC1/DroneWeapons/EntityStates.DroneWeaponsChainGun.FireChainGun.asset", "damageCoefficientPerBounce", "0.5"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC1/DroneWeapons/EntityStates.DroneWeaponsChainGun.FireChainGun.asset", "additionalBounces", "1"); object obj2 = <>c.<>9__2_1; if (obj2 == null) { Manipulator val2 = delegate(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 val3 = new ILCursor(il); if (val3.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_damage") })) { val3.Emit(OpCodes.Ldarg_1); val3.EmitDelegate>((Func)((float bodyDamage, DamageInfo damageInfo) => damageInfo.damage)); } else { Debug.LogError((object)"RiskyMod: SpareDroneParts DroneWeaponsBoostBehavior.OnEnemyHit IL Hook failed"); } }; <>c.<>9__2_1 = val2; obj2 = (object)val2; } DroneWeaponsBoostBehavior.OnEnemyHit += (Manipulator)obj2; } private static void ModifyDroneParts() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.DroneWeapons); } } } namespace RiskyMod.Items.DLC1.Equipment { public class Goobo { public static bool enabled = true; public Goobo() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown if (enabled) { EquipmentCatalog.Init += new hook_Init(UpdateDesc); GummyCloneProjectile.SpawnGummyClone += new hook_SpawnGummyClone(SetStats); GummyCloneProjectile.SpawnGummyClone += new Manipulator(GiveAmbientLevel); } } private void GiveAmbientLevel(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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 3) })) { val.Emit(OpCodes.Ldloc_2); val.EmitDelegate>((Func)delegate(MasterCopySpawnCard spawnCard, CharacterBody ownerBody) { if (enabled) { spawnCard.GiveItem(Items.UseAmbientLevel, 1); } return spawnCard; }); } else { Debug.LogError((object)"RiskyMod: Goobo IL Hook failed"); } } private void SetStats(orig_SpawnGummyClone orig, GummyCloneProjectile self) { self.hpBoostCount = 50; self.damageBoostCount = 20; orig.Invoke(self); } private void UpdateDesc(orig_Init orig) { orig.Invoke(); ArrayUtils.ArrayAppend(ref ItemsCore.changedEquipDescs, ref Equipment.GummyClone); } } } namespace RiskyMod.Items.DLC1.Common { public class DelicateWatch { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static RecalculateStats.HandleRecalculateStatsInventory <>9__3_0; public static Func <>9__3_4; public static Manipulator <>9__3_1; public static Func <>9__3_6; public static Func <>9__3_5; public static Manipulator <>9__3_2; public static GetStatCoefficients.HandleStatsInventory <>9__3_3; internal void <.ctor>b__3_0(CharacterBody self, Inventory inventory) { //IL_004e: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown bool flag = self.HasBuff(WatchIndicatorBuff); if (inventory.GetItemCount(Items.FragileDamageBonus) > 0) { if (flag && !self.outOfDanger) { if (NetworkServer.active) { self.RemoveBuff(WatchIndicatorBuff); } EffectData val = new EffectData { origin = self.transform.position, rootObject = ((Component)self).gameObject }; EffectManager.SpawnEffect(AssetReferences.fragileDamageBonusBreakEffectPrefab, val, false); } else if (!flag && self.outOfDanger) { if (NetworkServer.active) { self.AddBuff(WatchIndicatorBuff); } Util.PlaySound("Play_RiskyMod_DelicateWatch_Ready", ((Component)self).gameObject); } } else if (flag && NetworkServer.active) { self.RemoveBuff(WatchIndicatorBuff); } } internal void <.ctor>b__3_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FragileDamageBonus") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: DelicateWatch TakeDamage IL Hook failed"); } } internal bool <.ctor>b__3_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FragileDamageBonus"); } internal void <.ctor>b__3_2(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "fragileDamageBonus") })) { val2.EmitDelegate>((Func)((int val) => 0)); } else { Debug.LogError((object)"RiskyMod: DelicateWatch UpdateLastHitTime IL Hook failed"); } } internal bool <.ctor>b__3_6(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "fragileDamageBonus"); } internal int <.ctor>b__3_5(int val) { return 0; } internal void <.ctor>b__3_3(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { if (sender.outOfDanger) { int itemCount = inventory.GetItemCount(Items.FragileDamageBonus); if (itemCount > 0) { args.damageMultAdd += 0.15f * (float)itemCount; } } } } public static bool useBuff = true; public static bool enabled = true; public static BuffDef WatchIndicatorBuff; public DelicateWatch() { //IL_0061: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown if (!enabled) { return; } RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(SoftDependencies.LinearDamage_DisableWatch)); ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); WatchIndicatorBuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_WatchIndicatorBuff", canStack: false, isCooldown: false, isDebuff: false, Color.white, Assets.BuffIcons.Watch); if (useBuff) { RecalculateStats.HandleRecalculateStatsInventoryActions = (RecalculateStats.HandleRecalculateStatsInventory)Delegate.Combine(RecalculateStats.HandleRecalculateStatsInventoryActions, (RecalculateStats.HandleRecalculateStatsInventory)delegate(CharacterBody self, Inventory inventory) { //IL_004e: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown bool flag = self.HasBuff(WatchIndicatorBuff); if (inventory.GetItemCount(Items.FragileDamageBonus) > 0) { if (flag && !self.outOfDanger) { if (NetworkServer.active) { self.RemoveBuff(WatchIndicatorBuff); } EffectData val6 = new EffectData { origin = self.transform.position, rootObject = ((Component)self).gameObject }; EffectManager.SpawnEffect(AssetReferences.fragileDamageBonusBreakEffectPrefab, val6, false); } else if (!flag && self.outOfDanger) { if (NetworkServer.active) { self.AddBuff(WatchIndicatorBuff); } Util.PlaySound("Play_RiskyMod_DelicateWatch_Ready", ((Component)self).gameObject); } } else if (flag && NetworkServer.active) { self.RemoveBuff(WatchIndicatorBuff); } }); } object obj = <>c.<>9__3_1; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FragileDamageBonus") })) { val5.Remove(); val5.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: DelicateWatch TakeDamage IL Hook failed"); } }; <>c.<>9__3_1 = val2; obj = (object)val2; } HealthComponent.TakeDamageProcess += (Manipulator)obj; object obj2 = <>c.<>9__3_2; if (obj2 == null) { Manipulator val3 = 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 val4 = new ILCursor(il); if (val4.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "fragileDamageBonus") })) { val4.EmitDelegate>((Func)((int val) => 0)); } else { Debug.LogError((object)"RiskyMod: DelicateWatch UpdateLastHitTime IL Hook failed"); } }; <>c.<>9__3_2 = val3; obj2 = (object)val3; } HealthComponent.UpdateLastHitTime += (Manipulator)obj2; GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, (GetStatCoefficients.HandleStatsInventory)delegate(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { if (sender.outOfDanger) { int itemCount = inventory.GetItemCount(Items.FragileDamageBonus); if (itemCount > 0) { args.damageMultAdd += 0.15f * (float)itemCount; } } }); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.FragileDamageBonus); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.FragileDamageBonus); global::SneedUtils.SneedUtils.RemoveItemTag(Items.FragileDamageBonus, (ItemTag)16); } } public class PowerElixir { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "healingPotion") })) { val2.EmitDelegate>((Func)((int val) => 0)); } else { Debug.LogError((object)"RiskyMod: PowerElixir UpdateLastHitTime IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "healingPotion"); } internal int <.ctor>b__1_1(int val) { return 0; } } public static bool enabled = true; private static GameObject healEffect = Addressables.LoadAssetAsync((object)"RoR2/DLC1/HealingPotion/HealingPotionEffect.prefab").WaitForCompletion(); public PowerElixir() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val2 = 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 val3 = new ILCursor(il); if (val3.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "healingPotion") })) { val3.EmitDelegate>((Func)((int val) => 0)); } else { Debug.LogError((object)"RiskyMod: PowerElixir UpdateLastHitTime IL Hook failed"); } }; <>c.<>9__1_0 = val2; obj = (object)val2; } HealthComponent.UpdateLastHitTime += (Manipulator)obj; HealthComponent_UpdateLastHitTime.UpdateLastHitTimeActions = (HealthComponent_UpdateLastHitTime.UpdateLastHitTimeDelegate)Delegate.Combine(HealthComponent_UpdateLastHitTime.UpdateLastHitTimeActions, new HealthComponent_UpdateLastHitTime.UpdateLastHitTimeDelegate(TriggerElixir)); Stage.onStageStartGlobal += StageStartResetElixir; } private void StageStartResetElixir(Stage obj) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) if (CharacterMaster.instancesList == null) { return; } foreach (CharacterMaster instances in CharacterMaster.instancesList) { if (Object.op_Implicit((Object)(object)instances.inventory)) { int itemCountPermanent = instances.inventory.GetItemCountPermanent(Items.HealingPotionConsumed); if (itemCountPermanent > 0) { instances.inventory.RemoveItemPermanent(Items.HealingPotionConsumed, itemCountPermanent); instances.inventory.GiveItemPermanent(Items.HealingPotion, itemCountPermanent); CharacterMasterNotificationQueue.SendTransformNotification(instances, Items.HealingPotionConsumed.itemIndex, Items.HealingPotion.itemIndex, (TransformationType)0); } } } } private static void TriggerElixir(HealthComponent self, float damageValue, Vector3 damagePosition, bool damageIsSilent, GameObject attacker) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown if (self.itemCounts.healingPotion > 0 && self.combinedHealthFraction <= 0.5f) { bool flag = false; int itemCountTemp = self.body.inventory.GetItemCountTemp(Items.HealingPotion); if (itemCountTemp > 0) { flag = true; self.body.inventory.RemoveItemTemp(Items.HealingPotion.itemIndex, 1f); self.body.inventory.GiveItemTemp(Items.HealingPotionConsumed.itemIndex, 1f); } int itemCountPermanent = self.body.inventory.GetItemCountPermanent(Items.HealingPotion); if (!flag && itemCountPermanent > 0) { flag = true; self.body.inventory.RemoveItemPermanent(Items.HealingPotion.itemIndex, 1); self.body.inventory.GiveItemPermanent(Items.HealingPotionConsumed.itemIndex, 1); } if (flag) { self.AddBarrier(self.fullCombinedHealth * 0.5f); CharacterMasterNotificationQueue.SendTransformNotification(self.body.master, Items.HealingPotion.itemIndex, Items.HealingPotionConsumed.itemIndex, (TransformationType)0); EffectData val = new EffectData { origin = ((Component)self).transform.position }; val.SetNetworkedObjectReference(((Component)self).gameObject); EffectManager.SpawnEffect(healEffect, val, true); } } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.HealingPotion); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.HealingPotion); global::SneedUtils.SneedUtils.RemoveItemTag(Items.HealingPotion, (ItemTag)16); } } } namespace RiskyMod.Items.DLC1.Boss { public class DefenseNucleus { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_GetDeployableSameSlotLimit <>9__8_0; public static Func <>9__8_3; public static Manipulator <>9__8_1; public static Func <>9__8_5; public static Func <>9__8_4; public static Manipulator <>9__8_2; internal int <.ctor>b__8_0(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) if ((int)slot == 20) { return (self.inventory.GetItemCount(Items.MinorConstructOnKill) > 0) ? 4 : 0; } return orig.Invoke(self, slot); } internal void <.ctor>b__8_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MinorConstructOnKill") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: DefenseNucleus OnCharacterDeath IL Hook failed"); } } internal bool <.ctor>b__8_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MinorConstructOnKill"); } internal void <.ctor>b__8_2(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject") })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc_2); val.EmitDelegate>((Func)delegate(DirectorSpawnRequest directorSpawnRequest, ProjectileSpawnMaster self, CharacterBody ownerBody) { if ((Object)(object)self.spawnCard == (Object)(object)MinorConstructOnKillCard) { if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)ownerBody.master) && Object.op_Implicit((Object)(object)ownerBody.master.inventory)) { <>c__DisplayClass8_0 CS$<>8__locals0 = new <>c__DisplayClass8_0 { itemCount = ownerBody.master.inventory.GetItemCount(Items.MinorConstructOnKill) }; if (CS$<>8__locals0.itemCount > 0) { directorSpawnRequest.onSpawnedServer = (Action)Delegate.Combine(directorSpawnRequest.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success) { Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (component.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component.GiveItemPermanent(Items.UseAmbientLevel, 1); } component.GiveItemPermanent(Items.HealthDecay, 40); component.RemoveItemPermanent(Items.BoostDamage, component.GetItemCountPermanent(Items.BoostDamage)); component.RemoveItemPermanent(Items.BoostHp, component.GetItemCountPermanent(Items.BoostHp)); component.GiveItemPermanent(Items.BoostDamage, 30); component.GiveItemPermanent(Items.BoostHp, 30); int num = CS$<>8__locals0.itemCount - 1; if (removeAllyScaling && num > 0) { component.GiveItemPermanent(Items.BoostDamage, 20 * num); component.GiveItemPermanent(Items.BoostHp, 20 * num); } } } }); } } directorSpawnRequest.ignoreTeamMemberLimit = ignoreAllyCap; } return directorSpawnRequest; }); } else { Debug.LogError((object)"RiskyMod: DefenseNucleus SpawnMaster IL Hook failed"); } } internal bool <.ctor>b__8_5(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject"); } internal DirectorSpawnRequest <.ctor>b__8_4(DirectorSpawnRequest directorSpawnRequest, ProjectileSpawnMaster self, CharacterBody ownerBody) { if ((Object)(object)self.spawnCard == (Object)(object)MinorConstructOnKillCard) { if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)ownerBody.master) && Object.op_Implicit((Object)(object)ownerBody.master.inventory)) { <>c__DisplayClass8_0 CS$<>8__locals0 = new <>c__DisplayClass8_0 { itemCount = ownerBody.master.inventory.GetItemCount(Items.MinorConstructOnKill) }; if (CS$<>8__locals0.itemCount > 0) { directorSpawnRequest.onSpawnedServer = (Action)Delegate.Combine(directorSpawnRequest.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success) { Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (component.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component.GiveItemPermanent(Items.UseAmbientLevel, 1); } component.GiveItemPermanent(Items.HealthDecay, 40); component.RemoveItemPermanent(Items.BoostDamage, component.GetItemCountPermanent(Items.BoostDamage)); component.RemoveItemPermanent(Items.BoostHp, component.GetItemCountPermanent(Items.BoostHp)); component.GiveItemPermanent(Items.BoostDamage, 30); component.GiveItemPermanent(Items.BoostHp, 30); int num = CS$<>8__locals0.itemCount - 1; if (removeAllyScaling && num > 0) { component.GiveItemPermanent(Items.BoostDamage, 20 * num); component.GiveItemPermanent(Items.BoostHp, 20 * num); } } } }); } } directorSpawnRequest.ignoreTeamMemberLimit = ignoreAllyCap; } return directorSpawnRequest; } } [CompilerGenerated] private sealed class <>c__DisplayClass8_0 { public int itemCount; internal void <.ctor>b__6(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (!spawnResult.success) { return; } Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (component.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component.GiveItemPermanent(Items.UseAmbientLevel, 1); } component.GiveItemPermanent(Items.HealthDecay, 40); component.RemoveItemPermanent(Items.BoostDamage, component.GetItemCountPermanent(Items.BoostDamage)); component.RemoveItemPermanent(Items.BoostHp, component.GetItemCountPermanent(Items.BoostHp)); component.GiveItemPermanent(Items.BoostDamage, 30); component.GiveItemPermanent(Items.BoostHp, 30); int num = itemCount - 1; if (removeAllyScaling && num > 0) { component.GiveItemPermanent(Items.BoostDamage, 20 * num); component.GiveItemPermanent(Items.BoostHp, 20 * num); } } } } public static bool enabled = true; public static bool ignoreAllyCap = true; public static bool inheritEliteAffix = true; public static bool removeAllyScaling = true; public static BodyIndex MinorConstructAlly; public static bool weakToMithrix = true; public static SpawnCard MinorConstructOnKillCard = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/cscMinorConstructOnKill.asset").WaitForCompletion(); public static GameObject SpawnEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/OmniExplosionVFXMinorConstruct.prefab").WaitForCompletion(); public DefenseNucleus() { //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: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown if (!enabled) { return; } RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); if (weakToMithrix) { TakeDamage.ModifyInitialDamageAttackerActions = (TakeDamage.ModifyInitialDamageAttacker)Delegate.Combine(TakeDamage.ModifyInitialDamageAttackerActions, new TakeDamage.ModifyInitialDamageAttacker(WeakToMithrixHook)); } if (removeAllyScaling) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__8_0; if (obj == null) { hook_GetDeployableSameSlotLimit val = (orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) => ((int)slot == 20) ? ((self.inventory.GetItemCount(Items.MinorConstructOnKill) > 0) ? 4 : 0) : orig.Invoke(self, slot); <>c.<>9__8_0 = val; obj = (object)val; } CharacterMaster.GetDeployableSameSlotLimit += (hook_GetDeployableSameSlotLimit)obj; } if (inheritEliteAffix) { object obj2 = <>c.<>9__8_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "MinorConstructOnKill") })) { val5.Remove(); val5.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: DefenseNucleus OnCharacterDeath IL Hook failed"); } }; <>c.<>9__8_1 = val2; obj2 = (object)val2; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj2; OnCharacterDeath.OnCharacterDeathInventoryActions = (OnCharacterDeath.OnCharacterDeathInventory)Delegate.Combine(OnCharacterDeath.OnCharacterDeathInventoryActions, new OnCharacterDeath.OnCharacterDeathInventory(SpawnEliteConstruct)); return; } object obj3 = <>c.<>9__8_2; if (obj3 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject") })) { val4.Emit(OpCodes.Ldarg_0); val4.Emit(OpCodes.Ldloc_2); val4.EmitDelegate>((Func)delegate(DirectorSpawnRequest directorSpawnRequest, ProjectileSpawnMaster self, CharacterBody ownerBody) { if ((Object)(object)self.spawnCard == (Object)(object)MinorConstructOnKillCard) { if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)ownerBody.master) && Object.op_Implicit((Object)(object)ownerBody.master.inventory)) { int itemCount = ownerBody.master.inventory.GetItemCount(Items.MinorConstructOnKill); if (itemCount > 0) { directorSpawnRequest.onSpawnedServer = (Action)Delegate.Combine(directorSpawnRequest.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success) { Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (component.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component.GiveItemPermanent(Items.UseAmbientLevel, 1); } component.GiveItemPermanent(Items.HealthDecay, 40); component.RemoveItemPermanent(Items.BoostDamage, component.GetItemCountPermanent(Items.BoostDamage)); component.RemoveItemPermanent(Items.BoostHp, component.GetItemCountPermanent(Items.BoostHp)); component.GiveItemPermanent(Items.BoostDamage, 30); component.GiveItemPermanent(Items.BoostHp, 30); int num = itemCount - 1; if (removeAllyScaling && num > 0) { component.GiveItemPermanent(Items.BoostDamage, 20 * num); component.GiveItemPermanent(Items.BoostHp, 20 * num); } } } }); } } directorSpawnRequest.ignoreTeamMemberLimit = ignoreAllyCap; } return directorSpawnRequest; }); } else { Debug.LogError((object)"RiskyMod: DefenseNucleus SpawnMaster IL Hook failed"); } }; <>c.<>9__8_2 = val3; obj3 = (object)val3; } ProjectileSpawnMaster.SpawnMaster += (Manipulator)obj3; } private void OnLoad() { //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_0028: Unknown result type (might be due to invalid IL or missing references) MinorConstructAlly = BodyCatalog.FindBodyIndex("MinorConstructAllyBody"); if (enabled && ItemsCore.enabled) { TakeDamage.distractOnHitBodies.Add(MinorConstructAlly); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.MinorConstructOnKill); } private static void SpawnEliteConstruct(GlobalEventManager self, DamageReport damageReport, CharacterBody attackerBody, Inventory attackerInventory, CharacterBody victimBody) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) int itemCount = attackerInventory.GetItemCount(Items.MinorConstructOnKill); if (itemCount <= 0 || !Object.op_Implicit((Object)(object)attackerBody.teamComponent) || !Object.op_Implicit((Object)(object)attackerBody.master) || !victimBody.isElite || !attackerBody.master.IsDeployableSlotAvailable((DeployableSlot)20)) { return; } EffectManager.SimpleEffect(SpawnEffectPrefab, victimBody.corePosition, Quaternion.identity, true); SpawnCard minorConstructOnKillCard = MinorConstructOnKillCard; DirectorPlacementRule val = new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 5f, maxDistance = 25f, position = victimBody.corePosition }; DirectorSpawnRequest val2 = new DirectorSpawnRequest(minorConstructOnKillCard, val, RoR2Application.rng); val2.teamIndexOverride = attackerBody.teamComponent.teamIndex; val2.summonerBodyObject = ((Component)attackerBody).gameObject; val2.ignoreTeamMemberLimit = ignoreAllyCap; val2.onSpawnedServer = (Action)Delegate.Combine(val2.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success) { CharacterMaster component = spawnResult.spawnedInstance.GetComponent(); Inventory component2 = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { if (component2.GetItemCountPermanent(Items.UseAmbientLevel) <= 0) { component2.GiveItemPermanent(Items.UseAmbientLevel, 1); } if (Object.op_Implicit((Object)(object)component)) { GameObject bodyObject = component.GetBodyObject(); if (Object.op_Implicit((Object)(object)bodyObject)) { Transform transform = bodyObject.transform; transform.rotation *= Quaternion.Euler(-90f, 0f, 0f); } } component2.GiveItemPermanent(Items.HealthDecay, 40); component2.RemoveItemPermanent(Items.BoostDamage, component2.GetItemCount(Items.BoostDamage)); component2.RemoveItemPermanent(Items.BoostHp, component2.GetItemCount(Items.BoostHp)); component2.GiveItemPermanent(Items.BoostDamage, 30); component2.GiveItemPermanent(Items.BoostHp, 30); if (removeAllyScaling) { int num = itemCount - 1; if (num > 0) { component2.GiveItemPermanent(Items.BoostDamage, 20 * num); component2.GiveItemPermanent(Items.BoostHp, 20 * num); } } if (Object.op_Implicit((Object)(object)victimBody.inventory)) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(victimBody.inventory.currentEquipmentIndex); if (Object.op_Implicit((Object)(object)equipmentDef) && Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite) { component2.SetEquipmentIndex(victimBody.inventory.currentEquipmentIndex, false); } } } Deployable val3 = spawnResult.spawnedInstance.AddComponent(); if (Object.op_Implicit((Object)(object)val3) && attackerBody.master.IsDeployableSlotAvailable((DeployableSlot)20)) { attackerBody.master.AddDeployable(val3, (DeployableSlot)20); } else if (Object.op_Implicit((Object)(object)component)) { component.TrueKill(); } } }); DirectorCore.instance.TrySpawnObject(val2); } private void WeakToMithrixHook(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (self.body.bodyIndex == MinorConstructAlly && (attackerBody.bodyIndex == MithrixCore.brotherBodyIndex || attackerBody.bodyIndex == MithrixCore.brotherHurtBodyIndex)) { damageInfo.damage *= 2f; } } } } namespace RiskyMod.Items.Common { public class BisonSteak { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FlatHealth") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: BisonSteak IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FlatHealth"); } } public static bool enabled = true; public BisonSteak() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FlatHealth") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: BisonSteak IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStatsInventory)); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.FlatHealth); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.FlatHealth); global::SneedUtils.SneedUtils.RemoveItemTag(Items.FlatHealth, (ItemTag)6); } private static void HandleStatsInventory(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { int itemCountEffective = sender.inventory.GetItemCountEffective(Items.FlatHealth); if (itemCountEffective > 0) { args.baseHealthAdd += sender.levelMaxHealth * (float)itemCountEffective; } } } public class CritGlasses { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Func <>9__1_2; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelCrit") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 10f) })) { val.Next.Operand = 7f; } else { Debug.LogError((object)"RiskyMod: CritGlasses IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "levelCrit"); } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 10f); } } public static bool enabled = true; public CritGlasses() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelCrit") }) && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 10f) })) { val2.Next.Operand = 7f; } else { Debug.LogError((object)"RiskyMod: CritGlasses IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStats)); } private void HandleStats(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { if (inventory.GetItemCount(Items.CritGlasses) > 0) { args.critAdd += 3f; } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.CritGlasses); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.CritGlasses); } } public class Crowbar { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__5_2; public static Manipulator <>9__5_0; public static Func <>9__5_4; public static Func <>9__5_5; public static Func <>9__5_6; public static Func <>9__5_3; public static Manipulator <>9__5_1; internal void <.ctor>b__5_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Crowbar") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Crowbar TakeDamage IL Hook failed"); } } internal bool <.ctor>b__5_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Crowbar"); } internal void <.ctor>b__5_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElementalRingsReady"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "HasBuff") }) && val.TryGotoPrev((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) })) { val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldloc_1); val.EmitDelegate>((Func)delegate(float ringThreshold, DamageInfo damageInfo, CharacterBody attackerBody) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (enabled && ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, CrowbarProc) && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)attackerBody)) { Inventory inventory = attackerBody.inventory; if (Object.op_Implicit((Object)(object)inventory)) { int itemCount = inventory.GetItemCount(Items.Crowbar); if (itemCount > 0) { ringThreshold *= GetCrowbarMult(itemCount); } } } if (((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)67108864)) { ringThreshold = float.PositiveInfinity; } return ringThreshold; }); } else { Debug.LogError((object)"RiskyMod: Crowbar OnHitEnemy IL Hook failed"); } } internal bool <.ctor>b__5_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElementalRingsReady"); } internal bool <.ctor>b__5_5(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "HasBuff"); } internal bool <.ctor>b__5_6(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 4f); } internal float <.ctor>b__5_3(float ringThreshold, DamageInfo damageInfo, CharacterBody attackerBody) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (enabled && ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, CrowbarProc) && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)attackerBody)) { Inventory inventory = attackerBody.inventory; if (Object.op_Implicit((Object)(object)inventory)) { int itemCount = inventory.GetItemCount(Items.Crowbar); if (itemCount > 0) { ringThreshold *= GetCrowbarMult(itemCount); } } } if (((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)67108864)) { ringThreshold = float.PositiveInfinity; } return ringThreshold; } } public static bool enabled = true; public static ModdedDamageType IgnoreCrowbar; public static CrowbarManager crowbarManager; public static float damageCoefficient = 0.45f; public static ModdedProcType CrowbarProc; public Crowbar() { //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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); IgnoreCrowbar = DamageAPI.ReserveDamageType(); CrowbarProc = ProcTypeAPI.ReserveProcType(); object obj = <>c.<>9__5_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Crowbar") })) { val4.Remove(); val4.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Crowbar TakeDamage IL Hook failed"); } }; <>c.<>9__5_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; Run.onRunStartGlobal += InitCrowbarManager; Stage.onStageStartGlobal += ClearCrowbarList; object obj2 = <>c.<>9__5_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElementalRingsReady"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "HasBuff") }) && val3.TryGotoPrev((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) })) { val3.Emit(OpCodes.Ldarg_1); val3.Emit(OpCodes.Ldloc_1); val3.EmitDelegate>((Func)delegate(float ringThreshold, DamageInfo damageInfo, CharacterBody attackerBody) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (enabled && ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, CrowbarProc) && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)attackerBody)) { Inventory inventory = attackerBody.inventory; if (Object.op_Implicit((Object)(object)inventory)) { int itemCount = inventory.GetItemCount(Items.Crowbar); if (itemCount > 0) { ringThreshold *= GetCrowbarMult(itemCount); } } } if (((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)67108864)) { ringThreshold = float.PositiveInfinity; } return ringThreshold; }); } else { Debug.LogError((object)"RiskyMod: Crowbar OnHitEnemy IL Hook failed"); } }; <>c.<>9__5_1 = val2; obj2 = (object)val2; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj2; TakeDamage.ModifyInitialDamageAttackerInventoryActions = (TakeDamage.ModifyInitialDamageAttackerInventory)Delegate.Combine(TakeDamage.ModifyInitialDamageAttackerInventoryActions, new TakeDamage.ModifyInitialDamageAttackerInventory(CrowbarDamageBoost)); } private void InitCrowbarManager(Run self) { if (NetworkServer.active) { crowbarManager = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)crowbarManager)) { crowbarManager = ((Component)self).gameObject.AddComponent(); } } } private void ClearCrowbarList(Stage obj) { if (NetworkServer.active && Object.op_Implicit((Object)(object)crowbarManager)) { crowbarManager.ClearList(); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.Crowbar); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Crowbar); } public static float GetCrowbarMult(int crowbarCount) { return 1f + damageCoefficient * (float)crowbarCount; } private static void CrowbarDamageBoost(DamageInfo damageInfo, HealthComponent self, CharacterBody attackerBody, Inventory attackerInventory) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) int itemCount = attackerInventory.GetItemCount(Items.Crowbar); if (itemCount > 0 && (Object)(object)self.body != (Object)(object)attackerBody && damageInfo.procCoefficient > 0f && damageInfo.damage > 0f && !DamageAPI.HasModdedDamageType(damageInfo, IgnoreCrowbar) && !ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, CrowbarProc) && crowbarManager.CanApplyCrowbar(self, attackerBody)) { damageInfo.damage *= GetCrowbarMult(itemCount); EffectManager.SimpleImpactEffect(AssetReferences.crowbarImpactEffectPrefab, damageInfo.position, -damageInfo.force, true); ProcTypeAPI.AddModdedProc(ref damageInfo.procChainMask, CrowbarProc); } } } public class CrowbarManager : MonoBehaviour { private class CrowbarTarget { public HealthComponent victim; public HashSet attackers; public CrowbarTarget(HealthComponent vict, CharacterBody attacker = null) { victim = vict; attackers = new HashSet(); if (Object.op_Implicit((Object)(object)attacker)) { attackers.Add(attacker); } } } private List targetList; public void FixedUpdate() { if (targetList.Count <= 0) { return; } List list = new List(); foreach (CrowbarTarget target in targetList) { if (target.victim.health + target.victim.shield >= target.victim.fullCombinedHealth) { list.Add(target); } } foreach (CrowbarTarget item in list) { targetList.Remove(item); } } public void Awake() { targetList = new List(); } public void Remove(HealthComponent victim) { CrowbarTarget item = null; foreach (CrowbarTarget target in targetList) { if ((Object)(object)target.victim == (Object)(object)victim) { item = target; break; } } targetList.Remove(item); } public void ClearList() { targetList.Clear(); } public bool CanApplyCrowbar(HealthComponent victim, CharacterBody attackerBody) { bool result = true; bool flag = false; foreach (CrowbarTarget target in targetList) { if ((Object)(object)target.victim == (Object)(object)victim) { flag = true; if (target.attackers.Contains(attackerBody)) { result = false; } else { target.attackers.Add(attackerBody); } break; } } if (!flag) { targetList.Add(new CrowbarTarget(victim, attackerBody)); } return result; } } public class Fireworks { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_FixedUpdate <>9__3_0; internal void <.ctor>b__3_0(orig_FixedUpdate orig, FireworkLauncher self) { self.projectilePrefab = projectilePrefab; if (RiskyMod.inBazaar) { Object.Destroy((Object)(object)((Component)self).gameObject); return; } if (self.remaining > maxRockets) { float damageCoefficient = self.damageCoefficient * (float)self.remaining / (float)maxRockets; self.remaining = maxRockets; self.damageCoefficient = damageCoefficient; } orig.Invoke(self); } } public static bool enabled = true; public static int maxRockets = 32; public static GameObject projectilePrefab; public Fireworks() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown if (!enabled) { return; } projectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Firework/FireworkProjectile.prefab").WaitForCompletion(), "RiskyMod_Fireworks", true); ProjectileDamage component = projectilePrefab.GetComponent(); DamageAPI.AddModdedDamageType(ref component.damageType, SharedDamageTypes.DontTriggerBands); global::RiskyMod.Content.Content.projectilePrefabs.Add(projectilePrefab); object obj = <>c.<>9__3_0; if (obj == null) { hook_FixedUpdate val = delegate(orig_FixedUpdate orig, FireworkLauncher self) { self.projectilePrefab = projectilePrefab; if (RiskyMod.inBazaar) { Object.Destroy((Object)(object)((Component)self).gameObject); } else { if (self.remaining > maxRockets) { float damageCoefficient = self.damageCoefficient * (float)self.remaining / (float)maxRockets; self.remaining = maxRockets; self.damageCoefficient = damageCoefficient; } orig.Invoke(self); } }; <>c.<>9__3_0 = val; obj = (object)val; } FireworkLauncher.FixedUpdate += (hook_FixedUpdate)obj; } } public class Gasoline { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Func <>9__1_2; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 8f) })) { val.Next.Operand = 16f; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) })) { val.Next.Operand = 0f; flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Gasoline IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 8f); } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 4f); } } public static bool enabled = true; public Gasoline() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 8f) })) { val2.Next.Operand = 16f; if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) })) { val2.Next.Operand = 0f; flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Gasoline IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.ProcIgniteOnKill += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.IgniteOnKill); } } public class MonsterTooth { public static bool enabled = true; public MonsterTooth() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (enabled) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Tooth/HealPack.prefab").WaitForCompletion(); DestroyOnTimer component = val.GetComponent(); component.duration = 20f; BeginRapidlyActivatingAndDeactivating component2 = val.GetComponent(); component2.delayBeforeBeginningBlinking = component.duration - 2f; GravitatePickup componentInChildren = val.GetComponentInChildren(); componentInChildren.acceleration = 20f; Collider component3 = ((Component)componentInChildren).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component3) && component3.isTrigger) { Transform transform = ((Component)component3).transform; transform.localScale *= 2f; } } } } public class StickyBomb { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_2; public static Func <>9__2_3; public static Func <>9__2_4; public static Func <>9__2_1; public static Manipulator <>9__2_0; internal void <.ctor>b__2_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "StickyBomb") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.8f) })) { val.Next.Operand = 2.4f; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/StickyBomb") })) { val.Index += 2; val.EmitDelegate>((Func)((GameObject oldPrefab) => stickybombPrefab)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: StickyBomb IL Hook failed"); } } internal bool <.ctor>b__2_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "StickyBomb"); } internal bool <.ctor>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.8f); } internal bool <.ctor>b__2_4(Instruction x) { return ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/StickyBomb"); } internal GameObject <.ctor>b__2_1(GameObject oldPrefab) { return stickybombPrefab; } } public static bool enabled = true; public static GameObject stickybombPrefab; public StickyBomb() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0058: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "StickyBomb") }) && val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.8f) })) { val2.Next.Operand = 2.4f; if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/StickyBomb") })) { val2.Index += 2; val2.EmitDelegate>((Func)((GameObject oldPrefab) => stickybombPrefab)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: StickyBomb IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; stickybombPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/StickyBomb/StickyBomb.prefab").WaitForCompletion(), "RiskyModStickybomb", true); ProjectileImpactExplosion component = stickybombPrefab.GetComponent(); component.lifetime = 1.2f; Rigidbody component2 = stickybombPrefab.GetComponent(); component2.useGravity = false; global::RiskyMod.Content.Content.projectilePrefabs.Add(stickybombPrefab); } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.StickyBomb); } } public class StunGrenade { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_3; public static Func <>9__1_4; public static Func <>9__1_1; public static Func <>9__1_5; public static Func <>9__1_2; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "StunChanceOnHit") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Util), "ConvertAmplificationPercentageIntoReductionPercentage") })) { val.Emit(OpCodes.Ldloc_3); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)((float origChance, int itemCount, DamageReport damageReport) => (float)itemCount * SetStateOnHurt.stunChanceOnHitBaseChancePercent * damageReport.damageInfo.procCoefficient)); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "SetStun") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)delegate(float origStunDuration, DamageReport damageReport) { //IL_003b: 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_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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)damageReport.victimBody) && Object.op_Implicit((Object)(object)damageReport.victimBody.healthComponent)) { DamageInfo damageInfo = damageReport.damageInfo; damageReport.victimBody.healthComponent.TakeDamage(new DamageInfo { damage = damageInfo.damage * 0.5f, attacker = damageInfo.attacker, canRejectForce = true, crit = damageInfo.crit, damageType = DamageTypeCombo.op_Implicit((DamageType)0), damageColorIndex = (DamageColorIndex)3, force = Vector3.zero, inflictor = damageInfo.attacker, procCoefficient = 0f, procChainMask = damageInfo.procChainMask, position = damageInfo.position, dotIndex = (DotIndex)(-1), inflictedHurtbox = damageInfo.inflictedHurtbox }); } return origStunDuration; }); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: StunGrenade IL Hook failed"); } } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "StunChanceOnHit"); } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchCall(x, typeof(Util), "ConvertAmplificationPercentageIntoReductionPercentage"); } internal float <.ctor>b__1_1(float origChance, int itemCount, DamageReport damageReport) { return (float)itemCount * SetStateOnHurt.stunChanceOnHitBaseChancePercent * damageReport.damageInfo.procCoefficient; } internal bool <.ctor>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchCall(x, "SetStun"); } internal float <.ctor>b__1_2(float origStunDuration, DamageReport damageReport) { //IL_003b: 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_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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)damageReport.victimBody) && Object.op_Implicit((Object)(object)damageReport.victimBody.healthComponent)) { DamageInfo damageInfo = damageReport.damageInfo; damageReport.victimBody.healthComponent.TakeDamage(new DamageInfo { damage = damageInfo.damage * 0.5f, attacker = damageInfo.attacker, canRejectForce = true, crit = damageInfo.crit, damageType = DamageTypeCombo.op_Implicit((DamageType)0), damageColorIndex = (DamageColorIndex)3, force = Vector3.zero, inflictor = damageInfo.attacker, procCoefficient = 0f, procChainMask = damageInfo.procChainMask, position = damageInfo.position, dotIndex = (DotIndex)(-1), inflictedHurtbox = damageInfo.inflictedHurtbox }); } return origStunDuration; } } public static bool enabled = true; public StunGrenade() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "StunChanceOnHit") }) && val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Util), "ConvertAmplificationPercentageIntoReductionPercentage") })) { val2.Emit(OpCodes.Ldloc_3); val2.Emit(OpCodes.Ldarg_1); val2.EmitDelegate>((Func)((float origChance, int itemCount, DamageReport damageReport) => (float)itemCount * SetStateOnHurt.stunChanceOnHitBaseChancePercent * damageReport.damageInfo.procCoefficient)); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "SetStun") })) { val2.Emit(OpCodes.Ldarg_1); val2.EmitDelegate>((Func)delegate(float origStunDuration, DamageReport damageReport) { //IL_003b: 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_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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)damageReport.victimBody) && Object.op_Implicit((Object)(object)damageReport.victimBody.healthComponent)) { DamageInfo damageInfo = damageReport.damageInfo; damageReport.victimBody.healthComponent.TakeDamage(new DamageInfo { damage = damageInfo.damage * 0.5f, attacker = damageInfo.attacker, canRejectForce = true, crit = damageInfo.crit, damageType = DamageTypeCombo.op_Implicit((DamageType)0), damageColorIndex = (DamageColorIndex)3, force = Vector3.zero, inflictor = damageInfo.attacker, procCoefficient = 0f, procChainMask = damageInfo.procChainMask, position = damageInfo.position, dotIndex = (DotIndex)(-1), inflictedHurtbox = damageInfo.inflictedHurtbox }); } return origStunDuration; }); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: StunGrenade IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } SetStateOnHurt.OnTakeDamageServer += (Manipulator)obj; } private void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.StunChanceOnHit); } } public class TougherTimes { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Func <>9__1_2; public static Func <>9__1_3; public static Func <>9__1_4; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, typeof(HealthComponent), "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "bear") })) { val.Next.Operand = 10f; } else { Debug.LogError((object)"RiskyMod: TougherTimes IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 15f); } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchLdflda(x, typeof(HealthComponent), "itemCounts"); } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "bear"); } } public static bool enabled = true; public TougherTimes() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, typeof(HealthComponent), "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "bear") })) { val2.Next.Operand = 10f; } else { Debug.LogError((object)"RiskyMod: TougherTimes IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Bear); } } public class Warbanner { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__6_3; public static Func <>9__6_2; public static Manipulator <>9__6_0; public static Func <>9__6_5; public static Func <>9__6_4; public static Manipulator <>9__6_1; internal void b__6_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Warbanner") })) { val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((bool hasBuff, CharacterBody self) => hasBuff || self.HasBuff(warbannerBuff))); } else { Debug.LogError((object)"RiskyMod: Warbanner UpdateAllTemporaryVisualEffects IL Hook failed"); } } internal bool b__6_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Warbanner"); } internal bool b__6_2(bool hasBuff, CharacterBody self) { return hasBuff || self.HasBuff(warbannerBuff); } internal void b__6_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/NetworkedObjects/WarbannerWard") })) { val.Index += 2; val.EmitDelegate>((Func)((GameObject wardObject) => WarbannerObject)); } else { Debug.LogError((object)"RiskyMod: Warbanner TeleporterInteraction IL Hook failed."); } } internal bool b__6_5(Instruction x) { return ILPatternMatchingExt.MatchLdstr(x, "Prefabs/NetworkedObjects/WarbannerWard"); } internal GameObject b__6_4(GameObject wardObject) { return WarbannerObject; } } public static bool enabled = true; public static GameObject WarbannerObject = Addressables.LoadAssetAsync((object)"RoR2/Base/WardOnLevel/WarbannerWard.prefab").WaitForCompletion(); public static BuffDef warbannerBuff; public static bool UseModdedBuff = true; public Warbanner() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); if (UseModdedBuff) { SetupBuff(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(HandleStatsCustom); return; } WardHeal wardHeal = WarbannerObject.AddComponent(); wardHeal.healInterval = 1f; wardHeal.healFraction = 0.01f; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(HandleStatsVanilla); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.WardOnLevel); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.WardOnLevel); } private void SetupBuff() { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown BuffDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/WardOnLevel/bdWarbanner.asset").WaitForCompletion(); warbannerBuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyMod_WarbannerBuff", canStack: false, isCooldown: false, isDebuff: false, val.buffColor, val.iconSprite); object obj = <>c.<>9__6_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Warbanner") })) { val5.Index += 2; val5.Emit(OpCodes.Ldarg_0); val5.EmitDelegate>((Func)((bool hasBuff, CharacterBody self) => hasBuff || self.HasBuff(warbannerBuff))); } else { Debug.LogError((object)"RiskyMod: Warbanner UpdateAllTemporaryVisualEffects IL Hook failed"); } }; <>c.<>9__6_0 = val2; obj = (object)val2; } CharacterBody.UpdateAllTemporaryVisualEffects += (Manipulator)obj; WarbannerObject = PrefabAPI.InstantiateClone(WarbannerObject, "RiskyModWarbannerObject", true); WardHeal wardHeal = WarbannerObject.AddComponent(); wardHeal.healInterval = 1f; wardHeal.healFraction = 0.01f; BuffWard component = WarbannerObject.GetComponent(); component.buffDef = warbannerBuff; RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(ReplaceWarbanner)); object obj2 = <>c.<>9__6_1; if (obj2 == null) { Manipulator val3 = 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 val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/NetworkedObjects/WarbannerWard") })) { val4.Index += 2; val4.EmitDelegate>((Func)((GameObject wardObject) => WarbannerObject)); } else { Debug.LogError((object)"RiskyMod: Warbanner TeleporterInteraction IL Hook failed."); } }; <>c.<>9__6_1 = val3; obj2 = (object)val3; } ChargingState.OnEnter += (Manipulator)obj2; } private void ReplaceWarbanner() { if (!Object.op_Implicit((Object)(object)WardOnLevelManager.wardPrefab)) { Debug.LogError((object)"RiskyMod: Warbanner assigned before WardOnLevel Init"); } WardOnLevelManager.wardPrefab = WarbannerObject; } private void HandleStatsCustom(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(warbannerBuff)) { args.moveSpeedMultAdd += 0.3f; args.attackSpeedMultAdd += 0.3f; args.damageMultAdd += 0.1f; } } private void HandleStatsVanilla(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buffs.Warbanner)) { args.damageMultAdd += 0.1f; } } } } namespace RiskyMod.Items.Boss { public class ChargedPerf { public static bool enabled = true; public static float initialDamageCoefficient = 5f; public static float stackDamageCoefficient = 3.5f; public ChargedPerf() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); float initialDamage = initialDamageCoefficient - stackDamageCoefficient; GlobalEventManager.ProcessHitEnemy += (Manipulator)delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "LightningStrikeOnHit") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damage") })) { val.Index += 3; val.Next.Operand = stackDamageCoefficient; val.Index += 4; val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + initialDamage)); if (RiskyMod.disableProcChains && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "AddOrb") })) { val.EmitDelegate>((Func)delegate(SimpleLightningStrikeOrb orb) { ((GenericDamageOrb)orb).procCoefficient = 0f; return orb; }); } flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: ChargedPerf IL Hook failed"); } }; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.LightningStrikeOnHit); } } public class Disciple { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Fire <>9__1_0; internal void <.ctor>b__1_0(orig_Fire orig, SprintWispBodyBehavior self) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) DevilOrb val = new DevilOrb { origin = ((BaseItemBodyBehavior)self).body.corePosition, damageValue = ((BaseItemBodyBehavior)self).body.damage * SprintWispBodyBehavior.damageCoefficient * (float)((BaseItemBodyBehavior)self).stack, teamIndex = ((BaseItemBodyBehavior)self).body.teamComponent.teamIndex, attacker = ((Component)self).gameObject, damageColorIndex = (DamageColorIndex)3, scale = 1f, effectType = (EffectType)1, procCoefficient = 0.5f }; if (Object.op_Implicit((Object)(object)(((Orb)val).target = val.PickNextTarget(((Orb)val).origin, SprintWispBodyBehavior.searchRadius)))) { val.isCrit = Util.CheckRoll(((BaseItemBodyBehavior)self).body.crit, ((BaseItemBodyBehavior)self).body.master); OrbManager.instance.AddOrb((Orb)(object)val); } } } public static bool enabled = true; public Disciple() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown if (!enabled || !RiskyMod.disableProcChains) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_Fire val = delegate(orig_Fire orig, SprintWispBodyBehavior self) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) DevilOrb val2 = new DevilOrb { origin = ((BaseItemBodyBehavior)self).body.corePosition, damageValue = ((BaseItemBodyBehavior)self).body.damage * SprintWispBodyBehavior.damageCoefficient * (float)((BaseItemBodyBehavior)self).stack, teamIndex = ((BaseItemBodyBehavior)self).body.teamComponent.teamIndex, attacker = ((Component)self).gameObject, damageColorIndex = (DamageColorIndex)3, scale = 1f, effectType = (EffectType)1, procCoefficient = 0.5f }; if (Object.op_Implicit((Object)(object)(((Orb)val2).target = val2.PickNextTarget(((Orb)val2).origin, SprintWispBodyBehavior.searchRadius)))) { val2.isCrit = Util.CheckRoll(((BaseItemBodyBehavior)self).body.crit, ((BaseItemBodyBehavior)self).body.master); OrbManager.instance.AddOrb((Orb)(object)val2); } }; <>c.<>9__1_0 = val; obj = (object)val; } SprintWispBodyBehavior.Fire += (hook_Fire)obj; } } public class EmpathyCores { public static bool enabled = true; public static bool ignoreAllyCap = true; public static SpawnCard RedBuddyCard = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBuddy/cscRoboBallRedBuddy.asset").WaitForCompletion(); public static SpawnCard GreenBuddyCard = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBuddy/cscRoboBallGreenBuddy.asset").WaitForCompletion(); public EmpathyCores() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { DeployableMinionSpawner.SpawnMinion += new Manipulator(DeployableMinionSpawner_SpawnMinion); } } private void DeployableMinionSpawner_SpawnMinion(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "TrySpawnObject") })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)delegate(DirectorSpawnRequest directorSpawnRequest, DeployableMinionSpawner self, SpawnCard spawnCard) { if ((Object)(object)spawnCard == (Object)(object)RedBuddyCard || (Object)(object)spawnCard == (Object)(object)GreenBuddyCard) { directorSpawnRequest.ignoreTeamMemberLimit = ignoreAllyCap; } return directorSpawnRequest; }); } else { Debug.LogError((object)"RiskyMod: EmpathyCores IL Hook failed"); } } } public class GenesisLoop { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_attackSpeed") })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)((float attackSpeed) => 1f)); } else { Debug.LogError((object)"RiskyMod: GenesisLoop IL Hook failed"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_attackSpeed"); } internal float <.ctor>b__1_1(float attackSpeed) { return 1f; } } public static bool enabled = true; public GenesisLoop() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_attackSpeed") })) { int index = val2.Index; val2.Index = index + 1; val2.EmitDelegate>((Func)((float attackSpeed) => 1f)); } else { Debug.LogError((object)"RiskyMod: GenesisLoop IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } ChargeState.OnEnter += (Manipulator)obj; } } public class HalcyonSeed { public static bool enabled = true; public HalcyonSeed() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown if (enabled) { ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); CharacterBody.Start += new hook_Start(CharacterBody_Start); } } private void CharacterBody_Start(orig_Start orig, CharacterBody self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Invalid comparison between Unknown and I4 //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!self.isPlayerControlled && self.bodyIndex == BodyPrefabs.TitanGoldBody.bodyIndex && Object.op_Implicit((Object)(object)self.teamComponent) && (int)self.teamComponent.teamIndex == 1) { if (NetworkServer.active) { self.inventory.GiveItemPermanent(Items.BoostHp, 10); self.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } self.bodyFlags = (BodyFlags)(self.bodyFlags | 0x8A10); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.TitanGoldDuringTP); } } public class Knurl { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Knurl") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Knurl IL Hook failed"); } } internal bool <.ctor>b__1_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Knurl"); } } public static bool enabled = true; public Knurl() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Knurl") })) { val2.Remove(); val2.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Knurl IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); GetStatCoefficients.HandleStatsInventoryActions = (GetStatCoefficients.HandleStatsInventory)Delegate.Combine(GetStatCoefficients.HandleStatsInventoryActions, new GetStatCoefficients.HandleStatsInventory(HandleStatsInventory)); } private static void HandleStatsInventory(CharacterBody sender, StatHookEventArgs args, Inventory inventory) { int itemCount = sender.inventory.GetItemCount(Items.Knurl); if (itemCount > 0) { args.healthMultAdd += 0.08f * (float)itemCount; args.armorAdd += 10f * (float)itemCount; args.baseRegenAdd += (1.6f + 0.32f * (sender.level - 1f)) * (float)itemCount; } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.Knurl); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.Knurl); } } public class MoltenPerf { public static bool enabled = true; public static float initialDamageCoefficient = 3f; public static float stackDamageCoefficient = 2.1f; public static GameObject meatballPrefab; public MoltenPerf() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); float initialDamage = initialDamageCoefficient - stackDamageCoefficient; GlobalEventManager.ProcessHitEnemy += (Manipulator)delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FireballsOnHit") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damage") })) { val.Index -= 6; val.Next.Operand = stackDamageCoefficient; val.Index += 4; val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + initialDamage)); if (RiskyMod.disableProcChains && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/FireMeatBall") })) { val.Index += 2; val.EmitDelegate>((Func)((GameObject oldPrefab) => meatballPrefab)); } flag = false; } if (flag) { Debug.LogError((object)"RiskyMod: MoltenPerf IL Hook failed"); } }; if (RiskyMod.disableProcChains) { meatballPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/FireballsOnHit/FireMeatBall.prefab").WaitForCompletion(), "RiskyMod_Perforator", true); ProjectileImpactExplosion component = meatballPrefab.GetComponent(); ((ProjectileExplosion)component).blastProcCoefficient = 0f; ProjectileDamage component2 = meatballPrefab.GetComponent(); DamageAPI.AddModdedDamageType(ref component2.damageType, SharedDamageTypes.AlwaysIgnite); global::RiskyMod.Content.Content.projectilePrefabs.Add(meatballPrefab); } } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.FireballsOnHit); } } public class QueensGland { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_GetDeployableSameSlotLimit <>9__3_0; public static hook_FixedUpdate <>9__3_1; internal int <.ctor>b__3_0(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_003d: Unknown result type (might be due to invalid IL or missing references) if ((int)slot == 2) { return ((self.inventory.GetItemCount(Items.BeetleGland) > 0) ? 1 : 0) * ((!RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef)) ? 1 : 2); } return orig.Invoke(self, slot); } internal void <.ctor>b__3_1(orig_FixedUpdate orig, BeetleGlandBodyBehavior self) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown <>c__DisplayClass3_0 CS$<>8__locals0 = new <>c__DisplayClass3_0 { self = self }; if (!NetworkServer.active || RiskyMod.inBazaar || !Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)CS$<>8__locals0.self).body.master) || !((BaseItemBodyBehavior)CS$<>8__locals0.self).body.master.IsDeployableSlotAvailable((DeployableSlot)2)) { return; } BeetleGlandBodyBehavior self2 = CS$<>8__locals0.self; self2.guardResummonCooldown -= Time.fixedDeltaTime; if (!(CS$<>8__locals0.self.guardResummonCooldown <= 0f)) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest((SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/BeetleGland/cscBeetleGuardAlly.asset").WaitForCompletion(), new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 3f, maxDistance = 40f, spawnOnTarget = ((Component)CS$<>8__locals0.self).transform }, RoR2Application.rng); val.summonerBodyObject = ((Component)CS$<>8__locals0.self).gameObject; val.ignoreTeamMemberLimit = ignoreAllyCap; val.onSpawnedServer = (Action)Delegate.Combine(val.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_00fb: 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) if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)CS$<>8__locals0.self).body.inventory)) { Inventory component = spawnResult.spawnedInstance.GetComponent(); CharacterMaster component2 = spawnResult.spawnedInstance.GetComponent(); int num = (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)CS$<>8__locals0.self).body.inventory) ? ((BaseItemBodyBehavior)CS$<>8__locals0.self).body.inventory.GetItemCount(Items.BeetleGland) : 0); if (Object.op_Implicit((Object)(object)component) && num > 0) { int num2 = 20; int num3 = 30; int num4 = 10; int num5 = 10; int num6 = num - 1; component.GiveItem(Items.BoostDamage, num2 + num6 * num3); component.GiveItem(Items.BoostHp, num4 + num6 * num5); if (component.GetItemCount(Items.UseAmbientLevel) <= 0) { component.GiveItem(Items.UseAmbientLevel, 1); } } Deployable val2 = spawnResult.spawnedInstance.AddComponent(); if (Object.op_Implicit((Object)(object)val2) && ((BaseItemBodyBehavior)CS$<>8__locals0.self).body.master.IsDeployableSlotAvailable((DeployableSlot)2)) { ((BaseItemBodyBehavior)CS$<>8__locals0.self).body.master.AddDeployable(val2, (DeployableSlot)2); if (Object.op_Implicit((Object)(object)component2)) { CharacterBody body = component2.GetBody(); if (Object.op_Implicit((Object)(object)body)) { UpdateGlandStats updateGlandStats = spawnResult.spawnedInstance.AddComponent(); updateGlandStats.ownerInventory = ((BaseItemBodyBehavior)CS$<>8__locals0.self).body.inventory; updateGlandStats.minionInventory = component; } } } else if (Object.op_Implicit((Object)(object)component2)) { component2.TrueKill(); } } }); DirectorCore.instance.TrySpawnObject(val); if (((BaseItemBodyBehavior)CS$<>8__locals0.self).body.master.IsDeployableSlotAvailable((DeployableSlot)2)) { CS$<>8__locals0.self.guardResummonCooldown = 1f; } else { CS$<>8__locals0.self.guardResummonCooldown = 30f; } } } [CompilerGenerated] private sealed class <>c__DisplayClass3_0 { public BeetleGlandBodyBehavior self; internal void <.ctor>b__2(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_00fb: 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) if (!spawnResult.success || !Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) || !Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)self).body.inventory)) { return; } Inventory component = spawnResult.spawnedInstance.GetComponent(); CharacterMaster component2 = spawnResult.spawnedInstance.GetComponent(); int num = (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)self).body.inventory) ? ((BaseItemBodyBehavior)self).body.inventory.GetItemCount(Items.BeetleGland) : 0); if (Object.op_Implicit((Object)(object)component) && num > 0) { int num2 = 20; int num3 = 30; int num4 = 10; int num5 = 10; int num6 = num - 1; component.GiveItem(Items.BoostDamage, num2 + num6 * num3); component.GiveItem(Items.BoostHp, num4 + num6 * num5); if (component.GetItemCount(Items.UseAmbientLevel) <= 0) { component.GiveItem(Items.UseAmbientLevel, 1); } } Deployable val = spawnResult.spawnedInstance.AddComponent(); if (Object.op_Implicit((Object)(object)val) && ((BaseItemBodyBehavior)self).body.master.IsDeployableSlotAvailable((DeployableSlot)2)) { ((BaseItemBodyBehavior)self).body.master.AddDeployable(val, (DeployableSlot)2); if (Object.op_Implicit((Object)(object)component2)) { CharacterBody body = component2.GetBody(); if (Object.op_Implicit((Object)(object)body)) { UpdateGlandStats updateGlandStats = spawnResult.spawnedInstance.AddComponent(); updateGlandStats.ownerInventory = ((BaseItemBodyBehavior)self).body.inventory; updateGlandStats.minionInventory = component; } } } else if (Object.op_Implicit((Object)(object)component2)) { component2.TrueKill(); } } } public static bool enabled = true; public static bool ignoreAllyCap = true; public static BodyIndex BeetleGuardAllyIndex; public QueensGland() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown if (!enabled || SoftDependencies.QueensGlandBuffLoaded) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__3_0; if (obj == null) { hook_GetDeployableSameSlotLimit val = (orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) => ((int)slot == 2) ? (((self.inventory.GetItemCount(Items.BeetleGland) > 0) ? 1 : 0) * ((!RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef)) ? 1 : 2)) : orig.Invoke(self, slot); <>c.<>9__3_0 = val; obj = (object)val; } CharacterMaster.GetDeployableSameSlotLimit += (hook_GetDeployableSameSlotLimit)obj; object obj2 = <>c.<>9__3_1; if (obj2 == null) { hook_FixedUpdate val2 = delegate(orig_FixedUpdate orig, BeetleGlandBodyBehavior self) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown if (NetworkServer.active && !RiskyMod.inBazaar && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)self).body.master) && ((BaseItemBodyBehavior)self).body.master.IsDeployableSlotAvailable((DeployableSlot)2)) { BeetleGlandBodyBehavior obj3 = self; obj3.guardResummonCooldown -= Time.fixedDeltaTime; if (self.guardResummonCooldown <= 0f) { DirectorSpawnRequest val3 = new DirectorSpawnRequest((SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/BeetleGland/cscBeetleGuardAlly.asset").WaitForCompletion(), new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 3f, maxDistance = 40f, spawnOnTarget = ((Component)self).transform }, RoR2Application.rng); val3.summonerBodyObject = ((Component)self).gameObject; val3.ignoreTeamMemberLimit = ignoreAllyCap; val3.onSpawnedServer = (Action)Delegate.Combine(val3.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_00fb: 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) if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)self).body.inventory)) { Inventory component = spawnResult.spawnedInstance.GetComponent(); CharacterMaster component2 = spawnResult.spawnedInstance.GetComponent(); int num = (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)self).body.inventory) ? ((BaseItemBodyBehavior)self).body.inventory.GetItemCount(Items.BeetleGland) : 0); if (Object.op_Implicit((Object)(object)component) && num > 0) { int num2 = 20; int num3 = 30; int num4 = 10; int num5 = 10; int num6 = num - 1; component.GiveItem(Items.BoostDamage, num2 + num6 * num3); component.GiveItem(Items.BoostHp, num4 + num6 * num5); if (component.GetItemCount(Items.UseAmbientLevel) <= 0) { component.GiveItem(Items.UseAmbientLevel, 1); } } Deployable val4 = spawnResult.spawnedInstance.AddComponent(); if (Object.op_Implicit((Object)(object)val4) && ((BaseItemBodyBehavior)self).body.master.IsDeployableSlotAvailable((DeployableSlot)2)) { ((BaseItemBodyBehavior)self).body.master.AddDeployable(val4, (DeployableSlot)2); if (Object.op_Implicit((Object)(object)component2)) { CharacterBody body = component2.GetBody(); if (Object.op_Implicit((Object)(object)body)) { UpdateGlandStats updateGlandStats = spawnResult.spawnedInstance.AddComponent(); updateGlandStats.ownerInventory = ((BaseItemBodyBehavior)self).body.inventory; updateGlandStats.minionInventory = component; } } } else if (Object.op_Implicit((Object)(object)component2)) { component2.TrueKill(); } } }); DirectorCore.instance.TrySpawnObject(val3); if (((BaseItemBodyBehavior)self).body.master.IsDeployableSlotAvailable((DeployableSlot)2)) { self.guardResummonCooldown = 1f; } else { self.guardResummonCooldown = 30f; } } } }; <>c.<>9__3_1 = val2; obj2 = (object)val2; } BeetleGlandBodyBehavior.FixedUpdate += (hook_FixedUpdate)obj2; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.BeetleGland); } private void OnLoad() { //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) BeetleGuardAllyIndex = BodyCatalog.FindBodyIndex("BeetleGuardAllyBody"); } } public class UpdateGlandStats : MonoBehaviour { public Inventory minionInventory; public Inventory ownerInventory; public void FixedUpdate() { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)ownerInventory) || !Object.op_Implicit((Object)(object)minionInventory)) { return; } int num = Math.Max(ownerInventory.GetItemCountEffective(Items.BeetleGland), 1); int num2 = num - 1; int num3 = 20; int num4 = 30; int num5 = 10; int num6 = 10; int num7 = num3 + num2 * num4; int num8 = num5 + num2 * num6; int itemCountEffective = minionInventory.GetItemCountEffective(Items.BoostHp); int itemCountEffective2 = minionInventory.GetItemCountEffective(Items.BoostDamage); if (itemCountEffective != num7) { if (itemCountEffective < num7) { minionInventory.GiveItemPermanent(Items.BoostHp, num7 - itemCountEffective); } else if (itemCountEffective > num7) { minionInventory.RemoveItemPermanent(Items.BoostHp, itemCountEffective - num7); } } if (itemCountEffective2 != num8) { if (itemCountEffective2 < num8) { minionInventory.GiveItemPermanent(Items.BoostDamage, num8 - itemCountEffective2); } else if (itemCountEffective2 > num8) { minionInventory.RemoveItemPermanent(Items.BoostDamage, itemCountEffective2 - num8); } } } } public class Shatterspleen { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_3; public static Manipulator <>9__1_0; public static Func <>9__1_4; public static Manipulator <>9__1_1; public static Func <>9__1_9; public static Func <>9__1_10; public static Func <>9__1_5; public static Func <>9__1_11; public static Func <>9__1_6; public static Func <>9__1_12; public static Func <>9__1_7; public static Func <>9__1_13; public static Func <>9__1_8; public static Manipulator <>9__1_2; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Shatterspleen RecalculateStats IL Hook failed"); } } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode"); } internal void <.ctor>b__1_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode") })) { val.Remove(); val.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Shatterspleen OnHitEnemy IL Hook failed"); } } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode"); } internal void <.ctor>b__1_2(ILContext il) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) int num = 1; int num2 = 0; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "HasBuff") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)delegate(bool hasBuff, DamageReport damageReport) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 bool flag = false; if (damageReport != null) { if (Object.op_Implicit((Object)(object)damageReport.victimBody)) { flag = damageReport.victimBody.HasBuff(Buffs.Fracture); } if (!flag && damageReport.damageInfo != null) { flag = (int)damageReport.damageInfo.dotIndex == 8; } } return hasBuff || flag; }); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) })) { val.Next.Operand = 3.2f; val.Index += 8; val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + 0.8f)); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.15f) })) { val.Next.Operand = 0.08f; val.Index += 8; val.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + 0.02f)); num2++; if (RiskyMod.disableProcChains) { num++; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "position") })) { int index = val.Index; val.Index = index - 1; val.EmitDelegate>((Func)delegate(DelayBlast db) { db.procCoefficient = 0f; return db; }); num2++; } } } } } if (num != num2) { Debug.LogError((object)"RiskyMod: Shatterspleen OnCharacterDeath IL Hook failed"); } } internal bool <.ctor>b__1_9(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode"); } internal bool <.ctor>b__1_10(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "HasBuff"); } internal bool <.ctor>b__1_5(bool hasBuff, DamageReport damageReport) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 bool flag = false; if (damageReport != null) { if (Object.op_Implicit((Object)(object)damageReport.victimBody)) { flag = damageReport.victimBody.HasBuff(Buffs.Fracture); } if (!flag && damageReport.damageInfo != null) { flag = (int)damageReport.damageInfo.dotIndex == 8; } } return hasBuff || flag; } internal bool <.ctor>b__1_11(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 4f); } internal float <.ctor>b__1_6(float damageCoefficient) { return damageCoefficient + 0.8f; } internal bool <.ctor>b__1_12(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.15f); } internal float <.ctor>b__1_7(float damageCoefficient) { return damageCoefficient + 0.02f; } internal bool <.ctor>b__1_13(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "position"); } internal DelayBlast <.ctor>b__1_8(DelayBlast db) { db.procCoefficient = 0f; return db; } } public static bool enabled = true; public Shatterspleen() { //IL_004d: 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_0058: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown if (!enabled) { return; } ItemsCore.ModifyItemDefActions = (ItemsCore.ModifyItemDef)Delegate.Combine(ItemsCore.ModifyItemDefActions, new ItemsCore.ModifyItemDef(ModifyItem)); object obj = <>c.<>9__1_0; 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 //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val6 = new ILCursor(il); if (val6.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode") })) { val6.Remove(); val6.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Shatterspleen RecalculateStats IL Hook failed"); } }; <>c.<>9__1_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; object obj2 = <>c.<>9__1_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode") })) { val5.Remove(); val5.Emit(OpCodes.Ldsfld, "emptyItemDef"); } else { Debug.LogError((object)"RiskyMod: Shatterspleen OnHitEnemy IL Hook failed"); } }; <>c.<>9__1_1 = val2; obj2 = (object)val2; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj2; RecalculateStats.HandleRecalculateStatsInventoryActions = (RecalculateStats.HandleRecalculateStatsInventory)Delegate.Combine(RecalculateStats.HandleRecalculateStatsInventoryActions, new RecalculateStats.HandleRecalculateStatsInventory(AddBleedChance)); object obj3 = <>c.<>9__1_2; if (obj3 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) int num = 1; int num2 = 0; ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BleedOnHitAndExplode") }) && val4.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "HasBuff") })) { val4.Emit(OpCodes.Ldarg_1); val4.EmitDelegate>((Func)delegate(bool hasBuff, DamageReport damageReport) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 bool flag = false; if (damageReport != null) { if (Object.op_Implicit((Object)(object)damageReport.victimBody)) { flag = damageReport.victimBody.HasBuff(Buffs.Fracture); } if (!flag && damageReport.damageInfo != null) { flag = (int)damageReport.damageInfo.dotIndex == 8; } } return hasBuff || flag; }); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) })) { val4.Next.Operand = 3.2f; val4.Index += 8; val4.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + 0.8f)); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.15f) })) { val4.Next.Operand = 0.08f; val4.Index += 8; val4.EmitDelegate>((Func)((float damageCoefficient) => damageCoefficient + 0.02f)); num2++; if (RiskyMod.disableProcChains) { num++; if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "position") })) { int index = val4.Index; val4.Index = index - 1; val4.EmitDelegate>((Func)delegate(DelayBlast db) { db.procCoefficient = 0f; return db; }); num2++; } } } } } if (num != num2) { Debug.LogError((object)"RiskyMod: Shatterspleen OnCharacterDeath IL Hook failed"); } }; <>c.<>9__1_2 = val3; obj3 = (object)val3; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj3; } private static void ModifyItem() { ArrayUtils.ArrayAppend(ref ItemsCore.changedItemPickups, ref Items.BleedOnHitAndExplode); ArrayUtils.ArrayAppend(ref ItemsCore.changedItemDescs, ref Items.BleedOnHitAndExplode); } private static void AddBleedChance(CharacterBody self, Inventory inventory) { if (inventory.GetItemCount(Items.BleedOnHitAndExplode) > 0) { self.bleedChance += 10f; } } } } namespace RiskyMod.Fixes { public class FixCrocoPoisonAchievement { public FixCrocoPoisonAchievement() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new hook_AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1(FixAchieveTracking); } private void FixAchieveTracking(orig_AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 orig, DotController self, GameObject attackerObject, float duration, HurtBox hitHurtBox, DotIndex dotIndex, float damageMultiplier, uint? maxStacksFromAttacker, float? totalDamage, DotIndex? preUpgradeDotIndex) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 orig.Invoke(self, attackerObject, duration, hitHurtBox, dotIndex, damageMultiplier, maxStacksFromAttacker, totalDamage, preUpgradeDotIndex); if ((int)dotIndex != 5) { return; } CharacterBody component = attackerObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } CharacterMaster master = component.master; if ((Object)(object)master != (Object)null) { PlayerStatsComponent playerStatsComponent = master.playerStatsComponent; if ((Object)(object)playerStatsComponent != (Object)null) { playerStatsComponent.currentStats.PushStatValue(StatDef.totalCrocoInfectionsInflicted, 1uL); } } } } } namespace RiskyMod.Enemies { public class EnemiesCore { public static bool modifyEnemies = true; public static bool modifySpawns = true; public static bool infernoCompat = true; public static bool spawnpoolDLCReplacementFix = true; public EnemiesCore() { new MithrixCore(); new VoidlingCore(); ModifyEnemies(); ModifySpawns(); } private void ModifyEnemies() { if (modifyEnemies) { new Jellyfish(); new Imp(); new HermitCrab(); new Lemurian(); new Mushrum(); new Bison(); new GreaterWisp(); new Parent(); new VoidReaver(); new LunarWisp(); new LunarExploder(); new BeetleQueen(); new Vagrant(); new Gravekeeper(); new SCU(); new Worm(); new Titan(); new AWU(); new Aurelionite(); new VoidInfestor(); new BlindPest(); new XiConstruct(); new Child(); new Scorchling(); } } private void ModifySpawns() { if (modifySpawns) { SpawnCards.Init(); new TitanicPlains(); new DistantRoost(); new SnowyForest(); new Lakes(); new LakesNight(); new VillageNight(); new Wetland(); new GooLake(); new FrozenWall(); new DampCaveSimple(); new SirensCall(); new StadiaJungle(); new SkyMeadow(); new HelminthRoost(); } } } public static class SpawnCards { public static bool initialized; public static CharacterSpawnCard AlphaConstruct; public static CharacterSpawnCard Beetle; public static CharacterSpawnCard Lemurian; public static CharacterSpawnCard Wisp; public static CharacterSpawnCard Jellyfish; public static CharacterSpawnCard BlindPestSnowy; public static CharacterSpawnCard BlindVerminSnowy; public static CharacterSpawnCard Imp; public static CharacterSpawnCard Vulture; public static CharacterSpawnCard Golem; public static CharacterSpawnCard GolemNature; public static CharacterSpawnCard BeetleGuard; public static CharacterSpawnCard Mushrum; public static CharacterSpawnCard Bison; public static CharacterSpawnCard LemurianBruiser; public static CharacterSpawnCard ClayApothecary; public static CharacterSpawnCard Gup; public static CharacterSpawnCard Geep; public static CharacterSpawnCard Bronzong; public static CharacterSpawnCard GreaterWisp; public static CharacterSpawnCard TitanBlackBeach; public static CharacterSpawnCard TitanDampCave; public static CharacterSpawnCard TitanGolemPlains; public static CharacterSpawnCard TitanGooLake; public static CharacterSpawnCard Vagrant; public static CharacterSpawnCard BeetleQueen; public static CharacterSpawnCard Dunestrider; public static CharacterSpawnCard MagmaWorm; public static CharacterSpawnCard ImpOverlord; public static CharacterSpawnCard Grovetender; public static CharacterSpawnCard RoboBall; public static CharacterSpawnCard XiConstruct; public static CharacterSpawnCard Reminder; public static void Init() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: 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_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_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: 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_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) if (!initialized) { initialized = true; AlphaConstruct = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/cscMinorConstruct.asset").WaitForCompletion(); Beetle = Addressables.LoadAssetAsync((object)"RoR2/Base/Beetle/cscBeetle.asset").WaitForCompletion(); Lemurian = Addressables.LoadAssetAsync((object)"RoR2/Base/Lemurian/cscLemurian.asset").WaitForCompletion(); Wisp = Addressables.LoadAssetAsync((object)"RoR2/Base/Wisp/cscLesserWisp.asset").WaitForCompletion(); Jellyfish = Addressables.LoadAssetAsync((object)"RoR2/Base/Jellyfish/cscJellyfish.asset").WaitForCompletion(); Imp = Addressables.LoadAssetAsync((object)"RoR2/Base/Imp/cscImp.asset").WaitForCompletion(); Vulture = Addressables.LoadAssetAsync((object)"RoR2/Base/Vulture/cscVulture.asset").WaitForCompletion(); Golem = Addressables.LoadAssetAsync((object)"RoR2/Base/Golem/cscGolem.asset").WaitForCompletion(); GolemNature = Addressables.LoadAssetAsync((object)"RoR2/Base/Golem/cscGolemNature.asset").WaitForCompletion(); BeetleGuard = Addressables.LoadAssetAsync((object)"RoR2/Base/BeetleGuard/cscBeetleGuard.asset").WaitForCompletion(); Mushrum = Addressables.LoadAssetAsync((object)"RoR2/Base/MiniMushroom/cscMiniMushroom.asset").WaitForCompletion(); Bison = Addressables.LoadAssetAsync((object)"RoR2/Base/Bison/cscBison.asset").WaitForCompletion(); LemurianBruiser = Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/cscLemurianBruiser.asset").WaitForCompletion(); Bronzong = Addressables.LoadAssetAsync((object)"RoR2/Base/Bell/cscBell.asset").WaitForCompletion(); GreaterWisp = Addressables.LoadAssetAsync((object)"RoR2/Base/GreaterWisp/cscGreaterWisp.asset").WaitForCompletion(); TitanBlackBeach = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/cscTitanBlackBeach.asset").WaitForCompletion(); TitanDampCave = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/cscTitanDampCave.asset").WaitForCompletion(); TitanGolemPlains = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/cscTitanGolemPlains.asset").WaitForCompletion(); TitanGooLake = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/cscTitanGooLake.asset").WaitForCompletion(); Vagrant = Addressables.LoadAssetAsync((object)"RoR2/Base/Vagrant/cscVagrant.asset").WaitForCompletion(); BeetleQueen = Addressables.LoadAssetAsync((object)"RoR2/Base/BeetleQueen/cscBeetleQueen.asset").WaitForCompletion(); Dunestrider = Addressables.LoadAssetAsync((object)"RoR2/Base/ClayBoss/cscClayBoss.asset").WaitForCompletion(); MagmaWorm = Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/cscMagmaWorm.asset").WaitForCompletion(); ImpOverlord = Addressables.LoadAssetAsync((object)"RoR2/Base/ImpBoss/cscImpBoss.asset").WaitForCompletion(); Grovetender = Addressables.LoadAssetAsync((object)"RoR2/Base/Gravekeeper/cscGravekeeper.asset").WaitForCompletion(); RoboBall = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/cscRoboBallBoss.asset").WaitForCompletion(); Reminder = Addressables.LoadAssetAsync((object)"RoR2/Base/ElectricWorm/cscElectricWorm.asset").WaitForCompletion(); BlindVerminSnowy = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Vermin/cscVerminSnowy.asset").WaitForCompletion(); BlindPestSnowy = Addressables.LoadAssetAsync((object)"RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset").WaitForCompletion(); ClayApothecary = Addressables.LoadAssetAsync((object)"RoR2/DLC1/ClayGrenadier/cscClayGrenadier.asset").WaitForCompletion(); Gup = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/cscGupBody.asset").WaitForCompletion(); Geep = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/cscGeepBody.asset").WaitForCompletion(); XiConstruct = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/cscMegaConstruct.asset").WaitForCompletion(); DirectorCards.Init(); } } } public static class DirectorCards { public static bool initialized; public static DirectorCard AlphaConstructLoop; public static DirectorCard Beetle; public static DirectorCard Lemurian; public static DirectorCard Wisp; public static DirectorCard Jellyfish; public static DirectorCard BlindPestSnowy; public static DirectorCard BlindVerminSnowy; public static DirectorCard Imp; public static DirectorCard Vulture; public static DirectorCard Golem; public static DirectorCard GolemNature; public static DirectorCard BeetleGuard; public static DirectorCard Mushrum; public static DirectorCard ClayApothecary; public static DirectorCard Bison; public static DirectorCard BisonLoop; public static DirectorCard GupLoop; public static DirectorCard Geep; public static DirectorCard Bronzong; public static DirectorCard GreaterWisp; public static DirectorCard TitanBlackBeach; public static DirectorCard TitanDampCave; public static DirectorCard TitanGolemPlains; public static DirectorCard TitanGooLake; public static DirectorCard Vagrant; public static DirectorCard BeetleQueen; public static DirectorCard Dunestrider; public static DirectorCard MagmaWorm; public static DirectorCard MagmaWormLoop; public static DirectorCard ImpOverlord; public static DirectorCard Grovetender; public static DirectorCard RoboBall; public static DirectorCard XiConstructLoop; public static DirectorCard Reminder; public static DirectorCard ReminderLoop; public static DirectorCard LunarGolemSkyMeadow; public static DirectorCard LunarGolemSkyMeadowBasic; public static bool logCardInfo; public static void Init() { if (!initialized) { initialized = true; AlphaConstructLoop = BuildDirectorCard(SpawnCards.AlphaConstruct, 1, 5, (MonsterSpawnDistance)0); Beetle = BuildDirectorCard(SpawnCards.Beetle); Lemurian = BuildDirectorCard(SpawnCards.Lemurian); Wisp = BuildDirectorCard(SpawnCards.Wisp); Jellyfish = BuildDirectorCard(SpawnCards.Jellyfish, 1, 0, (MonsterSpawnDistance)2); BlindPestSnowy = BuildDirectorCard(SpawnCards.BlindPestSnowy); BlindVerminSnowy = BuildDirectorCard(SpawnCards.BlindVerminSnowy); Imp = BuildDirectorCard(SpawnCards.Imp); Vulture = BuildDirectorCard(SpawnCards.Vulture); Golem = BuildDirectorCard(SpawnCards.Golem); GolemNature = BuildDirectorCard(SpawnCards.GolemNature); BeetleGuard = BuildDirectorCard(SpawnCards.BeetleGuard); Mushrum = BuildDirectorCard(SpawnCards.Mushrum); ClayApothecary = BuildDirectorCard(SpawnCards.ClayApothecary); Bison = BuildDirectorCard(SpawnCards.Bison); BisonLoop = BuildDirectorCard(SpawnCards.Bison, 1, 5, (MonsterSpawnDistance)0); GupLoop = BuildDirectorCard(SpawnCards.Gup, 1, 5, (MonsterSpawnDistance)0); Geep = BuildDirectorCard(SpawnCards.Geep); Bronzong = BuildDirectorCard(SpawnCards.Bronzong); GreaterWisp = BuildDirectorCard(SpawnCards.GreaterWisp); TitanBlackBeach = BuildDirectorCard(SpawnCards.TitanBlackBeach); TitanDampCave = BuildDirectorCard(SpawnCards.TitanDampCave); TitanGolemPlains = BuildDirectorCard(SpawnCards.TitanGolemPlains); TitanGooLake = BuildDirectorCard(SpawnCards.TitanGooLake); Vagrant = BuildDirectorCard(SpawnCards.Vagrant); BeetleQueen = BuildDirectorCard(SpawnCards.BeetleQueen); Dunestrider = BuildDirectorCard(SpawnCards.Dunestrider); ImpOverlord = BuildDirectorCard(SpawnCards.ImpOverlord); Grovetender = BuildDirectorCard(SpawnCards.Grovetender); RoboBall = BuildDirectorCard(SpawnCards.RoboBall); MagmaWorm = BuildDirectorCard(SpawnCards.MagmaWorm); MagmaWormLoop = BuildDirectorCard(SpawnCards.MagmaWorm, 1, 5, (MonsterSpawnDistance)0); Reminder = BuildDirectorCard(SpawnCards.Reminder); ReminderLoop = BuildDirectorCard(SpawnCards.Reminder, 1, 5, (MonsterSpawnDistance)0); XiConstructLoop = BuildDirectorCard(SpawnCards.XiConstruct, 1, 5, (MonsterSpawnDistance)0); } } public static DirectorCard BuildDirectorCard(CharacterSpawnCard spawnCard) { return BuildDirectorCard(spawnCard, 1, 0, (MonsterSpawnDistance)0); } public static DirectorCard BuildDirectorCard(CharacterSpawnCard spawnCard, int weight, int minStages, MonsterSpawnDistance spawnDistance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown return new DirectorCard { spawnCard = (SpawnCard)(object)spawnCard, selectionWeight = weight, preventOverhead = false, minimumStageCompletions = minStages, spawnDistance = spawnDistance, forbiddenUnlockableDef = null, requiredUnlockableDef = null }; } } } namespace RiskyMod.Enemies.Spawnpools { public class DampCaveSimple { public static bool enabled = true; public DampCaveSimple() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/dampcave/dccsDampCaveMonstersDLC1.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection2 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/itdampcave/dccsITDampCaveMonsters.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Gup, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.Gup, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } public class DistantRoost { public static bool enabled = true; public DistantRoost() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/blackbeach/dccsBlackBeachMonsters.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Jellyfish, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Wisp, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Jellyfish, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); DirectorCardCategorySelection categorySelection2 = Addressables.LoadAssetAsync((object)"RoR2/Base/blackbeach/dccsBlackBeachMonsters.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection2, DirectorCards.AlphaConstructLoop, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection2, DirectorCards.XiConstructLoop, global::SneedUtils.SneedUtils.MonsterCategories.Champions); } } } public class FrozenWall { public FrozenWall() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/frozenwall/dccsFrozenWallMonsters.asset").WaitForCompletion(); if (EnemiesCore.spawnpoolDLCReplacementFix) { global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Wisp, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); } } } public class GooLake { public static bool enabled = true; public GooLake() { //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_0032: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/goolake/dccsGooLakeMonsters.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection2 = Addressables.LoadAssetAsync((object)"RoR2/Base/goolake/dccsGooLakeMonstersDLC1.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection3 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/itgoolake/dccsITGooLakeMonsters.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.MagmaWormLoop, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.ReminderLoop, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection3, DirectorCards.MagmaWormLoop, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection3, DirectorCards.ReminderLoop, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.ClayApothecary, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection2, DirectorCards.ClayApothecary, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } public class HelminthRoost { public static bool enabled = true; public HelminthRoost() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/DLC2/helminthroost/dccsHelminthRoostMonstersDLC2Only.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/helminthroost/dccsHelminthRoostMonsters.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.Gup, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); if (DirectorCards.LunarGolemSkyMeadow != null) { global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.LunarGolemSkyMeadow, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } } public class Lakes { public static bool enabled = true; public Lakes() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakes/dccsLakesMonstersDLC1.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.GupLoop, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } public class LakesNight { public static bool enabled = true; public LakesNight() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (enabled) { List cardList = new List { (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/cscLemurianBruiser.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Parent/cscParent.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Nullifier/cscNullifier.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/cscGupBody.asset").WaitForCompletion() }; DirectorCardCategorySelection dccs = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakesnight/dccsLakesnightMonsters.asset").WaitForCompletion(); DirectorCardCategorySelection dccs2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakesnight/dccsLakesnightMonsters_DLC1.asset").WaitForCompletion(); ModifyCards(dccs, cardList); ModifyCards(dccs2, cardList); } } private void ModifyCards(DirectorCardCategorySelection dccs, List cardList) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Category[] categories = dccs.categories; foreach (Category val in categories) { DirectorCard[] cards = val.cards; foreach (DirectorCard val2 in cards) { if (val2.minimumStageCompletions < 3 && cardList.Contains(val2.spawnCard)) { val2.minimumStageCompletions = 3; } } } int num = global::SneedUtils.SneedUtils.FindCategoryIndexByName(dccs, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); if (num == -1) { num = global::SneedUtils.SneedUtils.FindCategoryIndexByName(dccs, "Mini Bosses"); } if (num != -1) { dccs.AddCard(num, DirectorCards.GolemNature); } } } public class SirensCall { public static bool enabled = true; public SirensCall() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (enabled) { ApplyChanges(Addressables.LoadAssetAsync((object)"RoR2/Base/shipgraveyard/dccsShipgraveyardMonsters.asset").WaitForCompletion()); } } private void ApplyChanges(DirectorCardCategorySelection dccs) { global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(dccs, DirectorCards.Reminder, global::SneedUtils.SneedUtils.MonsterCategories.Champions); if (EnemiesCore.spawnpoolDLCReplacementFix) { global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(dccs, (SpawnCard)(object)SpawnCards.Beetle, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); } } } public class SkyMeadow { public static bool enabled = true; public SkyMeadow() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //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) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/skymeadow/dccsSkyMeadowMonsters.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection2 = Addressables.LoadAssetAsync((object)"RoR2/Base/skymeadow/dccsSkyMeadowMonstersDLC1.asset").WaitForCompletion(); DirectorCardCategorySelection val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsSkyMeadowMonstersDLC2.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection3 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/itskymeadow/dccsITSkyMeadowMonsters.asset").WaitForCompletion(); DirectorCardCategorySelection val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/itskymeadow/dccsITSkyMeadowMonstersDLC2.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Mushrum, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Bronzong, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection3, (SpawnCard)(object)SpawnCards.Mushrum, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection3, (SpawnCard)(object)SpawnCards.Bronzong, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Jellyfish, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Imp, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection3, DirectorCards.Jellyfish, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection3, DirectorCards.Imp, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); if (DirectorCards.LunarGolemSkyMeadow != null) { global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.LunarGolemSkyMeadow, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection3, DirectorCards.LunarGolemSkyMeadow, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.AlphaConstruct, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.XiConstruct, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.Gup, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection3, (SpawnCard)(object)SpawnCards.AlphaConstruct, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection3, (SpawnCard)(object)SpawnCards.XiConstruct, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection3, (SpawnCard)(object)SpawnCards.Gup, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } public class SnowyForest { public static bool enabled = true; public SnowyForest() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/DLC1/snowyforest/dccsSnowyForestMonstersDLC1.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.BlindVerminSnowy, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Beetle, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Wisp, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.BlindVerminSnowy, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Bison, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } public class StadiaJungle { public static bool enabled = true; public StadiaJungle() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/rootjungle/dccsRootJungleMonsters.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Lemurian, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Mushrum, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Dunestrider, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Vulture, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Mushrum, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Grovetender, global::SneedUtils.SneedUtils.MonsterCategories.Champions); if (EnemiesCore.spawnpoolDLCReplacementFix) { global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.LemurianBruiser, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } } public class TitanicPlains { public static bool enabled = true; public TitanicPlains() { //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_0032: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/golemplains/dccsGolemplainsMonsters.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection2 = Addressables.LoadAssetAsync((object)"RoR2/Base/golemplains/dccsGolemplainsMonstersDLC1.asset").WaitForCompletion(); DirectorCardCategorySelection categorySelection3 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/itgolemplains/dccsITGolemplainsMonsters.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Jellyfish, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection3, (SpawnCard)(object)SpawnCards.Jellyfish, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.AlphaConstruct, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection2, (SpawnCard)(object)SpawnCards.XiConstruct, global::SneedUtils.SneedUtils.MonsterCategories.Champions); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.BisonLoop, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection3, DirectorCards.Bison, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); } } } public class VillageNight { public static bool enabled = true; public VillageNight() { //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) if (enabled) { List cardList = new List { (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/cscLemurianBruiser.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Parent/cscParent.asset").WaitForCompletion(), (SpawnCard)(object)Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/cscGrandparent.asset").WaitForCompletion() }; ModifyCards(Addressables.LoadAssetAsync((object)"RoR2/DLC2/villagenight/dccsVillageNightMonsters_Additional.asset").WaitForCompletion(), cardList); } } private void ModifyCards(DirectorCardCategorySelection dccs, List cardList) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Category[] categories = dccs.categories; foreach (Category val in categories) { DirectorCard[] cards = val.cards; foreach (DirectorCard val2 in cards) { if (val2.minimumStageCompletions < 3 && cardList.Contains(val2.spawnCard)) { val2.minimumStageCompletions = 3; } } } } } public class Wetland { public static bool enabled = true; public Wetland() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { DirectorCardCategorySelection categorySelection = Addressables.LoadAssetAsync((object)"RoR2/Base/foggyswamp/dccsFoggySwampMonstersDLC.asset").WaitForCompletion(); global::SneedUtils.SneedUtils.RemoveMonsterSpawnCardFromCategory(categorySelection, (SpawnCard)(object)SpawnCards.Gup, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.GupLoop, global::SneedUtils.SneedUtils.MonsterCategories.Minibosses); global::SneedUtils.SneedUtils.AddMonsterDirectorCardToCategory(categorySelection, DirectorCards.Geep, global::SneedUtils.SneedUtils.MonsterCategories.BasicMonsters); } } } } namespace RiskyMod.Enemies.Mobs { public class Bison { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_2; public static Func <>9__2_1; public static Manipulator <>9__2_0; internal void <.ctor>b__2_0(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)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "snowyMaterial") })) { val.EmitDelegate>((Func)delegate(Material snowyMaterial) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && !SnowyStageList.Contains(sceneDefForCurrentScene.baseSceneName)) { snowyMaterial = null; } return snowyMaterial; }); } else { Debug.LogError((object)"RiskyMod: Bison IL Hook failed"); } } internal bool <.ctor>b__2_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "snowyMaterial"); } internal Material <.ctor>b__2_1(Material snowyMaterial) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && !SnowyStageList.Contains(sceneDefForCurrentScene.baseSceneName)) { snowyMaterial = null; } return snowyMaterial; } } public static bool enabled = true; public static List SnowyStageList = new List { "snowyforest", "itsnowyforest", "frozenwall", "itfrozenwall" }; public Bison() { //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_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_006d: Expected O, but got Unknown if (!enabled) { return; } CharacterBody component = Addressables.LoadAssetAsync((object)"RoR2/Base/Bison/BisonBody.prefab").WaitForCompletion().GetComponent(); component.baseDamage = 15f; component.levelDamage = component.baseDamage * 0.2f; object obj = <>c.<>9__2_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "snowyMaterial") })) { val2.EmitDelegate>((Func)delegate(Material snowyMaterial) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && !SnowyStageList.Contains(sceneDefForCurrentScene.baseSceneName)) { snowyMaterial = null; } return snowyMaterial; }); } else { Debug.LogError((object)"RiskyMod: Bison IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } SpawnState.OnEnter += (Manipulator)obj; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Bison/EntityStates.Bison.Charge.asset", "chargeMovementSpeedCoefficient", "12"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Bison/EntityStates.Bison.Charge.asset", "turnSpeed", "600"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Bison/EntityStates.Bison.Charge.asset", "selfStunDuration", "1"); } } public class GreaterWisp { public static bool enabled = true; public GreaterWisp() { if (enabled) { ChangeFalloff(); } } private void ChangeFalloff() { //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_001d: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/GreaterWisp/WispCannon.prefab").WaitForCompletion(); ProjectileImpactExplosion component = val.GetComponent(); ((ProjectileExplosion)component).falloffModel = (FalloffModel)2; } } public class HermitCrab { public static bool enabled = true; public HermitCrab() { if (enabled) { } } } public class Imp { public static bool enabled = true; public Imp() { if (enabled) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Imp/EntityStates.ImpMonster.DoubleSlash.asset", "walkSpeedPenaltyCoefficient", "1"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Imp/EntityStates.ImpMonster.DoubleSlash.asset", "selfForce", "1600"); } } } public class Jellyfish { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_2; public static Func <>9__2_1; public static Manipulator <>9__2_0; internal void b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) blastAttack.falloffModel = (FalloffModel)2; return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Jellyfish IL Hook failed"); } } internal bool b__2_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "Fire"); } internal BlastAttack b__2_1(BlastAttack blastAttack) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) blastAttack.falloffModel = (FalloffModel)2; return blastAttack; } } public static bool enabled = true; public Jellyfish() { if (enabled) { ChangeFalloff(); } } private void ChangeFalloff() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__2_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val2.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) blastAttack.falloffModel = (FalloffModel)2; return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Jellyfish IL Hook failed"); } }; <>c.<>9__2_0 = val; obj = (object)val; } JellyNova.Detonate += (Manipulator)obj; } } public class Lemurian { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_FixedUpdate <>9__1_0; internal void <.ctor>b__1_0(orig_FixedUpdate orig, Bite self) { //IL_0057: 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) bool hasBit = self.hasBit; orig.Invoke(self); if (((EntityState)self).isAuthority && hasBit != self.hasBit && Object.op_Implicit((Object)(object)((EntityState)self).characterDirection) && global::SneedUtils.SneedUtils.ShouldRunInfernoChange() && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.TakeDamageForce(((EntityState)self).characterDirection.forward * 1400f, true, false); } } } public static bool enabled = true; public Lemurian() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!enabled) { return; } object obj = <>c.<>9__1_0; if (obj == null) { hook_FixedUpdate val = delegate(orig_FixedUpdate orig, Bite self) { //IL_0057: 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) bool hasBit = self.hasBit; orig.Invoke(self); if (((EntityState)self).isAuthority && hasBit != self.hasBit && Object.op_Implicit((Object)(object)((EntityState)self).characterDirection) && global::SneedUtils.SneedUtils.ShouldRunInfernoChange() && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { ((EntityState)self).healthComponent.TakeDamageForce(((EntityState)self).characterDirection.forward * 1400f, true, false); } }; <>c.<>9__1_0 = val; obj = (object)val; } Bite.FixedUpdate += (hook_FixedUpdate)obj; } } public class Mushrum { public static bool enabled = true; public static GameObject modifiedProjectile; public static GameObject modifiedGas; public Mushrum() { if (enabled) { ReduceProcCoefficient(); } } private void ReduceProcCoefficient() { //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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) modifiedGas = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/MiniMushroom/SporeGrenadeProjectileDotZone.prefab").WaitForCompletion(), "RiskyModMushrumProjectileDotZone", true); ProjectileDotZone component = modifiedGas.GetComponent(); component.overlapProcCoefficient = 0.2f; modifiedProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/MiniMushroom/SporeGrenadeProjectile.prefab").WaitForCompletion(), "RiskyModMushrumProjectile", true); ProjectileImpactExplosion component2 = modifiedProjectile.GetComponent(); ((ProjectileExplosion)component2).childrenProjectilePrefab = modifiedGas; global::RiskyMod.Content.Content.projectilePrefabs.Add(modifiedGas); global::RiskyMod.Content.Content.projectilePrefabs.Add(modifiedProjectile); } } public class Parent { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_2; public static Func <>9__3_1; public static Manipulator <>9__3_0; internal void b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) blastAttack.falloffModel = (FalloffModel)2; DamageAPI.AddModdedDamageType(blastAttack, SharedDamageTypes.SweetSpotModifier); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Parent IL Hook failed"); } } internal bool b__3_2(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "Fire"); } internal BlastAttack b__3_1(BlastAttack blastAttack) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) blastAttack.falloffModel = (FalloffModel)2; DamageAPI.AddModdedDamageType(blastAttack, SharedDamageTypes.SweetSpotModifier); return blastAttack; } } public static bool enabled = true; public Parent() { if (enabled) { SlamFalloff(); } } private void EnableStuns() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Parent/ParentBody.prefab").WaitForCompletion(); SetStateOnHurt component = val.GetComponent(); component.canBeHitStunned = true; component.canBeStunned = true; EntityStateMachine val2 = null; EntityStateMachine[] components = val.GetComponents(); EntityStateMachine[] array = components; foreach (EntityStateMachine val3 in array) { string customName = val3.customName; string text = customName; if (text == "Weapon") { val2 = val3; } } if (Object.op_Implicit((Object)(object)val2)) { component.idleStateMachine = (EntityStateMachine[])(object)new EntityStateMachine[1] { val2 }; } } private void SlamFalloff() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__3_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "Fire") })) { val2.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) blastAttack.falloffModel = (FalloffModel)2; DamageAPI.AddModdedDamageType(blastAttack, SharedDamageTypes.SweetSpotModifier); return blastAttack; }); } else { Debug.LogError((object)"RiskyMod: Parent IL Hook failed"); } }; <>c.<>9__3_0 = val; obj = (object)val; } GroundSlam.FixedUpdate += (Manipulator)obj; } } public class VoidReaver { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_TakeDamageProcess <>9__3_0; internal void <.ctor>b__3_0(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo); if (NetworkServer.active && !damageInfo.rejected && DamageAPI.HasModdedDamageType(damageInfo, ExtraNullify)) { self.body.AddTimedBuff(Buffs.NullifyStack, 8f); } } } public static bool enabled = true; public static ModdedDamageType ExtraNullify; public static GameObject NullifierPreBombProjectileModded; public VoidReaver() { //IL_0019: 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_004d: 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_007b: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown if (!enabled) { return; } ExtraNullify = DamageAPI.ReserveDamageType(); object obj = <>c.<>9__3_0; if (obj == null) { hook_TakeDamageProcess val = delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo); if (NetworkServer.active && !damageInfo.rejected && DamageAPI.HasModdedDamageType(damageInfo, ExtraNullify)) { self.body.AddTimedBuff(Buffs.NullifyStack, 8f); } }; <>c.<>9__3_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)obj; NullifierPreBombProjectileModded = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Nullifier/NullifierPreBombProjectile.prefab").WaitForCompletion(), "RiskyModNullifierPreBombProjectile", true); ProjectileDamage component = NullifierPreBombProjectileModded.GetComponent(); DamageAPI.AddModdedDamageType(ref component.damageType, ExtraNullify); global::RiskyMod.Content.Content.projectilePrefabs.Add(NullifierPreBombProjectileModded); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Nullifier/EntityStates.NullifierMonster.FirePortalBomb.asset", "portalBombProjectileEffect", (Object)(object)NullifierPreBombProjectileModded); } } } namespace RiskyMod.Enemies.Mobs.Lunar { public class LunarExploder { public static bool enabled = true; public static GameObject modifiedFirePool; public LunarExploder() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { modifiedFirePool = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/LunarExploder/LunarExploderProjectileDotZone.prefab").WaitForCompletion(), "RiskyModLunarExploderProjectileDotZone", true); ProjectileDotZone component = modifiedFirePool.GetComponent(); component.overlapProcCoefficient = 0.2f; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/LunarExploder/EntityStates.LunarExploderMonster.DeathState.asset", "projectilePrefab", (Object)(object)modifiedFirePool); global::RiskyMod.Content.Content.projectilePrefabs.Add(modifiedFirePool); } } } public class LunarWisp { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnFireAuthority <>9__6_0; internal void b__6_0(orig_OnFireAuthority orig, FireLunarGuns self) { //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_004b: 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_0057: Unknown result type (might be due to invalid IL or missing references) self.UpdateCrits(); bool flag = !((FixedTimeStamp)(ref self.critEndTime)).hasPassed; float num = FireLunarGuns.baseDamagePerSecondCoefficient / self.baseBulletsPerSecond * ((BaseState)self).damageStat; ((BaseState)self).StartAimMode(0.5f, false); Ray aimRay = ((BaseState)self).GetAimRay(); ProjectileManager.instance.FireProjectile(shardProjectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, num, 0f, flag, (DamageColorIndex)0, (GameObject)null, 150f, (DamageTypeCombo?)null); } } public static bool enabled = true; public static bool disableProjectileOnKill = true; public static bool removeHitscan = true; public static GameObject shardProjectilePrefab; public LunarWisp() { if (enabled && removeHitscan) { RemoveHitscan(); } ModifyProjectile(); } private void ModifyProjectile() { //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_0048: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/LunarWisp/LunarWispTrackingBomb.prefab").WaitForCompletion(); if (disableProjectileOnKill) { HealthComponent component = val.GetComponent(); component.globalDeathEventChanceCoefficient = 0f; } if (enabled) { ProjectileImpactExplosion component2 = val.GetComponent(); ((ProjectileExplosion)component2).falloffModel = (FalloffModel)2; } } private void RemoveHitscan() { //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_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_0094: Expected O, but got Unknown shardProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/LunarShardProjectile.prefab").WaitForCompletion(), "RiskyModLunarWispShardProjectile", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(shardProjectilePrefab); ProjectileImpactExplosion component = shardProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((ProjectileExplosion)component).blastDamageCoefficient = 1f; } ProjectileDirectionalTargetFinder component2 = shardProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.lookCone = 15f; } object obj = <>c.<>9__6_0; if (obj == null) { hook_OnFireAuthority val = delegate(orig_OnFireAuthority orig, FireLunarGuns self) { //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_004b: 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_0057: Unknown result type (might be due to invalid IL or missing references) self.UpdateCrits(); bool flag = !((FixedTimeStamp)(ref self.critEndTime)).hasPassed; float num = FireLunarGuns.baseDamagePerSecondCoefficient / self.baseBulletsPerSecond * ((BaseState)self).damageStat; ((BaseState)self).StartAimMode(0.5f, false); Ray aimRay = ((BaseState)self).GetAimRay(); ProjectileManager.instance.FireProjectile(shardProjectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, num, 0f, flag, (DamageColorIndex)0, (GameObject)null, 150f, (DamageTypeCombo?)null); }; <>c.<>9__6_0 = val; obj = (object)val; } FireLunarGuns.OnFireAuthority += (hook_OnFireAuthority)obj; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/LunarWisp/EntityStates.LunarWisp.FireLunarGuns.asset", "baseFireInterval", "0.125"); } } } namespace RiskyMod.Enemies.Mithrix { public class MithrixCore { public static bool enabled = true; public static BodyIndex brotherBodyIndex; public static BodyIndex brotherHurtBodyIndex; public MithrixCore() { RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); if (enabled) { new MithrixTargetPrioritization(); new MithrixFreezeImmune(); new MithrixHealthBuff(); } } private void OnLoad() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) brotherBodyIndex = BodyCatalog.FindBodyIndex("BrotherBody"); brotherHurtBodyIndex = BodyCatalog.FindBodyIndex("BrotherHurtBody"); } } public class MithrixDebuffResist { public static bool enabled = true; public MithrixDebuffResist() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); } } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.bodyIndex != MithrixCore.brotherBodyIndex) { return; } if (self.moveSpeed > 0f) { float num = self.baseMoveSpeed; if (self.isSprinting) { num *= self.sprintingSpeedMultiplier; } if (self.moveSpeed < num) { self.moveSpeed = Mathf.Lerp(self.moveSpeed, num, 0.5f); } } if (self.attackSpeed > 0f && self.attackSpeed < 1f) { self.attackSpeed = Mathf.Lerp(self.attackSpeed, 1f, 0.5f); } } } public class MithrixFreezeImmune { public static bool enabled; public MithrixFreezeImmune() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/BrotherBody.prefab").WaitForCompletion(); SetStateOnHurt component = val.GetComponent(); component.canBeFrozen = false; } } } public class MithrixHealthBuff { public static bool enabled = true; public MithrixHealthBuff() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (enabled) { CharacterBody component = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/BrotherBody.prefab").WaitForCompletion().GetComponent(); if (component.baseMaxHealth < 1200f) { component.baseMaxHealth = 1200f; component.levelMaxHealth = component.baseMaxHealth * 0.3f; } } } } public class MithrixTargetPrioritization { public static bool enabled = true; public MithrixTargetPrioritization() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (enabled) { global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/BrotherMaster.prefab").WaitForCompletion()); global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/ITBrotherMaster.prefab").WaitForCompletion()); } } } } namespace RiskyMod.Enemies.DLC2 { public class Child { public static bool enabled = true; public Child() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (enabled) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/Child/EntityStates.ChildMonster.FireTrackingSparkBall.asset", "bombDamageCoefficient", "4"); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Child/ChildTrackingSparkBall.prefab").WaitForCompletion(), "RiskyModChildTrackingSparkball", true); ProjectileExplosion component = val.GetComponent(); component.falloffModel = (FalloffModel)2; ProjectileDamage component2 = val.GetComponent(); DamageAPI.AddModdedDamageType(ref component2.damageType, SharedDamageTypes.SweetSpotModifier); global::RiskyMod.Content.Content.projectilePrefabs.Add(val); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/Child/EntityStates.ChildMonster.FireTrackingSparkBall.asset", "projectilePrefab", (Object)(object)val); } } } public class Scorchling { public static bool enabled = true; public Scorchling() { if (enabled) { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/Scorchling/EntityStates.Scorchling.LavaBomb.asset", "mortarDamageCoefficient", "0.8"); } } } } namespace RiskyMod.Enemies.DLC1 { public class BlindPest { public static bool enabled = true; public BlindPest() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Invalid comparison between Unknown and I4 if (!enabled) { return; } GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC1/FlyingVermin/FlyingVerminBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.baseMaxHealth = 60f; component.levelMaxHealth = 18f; component.baseDamage = 15f; component.levelDamage = 3f; global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/DLC1/FlyingVermin/EntityStates.FlyingVermin.Weapon.Spit.asset", "damageCoefficient", "1"); GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/FlyingVermin/FlyingVerminMaster.prefab").WaitForCompletion(); CharacterMaster component2 = val2.GetComponent(); AISkillDriver[] componentsInChildren = ((Component)component2).GetComponentsInChildren(); AISkillDriver[] array = componentsInChildren; foreach (AISkillDriver val3 in array) { if ((int)val3.skillSlot == 0) { val3.maxDistance = 50f; } } BaseAI component3 = val2.GetComponent(); component3.shouldMissFirstOffScreenShot = false; ChangeCost("RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset"); ChangeCost("RoR2/DLC1/FlyingVermin/cscFlyingVermin.asset"); } private void ChangeCost(string addressablePath) { //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) AsyncOperationHandle val = Addressables.LoadAssetAsync((object)"RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset"); val.Completed += BlindPest_Completed; } private void BlindPest_Completed(AsyncOperationHandle handle) { CharacterSpawnCard result = handle.Result; ((SpawnCard)result).directorCreditCost = 20; } } public class VoidInfestor { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__2_3; public static Func <>9__2_2; public static Manipulator <>9__2_0; public static Func <>9__2_7; public static Func <>9__2_4; public static Func <>9__2_8; public static Func <>9__2_5; public static Func <>9__2_9; public static Func <>9__2_6; public static Manipulator <>9__2_1; internal void <.ctor>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RefreshCandidates") })) { val.EmitDelegate>((Func)delegate(BullseyeSearch search) { ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam((TeamIndex)1); return search; }); } else { Debug.LogError((object)"RiskyMod: VoidInfestor Infest.OnEnter IL Hook failed"); } } internal bool <.ctor>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RefreshCandidates"); } internal BullseyeSearch <.ctor>b__2_2(BullseyeSearch search) { ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam((TeamIndex)1); return search; } internal void <.ctor>b__2_1(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: 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_0111: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_isPlayerControlled") })) { val.Emit(OpCodes.Ldloc_3); val.EmitDelegate>((Func)((bool playerControlled, CharacterBody body) => playerControlled || (Object.op_Implicit((Object)(object)body.teamComponent) && (int)body.teamComponent.teamIndex == 1) || body.isBoss)); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "set_teamIndex") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((TeamIndex team, Infest self) => ((BaseState)self).GetTeam())); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "set_teamIndex") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((TeamIndex team, Infest self) => ((BaseState)self).GetTeam())); flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: VoidInfestor Infest.FixedUpdate IL Hook failed"); } } internal bool <.ctor>b__2_7(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "get_isPlayerControlled"); } internal bool <.ctor>b__2_4(bool playerControlled, CharacterBody body) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 return playerControlled || (Object.op_Implicit((Object)(object)body.teamComponent) && (int)body.teamComponent.teamIndex == 1) || body.isBoss; } internal bool <.ctor>b__2_8(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "set_teamIndex"); } internal TeamIndex <.ctor>b__2_5(TeamIndex team, Infest self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) return ((BaseState)self).GetTeam(); } internal bool <.ctor>b__2_9(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "set_teamIndex"); } internal TeamIndex <.ctor>b__2_6(TeamIndex team, Infest self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) return ((BaseState)self).GetTeam(); } } public static bool enabled = true; public static bool noVoidAllies = true; public VoidInfestor() { //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_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_007b: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown if (!enabled) { return; } GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC1/EliteVoid/VoidInfestorBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.baseMaxHealth = 30f; component.levelMaxHealth = component.baseMaxHealth * 0.3f; if (!noVoidAllies) { return; } object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val2 = 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 val5 = new ILCursor(il); if (val5.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RefreshCandidates") })) { val5.EmitDelegate>((Func)delegate(BullseyeSearch search) { ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam((TeamIndex)1); return search; }); } else { Debug.LogError((object)"RiskyMod: VoidInfestor Infest.OnEnter IL Hook failed"); } }; <>c.<>9__2_0 = val2; obj = (object)val2; } Infest.OnEnter += (Manipulator)obj; object obj2 = <>c.<>9__2_1; if (obj2 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: 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_0111: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val4 = new ILCursor(il); if (val4.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_isPlayerControlled") })) { val4.Emit(OpCodes.Ldloc_3); val4.EmitDelegate>((Func)((bool playerControlled, CharacterBody body) => playerControlled || (Object.op_Implicit((Object)(object)body.teamComponent) && (int)body.teamComponent.teamIndex == 1) || body.isBoss)); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "set_teamIndex") })) { val4.Emit(OpCodes.Ldarg_0); val4.EmitDelegate>((Func)((TeamIndex team, Infest self) => ((BaseState)self).GetTeam())); if (val4.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "set_teamIndex") })) { val4.Emit(OpCodes.Ldarg_0); val4.EmitDelegate>((Func)((TeamIndex team, Infest self) => ((BaseState)self).GetTeam())); flag = false; } } } if (flag) { Debug.LogError((object)"RiskyMod: VoidInfestor Infest.FixedUpdate IL Hook failed"); } }; <>c.<>9__2_1 = val3; obj2 = (object)val3; } Infest.FixedUpdate += (Manipulator)obj2; } } public class XiConstruct { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__2_0; public static hook_OnEnter <>9__2_1; public static hook_OnEnter <>9__2_2; internal void <.ctor>b__2_0(orig_OnEnter orig, ChargeLaser self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(VulnerableDebuff, self.duration + 0.4f); } } internal void <.ctor>b__2_1(orig_OnEnter orig, FireLaser self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(VulnerableDebuff, self.duration + 0.4f); } } internal void <.ctor>b__2_2(orig_OnEnter orig, TerminateLaser self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(VulnerableDebuff, self.duration + 0.4f); } } } public static bool enabled = true; public static BuffDef VulnerableDebuff; public XiConstruct() { //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_0031: 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_0057: 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_00b3: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown if (!enabled) { return; } BuffDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/ArmorReductionOnHit/bdPulverized.asset").WaitForCompletion(); GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MegaConstructBody.prefab").WaitForCompletion(); VulnerableDebuff = global::SneedUtils.SneedUtils.CreateBuffDef("RiskyModXiConstructVulnerableDebuff", canStack: false, isCooldown: false, isDebuff: false, new Color(42f / 85f, 111f / 170f, 0.6741176f), val.iconSprite); if (SoftDependencies.LinearDamageLoaded) { ModifyFinalDamage.ModifyFinalDamageActions = (ModifyFinalDamageDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageActions, (Delegate?)new ModifyFinalDamageDelegate(ModifyfinalDamage_Additive)); } else { ModifyFinalDamage.ModifyFinalDamageActions = (ModifyFinalDamageDelegate)Delegate.Combine((Delegate?)(object)ModifyFinalDamage.ModifyFinalDamageActions, (Delegate?)new ModifyFinalDamageDelegate(ModifyfinalDamage)); } object obj = <>c.<>9__2_0; if (obj == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, ChargeLaser self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(VulnerableDebuff, self.duration + 0.4f); } }; <>c.<>9__2_0 = val3; obj = (object)val3; } ChargeLaser.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__2_1; if (obj2 == null) { hook_OnEnter val4 = delegate(orig_OnEnter orig, FireLaser self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(VulnerableDebuff, self.duration + 0.4f); } }; <>c.<>9__2_1 = val4; obj2 = (object)val4; } FireLaser.OnEnter += (hook_OnEnter)obj2; object obj3 = <>c.<>9__2_2; if (obj3 == null) { hook_OnEnter val5 = delegate(orig_OnEnter orig, TerminateLaser self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(VulnerableDebuff, self.duration + 0.4f); } }; <>c.<>9__2_2 = val5; obj3 = (object)val5; } TerminateLaser.OnEnter += (hook_OnEnter)obj3; } private void ModifyfinalDamage(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (victimBody.HasBuff(VulnerableDebuff)) { damageModifierArgs.damageMultFinal *= 1.5f; if ((int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)5; } } } private void ModifyfinalDamage_Additive(DamageModifierArgs damageModifierArgs, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (victimBody.HasBuff(VulnerableDebuff)) { damageModifierArgs.damageMultAdd += 0.5f; if ((int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)5; } } } } } namespace RiskyMod.Enemies.DLC1.Voidling { public class VoidlingCore { public static bool enabled = true; public VoidlingCore() { if (enabled) { new VoidlingTargetPrioritization(); new VoidlingStats(); } } } public class VoidlingStats { public static bool modifyHP = true; public VoidlingStats() { //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_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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) if (modifyHP) { SetHP(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyBase.prefab").WaitForCompletion().GetComponent()); SetHP(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase1.prefab").WaitForCompletion().GetComponent()); SetHP(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase2.prefab").WaitForCompletion().GetComponent()); SetHP(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase3.prefab").WaitForCompletion().GetComponent()); } } private void SetHP(CharacterBody cb) { cb.baseMaxHealth = 1400f; cb.levelMaxHealth = 420f; } } public class VoidlingTargetPrioritization { public static bool enabled = true; public VoidlingTargetPrioritization() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (enabled) { global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterBase.prefab").WaitForCompletion()); global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase1.prefab").WaitForCompletion()); global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase2.prefab").WaitForCompletion()); global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase3.prefab").WaitForCompletion()); } } } } namespace RiskyMod.Enemies.Bosses { public class Aurelionite { public static bool modifyStats = true; public static bool enabled = true; public Aurelionite() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (modifyStats) { GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/TitanGoldBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.baseDamage = 60f; component.levelDamage = component.baseDamage * 0.2f; } if (enabled) { ModifyAI(); } } private void ModifyAI() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_0053: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/TitanGoldMaster.prefab").WaitForCompletion(); BaseAI component = val.GetComponent(); AISkillDriver[] components = val.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { if ((int)val2.skillSlot == 3) { val2.maxDistance = 200f; val2.aimType = (AimType)2; } } } } public class AWU { public static bool enabled = true; public AWU() { if (enabled) { ModifyStats(); } } private void ModifyStats() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/SuperRoboBallBossBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.baseDamage = 25f; component.levelDamage = component.baseDamage * 0.2f; } } public class BeetleQueen { public static bool enabled = true; public static BuffDef BeetleBuff; public static BodyIndex BeetleBodyIndex; public static BodyIndex BeetleGuardBodyIndex; public static BodyIndex BeetleGuardAllyBodyIndex; public static SpawnCard BeetleCard; public static SpawnCard BeetleGuardCard; public BeetleQueen() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown if (enabled) { ModifyProjectile(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ModifyBeetleJuice); } } private void ModifyProjectile() { //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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/BeetleQueen/BeetleQueenAcid.prefab").WaitForCompletion(), "RiskyMod_BeetleQueenAcid", true); val.transform.localScale = 2f * Vector3.one; ProjectileDotZone component = val.GetComponent(); component.overlapProcCoefficient = 0.3f; component.resetFrequency = 5f; component.lifetime = 25f; global::RiskyMod.Content.Content.projectilePrefabs.Add(val); GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/BeetleQueen/BeetleQueenSpit.prefab").WaitForCompletion(), "RiskyMod_BeetleQueenSpit", true); ProjectileImpactExplosion component2 = val2.GetComponent(); ((ProjectileExplosion)component2).blastRadius = 6f; ((ProjectileExplosion)component2).childrenDamageCoefficient = 0.1f; ((ProjectileExplosion)component2).childrenProjectilePrefab = val; global::RiskyMod.Content.Content.projectilePrefabs.Add(val2); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/BeetleQueen/EntityStates.BeetleQueenMonster.FireSpit.asset", "projectilePrefab", (Object)(object)val2); } private static void ModifyBeetleJuice(CharacterBody sender, StatHookEventArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) int buffCount = sender.GetBuffCount(Buffs.BeetleJuice.buffIndex); if (buffCount > 0) { args.armorAdd += (float)buffCount * -5f; } } } public class Gravekeeper { public static bool disableProjectileOnKill = true; public Gravekeeper() { if (disableProjectileOnKill) { RemoveGrovetenderWispOnKill(); } } private void RemoveGrovetenderWispOnKill() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Gravekeeper/GravekeeperTrackingFireball.prefab").WaitForCompletion(); HealthComponent component = val.GetComponent(); component.globalDeathEventChanceCoefficient = 0f; } } public class SCU { public static bool enabled = true; public SCU() { if (enabled) { ModifyAI(); ModifyStats(); } } private void ModifyAI() { //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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/RoboBallBossMaster.prefab").WaitForCompletion(); AISkillDriver[] components = val.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { if ((int)val2.skillSlot == 3 && val2.maxUserHealthFraction < 0.4f) { val2.maxUserHealthFraction = 0.4f; } } } private void ModifyStats() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/RoboBallBossBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.baseDamage = 25f; component.levelDamage = component.baseDamage * 0.2f; } } public class Titan { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__5_3; public static Func <>9__5_1; public static Func <>9__5_4; public static Func <>9__5_2; public static Manipulator <>9__5_0; public static hook_PlacePredictedAttack <>9__7_0; public static hook_Fire <>9__8_0; internal void b__5_0(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: 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) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "fireFrequency") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((float freq, FireMegaLaser self) => freq * ((BaseState)self).attackSpeedStat)); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "fireFrequency") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((float freq, FireMegaLaser self) => freq * ((BaseState)self).attackSpeedStat)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Titan MegaLaserAttackSpeed IL Hook failed"); } } internal bool b__5_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "fireFrequency"); } internal float b__5_1(float freq, FireMegaLaser self) { return freq * ((BaseState)self).attackSpeedStat; } internal bool b__5_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "fireFrequency"); } internal float b__5_2(float freq, FireMegaLaser self) { return freq * ((BaseState)self).attackSpeedStat; } internal void b__7_0(orig_PlacePredictedAttack orig, FireFist self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_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_008d: 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_00bd: 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_00b9: Unknown result type (might be due to invalid IL or missing references) int num = 3; float num2 = 10f; float num3 = 0.1f; int num4 = 0; Vector3 predictedTargetPosition = self.predictedTargetPosition; Vector3 val = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f) * Vector3.forward; RaycastHit val3 = default(RaycastHit); for (int i = -(num / 2); i < num / 2; i++) { Vector3 val2 = predictedTargetPosition + val * num2 * (float)i; float num5 = 60f; if (Physics.Raycast(new Ray(val2 + Vector3.up * (num5 / 2f), Vector3.down), ref val3, num5, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { val2 = ((RaycastHit)(ref val3)).point; } self.PlaceSingleDelayBlast(val2, num3 * (float)num4); num4++; } } internal void b__8_0(orig_Fire orig, TitanRockController self) { //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) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)self.ownerCharacterBody) || !Object.op_Implicit((Object)(object)self.ownerCharacterBody.teamComponent)) { orig.Invoke(self); } else if (NetworkServer.active) { Vector3 val = Vector3.down; if (Object.op_Implicit((Object)(object)self.ownerInputBank)) { Ray aimRay = self.ownerInputBank.GetAimRay(); val = ((Ray)(ref aimRay)).direction; } BullseyeSearch val2 = new BullseyeSearch(); val2.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref val2.teamMaskFilter)).RemoveTeam(self.ownerCharacterBody.teamComponent.teamIndex); val2.filterByLoS = true; val2.searchOrigin = self.fireTransform.position; val2.sortMode = (SortMode)1; val2.maxDistanceFilter = 200f; val2.maxAngleFilter = 360f; val2.searchDirection = val; val2.RefreshCandidates(); HurtBox val3 = val2.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val3)) { Vector3 val4 = ((Component)val3).transform.position - self.fireTransform.position; val = ((Vector3)(ref val4)).normalized; } float num = (Object.op_Implicit((Object)(object)self.ownerCharacterBody) ? self.ownerCharacterBody.damage : 1f); ProjectileManager.instance.FireProjectile(self.projectilePrefab, self.fireTransform.position, Util.QuaternionSafeLookRotation(val), self.owner, self.damageCoefficient * num, self.damageForce, self.isCrit, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } } public static bool enabled = true; public static float laserTrackingSpeed = 10f; public Titan() { if (enabled) { FasterAnims(); LaserRework(); ModifyAI(); FistRework(); RockTargeting(); } } private void FasterAnims() { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Titan/EntityStates.TitanMonster.FireFist.asset", "exitDuration", "1.5"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Titan/EntityStates.TitanMonster.RechargeRocks.asset", "baseDuration", "5"); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Titan/EntityStates.TitanMonster.ChargeMegaLaser.asset", "baseDuration", "2"); } private void LaserRework() { global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Titan/EntityStates.TitanMonster.FireMegaLaser.asset", "damageCoefficient", "1.25"); MegaLaserAttackSpeed(); } private void MegaLaserAttackSpeed() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__5_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_0042: 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) bool flag = true; ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "fireFrequency") })) { val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)((float freq, FireMegaLaser self) => freq * ((BaseState)self).attackSpeedStat)); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "fireFrequency") })) { val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)((float freq, FireMegaLaser self) => freq * ((BaseState)self).attackSpeedStat)); flag = false; } } if (flag) { Debug.LogError((object)"RiskyMod: Titan MegaLaserAttackSpeed IL Hook failed"); } }; <>c.<>9__5_0 = val; obj = (object)val; } FireMegaLaser.FixedUpdate += (Manipulator)obj; } private void ModifyAI() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_0053: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/TitanMaster.prefab").WaitForCompletion(); BaseAI component = val.GetComponent(); AISkillDriver[] components = val.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { if ((int)val2.skillSlot == 3) { val2.maxDistance = 200f; val2.aimType = (AimType)2; } } } private void FistRework() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__7_0; if (obj == null) { hook_PlacePredictedAttack val = delegate(orig_PlacePredictedAttack orig, FireFist self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_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_008d: 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_00bd: 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_00b9: Unknown result type (might be due to invalid IL or missing references) int num = 3; float num2 = 10f; float num3 = 0.1f; int num4 = 0; Vector3 predictedTargetPosition = self.predictedTargetPosition; Vector3 val2 = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f) * Vector3.forward; RaycastHit val4 = default(RaycastHit); for (int i = -(num / 2); i < num / 2; i++) { Vector3 val3 = predictedTargetPosition + val2 * num2 * (float)i; float num5 = 60f; if (Physics.Raycast(new Ray(val3 + Vector3.up * (num5 / 2f), Vector3.down), ref val4, num5, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { val3 = ((RaycastHit)(ref val4)).point; } self.PlaceSingleDelayBlast(val3, num3 * (float)num4); num4++; } }; <>c.<>9__7_0 = val; obj = (object)val; } FireFist.PlacePredictedAttack += (hook_PlacePredictedAttack)obj; } private void RockTargeting() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__8_0; if (obj == null) { hook_Fire val = delegate(orig_Fire orig, TitanRockController self) { //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) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)self.ownerCharacterBody) || !Object.op_Implicit((Object)(object)self.ownerCharacterBody.teamComponent)) { orig.Invoke(self); } else if (NetworkServer.active) { Vector3 val2 = Vector3.down; if (Object.op_Implicit((Object)(object)self.ownerInputBank)) { Ray aimRay = self.ownerInputBank.GetAimRay(); val2 = ((Ray)(ref aimRay)).direction; } BullseyeSearch val3 = new BullseyeSearch(); val3.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref val3.teamMaskFilter)).RemoveTeam(self.ownerCharacterBody.teamComponent.teamIndex); val3.filterByLoS = true; val3.searchOrigin = self.fireTransform.position; val3.sortMode = (SortMode)1; val3.maxDistanceFilter = 200f; val3.maxAngleFilter = 360f; val3.searchDirection = val2; val3.RefreshCandidates(); HurtBox val4 = val3.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val4)) { Vector3 val5 = ((Component)val4).transform.position - self.fireTransform.position; val2 = ((Vector3)(ref val5)).normalized; } float num = (Object.op_Implicit((Object)(object)self.ownerCharacterBody) ? self.ownerCharacterBody.damage : 1f); ProjectileManager.instance.FireProjectile(self.projectilePrefab, self.fireTransform.position, Util.QuaternionSafeLookRotation(val2), self.owner, self.damageCoefficient * num, self.damageForce, self.isCrit, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } }; <>c.<>9__8_0 = val; obj = (object)val; } TitanRockController.Fire += (hook_Fire)obj; } } public class Vagrant { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__3_2; public static Func <>9__3_1; public static Manipulator <>9__3_0; internal void b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "attackSpeedStat") })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate>((Func)((float attackSpeed) => 1f)); } else { Debug.LogError((object)"RiskyMod: Vagrant IL Hook failed"); } } internal bool b__3_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "attackSpeedStat"); } internal float b__3_1(float attackSpeed) { return 1f; } } public static bool enabled = true; public static bool disableProjectileOnKill = true; public Vagrant() { if (enabled) { DisableNovaAttackSpeed(); ReduceFalloff(); } if (disableProjectileOnKill) { RemoveTrackingBombOnKill(); } } private void DisableNovaAttackSpeed() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__3_0; 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 val2 = new ILCursor(il); if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "attackSpeedStat") })) { int index = val2.Index; val2.Index = index + 1; val2.EmitDelegate>((Func)((float attackSpeed) => 1f)); } else { Debug.LogError((object)"RiskyMod: Vagrant IL Hook failed"); } }; <>c.<>9__3_0 = val; obj = (object)val; } ChargeMegaNova.OnEnter += (Manipulator)obj; } private void RemoveTrackingBombOnKill() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Vagrant/VagrantTrackingBomb.prefab").WaitForCompletion(); HealthComponent component = val.GetComponent(); component.globalDeathEventChanceCoefficient = 0f; } private void ReduceFalloff() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Vagrant/VagrantTrackingBomb.prefab").WaitForCompletion(), "RiskyModVagrantTrackingBomb", true); ProjectileExplosion component = val.GetComponent(); component.falloffModel = (FalloffModel)2; ProjectileDamage component2 = val.GetComponent(); DamageAPI.AddModdedDamageType(ref component2.damageType, SharedDamageTypes.SweetSpotModifier); global::RiskyMod.Content.Content.projectilePrefabs.Add(val); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Vagrant/EntityStates.VagrantMonster.FireTrackingBomb.asset", "projectilePrefab", (Object)(object)val); GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Vagrant/VagrantCannon.prefab").WaitForCompletion(), "RiskyModVagrantCannon", true); ProjectileExplosion component3 = val2.GetComponent(); component3.falloffModel = (FalloffModel)2; ProjectileDamage component4 = val2.GetComponent(); DamageAPI.AddModdedDamageType(ref component4.damageType, SharedDamageTypes.SweetSpotModifier); global::RiskyMod.Content.Content.projectilePrefabs.Add(val2); global::SneedUtils.SneedUtils.SetAddressableEntityStateField("RoR2/Base/Vagrant/EntityStates.VagrantMonster.Weapon.JellyBarrage.asset", "projectilePrefab", (Object)(object)val2); } } public class Worm { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_SetStanceParameters <>9__6_0; internal void b__6_0(orig_SetStanceParameters orig, SwitchStance self, bool leaping) { orig.Invoke(self, leaping); if (!leaping) { WormBodyPositions2 component = ((EntityState)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.shouldFireMeatballsOnImpact = true; } } } } public static bool enabled = true; public static GameObject MagmaWormProjectile; public static GameObject MagmaWormProjectileZone; public Worm() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (enabled) { ProjectileSetup(); GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/MagmaWormBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent(); component.baseDamage = 15f; component.levelDamage = 0.2f * component.baseDamage; GameObject bodyObject = Addressables.LoadAssetAsync((object)"RoR2/Base/ElectricWorm/ElectricWormBody.prefab").WaitForCompletion(); global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/MagmaWormMaster.prefab").WaitForCompletion()); global::SneedUtils.SneedUtils.SetPrioritizePlayers(Addressables.LoadAssetAsync((object)"RoR2/Base/ElectricWorm/ElectricWormMaster.prefab").WaitForCompletion()); ReduceFollowDelay(val); ReduceFollowDelay(bodyObject); } } private void ProjectileSetup() { //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_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_004f: Unknown result type (might be due to invalid IL or missing references) MagmaWormProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/MagmaOrbProjectile.prefab").WaitForCompletion(), "RiskyMod_MagmaWormProjectile", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(MagmaWormProjectile); ProjectileImpactExplosion component = MagmaWormProjectile.GetComponent(); ((ProjectileExplosion)component).falloffModel = (FalloffModel)0; GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/MagmaWormBody.prefab").WaitForCompletion(); WormBodyPositions2 component2 = val.GetComponent(); component2.meatballProjectile = MagmaWormProjectile; } private void ProjectileSetupUnused() { //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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) MagmaWormProjectileZone = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC1/Molotov/MolotovProjectileDotZone.prefab").WaitForCompletion(), "RiskyMod_MagmaWormProjectileZone", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(MagmaWormProjectileZone); ProjectileDamage component = MagmaWormProjectileZone.GetComponent(); component.damageType = DamageTypeCombo.op_Implicit((DamageType)0); MagmaWormProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/MagmaOrbProjectile.prefab").WaitForCompletion(), "RiskyMod_MagmaWormProjectile", true); global::RiskyMod.Content.Content.projectilePrefabs.Add(MagmaWormProjectile); ProjectileImpactExplosion component2 = MagmaWormProjectile.GetComponent(); ((ProjectileExplosion)component2).fireChildren = true; ((ProjectileExplosion)component2).childrenProjectilePrefab = MagmaWormProjectileZone; ((ProjectileExplosion)component2).childrenDamageCoefficient = 1f; GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/MagmaWormBody.prefab").WaitForCompletion(); WormBodyPositions2 component3 = val.GetComponent(); component3.meatballProjectile = MagmaWormProjectile; } private void AlwaysFireMeatballs() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__6_0; if (obj == null) { hook_SetStanceParameters val = delegate(orig_SetStanceParameters orig, SwitchStance self, bool leaping) { orig.Invoke(self, leaping); if (!leaping) { WormBodyPositions2 component = ((EntityState)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.shouldFireMeatballsOnImpact = true; } } }; <>c.<>9__6_0 = val; obj = (object)val; } SwitchStance.SetStanceParameters += (hook_SetStanceParameters)obj; } private void ReduceFollowDelay(GameObject bodyObject) { WormBodyPositions2 component = bodyObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.followDelay = 0.1f; } } } } namespace RiskyMod.Content { public class Assets { public static class BuffIcons { public static Sprite Infusion; public static Sprite Freeze; public static Sprite RaincoatReady; public static Sprite RaincoatActive; public static Sprite RaincoatCooldown; public static Sprite HeadstomperActive; public static Sprite HeadstomperCooldown; public static Sprite HappiestMaskReady; public static Sprite HappiestMaskCooldown; public static Sprite Watch; public static Sprite Standoff1; public static Sprite Standoff2; public static Sprite Standoff3; public static Sprite Standoff4; public static Sprite Standoff5; } public static class SkillIcons { public static Sprite Bandit2Gunslinger; public static Sprite Bandit2Desperado; public static Sprite Bandit2Standoff; } public static class ScepterSkillIcons { public static Sprite CommandoBarrageScepter; public static Sprite CommandoGrenadeScepter; public static Sprite HuntressArrowRainScepter; public static Sprite LightsOutScepter; public static Sprite RackEmUpScepter; public static Sprite CrocoEpidemicScepter; } public static class MiscSprites { public static Sprite CaptainEquipmentRestockBar; public static Sprite ModIcon; } public static AssetBundle assetBundle; internal static string languageRoot => Path.Combine(assemblyDir, "language"); internal static string assemblyDir => Path.GetDirectoryName(RiskyMod.pluginInfo.Location); public static void Init() { using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("RiskyMod.resources")) { assetBundle = AssetBundle.LoadFromStream(stream); } using (Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("RiskyMod.RiskyMod_Soundbank.bnk")) { byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } LoadSkillIcons(); LoadScepterSkillIcons(); LoadBuffIcons(); LoadMiscSprites(); LoadLanguage(); } private static void LoadLanguage() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Language.SetFolders += new hook_SetFolders(fixme); } private static void fixme(orig_SetFolders orig, Language self, IEnumerable newFolders) { if (Directory.Exists(languageRoot)) { IEnumerable second = Directory.EnumerateDirectories(Path.Combine(languageRoot), self.name); orig.Invoke(self, newFolders.Union(second)); } else { orig.Invoke(self, newFolders); } } private static void LoadBuffIcons() { BuffIcons.Infusion = assetBundle.LoadAsset("BuffInfusion"); BuffIcons.Freeze = assetBundle.LoadAsset("BuffFreeze"); BuffIcons.RaincoatActive = assetBundle.LoadAsset("BuffRaincoatActive"); BuffIcons.RaincoatReady = assetBundle.LoadAsset("BuffRaincoatReady"); BuffIcons.RaincoatCooldown = assetBundle.LoadAsset("BuffRaincoatCooldown"); BuffIcons.HeadstomperActive = assetBundle.LoadAsset("BuffHeadstomperActive"); BuffIcons.HeadstomperCooldown = assetBundle.LoadAsset("BuffHeadstomperCooldown"); BuffIcons.Watch = assetBundle.LoadAsset("BuffWatch"); BuffIcons.HappiestMaskReady = assetBundle.LoadAsset("BuffHappiestMaskReady"); BuffIcons.HappiestMaskCooldown = assetBundle.LoadAsset("BuffHappiestMaskCooldown"); BuffIcons.Standoff1 = assetBundle.LoadAsset("BuffStandoff1"); BuffIcons.Standoff2 = assetBundle.LoadAsset("BuffStandoff2"); BuffIcons.Standoff3 = assetBundle.LoadAsset("BuffStandoff3"); BuffIcons.Standoff4 = assetBundle.LoadAsset("BuffStandoff4"); BuffIcons.Standoff5 = assetBundle.LoadAsset("BuffStandoff5"); } private static void LoadSkillIcons() { SkillIcons.Bandit2Gunslinger = assetBundle.LoadAsset("Bandit2Gunslinger"); SkillIcons.Bandit2Desperado = assetBundle.LoadAsset("Bandit2Desperado"); SkillIcons.Bandit2Standoff = assetBundle.LoadAsset("Bandit2Standoff"); } private static void LoadScepterSkillIcons() { ScepterSkillIcons.CommandoBarrageScepter = assetBundle.LoadAsset("texCommandoR1"); ScepterSkillIcons.CommandoGrenadeScepter = assetBundle.LoadAsset("texCommandoR2"); ScepterSkillIcons.HuntressArrowRainScepter = assetBundle.LoadAsset("texHuntressR1"); ScepterSkillIcons.CrocoEpidemicScepter = assetBundle.LoadAsset("texAcridR1"); ScepterSkillIcons.LightsOutScepter = assetBundle.LoadAsset("texBanditR1"); ScepterSkillIcons.RackEmUpScepter = assetBundle.LoadAsset("texBanditR2"); } private static void LoadMiscSprites() { MiscSprites.CaptainEquipmentRestockBar = assetBundle.LoadAsset("texUIEquipmentRestock"); MiscSprites.ModIcon = assetBundle.LoadAsset("texModIcon"); } } public class Content : IContentPackProvider { [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FinalizeAsyncArgs args; public Content <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GetContentPackAsyncArgs args; public Content <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; ContentPack.Copy(content, args.output); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__15 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LoadStaticContentAsyncArgs args; public Content <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; content.networkedObjectPrefabs.Add(networkedObjectPrefabs.ToArray()); content.bodyPrefabs.Add(bodyPrefabs.ToArray()); content.masterPrefabs.Add(masterPrefabs.ToArray()); content.buffDefs.Add(buffDefs.ToArray()); content.effectDefs.Add(effectDefs.ToArray()); content.projectilePrefabs.Add(projectilePrefabs.ToArray()); content.entityStateTypes.Add(entityStates.ToArray()); content.skillDefs.Add(skillDefs.ToArray()); content.skillFamilies.Add(skillFamilies.ToArray()); content.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray()); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static ContentPack content = new ContentPack(); public static List networkedObjectPrefabs = new List(); public static List bodyPrefabs = new List(); public static List masterPrefabs = new List(); public static List buffDefs = new List(); public static List effectDefs = new List(); public static List projectilePrefabs = new List(); public static List entityStates = new List(); public static List skillDefs = new List(); public static List skillFamilies = new List(); public static List networkSoundEventDefs = new List(); public string identifier => "RiskyMod.content"; [IteratorStateMachine(typeof(d__13))] public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(d__14))] public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(d__15))] public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { <>4__this = this, args = args }; } } public class ContentCore { public static bool initialized; public static void Init() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!initialized) { ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); new LunarGolemSkyMeadow(); } } private static void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new Content()); } } } namespace RiskyMod.Content.Enemies { public class LunarGolemSkyMeadow { public static bool enabled = true; public static GameObject bodyObject; public static GameObject masterObject; public static CharacterSpawnCard characterSpawnCard; public LunarGolemSkyMeadow() { if (enabled && !Object.op_Implicit((Object)(object)bodyObject)) { SetupBody(); SetupSpawnCard(); } } private void SetupBody() { //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_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) bodyObject = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/LunarGolem/LunarGolemBody.prefab").WaitForCompletion(), "RiskyMod_LunarGolemSkyMeadow", true); DeathRewards component = bodyObject.GetComponent(); component.logUnlockableDef = null; Content.bodyPrefabs.Add(bodyObject); ModifyStats(bodyObject); bodyObject.AddComponent(); masterObject = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/LunarGolem/LunarGolemMaster.prefab").WaitForCompletion(), "RiskyMod_LunarGolemSkyMeadowMaster", true); masterObject.GetComponent().bodyPrefab = bodyObject; Content.masterPrefabs.Add(masterObject); } private void SetupSpawnCard() { //IL_003b: 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_0051: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown characterSpawnCard = ScriptableObject.CreateInstance(); ((Object)characterSpawnCard).name = "cscRiskyModLunarGolemSkyMeadow"; ((SpawnCard)characterSpawnCard).prefab = masterObject; ((SpawnCard)characterSpawnCard).sendOverNetwork = true; ((SpawnCard)characterSpawnCard).hullSize = (HullClassification)1; ((SpawnCard)characterSpawnCard).nodeGraphType = (GraphType)0; ((SpawnCard)characterSpawnCard).requiredFlags = (NodeFlags)0; ((SpawnCard)characterSpawnCard).forbiddenFlags = (NodeFlags)4; ((SpawnCard)characterSpawnCard).directorCreditCost = 115; ((SpawnCard)characterSpawnCard).occupyPosition = false; characterSpawnCard.loadout = new SerializableLoadout(); characterSpawnCard.noElites = false; characterSpawnCard.forbiddenAsBoss = true; DirectorCards.LunarGolemSkyMeadow = DirectorCards.BuildDirectorCard(characterSpawnCard); DirectorCards.LunarGolemSkyMeadowBasic = DirectorCards.BuildDirectorCard(characterSpawnCard); } private void ModifyStats(GameObject go) { CharacterBody component = go.GetComponent(); component.baseMaxHealth = 1000f; component.levelMaxHealth = component.baseMaxHealth * 0.3f; component.baseDamage = 35f; component.levelDamage = component.baseDamage * 0.2f; component.baseRegen = 0f; component.levelRegen = component.baseRegen * 0.2f; } } } namespace RiskyMod.Content.Enemies.Components { public class SwapToLunarTeam : MonoBehaviour { public void Start() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Invalid comparison between Unknown and I4 if (NetworkServer.active) { TeamComponent component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.teamIndex == 2) { component.teamIndex = (TeamIndex)3; } CharacterBody component2 = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.master) && (int)component2.master.teamIndex == 2) { component2.master.teamIndex = (TeamIndex)3; if (component2.master.aiComponents != null) { BaseAI[] aiComponents = component2.master.aiComponents; foreach (BaseAI val in aiComponents) { val.UpdateTargets(); } } } } Object.Destroy((Object)(object)this); } } } namespace RiskyMod.Allies { public class AlliesCore { public static bool enabled = true; public AlliesCore() { if (enabled) { new NoVoidDamage(); new AntiSplat(); new AntiOneshot(); new AntiVoidDeath(); new AntiOverheat(); TweakDrones(); } } private void TweakDrones() { new GunnerTurret(); new MegaDrone(); } public static bool IsDrone(HealthComponent health) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Invalid comparison between Unknown and I4 return Object.op_Implicit((Object)(object)health.body) && !health.body.isPlayerControlled && Object.op_Implicit((Object)(object)health.body.teamComponent) && (int)health.body.teamComponent.teamIndex == 1 && health.body.IsDrone; } } public class NoVoidDamage { public static bool enabled = true; public static bool alliesInVoidFields = true; public NoVoidDamage() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) if (enabled) { HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); } if (alliesInVoidFields) { SceneDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/arena/arena.asset").WaitForCompletion(); val.suppressNpcEntry = false; } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Invalid comparison between Unknown and I4 //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Invalid comparison between Unknown and I4 //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_0071: Invalid comparison between Unknown and I4 if (NetworkServer.active && !self.body.isPlayerControlled && Object.op_Implicit((Object)(object)self.body.teamComponent) && (int)self.body.teamComponent.teamIndex == 1 && !Object.op_Implicit((Object)(object)damageInfo.attacker) && !Object.op_Implicit((Object)(object)damageInfo.inflictor) && (int)damageInfo.damageColorIndex == 9 && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 66) { damageInfo.damage = 0f; damageInfo.rejected = true; } orig.Invoke(self, damageInfo); } } } namespace RiskyMod.Allies.DroneChanges { public class GunnerTurret { public static bool allowRepair = true; public static bool teleportWithPlayer = true; public static bool teleportToMithrix = true; public GunnerTurret() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/Turret1Body.prefab").WaitForCompletion(); if (allowRepair) { CharacterDeathBehavior component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.deathState = new SerializableEntityStateType(typeof(Turret1DeathState)); } } global::RiskyMod.Content.Content.entityStates.Add(typeof(Turret1DeathState)); if (teleportWithPlayer) { if (teleportToMithrix) { Phase1.OnEnter += new hook_OnEnter(TeleportTurretToMithrix); } if (!SoftDependencies.TeleporterTurretsLoaded) { HoldoutZoneController.OnEnable += new hook_OnEnable(HoldoutZoneController_OnEnable); } else { Debug.LogError((object)"RiskyMod: Disabling GunnerTurret teleport because TeleporterTurrets is installed."); } } } private void HoldoutZoneController_OnEnable(orig_OnEnable orig, HoldoutZoneController self) { orig.Invoke(self); TeleportTurretsToPlayer(self); } private void TeleportTurretToMithrix(orig_OnEnter orig, Phase1 self) { orig.Invoke(self); TeleportTurretsToPlayer(null); } public static void TeleportTurretsToPlayer(HoldoutZoneController holdout) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) ReadOnlyCollection teamMembers = TeamComponent.GetTeamMembers((TeamIndex)1); foreach (TeamComponent item in teamMembers) { if (!Object.op_Implicit((Object)(object)item.body) || item.body.bodyIndex != BodyPrefabs.Turret1Body.bodyIndex || !Object.op_Implicit((Object)(object)item.body.master) || !Object.op_Implicit((Object)(object)item.body.master.minionOwnership) || !Object.op_Implicit((Object)(object)item.body.master.minionOwnership.ownerMaster)) { continue; } Vector3? val = null; if (Object.op_Implicit((Object)(object)holdout)) { val = ((Component)holdout).transform.position; float baseRadius = holdout.baseRadius; Vector3 val2 = item.body.corePosition - val.Value; if (((Vector3)(ref val2)).sqrMagnitude < baseRadius * baseRadius) { continue; } } CharacterBody body = item.body.master.minionOwnership.ownerMaster.GetBody(); if (!val.HasValue && Object.op_Implicit((Object)(object)body)) { val = body.corePosition; } SpawnCard val3 = ScriptableObject.CreateInstance(); val3.hullSize = item.body.hullClassification; val3.nodeGraphType = (GraphType)0; val3.prefab = global::SneedUtils.SneedUtils.teleportHelperPrefab; GameObject val4 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val3, new DirectorPlacementRule { placementMode = (PlacementMode)1, position = val.Value, minDistance = 5f, maxDistance = 45f }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val4)) { Vector3 position = val4.transform.position; TeleportHelper.TeleportBody(item.body, position, false); GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)item.body).gameObject); if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, position, Quaternion.identity, true); } Object.Destroy((Object)(object)val4); } } } } public class MegaDrone { public static bool allowRepair = true; public MegaDrone() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/MegaDroneBody.prefab").WaitForCompletion(); if (allowRepair) { CharacterDeathBehavior component = val.GetComponent(); component.deathState = new SerializableEntityStateType(typeof(MegaDroneDeathState)); } global::RiskyMod.Content.Content.entityStates.Add(typeof(MegaDroneDeathState)); } } } namespace RiskyMod.Allies.DamageResistances { public class AntiOneshot { public static bool enabled = true; public AntiOneshot() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { if (NetworkServer.active && AlliesCore.IsDrone(self)) { float damage = damageInfo.damage; float num = self.adaptiveArmorValue + self.body.armor; damage = ((!(num >= 0f)) ? (damage * (2f - 100f / (100f - num))) : (damage * (100f / (100f + num)))); float num2 = self.fullCombinedHealth * 0.6f; if (damage > num2) { damageInfo.damage *= num2 / damage; } } orig.Invoke(self, damageInfo); } } public class AntiOverheat { public static bool enabled = true; public AntiOverheat() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Invalid comparison between Unknown and I4 //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Invalid comparison between Unknown and I4 if (NetworkServer.active && AlliesCore.IsDrone(self) && self.body.HasBuff(Buffs.Overheat) && damageInfo.procCoefficient <= 0f && ((int)damageInfo.dotIndex == 1 || (int)damageInfo.dotIndex == 3 || (int)damageInfo.dotIndex == 7)) { ref DamageType damageType = ref damageInfo.damageType.damageType; damageType = (DamageType)((uint)damageType | 1u); } orig.Invoke(self, damageInfo); } } public class AntiSplat { public static bool enabled = true; public AntiSplat() { if (enabled) { TakeDamage.ModifyInitialDamageActions = (TakeDamage.ModifyInitialDamage)Delegate.Combine(TakeDamage.ModifyInitialDamageActions, new TakeDamage.ModifyInitialDamage(AddResist)); } } private static void AddResist(DamageInfo damageInfo, HealthComponent self) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Invalid comparison between Unknown and I4 //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) if (!self.body.isPlayerControlled && Object.op_Implicit((Object)(object)self.body.teamComponent) && (int)self.body.teamComponent.teamIndex == 1 && self.body.isFlying && (Object)(object)damageInfo.inflictor == (Object)null && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 0 && damageInfo.procCoefficient == 0f && (int)damageInfo.dotIndex == -1 && damageInfo.canRejectForce && damageInfo.force == Vector3.zero) { damageInfo.damage = 0f; damageInfo.rejected = true; } } } public class AntiVoidDeath { public static bool enabled = true; public AntiVoidDeath() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if (enabled) { HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && AlliesCore.IsDrone(self) && DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)65536)) != 0 && DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)262144)) == 0) { ref DamageType damageType = ref damageInfo.damageType.damageType; damageType = (DamageType)((uint)damageType & 0xFFFEFFFFu); float num = self.fullCombinedHealth * 0.5f; float num2 = self.adaptiveArmorValue + self.body.armor; num = ((!(num2 >= 0f)) ? (num / (2f - 100f / (100f - num2))) : (num / (100f / (100f + num2)))); damageInfo.damage = num; } orig.Invoke(self, damageInfo); } } }