Decompiled source of FalseSon Survivor Tweaks v1.1.0
FalseSonSurvivorTweaks.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.FalseSon; using FalseSonSurvivorTweaks.DashChanges; using FalseSonSurvivorTweaks.ForsakenClubChanges; using FalseSonSurvivorTweaks.GrowthChanges; using FalseSonSurvivorTweaks.LaserBurstChanges; using FalseSonSurvivorTweaks.LaserChargedChanges; using FalseSonSurvivorTweaks.LunarSpikesChanges; using FalseSonSurvivorTweaks.LunarTamperingChanges; using IL.EntityStates.FalseSon; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.FalseSon; using On.RoR2; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; [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("FalseSonSurvivorTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("FalseSonSurvivorTweaks")] [assembly: AssemblyTitle("FalseSonSurvivorTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace FalseSonSurvivorTweaks { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency("com.rune580.riskofoptions", "2.8.2")] [BepInPlugin("0p41.FalseSon_Survivor_Tweaks", "FalseSon_Survivor_Tweaks", "1.1.0")] public class MainPlugin : BaseUnityPlugin { public const string PluginGUID = "0p41.FalseSon_Survivor_Tweaks"; public const string PluginAuthor = "0p41"; public const string PluginName = "FalseSon_Survivor_Tweaks"; public const string PluginVersion = "1.1.0"; public void Awake() { //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) Log.Init(((BaseUnityPlugin)this).Logger); ModConfig.Init(((BaseUnityPlugin)this).Config); if (ModConfig.survivorChanges.Value) { GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSon/FalseSonBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent<CharacterBody>(); component.levelRegen = ModConfig.survivorRegen.Value; component.baseArmor = ModConfig.survivorArmor.Value; } if (ModConfig.growthChanges.Value) { GrowthMod.Init(); } if (ModConfig.lunarTamperingChanges.Value) { LunarTamperingMod.Init(); } if (ModConfig.forsakenClubChanges.Value) { ClubSlamMod.Init(); } if (ModConfig.lunarSpikeChanges.Value) { LunarSpikesMod.Init(); UtilStuff.HookLooping(); } if (ModConfig.dashChanges.Value) { DashMod.Init(); } if (ModConfig.laserChargedChanges.Value) { LaserChargedMod.Init(); } if (ModConfig.laserBurstChanges.Value) { LaserBurstMod.Init(); } } } public static class ModConfig { public static ConfigEntry<bool> ResetValues; public static ConfigEntry<string> lastVersion; public static ConfigEntry<bool> survivorChanges; public static ConfigEntry<float> survivorRegen; private const float defaultSurvivorRegen = 0.2f; public static ConfigEntry<int> survivorArmor; private const int defaultSurvivorArmor = 10; public static ConfigEntry<bool> growthChanges; public static ConfigEntry<float> growthMaxHealthPerGrowth; private const float defaultGrowthMaxHealthPerGrowth = 10f; public static ConfigEntry<float> growthScaling; private const float defaultGrowthScaling = 10f; public static ConfigEntry<int> growthPerLevel; private const int defaultGrowthPerLevel = 5; public static ConfigEntry<bool> growthCounter; public static ConfigEntry<bool> lunarTamperingChanges; public static ConfigEntry<float> lunarTamperingHealthRegen; private const float defaultLunarTamperingHealthRegen = 1.25f; public static ConfigEntry<float> lunarTamperingMovementSpeed; private const float defaultLunarTamperingMovementSpeed = 2.5f; public static ConfigEntry<float> lunarTamperingAttackSpeed; private const float defaultLunarTamperingAttackSpeed = 2.5f; public static ConfigEntry<float> lunarTamperingArmor; private const float defaultLunarTamperingArmor = 2f; public static ConfigEntry<bool> forsakenClubChanges; public static ConfigEntry<float> forsakenClubMinimumCharge; private const float defaultForsakenClubMinimumCharge = 0.6f; public static ConfigEntry<float> forsakenClubDamage; private const float defaultForsakenClubDamage = 1200f; public static ConfigEntry<float> forsakenClubGrowthDamage; private const float defaultForsakenClubGrowthDamage = 25f; public static ConfigEntry<float> forsakenClubProcCoefficient; private const float defaultForsakenClubProcCoefficient = 1f; public static ConfigEntry<float> forsakenClubRadius; private const float defaultForsakenClubRadius = 6f; public static ConfigEntry<float> forsakenClubGrowthRadius; private const float defaultForsakenClubGrowthRadius = 0.5f; public static ConfigEntry<bool> lunarSpikeChanges; public static ConfigEntry<bool> lunarSpikeAgile; public static ConfigEntry<float> lunarSpikeUseSpeed; private const float defaultLunarSpikeUseSpeed = 0.65f; public static ConfigEntry<float> lunarSpikeSpeed; private const float defaultLunarSpikeSpeed = 2.5f; public static ConfigEntry<bool> dashChanges; public static ConfigEntry<int> dashStock; private const int defaultDashStock = 1; public static ConfigEntry<bool> dashSpeedFormula; public static ConfigEntry<int> dashPower; private const int defaultDashPower = 100; public static ConfigEntry<float> dashSpeedTreshold; private const float defaultDashSpeedTreshold = 30f; public static ConfigEntry<float> dashBarrierGain; private const float defaultDashBarrierGain = 5f; public static ConfigEntry<float> dashBarrierGrowth; private const float defaultDashBarrierGrowth = 0.25f; public static ConfigEntry<bool> laserChargedChanges; public static ConfigEntry<bool> laserChargedWobbleFix; public static ConfigEntry<bool> laserBurstChanges; public static ConfigEntry<bool> laserBurstFaster; public static ConfigEntry<int> laserBurstDamage; private const int defaultLaserBurstDamage = 2200; public static ConfigEntry<float> laserBurstRadius; private const float defaultLaserBurstRadius = 6f; public static ConfigEntry<float> laserBurstCooldown; private const float defaultLaserBurstCooldown = 10f; public static ConfigEntry<int> laserBurstStock; private const int defaultLaserBurstStock = 4; public static ConfigEntry<int> laserBurstRestock; private const int defaultLaserBurstRestock = 50; public static ConfigEntry<bool> laserBurstKnockback; public static ConfigEntry<float> laserBurstKnockbackForce; private const float defaultLaserBurstKnockbackForce = 18f; public static void Init(ConfigFile config) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //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_00c9: 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_00eb: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_011e: 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_012a: 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: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: 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_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: 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_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Expected O, but got Unknown //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Expected O, but got Unknown //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Expected O, but got Unknown //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Expected O, but got Unknown //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Expected O, but got Unknown //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Expected O, but got Unknown //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Expected O, but got Unknown //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Expected O, but got Unknown //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Expected O, but got Unknown //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Expected O, but got Unknown //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Expected O, but got Unknown //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Expected O, but got Unknown //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Expected O, but got Unknown //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Expected O, but got Unknown //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Expected O, but got Unknown //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Expected O, but got Unknown //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Expected O, but got Unknown //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06c1: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Expected O, but got Unknown //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06dd: Expected O, but got Unknown //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Expected O, but got Unknown //IL_073e: Unknown result type (might be due to invalid IL or missing references) //IL_0748: Expected O, but got Unknown //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Expected O, but got Unknown //IL_0796: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Expected O, but got Unknown //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Expected O, but got Unknown //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_080b: Expected O, but got Unknown //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_0865: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Expected O, but got Unknown //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Expected O, but got Unknown //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Expected O, but got Unknown //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08e2: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Expected O, but got Unknown //IL_08e9: Unknown result type (might be due to invalid IL or missing references) //IL_08f3: Expected O, but got Unknown //IL_0915: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Expected O, but got Unknown //IL_094d: Unknown result type (might be due to invalid IL or missing references) //IL_0952: Unknown result type (might be due to invalid IL or missing references) //IL_0959: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Expected O, but got Unknown //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0975: Expected O, but got Unknown //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09db: Expected O, but got Unknown //IL_09d6: Unknown result type (might be due to invalid IL or missing references) //IL_09e0: Expected O, but got Unknown //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0a24: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a46: Expected O, but got Unknown //IL_0a41: Unknown result type (might be due to invalid IL or missing references) //IL_0a4b: Expected O, but got Unknown //IL_0a7f: Unknown result type (might be due to invalid IL or missing references) //IL_0a84: Unknown result type (might be due to invalid IL or missing references) //IL_0a8f: Unknown result type (might be due to invalid IL or missing references) //IL_0a9a: Unknown result type (might be due to invalid IL or missing references) //IL_0aa5: Unknown result type (might be due to invalid IL or missing references) //IL_0ab1: Expected O, but got Unknown //IL_0aac: Unknown result type (might be due to invalid IL or missing references) //IL_0ab6: Expected O, but got Unknown //IL_0ad8: Unknown result type (might be due to invalid IL or missing references) //IL_0ae2: Expected O, but got Unknown //IL_0b04: Unknown result type (might be due to invalid IL or missing references) //IL_0b0e: Expected O, but got Unknown //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Expected O, but got Unknown //IL_0b5c: Unknown result type (might be due to invalid IL or missing references) //IL_0b66: Expected O, but got Unknown //IL_0b9a: Unknown result type (might be due to invalid IL or missing references) //IL_0b9f: Unknown result type (might be due to invalid IL or missing references) //IL_0ba6: Unknown result type (might be due to invalid IL or missing references) //IL_0bb1: Unknown result type (might be due to invalid IL or missing references) //IL_0bbd: Expected O, but got Unknown //IL_0bb8: Unknown result type (might be due to invalid IL or missing references) //IL_0bc2: Expected O, but got Unknown //IL_0bf6: Unknown result type (might be due to invalid IL or missing references) //IL_0bfb: Unknown result type (might be due to invalid IL or missing references) //IL_0c06: Unknown result type (might be due to invalid IL or missing references) //IL_0c11: Unknown result type (might be due to invalid IL or missing references) //IL_0c1c: Unknown result type (might be due to invalid IL or missing references) //IL_0c28: Expected O, but got Unknown //IL_0c23: Unknown result type (might be due to invalid IL or missing references) //IL_0c2d: Expected O, but got Unknown //IL_0c61: Unknown result type (might be due to invalid IL or missing references) //IL_0c66: Unknown result type (might be due to invalid IL or missing references) //IL_0c71: Unknown result type (might be due to invalid IL or missing references) //IL_0c7c: Unknown result type (might be due to invalid IL or missing references) //IL_0c87: Unknown result type (might be due to invalid IL or missing references) //IL_0c93: Expected O, but got Unknown //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0c98: Expected O, but got Unknown //IL_0cc4: Unknown result type (might be due to invalid IL or missing references) //IL_0cc9: Unknown result type (might be due to invalid IL or missing references) //IL_0cd0: Unknown result type (might be due to invalid IL or missing references) //IL_0cd8: Unknown result type (might be due to invalid IL or missing references) //IL_0ce4: Expected O, but got Unknown //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce9: Expected O, but got Unknown //IL_0d17: Unknown result type (might be due to invalid IL or missing references) //IL_0d1c: Unknown result type (might be due to invalid IL or missing references) //IL_0d23: Unknown result type (might be due to invalid IL or missing references) //IL_0d2b: Unknown result type (might be due to invalid IL or missing references) //IL_0d37: Expected O, but got Unknown //IL_0d32: Unknown result type (might be due to invalid IL or missing references) //IL_0d3c: Expected O, but got Unknown //IL_0d5e: Unknown result type (might be due to invalid IL or missing references) //IL_0d68: Expected O, but got Unknown //IL_0d9c: Unknown result type (might be due to invalid IL or missing references) //IL_0da1: Unknown result type (might be due to invalid IL or missing references) //IL_0dac: Unknown result type (might be due to invalid IL or missing references) //IL_0db7: Unknown result type (might be due to invalid IL or missing references) //IL_0dc2: Unknown result type (might be due to invalid IL or missing references) //IL_0dce: Expected O, but got Unknown //IL_0dc9: Unknown result type (might be due to invalid IL or missing references) //IL_0dd3: Expected O, but got Unknown if (lastVersion == null) { lastVersion = config.Bind<string>("Last Version", "Last Version", "0.0.0", "Last version played."); } ResetValues = config.Bind<bool>("General", "Restore values to default on update", true, "If you don't delete your config file the new values may not be applied properly, with this enabled when the version changes all values will be restored to their default, disabled changes stay disabled."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ResetValues, true)); survivorChanges = config.Bind<bool>("Stat Changes", "Enable Stat Changes?", true, "Toggle Stat changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(survivorChanges, true)); survivorRegen = config.Bind<float>("Stat Changes", "Health Regen Per Level", 0.2f, $"How much base health regeneration per level you gain.\nDefault value: {0.2f}.\nVanilla value: 0.5"); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(survivorRegen, new StepSliderConfig { min = 0f, max = 100f, increment = 0.2f, restartRequired = true })); survivorArmor = config.Bind<int>("Stat Changes", "Base Armor", 10, $"How much base armor you start with.\nDefault value: {10}.\nVanilla value: 20"); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(survivorArmor, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); growthChanges = config.Bind<bool>("Growth Changes", "Enable Growth Changes?", true, "Toggle Growth changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(growthChanges, true)); growthMaxHealthPerGrowth = config.Bind<float>("Growth Changes", "Bonus Health To Growth Ratio", 10f, $"How much bonus health you need per growth, this is the initial value and will increase the more growth you have.\nDefault value: {10f}.\nVanilla value: 15"); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(growthMaxHealthPerGrowth, new StepSliderConfig { min = 0.5f, max = 100f, increment = 0.5f, restartRequired = true })); growthScaling = config.Bind<float>("Growth Changes", "Bonus Health Scaling", 10f, $"This affect the scaling of how much bonus health you need per growth, higher values means harsher scaling.\nDefault value: {10f}.\nVanilla value: 5"); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(growthScaling, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); growthPerLevel = config.Bind<int>("Growth Changes", "Level To Growth Ratio", 5, $"How many many level ups you need to gain 1 Growth, setting this to 0 will disable this behavior.\nDefault value: {5}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(growthPerLevel, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); growthCounter = config.Bind<bool>("Growth Changes", "Enable Growth Counter", true, "Enables a buff counter to keep track of your current growth."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(growthCounter, true)); lunarTamperingChanges = config.Bind<bool>("Lunar Tampering (Passive) Changes", "Enable Lunar Tampering Changes?", true, "Toggle Lunar Tampering changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(lunarTamperingChanges, true)); lunarTamperingHealthRegen = config.Bind<float>("Lunar Tampering (Passive) Changes", "Lunar Tampering Health Regen", 1.25f, $"How much health regeneration you gain per growth.\nDefault value: {1.25f}.\nVanilla value: 2.5."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(lunarTamperingHealthRegen, new StepSliderConfig { min = 0f, max = 10f, increment = 0.25f, restartRequired = true })); lunarTamperingMovementSpeed = config.Bind<float>("Lunar Tampering (Passive) Changes", "Lunar Tampering Movement Speed", 2.5f, $"How much movement speed you gain per growth, in %.\nDefault value: {2.5f}.\nVanilla value: 5."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(lunarTamperingMovementSpeed, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); lunarTamperingAttackSpeed = config.Bind<float>("Lunar Tampering (Passive) Changes", "Lunar Tampering Attack Speed", 2.5f, $"How much attack speed you gain per growth, in %.\nDefault value: {2.5f}.\nVanilla value: 5."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(lunarTamperingAttackSpeed, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); lunarTamperingArmor = config.Bind<float>("Lunar Tampering (Passive) Changes", "Lunar Tampering Armor", 2f, $"How much armor you gain per growth.\nDefault value: {2f}.\nVanilla value: 2.5."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(lunarTamperingArmor, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); forsakenClubChanges = config.Bind<bool>("Forsaken Club (Primary) Changes", "Enable Forsaken Club Changes?", true, "Toggle Forsaken Club changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(forsakenClubChanges, true)); forsakenClubMinimumCharge = config.Bind<float>("Forsaken Club (Primary) Changes", "Forsaken Club Minimum Hold Time", 0.6f, $"The minimum charge needed for the slam to occur.\nDefault value: {0.6f}.\nVanilla value: 0.8."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(forsakenClubMinimumCharge, new StepSliderConfig { min = 0.1f, max = 1f, increment = 0.1f, restartRequired = true })); forsakenClubDamage = config.Bind<float>("Forsaken Club (Primary) Changes", "Forsaken Club Max Damage", 1200f, $"Damage multiplier at maximum charge, in %.\nDefault value: {1200f}.\nVanilla value: 1500."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(forsakenClubDamage, new StepSliderConfig { min = 25f, max = 10000f, increment = 25f, restartRequired = true })); forsakenClubGrowthDamage = config.Bind<float>("Forsaken Club (Primary) Changes", "Forsaken Club Damage Per Growth", 25f, $"Extra damage multiplier per each growth, this is added to the damage multiplier, in %.\nDefault value: {25f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(forsakenClubGrowthDamage, new StepSliderConfig { min = 0f, max = 1000f, increment = 25f, restartRequired = true })); forsakenClubProcCoefficient = config.Bind<float>("Forsaken Club (Primary) Changes", "Forsaken Club Proc Coefficient", 1f, $"Blast proc coefficient.\nDefault value: {1f}.\nVanilla value: 3."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(forsakenClubProcCoefficient, new StepSliderConfig { min = 0f, max = 10f, increment = 0.1f, restartRequired = true })); forsakenClubRadius = config.Bind<float>("Forsaken Club (Primary) Changes", "Forsaken Club Radius", 6f, $"Blast radius.\nDefault value: {6f}.\nVanilla value: 5."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(forsakenClubRadius, new StepSliderConfig { min = 0.5f, max = 100f, increment = 0.5f, restartRequired = true })); forsakenClubGrowthRadius = config.Bind<float>("Forsaken Club (Primary) Changes", "Forsaken Club Radius Per Growth", 0.5f, $"Extra blast radius per growth, added to the normal blast radius.\nDefault value: {0.5f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(forsakenClubGrowthRadius, new StepSliderConfig { min = 0f, max = 10f, increment = 0.25f, restartRequired = true })); lunarSpikeChanges = config.Bind<bool>("Lunar Spikes (Secondary) Changes", "Enable Lunar Spikes Changes?", true, "Toggle Lunar Spikes changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(lunarSpikeChanges, true)); lunarSpikeAgile = config.Bind<bool>("Lunar Spikes (Secondary) Changes", "Add Agile To Lunar Spikes?", true, "This affect both vanilla Lunar Spikes and the new alt version.\n\nAdds Agile to Lunar spikes, allowing them to be fired while running."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(lunarSpikeAgile, true)); lunarSpikeUseSpeed = config.Bind<float>("Lunar Spikes (Secondary) Changes", "Lunar Spike Delay", 0.65f, $"This affect both vanilla Lunar Spikes and the new alt version.\n\nDecrease the delay between each shot of your lunar spikes, this is multiplied to the base value, lower values means faster shooting speed while higher values slower shooting speed, set to 1 to disable this behavior.\nDefault value: {0.65f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(lunarSpikeUseSpeed, new StepSliderConfig { min = 0.1f, max = 1f, increment = 0.05f, restartRequired = true })); lunarSpikeSpeed = config.Bind<float>("Lunar Spikes (Secondary) Changes", "Lunar Spike Projectile Speed", 2.5f, $"This affect both vanilla Lunar Spikes and the new alt version.\n\nIncrease the speed of the spike projectile, this multiplies the base speed, set to 1 to disable this behavior.\nDefault value: {2.5f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(lunarSpikeSpeed, new StepSliderConfig { min = 0.2f, max = 10f, increment = 0.2f, restartRequired = true })); dashChanges = config.Bind<bool>("Step of the Brothers (Utility) Changes", "Enable Step of the Brothers Changes?", true, "Toggle Step of the Brothers changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(dashChanges, true)); dashStock = config.Bind<int>("Step of the Brothers (Utility) Changes", "Dash Stocks", 1, $"How many stocks the skill has by default.\nDefault value: {1}.\nVanilla value: 2."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(dashStock, new IntSliderConfig { min = 1, max = 10, restartRequired = true })); dashSpeedFormula = config.Bind<bool>("Step of the Brothers (Utility) Changes", "Enable Dash Speed Formula Changes?", true, "Toggle Dash formula changes so the dash distance is less affected by movement speed.\nOld formula was movementStat * dashPower.\nNew formula is dashPower * (1 + (movementStat/speedThreshold))."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(dashSpeedFormula, true)); dashPower = config.Bind<int>("Step of the Brothers (Utility) Changes", "Dash Power", 100, $"This affects the distance of the dash.\nDefault value: {100}.\nVanilla value: 15, check Formula Changes to see how is it used and why vanilla is so low in comparison."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(dashPower, new IntSliderConfig { min = 1, max = 1000, restartRequired = true })); dashSpeedTreshold = config.Bind<float>("Step of the Brothers (Utility) Changes", "Dash Speed Treshold", 30f, $"This affects the distance of the dash, check Formula Changes to see how is it used, if Formula Changes is disabled this does nothing.\nDefault value: {30f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(dashSpeedTreshold, new StepSliderConfig { min = 1f, max = 100f, increment = 0.5f, restartRequired = true })); dashBarrierGain = config.Bind<float>("Step of the Brothers (Utility) Changes", "Dash Barrier Gain", 5f, $"How much barrier you gain per enemy hit, based of your maximum health in %.\nDefault value: {5f}%."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(dashBarrierGain, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); dashBarrierGrowth = config.Bind<float>("Step of the Brothers (Utility) Changes", "Dash Barrier Per Growth", 0.25f, $"How much extra barrier per growth you gain on enemy hit, added to barrier gain.\nDefault value: {0.25f}%."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(dashBarrierGrowth, new StepSliderConfig { min = 0f, max = 100f, increment = 0.05f, restartRequired = true })); laserChargedChanges = config.Bind<bool>("Laser of the Father (Special) Changes", "Enable Charged Laser Changes?", true, "Toggle Charged Laser changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(laserChargedChanges, true)); laserChargedWobbleFix = config.Bind<bool>("Laser of the Father (Special) Changes", "Enable Charged Laser Wobble Fix?", true, "Fixes the laser wobbling up and down when moving around, same fix from StormTweaks by pseudopulse."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(laserChargedWobbleFix, true)); laserBurstChanges = config.Bind<bool>("Laser Burst (Special) Changes", "Enable Laser Burst Changes?", true, "Toggle Laser Burst changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(laserBurstChanges, true)); laserBurstFaster = config.Bind<bool>("Laser Burst (Special) Changes", "Enable Laser Burst Faster Use?", true, "Reduces the delay between Laser Burst uses."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(laserBurstFaster, true)); laserBurstDamage = config.Bind<int>("Laser Burst (Special) Changes", "Laser Burst Damage", 2200, $"Damage multiplier of base damage.\nDefault value: {2200}.\nVanilla value: 1000."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(laserBurstDamage, new IntSliderConfig { min = 1, max = 10000, restartRequired = true })); laserBurstRadius = config.Bind<float>("Laser Burst (Special) Changes", "Laser Burst Explosion Radius", 6f, $"Radius of explosion on impact.\nDefault value: {6f}.\nVanilla value: 3."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(laserBurstRadius, new StepSliderConfig { min = 1f, max = 100f, increment = 0.25f, restartRequired = true })); laserBurstCooldown = config.Bind<float>("Laser Burst (Special) Changes", "Laser Burst Cooldown", 10f, $"Cooldown of Laser Burst, in seconds.\nDefault value: {10f}.\nVanilla value: 7."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(laserBurstCooldown, new StepSliderConfig { min = 1f, max = 100f, increment = 0.25f, restartRequired = true })); laserBurstStock = config.Bind<int>("Laser Burst (Special) Changes", "Laser Burst Stock Per Growth Ratio", 4, $"How much growth do you need to gain 1 extra stock on your Laser Burst.\nDefault value: {4}.\nVanilla value: 4."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(laserBurstStock, new IntSliderConfig { min = 1, max = 10, restartRequired = true })); laserBurstRestock = config.Bind<int>("Laser Burst (Special) Changes", "Laser Burst Spikes Restock", 50, $"How many spikes it will regenerate on hit, in %.\nDefault value: {50}.\nVanilla value: 30."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(laserBurstRestock, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); laserBurstKnockback = config.Bind<bool>("Laser Burst (Special) Changes", "Enable Laser Burst Knockback?", true, "Adds a knockback when using Laser Burst, only applies when looking downwards."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(laserBurstKnockback, true)); laserBurstKnockbackForce = config.Bind<float>("Laser Burst (Special) Changes", "Laser Burst Knockback Force", 18f, $"Knockback force applied after using Laser Burst, this is multiplied by character mass, if Laser Burst Knockback is disabled this does nothing.\nDefault value: {18f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(laserBurstKnockbackForce, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); } public static void ResetAllValues(bool reset, string currentVersion) { Log.Warning("Last version: " + lastVersion.Value); Log.Warning("Current version: " + currentVersion); if (reset && lastVersion.Value != currentVersion) { Log.Warning("Config Reset."); lastVersion.Value = currentVersion; survivorRegen.Value = 0.2f; survivorArmor.Value = 10; growthMaxHealthPerGrowth.Value = 10f; growthScaling.Value = 10f; growthPerLevel.Value = 5; lunarTamperingHealthRegen.Value = 1.25f; lunarTamperingMovementSpeed.Value = 2.5f; lunarTamperingAttackSpeed.Value = 2.5f; lunarTamperingArmor.Value = 2f; forsakenClubMinimumCharge.Value = 0.6f; forsakenClubDamage.Value = 1200f; forsakenClubGrowthDamage.Value = 25f; forsakenClubProcCoefficient.Value = 1f; forsakenClubRadius.Value = 6f; forsakenClubGrowthRadius.Value = 0.5f; lunarSpikeUseSpeed.Value = 0.65f; lunarSpikeSpeed.Value = 2.5f; dashStock.Value = 1; dashPower.Value = 100; dashSpeedTreshold.Value = 30f; dashBarrierGain.Value = 5f; dashBarrierGrowth.Value = 0.25f; laserBurstDamage.Value = 2200; laserBurstRadius.Value = 6f; laserBurstCooldown.Value = 10f; laserBurstKnockbackForce.Value = 18f; laserBurstStock.Value = 4; laserBurstRestock.Value = 50; } } } public static class UtilStuff { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__2_2; public static Func<Instruction, bool> <>9__2_3; public static Func<bool, FalseSonController, bool> <>9__2_1; public static Manipulator <>9__2_0; internal void <HookLooping>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_0067: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); for (int i = 0; i < 3; i++) { if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.FalseSonController", "get_secondarySkillIsFalseSonDefault") })) { break; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, FalseSonController, bool>>((Func<bool, FalseSonController, bool>)delegate(bool boolean, FalseSonController sonController) { if (!boolean) { foreach (SkillDef item in secondarySkillDef) { if ((Object)(object)sonController.characterBody.skillLocator.secondary.skillDef == (Object)(object)item) { return true; } } } return boolean; }); } } internal bool <HookLooping>b__2_2(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <HookLooping>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.FalseSonController", "get_secondarySkillIsFalseSonDefault"); } internal bool <HookLooping>b__2_1(bool boolean, FalseSonController sonController) { if (!boolean) { foreach (SkillDef item in secondarySkillDef) { if ((Object)(object)sonController.characterBody.skillLocator.secondary.skillDef == (Object)(object)item) { return true; } } } return boolean; } } private static List<SkillDef> secondarySkillDef = new List<SkillDef>(); public static void AddSkillDef(SkillDef skill) { secondarySkillDef.Add(skill); } public static void HookLooping() { //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_0063: Expected O, but got Unknown if (secondarySkillDef.Count <= 0) { Log.Info("No secondary skills to check"); return; } Log.Info($"{secondarySkillDef.Count} secondary skills added to check."); 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_0067: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); for (int i = 0; i < 3; i++) { if (!val2.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.FalseSonController", "get_secondarySkillIsFalseSonDefault") })) { break; } val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate<Func<bool, FalseSonController, bool>>((Func<bool, FalseSonController, bool>)delegate(bool boolean, FalseSonController sonController) { if (!boolean) { foreach (SkillDef item in secondarySkillDef) { if ((Object)(object)sonController.characterBody.skillLocator.secondary.skillDef == (Object)(object)item) { return true; } } } return boolean; }); } }; <>c.<>9__2_0 = val; obj = (object)val; } FalseSonController.Update += (Manipulator)obj; } public static void AddHudSpikes(CharacterBody body, SkillSlot slot, SkillDef skill) { //IL_00b2: 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_00e3: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(body.defaultCrosshairPrefab, ((Object)body.defaultCrosshairPrefab).name); CrosshairController component = val.GetComponent<CrosshairController>(); Transform[] array = (Transform[])(object)new Transform[4] { ((Component)component).transform.Find("Holder/TR/TRFill"), ((Component)component).transform.Find("Holder/BR/BRFill"), ((Component)component).transform.Find("Holder/BL/BLFill"), ((Component)component).transform.Find("Holder/TL/TLFill") }; List<SkillStockSpriteDisplay> list = new List<SkillStockSpriteDisplay>(); list.AddRange(component.skillStockSpriteDisplays); int num = 1; Transform[] array2 = array; foreach (Transform val2 in array2) { GameObject target = Object.Instantiate<GameObject>(((Component)val2).gameObject, val2.parent); list.Add(new SkillStockSpriteDisplay { target = target, skillSlot = slot, requiredSkillDef = skill, minimumStockCountToBeValid = num, maximumStockCountToBeValid = 100 }); num++; } component.skillStockSpriteDisplays = list.ToArray(); body._defaultCrosshairPrefab = val; } } } namespace FalseSonSurvivorTweaks.LunarTamperingChanges { internal class LunarTamperingMod { [CompilerGenerated] private static class <>O { public static hook_CalcTamperedHeartStats <0>__FalseSonController_CalcTamperedHeartStats; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__7_1; public static Func<Instruction, bool> <>9__7_2; public static Func<Instruction, bool> <>9__7_3; public static Func<bool, CharacterBody, bool> <>9__7_4; public static Func<Instruction, bool> <>9__7_5; public static Func<Instruction, bool> <>9__7_6; public static Func<Instruction, bool> <>9__7_7; public static Func<bool, CharacterBody, bool> <>9__7_8; public static Func<Instruction, bool> <>9__7_9; public static Func<Instruction, bool> <>9__7_10; public static Func<Instruction, bool> <>9__7_11; public static Func<bool, CharacterBody, bool> <>9__7_12; public static Func<Instruction, bool> <>9__7_13; public static Func<Instruction, bool> <>9__7_14; public static Func<Instruction, bool> <>9__7_15; public static Func<bool, CharacterBody, bool> <>9__7_16; public static Manipulator <>9__7_0; internal void <LunarTamperingRecalculateStats>b__7_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_008c: 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_01f6: 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) ILCursor val = new ILCursor(il); ILLabel val5 = default(ILLabel); val.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val5) }); val.Index -= 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && body.outOfCombat) ? true : false)); ILLabel val4 = default(ILLabel); val.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4) }); val.Index -= 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && body.outOfCombat) ? true : false)); ILLabel val3 = default(ILLabel); val.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3) }); val.Index -= 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && !body.outOfCombat) ? true : false)); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && !body.outOfCombat) ? true : false)); } internal bool <LunarTamperingRecalculateStats>b__7_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <LunarTamperingRecalculateStats>b__7_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"); } internal bool <LunarTamperingRecalculateStats>b__7_3(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool <LunarTamperingRecalculateStats>b__7_4(bool boolean, CharacterBody body) { if (boolean && Object.op_Implicit((Object)(object)body) && body.outOfCombat) { return true; } return false; } internal bool <LunarTamperingRecalculateStats>b__7_5(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <LunarTamperingRecalculateStats>b__7_6(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"); } internal bool <LunarTamperingRecalculateStats>b__7_7(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool <LunarTamperingRecalculateStats>b__7_8(bool boolean, CharacterBody body) { if (boolean && Object.op_Implicit((Object)(object)body) && body.outOfCombat) { return true; } return false; } internal bool <LunarTamperingRecalculateStats>b__7_9(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <LunarTamperingRecalculateStats>b__7_10(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"); } internal bool <LunarTamperingRecalculateStats>b__7_11(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool <LunarTamperingRecalculateStats>b__7_12(bool boolean, CharacterBody body) { if (boolean && Object.op_Implicit((Object)(object)body) && !body.outOfCombat) { return true; } return false; } internal bool <LunarTamperingRecalculateStats>b__7_13(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <LunarTamperingRecalculateStats>b__7_14(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"); } internal bool <LunarTamperingRecalculateStats>b__7_15(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool <LunarTamperingRecalculateStats>b__7_16(bool boolean, CharacterBody body) { if (boolean && Object.op_Implicit((Object)(object)body) && !body.outOfCombat) { return true; } return false; } } private static SkillDef passiveDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonBodyTheTamperedHeart.asset").WaitForCompletion(); private static float healthRegenStack = ModConfig.lunarTamperingHealthRegen.Value; private static float movemenSpeedStack = ModConfig.lunarTamperingMovementSpeed.Value / 100f; private static float attackSpeedStack = ModConfig.lunarTamperingAttackSpeed.Value / 100f; private static float armorStack = ModConfig.lunarTamperingArmor.Value; public static void Init() { //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_001c: Expected O, but got Unknown object obj = <>O.<0>__FalseSonController_CalcTamperedHeartStats; if (obj == null) { hook_CalcTamperedHeartStats val = FalseSonController_CalcTamperedHeartStats; <>O.<0>__FalseSonController_CalcTamperedHeartStats = val; obj = (object)val; } FalseSonController.CalcTamperedHeartStats += (hook_CalcTamperedHeartStats)obj; LunarTamperingRecalculateStats(); string[] keywordTokens = new string[1] { "KEYWORD_GROWTH" }; passiveDef.keywordTokens = keywordTokens; string text = $"While <style=cIsUtility>in combat</style> gain <style=cIsDamage>+{attackSpeedStack * 100f}% attack speed</style> and <style=cIsDamage>+{armorStack} armor</style> per <style=cIsHealing>Growth</style>.\nWhile <style=cIsUtility>outside of combat</style> gain <style=cIsUtility>+{movemenSpeedStack * 100f}% movement speed</style> and <style=cIsHealing>+{healthRegenStack} health regeneration</style> per <style=cIsHealing>Growth</style> instead."; LanguageAPI.Add(passiveDef.skillDescriptionToken, text); Log.Info("Lunar Tampering Changes Loaded"); } private static void FalseSonController_CalcTamperedHeartStats(orig_CalcTamperedHeartStats orig, FalseSonController self) { float num = 0f; float num2 = 0f; float num3 = 0f; float num4 = 0f; float num5 = 0f; if ((Object)(object)self.passiveSkillSlot.skillDef == (Object)(object)passiveDef) { int extraShardFromHealth = self.extraShardFromHealth; num = healthRegenStack * (float)extraShardFromHealth; num2 = movemenSpeedStack * (float)extraShardFromHealth; num3 = attackSpeedStack * (float)extraShardFromHealth; num4 = armorStack * (float)extraShardFromHealth; } self.characterBody.ApplyTamperedHeartPassive(num, num2, num5, num4, num3); self.UpdateStats(); self.oldSecondaryStock = self.secondaryStock; } private static void LunarTamperingRecalculateStats() { //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) { 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_008c: 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_01f6: 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) ILCursor val2 = new ILCursor(il); ILLabel val6 = default(ILLabel); val2.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val6) }); val2.Index -= 1; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && body.outOfCombat) ? true : false)); ILLabel val5 = default(ILLabel); val2.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val5) }); val2.Index -= 1; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && body.outOfCombat) ? true : false)); ILLabel val4 = default(ILLabel); val2.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4) }); val2.Index -= 1; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && !body.outOfCombat) ? true : false)); ILLabel val3 = default(ILLabel); val2.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartActive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3) }); val2.Index -= 1; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate<Func<bool, CharacterBody, bool>>((Func<bool, CharacterBody, bool>)((bool boolean, CharacterBody body) => (boolean && Object.op_Implicit((Object)(object)body) && !body.outOfCombat) ? true : false)); }; <>c.<>9__7_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; } } } namespace FalseSonSurvivorTweaks.LunarSpikesChanges { public class LunarSpikeAlt : BaseSkillState { private SkillDef primaryDef = LunarSpikesMod.primaryDef; private SkillDef slamDef = LunarSpikesMod.slamDef; private GameObject projectilePrefab = LunarSpikesMod.newProjectilePrefab; private GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)" RoR2/DLC2/FalseSon/MuzzleflashFalseSonFire.prefab").WaitForCompletion(); private float damageCoefficient = 1.5f; private float procCoefficient = 1f; private float baseDuration = 0.37f * ModConfig.lunarSpikeUseSpeed.Value; private float duration; private float force = 20f; private float attackSpeedAltAnimationThreshold = 1.5f; private string attackSoundString = "Play_falseson_skill2_lunarSpikes_shoot"; private float attackSoundPitch = 1.3f; private float bloom = 0.2f; private string muzzleString; private Transform muzzleTransform; private Animator animator; private ChildLocator childLocator; private bool isKeyDown = false; public override void OnEnter() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); if ((Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)primaryDef) { ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).characterBody, slamDef, SkillStateOverrideData.priority); } if (Object.op_Implicit((Object)(object)animator)) { childLocator = ((Component)animator).GetComponent<ChildLocator>(); } muzzleString = "MuzzleRight"; if (((EntityState)this).skillLocator.secondary.stock > 0) { if (((BaseState)this).attackSpeedStat < attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireLunarSpike", "LunarSpike.playbackRate", duration, 0.1f); } FireLunarSpike(); } } public override void OnExit() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (!isKeyDown && (Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)slamDef) { ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).characterBody, slamDef, SkillStateOverrideData.priority); } ((EntityState)this).OnExit(); } private void FireLunarSpike() { //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_0114: 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) ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, projectilePrefab, ((EntityState)this).gameObject, 1f); if (Object.op_Implicit((Object)(object)childLocator)) { muzzleTransform = childLocator.FindChild(muzzleString); } if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { if (((BaseState)this).attackSpeedStat < attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Override", "FireLunarSpike", "LunarSpike.playbackRate", duration, 0.1f); } else { ((EntityState)this).PlayAnimation("Gesture, Override", "HoldGauntletsUp", "LunarSpike.playbackRate", duration, 0f); } Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, attackSoundPitch); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)9, (GameObject)null, -1f); if (!((BaseState)this).HasBuff(Buffs.NoCooldowns)) { ((EntityState)this).skillLocator.secondary.DeductStock(1); } } } public override void FixedUpdate() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).inputBank.skill2.down && (Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)slamDef) { ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).characterBody, slamDef, SkillStateOverrideData.priority); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill2.down) { isKeyDown = true; ((EntityState)this).outer.SetNextState(GetNextStateAuthority()); } else { ((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; } protected virtual EntityState GetNextStateAuthority() { return (EntityState)(object)new LunarSpikeAlt(); } } internal class LunarSpikesMod { [CompilerGenerated] private static class <>O { public static hook_OnEnter <0>__LunarSpikes_OnEnter; } public static SkillDef spikesDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonBodyLunarSpikes.asset").WaitForCompletion(); public static GameObject newProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSon/LunarSpike.prefab").WaitForCompletion(), "lunarSpikeMachineGun"); public static SkillDef primaryDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonBodyClub.asset").WaitForCompletion(); public static SkillDef slamDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonClubSlam.asset").WaitForCompletion(); private static float lunarSpikeSpeed = ModConfig.lunarSpikeSpeed.Value; private static float useSpeedMult = ModConfig.lunarSpikeUseSpeed.Value; public static void Init() { //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_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_005f: Expected O, but got Unknown GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSon/LunarSpike.prefab").WaitForCompletion(); val.GetComponent<ProjectileSimple>().desiredForwardSpeed = 130f * lunarSpikeSpeed; newProjectilePrefab.GetComponent<ProjectileSimple>().desiredForwardSpeed = 130f * lunarSpikeSpeed; object obj = <>O.<0>__LunarSpikes_OnEnter; if (obj == null) { hook_OnEnter val2 = LunarSpikes_OnEnter; <>O.<0>__LunarSpikes_OnEnter = val2; obj = (object)val2; } LunarSpikes.OnEnter += (hook_OnEnter)obj; if (ModConfig.lunarSpikeAgile.Value) { spikesDef.cancelSprintingOnActivation = false; spikesDef.keywordTokens = new string[3] { "KEYWORD_LUNARRUIN", "KEYWORD_AGILE", "KEYWORD_GROWTH" }; string text = "<style=cIsUtility>Lunar Ruin</style>. <style=cIsUtility>Agile</style>. Fire a Lunar Spike for <style=cIsDamage>150% damage</style>.\nGain additional Lunar Spikes through <style=cIsHealing>Growth</style>."; LanguageAPI.Add(spikesDef.skillDescriptionToken, text); } AddAltSpikeSkill(); Log.Info("Lunar Spikes Changes Loaded"); } private static void LunarSpikes_OnEnter(orig_OnEnter orig, LunarSpikes self) { self.baseDuration *= useSpeedMult; orig.Invoke(self); } private static void AddAltSpikeSkill() { //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_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_00cb: 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_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Expected O, but got Unknown //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) bool value = ModConfig.lunarSpikeAgile.Value; GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSon/FalseSonBody.prefab").WaitForCompletion(); string text = "<style=cIsUtility>Lunar Ruin</style>. "; if (value) { text += "<style=cIsUtility>Agile</style>. "; } text += $"Fire a Lunar Spike for <style=cIsDamage>{150}% damage</style>.\nGain additional Lunar Spikes through <style=cIsHealing>Growth</style>."; LanguageAPI.Add("LUNAR_SPIKE_ALT_NAME", "Lunar Spike (Alt)"); LanguageAPI.Add("LUNAR_SPIKE_ALT_DESCRIPTION", text); SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>(); val2.activationState = new SerializableEntityStateType(typeof(LunarSpikeAlt)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 4; val2.baseRechargeInterval = 4f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.cancelSprintingOnActivation = !value; val2.fullRestockOnAssign = true; val2.interruptPriority = (InterruptPriority)0; val2.isCombatSkill = true; val2.mustKeyPress = false; val2.rechargeStock = 1; val2.requiredStock = 1; val2.stockToConsume = 0; val2.icon = spikesDef.icon; val2.skillDescriptionToken = "LUNAR_SPIKE_ALT_DESCRIPTION"; val2.skillName = "LUNAR_SPIKE_ALT_NAME"; val2.skillNameToken = "LUNAR_SPIKE_ALT_NAME"; if (value) { val2.keywordTokens = new string[3] { "KEYWORD_LUNARRUIN", "KEYWORD_AGILE", "KEYWORD_GROWTH" }; } else { val2.keywordTokens = new string[2] { "KEYWORD_LUNARRUIN", "KEYWORD_GROWTH" }; } ContentAddition.AddSkillDef(val2); UtilStuff.AddSkillDef(val2); SkillLocator component = val.GetComponent<SkillLocator>(); SkillFamily skillFamily = component.secondary.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, unlockableName = "" }; ((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants[num] = val3; UtilStuff.AddHudSpikes(val.GetComponent<FalseSonController>().characterBody, (SkillSlot)1, val2); } } public class OldLunarMachineGun : BaseSkillState { private float stopWatch = 0f; private static SkillDef primaryDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonBodyClub.asset").WaitForCompletion(); private static SkillDef slamDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonClubSlam.asset").WaitForCompletion(); private GameObject projectilePrefab = LunarSpikesMod.newProjectilePrefab; private GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)" RoR2/DLC2/FalseSon/MuzzleflashFalseSonFire.prefab").WaitForCompletion(); private float damageCoefficient = 1.5f; private float procCoefficient = 1f; private static float baseDuration = 0.37f * ModConfig.lunarSpikeUseSpeed.Value; private float duration; public float force = 20f; public float attackSpeedAltAnimationThreshold = 1.5f; public string attackSoundString = "Play_falseson_skill2_lunarSpikes_shoot"; public float attackSoundPitch = 1.3f; public float bloom = 0.2f; private string muzzleString; private Transform muzzleTransform; private Animator animator; private ChildLocator childLocator; public override void OnEnter() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); if ((Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)primaryDef) { ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).characterBody, slamDef, SkillStateOverrideData.priority); } if (Object.op_Implicit((Object)(object)animator)) { childLocator = ((Component)animator).GetComponent<ChildLocator>(); } muzzleString = "MuzzleRight"; stopWatch = 0f; if (((BaseState)this).attackSpeedStat < attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireLunarSpike", "LunarSpike.playbackRate", duration, 0.1f); } Log.Warning("Fired First Spike"); FireLunarSpike(); } public override void OnExit() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)slamDef) { ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).characterBody, slamDef, SkillStateOverrideData.priority); } ((EntityState)this).OnExit(); } private void FireLunarSpike() { //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_0136: 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_0142: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).skillLocator.secondary.stock <= 0) { return; } ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, projectilePrefab, ((EntityState)this).gameObject, 1f); if (Object.op_Implicit((Object)(object)childLocator)) { muzzleTransform = childLocator.FindChild(muzzleString); } if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { if (((BaseState)this).attackSpeedStat < attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Override", "FireLunarSpike", "LunarSpike.playbackRate", duration, 0.1f); } else { ((EntityState)this).PlayAnimation("Gesture, Override", "HoldGauntletsUp", "LunarSpike.playbackRate", duration, 0f); } Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, attackSoundPitch); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)9, (GameObject)null, -1f); stopWatch = 0f; ((EntityState)this).skillLocator.secondary.DeductStock(1); } } public override void FixedUpdate() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopWatch += ((EntityState)this).GetDeltaTime(); if (stopWatch >= duration && ((EntityState)this).inputBank.skill2.down) { Log.Warning("Fired Spike after: " + stopWatch); FireLunarSpike(); } if (!((EntityState)this).inputBank.skill2.down && (Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)slamDef) { ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).characterBody, slamDef, SkillStateOverrideData.priority); } if (((EntityState)this).fixedAge >= duration && !((EntityState)this).inputBank.skill2.down && ((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 FalseSonSurvivorTweaks.LaserChargedChanges { internal class LaserChargedMod { [CompilerGenerated] private static class <>O { public static hook_FixedUpdate <0>__LaserFatherCharged_FixedUpdate; public static hook_OnExit <1>__LaserFatherCharged_OnExit; } public static void Init() { //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_002b: Expected O, but got Unknown //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_004c: Expected O, but got Unknown if (ModConfig.laserChargedWobbleFix.Value) { object obj = <>O.<0>__LaserFatherCharged_FixedUpdate; if (obj == null) { hook_FixedUpdate val = LaserFatherCharged_FixedUpdate; <>O.<0>__LaserFatherCharged_FixedUpdate = val; obj = (object)val; } LaserFatherCharged.FixedUpdate += (hook_FixedUpdate)obj; object obj2 = <>O.<1>__LaserFatherCharged_OnExit; if (obj2 == null) { hook_OnExit val2 = LaserFatherCharged_OnExit; <>O.<1>__LaserFatherCharged_OnExit = val2; obj2 = (object)val2; } LaserFatherCharged.OnExit += (hook_OnExit)obj2; } Log.Info("Laser Charged Changes Loaded"); } private static void LaserFatherCharged_FixedUpdate(orig_FixedUpdate orig, LaserFatherCharged self) { //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_0070: 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_008c: 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_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_00ca: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.laserEffectEnd) && Object.op_Implicit((Object)(object)((Component)self.laserEffectEnd).transform.parent)) { ((Component)self.laserEffectEnd).transform.parent = null; } if (Object.op_Implicit((Object)(object)self.laserEffectEnd) && !Object.op_Implicit((Object)(object)self.lockedOnHurtBox)) { Ray aimRay = ((BaseState)self).GetAimRay(); RaycastHit val = default(RaycastHit); Vector3 position = ((!Physics.Raycast(aimRay, ref val, LaserFatherCharged.maxDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) ? ((Ray)(ref aimRay)).GetPoint(LaserFatherCharged.maxDistance) : ((RaycastHit)(ref val)).point); ((Component)self.laserEffectEnd).transform.position = position; } } private static void LaserFatherCharged_OnExit(orig_OnExit orig, LaserFatherCharged self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.laserEffectEnd)) { Object.Destroy((Object)(object)((Component)self.laserEffectEnd).gameObject); } } } } namespace FalseSonSurvivorTweaks.LaserBurstChanges { internal class LaserBurstMod { [CompilerGenerated] private static class <>O { public static hook_OnEnter <0>__LaserFatherBurst_OnEnter; public static hook_IncreaseStockCount <1>__FalseSonController_IncreaseStockCount; public static hook_FireBurstLaser <2>__LaserFatherBurst_FireBurstLaser; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__8_1; public static Func<Instruction, bool> <>9__8_2; public static Func<Instruction, bool> <>9__8_3; public static Func<Instruction, bool> <>9__8_4; public static Func<Instruction, bool> <>9__8_5; public static Func<Instruction, bool> <>9__8_6; public static Func<float, float> <>9__8_7; public static Manipulator <>9__8_0; internal void <LaserFatherRestock>b__8_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); int num = default(int); val.GotoNext(new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "EntityStates.FalseSon.LaserFatherBurst", "maxSecondaryStock"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchConvI4(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val.Index += 3; val.EmitDelegate<Func<float, float>>((Func<float, float>)((float value) => laserBurstSpikeRestock)); } internal bool <LaserFatherRestock>b__8_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <LaserFatherRestock>b__8_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "EntityStates.FalseSon.LaserFatherBurst", "maxSecondaryStock"); } internal bool <LaserFatherRestock>b__8_3(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.3f); } internal bool <LaserFatherRestock>b__8_4(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <LaserFatherRestock>b__8_5(Instruction x) { return ILPatternMatchingExt.MatchConvI4(x); } internal bool <LaserFatherRestock>b__8_6(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal float <LaserFatherRestock>b__8_7(float value) { return laserBurstSpikeRestock; } } private static float burstLaserdamageCoefficient = 22f; private static float blastRadius = 6f; private static float laserBurstCooldown = 10f; private static int growthPerBustStock = 4; private static float laserBurstSpikeRestock = 0.6f; private static float burstDuration = 0.5f; private static float knockbackForce = -15f; public static void Init() { //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_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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00ec: 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_00f7: Expected O, but got Unknown SteppedSkillDef val = Addressables.LoadAssetAsync<SteppedSkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonBodyLaserBurst.asset").WaitForCompletion(); ((SkillDef)val).activationStateMachineName = "Slide"; burstLaserdamageCoefficient = (float)ModConfig.laserBurstDamage.Value / 100f; blastRadius = ModConfig.laserBurstRadius.Value; laserBurstCooldown = ModConfig.laserBurstCooldown.Value; ((SkillDef)val).baseRechargeInterval = laserBurstCooldown; laserBurstSpikeRestock = (float)ModConfig.laserBurstRestock.Value / 100f; if (ModConfig.laserBurstFaster.Value) { object obj = <>O.<0>__LaserFatherBurst_OnEnter; if (obj == null) { hook_OnEnter val2 = LaserFatherBurst_OnEnter; <>O.<0>__LaserFatherBurst_OnEnter = val2; obj = (object)val2; } LaserFatherBurst.OnEnter += (hook_OnEnter)obj; } object obj2 = <>O.<1>__FalseSonController_IncreaseStockCount; if (obj2 == null) { hook_IncreaseStockCount val3 = FalseSonController_IncreaseStockCount; <>O.<1>__FalseSonController_IncreaseStockCount = val3; obj2 = (object)val3; } FalseSonController.IncreaseStockCount += (hook_IncreaseStockCount)obj2; LaserFatherRestock(); knockbackForce = 0f - ModConfig.laserBurstKnockbackForce.Value; object obj3 = <>O.<2>__LaserFatherBurst_FireBurstLaser; if (obj3 == null) { hook_FireBurstLaser val4 = LaserFatherBurst_FireBurstLaser; <>O.<2>__LaserFatherBurst_FireBurstLaser = val4; obj3 = (object)val4; } LaserFatherBurst.FireBurstLaser += (hook_FireBurstLaser)obj3; string text = $"Fire a powerful laser for <style=cIsDamage>{burstLaserdamageCoefficient * 100f}% damage</style>, refilling <style=cIsUtility>{laserBurstSpikeRestock * 100f}% Lunar Spikes</style>.\nGain additional stocks through <style=cIsHealing>Growth</style>."; LanguageAPI.Add(((SkillDef)val).skillDescriptionToken, text); Log.Info("Laser Burst Changes Loaded"); } private static void LaserFatherRestock() { //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) { 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); int num = default(int); val2.GotoNext(new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "EntityStates.FalseSon.LaserFatherBurst", "maxSecondaryStock"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchConvI4(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val2.Index += 3; val2.EmitDelegate<Func<float, float>>((Func<float, float>)((float value) => laserBurstSpikeRestock)); }; <>c.<>9__8_0 = val; obj = (object)val; } LaserFatherBurst.OnEnter += (Manipulator)obj; } private static void LaserFatherBurst_OnEnter(orig_OnEnter orig, LaserFatherBurst self) { LaserFatherBurst.baseDuration = burstDuration; orig.Invoke(self); } private static void LaserFatherBurst_FireBurstLaser(orig_FireBurstLaser orig, LaserFatherBurst self) { //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_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_0078: 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_00a7: Unknown result type (might be due to invalid IL or missing references) LaserFatherBurst.damageCoefficient = burstLaserdamageCoefficient; LaserFatherBurst.blastRadius = blastRadius; orig.Invoke(self); if (ModConfig.laserBurstKnockback.Value && !((EntityState)self).characterMotor.isGrounded) { Ray aimRay = ((BaseState)self).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; float num = (Object.op_Implicit((Object)(object)((EntityState)self).characterBody.characterMotor) ? ((EntityState)self).characterBody.characterMotor.mass : 1f); if ((double)direction.y <= -0.75) { ((EntityState)self).characterBody.characterMotor.ApplyForce(knockbackForce * num * direction, false, false); } } } private static void FalseSonController_IncreaseStockCount(orig_IncreaseStockCount orig, FalseSonController self) { self.extraShardFromHealth = self.GetTotalSpikeCount(); if (self.extraShardFromHealth != self.oldExtraShardFromHealth) { if (self.extraShardFromHealth < 0) { self.extraShardFromHealth = 0; } self.characterBody.extraSecondaryFromSkill = self.extraShardFromHealth; int extraSpecialFromSkill = self.extraShardFromHealth / growthPerBustStock; if (self.laserSpecialSkill.skillDef.skillIndex == self.laserBurstSkillIndex) { self.characterBody.extraSpecialFromSkill = extraSpecialFromSkill; } self.UpdateStats(); self.oldExtraShardFromHealth = self.extraShardFromHealth; } self.maxSecondaryStock = self.GetMaxSecondaryStock(); } } } namespace FalseSonSurvivorTweaks.GrowthChanges { internal class GrowthMod { [CompilerGenerated] private static class <>O { public static hook_GetTotalSpikeCount <0>__FalseSonController_GetTotalSpikeCount; } private static BuffDef growthCounterBuff = ScriptableObject.CreateInstance<BuffDef>(); private static int growthPerLevel = ModConfig.growthPerLevel.Value; private static float maxHealthThresholdValue = ModConfig.growthMaxHealthPerGrowth.Value; private static float growthScaling = ModConfig.growthScaling.Value; public static void Init() { //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_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_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_0088: Expected O, but got Unknown ((Object)growthCounterBuff).name = "bdGrowthCounterBuff"; growthCounterBuff.buffColor = Color.green; growthCounterBuff.canStack = true; growthCounterBuff.isDebuff = false; growthCounterBuff.isCooldown = false; growthCounterBuff.iconSprite = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Base/LunarSkillReplacements/bdLunarDetonationCharge.asset").WaitForCompletion().iconSprite; ContentAddition.AddBuffDef(growthCounterBuff); object obj = <>O.<0>__FalseSonController_GetTotalSpikeCount; if (obj == null) { hook_GetTotalSpikeCount val = FalseSonController_GetTotalSpikeCount; <>O.<0>__FalseSonController_GetTotalSpikeCount = val; obj = (object)val; } FalseSonController.GetTotalSpikeCount += (hook_GetTotalSpikeCount)obj; string text = $"<style=cKeywordName>Growth</style>Enhances your skills by gaining <style=cIsHealing>bonus health</style> from items or other sources, <style=cIsHealing>maximum health</style> gained from level ups does not count towards this bonus, instead gain <style=cIsHealing>Growth</style> every <style=cIsUtility>{5}</style> levels."; LanguageAPI.Add("KEYWORD_GROWTH", text); Log.Info("Growth Changes Loaded."); } private static int FalseSonController_GetTotalSpikeCount(orig_GetTotalSpikeCount orig, FalseSonController self) { //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) int num = 0; float num2 = maxHealthThresholdValue; float num3 = growthScaling; float num4 = self.characterBody.maxBonusHealth - (self.characterBody.baseMaxHealth + self.characterBody.levelMaxHealth * (float)((int)self.characterBody.level - 1)); int num5 = 10; if (num2 == 0f && num3 == 0f) { Log.Error("Growth Math Safety Check Triggered."); num = (int)num4; } else { while (num4 >= num2) { num4 -= num2; if (num4 < 0f) { break; } num++; if (num + 4 > num5) { num5 += 10; num3 = growthScaling + growthScaling * (float)(num / 10); } num2 = maxHealthThresholdValue + num3 * (float)num; } } int num6 = (int)self.characterBody.level - 1; int num7 = 0; if (growthPerLevel > 0) { num7 = num6 / growthPerLevel; } if (ModConfig.growthCounter.Value) { if (self.characterBody.HasBuff(growthCounterBuff)) { self.characterBody.SetBuffCount(growthCounterBuff.buffIndex, num + num7); } else if (num + num7 > 0) { self.characterBody.AddBuff(growthCounterBuff); self.characterBody.SetBuffCount(growthCounterBuff.buffIndex, num + num7); } } return num + num7; } } } namespace FalseSonSurvivorTweaks.ForsakenClubChanges { internal class ClubSlamMod { [CompilerGenerated] private static class <>O { public static hook_OnEnter <0>__ClubForsaken_OnEnter; public static hook_OnEnter <1>__ClubForsaken2_OnEnter; public static hook_OnEnter <2>__ClubSwing3_OnEnter; public static hook_FixedUpdate <3>__ClubSwing3_FixedUpdate; public static hook_DetonateAuthority <4>__ClubGroundSlam_DetonateAuthority; public static hook_InitializeBlastAttackAsCharged <5>__ChargedClubSwing_InitializeBlastAttackAsCharged; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__13_1; public static Func<Instruction, bool> <>9__13_2; public static Func<Instruction, bool> <>9__13_3; public static Func<Instruction, bool> <>9__13_4; public static Func<Instruction, bool> <>9__13_5; public static Func<Instruction, bool> <>9__13_6; public static Func<Instruction, bool> <>9__13_7; public static Func<EntityState, bool> <>9__13_8; public static Manipulator <>9__13_0; internal void <CLubSwingButtonDownFix>b__13_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); ILLabel val3 = default(ILLabel); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func<Instruction, bool>[7] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "EntityStates.EntityState", "get_inputBank"), (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.InputBankTest", "skill2"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.InputBankTest/ButtonState", "get_justPressed"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 4; val.RemoveRange(3); val.EmitDelegate<Func<EntityState, bool>>((Func<EntityState, bool>)((EntityState state) => state.inputBank.skill2.down ? true : false)); } internal bool <CLubSwingButtonDownFix>b__13_1(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 0); } internal bool <CLubSwingButtonDownFix>b__13_2(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool <CLubSwingButtonDownFix>b__13_3(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <CLubSwingButtonDownFix>b__13_4(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "EntityStates.EntityState", "get_inputBank"); } internal bool <CLubSwingButtonDownFix>b__13_5(Instruction x) { return ILPatternMatchingExt.MatchLdflda(x, "RoR2.InputBankTest", "skill2"); } internal bool <CLubSwingButtonDownFix>b__13_6(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.InputBankTest/ButtonState", "get_justPressed"); } internal bool <CLubSwingButtonDownFix>b__13_7(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool <CLubSwingButtonDownFix>b__13_8(EntityState state) { if (state.inputBank.skill2.down) { return true; } return false; } } private static float slamDamageGrowthScaling = ModConfig.forsakenClubGrowthDamage.Value / 100f; private static float slamRadiusGrowthScaling = ModConfig.forsakenClubGrowthRadius.Value; private static float damageCoefficient = ModConfig.forsakenClubDamage.Value / 100f; private static float blastProcCoefficient = ModConfig.forsakenClubProcCoefficient.Value; private static float blastRadius = ModConfig.forsakenClubRadius.Value; private static float blastForce = 600f; private static Vector3 blastBonusForce = new Vector3(1000f, 1000f, 1000f); private static float minChargeSlam = ModConfig.forsakenClubMinimumCharge.Value; private static GameObject clubSlamClone = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSon/FalseSonGroundSlam.prefab").WaitForCompletion(), "0p41_scalableGroundSlam"); private static SkillDef primaryDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonBodyClub.asset").WaitForCompletion(); private static SkillDef slamDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonClubSlam.asset").WaitForCompletion(); p