Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of StormboundFalseSon v0.8.4
StormboundFalseSon.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Destructible; using EntityStates.FalseSon; using EntityStates.FalseSonBoss; using EntityStates.Geode; using EntityStates.GolemMonster; using EntityStates.Interactables.GoldBeacon; using EntityStates.LightningStorm; using EntityStates.MeridianEvent; using EntityStates.Missions.Goldshores; using EntityStates.Missions.MiniGeodeTracker; using EntityStates.PrimeMeridian; using EntityStates.ShrineRebirth; using EntityStates.TitanMonster; using IL.EntityStates.FalseSonBoss; using IL.EntityStates.Geode; using IL.RoR2; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On; using On.EntityStates.Destructible; using On.EntityStates.FalseSonBoss; using On.EntityStates.Geode; using On.EntityStates.Interactables.GoldBeacon; using On.EntityStates.LightningStorm; using On.EntityStates.MeridianEvent; using On.EntityStates.Missions.Goldshores; using On.EntityStates.PrimeMeridian; using On.EntityStates.ShrineRebirth; using On.EntityStates.TitanMonster; using On.RoR2; using On.RoR2.Projectile; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntitlementManagement; using RoR2.Navigation; using RoR2.Orbs; using RoR2.PostProcessing; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using StormboundFalseSon.Changes; using StormboundFalseSon.Modules; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [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: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("StormboundFalseSon")] [assembly: AssemblyProduct("StormboundFalseSon")] [assembly: AssemblyTitle("StormboundFalseSon")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [Embedded] [CompilerGenerated] [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 StormboundFalseSon { 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.*/)] [BepInPlugin("com.Bloonjitsu7.StormboundFalseSon", "StormboundFalseSon", "0.8.4")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class StormboundFalseSonPlugin : BaseUnityPlugin { private Main changes; public static PluginInfo PInfo { get; private set; } public void Awake() { PInfo = ((BaseUnityPlugin)this).Info; Log.Init(((BaseUnityPlugin)this).Logger); Configs.SetupConfig(((BaseUnityPlugin)this).Config); Configs.UpdateConfigValues(); new ContentPacks().Initialize(); changes = new Main(); changes.Initialize(); } } public static class Configs { [CompilerGenerated] private static class <>O { public static IsDisabledDelegate <0>__CheckDisabled; } public static float scalingMult; public static bool bonusItemEnable; public static bool adaptiveArmorEnable; public static bool damageCapEnable; public static bool freezeImmunityEnable; public static float freezeDamage; public static bool lunarRuinEnable; public static float lunarRuinCap; public static float eclipseCooldownMult; public static float fsBaseHP1; public static float fsLevelHP1; public static float fsBaseHP2; public static float fsLevelHP2; public static float fsBaseHP3; public static float fsLevelHP3; public static float fsBaseArmor; public static float fsLevelArmor; public static float lightningRadiusMult; public static float baseLightningDelay; public static float lightningDamage; public static bool lightningDelayScaling; public static bool lightningDamageScaling; public static bool lightningWarningFX; public static bool lightningMeridianReduce; public static bool geodeEnable; public static bool geodeBuffs; public static float geodeSpeedMult; public static float geodeSpeedDuration; public static float geodeRegenAmount; public static float geodeRegenDuration; public static bool halcLaser; public static int halcHP; public static int halcDamage; public static bool slamEnable; public static float slamCooldown; public static bool slamEclipse; public static int slamStocks; public static float slamWindup1; public static float slamWindup2; public static float slamDelayMult; public static float slamAbilityDelay; public static float slamAimSpeed; public static int slamFissures; public static bool dashEnable; public static float dashCooldown; public static bool dashEclipse; public static float dashWindup; public static float dashLightningDelay; public static bool dashArmor; public static float dashSlamDelay; public static bool offeringEnable; public static float offeringCooldown; public static bool offeringEclipse; public static bool offeringStakeEnable; public static bool offeringProjectiles; public static float offeringSpikeSpeed; public static float offeringStakeSpeed; public static float offeringAimSpeed; public static bool rainEnable; public static float rainCooldown; public static bool rainEclipse; public static float rainWindup; public static int crystalScatters; public static int crystalCount; public static float crystalDuration; public static bool crystalAutoDetonate; public static float crystalTimer; public static float crystalDamage; public static bool crystalFalloff; public static int crystalFissures; public static float crystalOverchargeRadius; public static float crystalOverchargeDamage; public static bool crystalOverchargeLight; public static float laserCooldown; public static bool laserEclipse; public static bool leapEnable; public static float leapDelay; public static float leapFrequency; public static float leapDuration; public static int leapMin; public static int leapMax; public static int leapPlusMin; public static int leapPlusMax; public static bool laserEnable; public static float laserDuration; public static float laserDamage; public static float laserTickRate; public static float laserDecayRate; public static bool laserLightEnable; public static float laserLightIntensity; public static float laserLightAutoDisable; public static float devastatorCooldown; public static bool devastatorEclipse; public static bool devastatorOrbEnable; public static float devastatorOrbSpeed; public static float devastatorOrbDuration; public static float devastatorOrbDamage; public static int devastatorOrbCount; public static bool devastatorDebuffEnable; public static float devastatorDebuffInterval; public static bool devastatorDebuffVFX; public static bool artifactEnable; public static bool forceHardMode; public static bool forceEclipse; public static int thunderHPBoost; public static float thunderLightningDelayMult; public static bool thunderPassiveLightning; public static bool thunderLightningLine2; public static bool thunderLightningLine3; public static float thunderLightningLineDelayMult; public static float thunderLightningLineInterval; public static float thunderGeodeBarrier; public static float thunderGeodeHeal; public static bool thunderGeodeElite; public static bool thunderGeodeArmor; public static bool thunderGeodeGolems; public static bool thunderSlamPatterns; public static int thunderSlamScatter2; public static int thunderSlamScatter3; public static float thunderSlamScatterDelay; public static int thunderSlamFissures; public static float thunderSlamWindupMult; public static bool thunderDashParry; public static float thunderDashParryDuration; public static bool thunderDashParryAll; public static float thunderDashWindup; public static bool thunderDashEnable; public static float thunderOfferingSpeedMult; public static bool thunderOfferingProjectiles; public static int thunderRainShards; public static int thunderRainFissures; public static float thunderLaserDuration; public static float thunderLeapLightningMult; public static float thunderLeapDurationMult; public static float thunderLaserCooldownMult; public static bool thunderShockwaveEnable; public static float thunderShockwaveDelay; public static float thunderShockwaveDamage; public static bool thunderDevastatorOrbs; public static bool auriEnable; public static float auriRegen; public static bool auriAdaptiveArmor; public static bool auriFixedSpawn; public static bool auriReducedStats; public static float auriDamageMultFS; public static float auriSpeedMultFS; public static float auriBaseHP; public static float auriLevelHP; public static float auriBaseArmor; public static float auriLevelArmor; public static bool auriSwordEnable; public static float auriSwordDelay; public static float auriSwordInterval; public static bool auriCrownEnable; public static int auriCrownLasers; public static int auriCrownLasersFS; public static float auriCrownSpinSpeed; public static float auriCrownDuration; public static float auriCrownDamage; public static float auriCrownDamageDelay; public static bool auriCrownBypassArmor; public static bool auriBeamEnable; public static float auriBeamFrequency; public static float auriBeamProjectileDamage; public static float auriBeamProjectileSpeed; public static float auriBeamProjectileSpread; public static float auriBeamProjectileAccuracy; public static float auriBeamDuration; public static float auriBeamDamage; public static float auriBeamRadius; public static float auriBeamForce; public static bool auriBeamIgnite; public static bool coastEnable; public static float coastSpawnTimer; public static float coastSpawnReduction; public static float coastBaseArmor; public static float coastBeaconArmor; public static int coastBeaconTimer; public static int coastBeaconExtension; public static float coastGoldMult; public static bool coastBonusChest; public static string halcyonStages; public static float halcyonChanceMult; public static bool halcyonStage5; public static bool voidGeodes; public static int voidGeodeCount; public static float voidLightIntensity; public static float voidLightRange; public static ConfigEntry<bool> knightEnable { get; set; } public static ConfigEntry<bool> enableConfigs { get; set; } public static ConfigEntry<float> CFGscalingMult { get; set; } public static ConfigEntry<bool> CFGbonusItemEnable { get; set; } public static ConfigEntry<bool> CFGadaptiveArmorEnable { get; set; } public static ConfigEntry<bool> CFGdamageCapEnable { get; set; } public static ConfigEntry<bool> CFGfreezeImmunityEnable { get; set; } public static ConfigEntry<float> CFGfreezeDamage { get; set; } public static ConfigEntry<bool> CFGlunarRuinEnable { get; set; } public static ConfigEntry<float> CFGlunarRuinCap { get; set; } public static ConfigEntry<float> CFGeclipseMult { get; set; } public static ConfigEntry<float> CFGfsBaseHP1 { get; set; } public static ConfigEntry<float> CFGfsLevelHP1 { get; set; } public static ConfigEntry<float> CFGfsBaseHP2 { get; set; } public static ConfigEntry<float> CFGfsLevelHP2 { get; set; } public static ConfigEntry<float> CFGfsBaseHP3 { get; set; } public static ConfigEntry<float> CFGfsLevelHP3 { get; set; } public static ConfigEntry<float> CFGfsBaseArmor { get; set; } public static ConfigEntry<float> CFGfsLevelArmor { get; set; } public static ConfigEntry<float> CFGlightningRadiusMult { get; set; } public static ConfigEntry<float> CFGbaseLightningDelay { get; set; } public static ConfigEntry<float> CFGlightningDamage { get; set; } public static ConfigEntry<bool> CFGlightningDelayScaling { get; set; } public static ConfigEntry<bool> CFGlightningDamageScaling { get; set; } public static ConfigEntry<bool> CFGlightningWarningFX { get; set; } public static ConfigEntry<bool> CFGlightningMeridianReduce { get; set; } public static ConfigEntry<bool> CFGgeodeEnable { get; set; } public static ConfigEntry<bool> CFGgeodeBuffs { get; set; } public static ConfigEntry<float> CFGgeodeSpeedMult { get; set; } public static ConfigEntry<float> CFGgeodeSpeedDuration { get; set; } public static ConfigEntry<float> CFGgeodeRegenAmount { get; set; } public static ConfigEntry<float> CFGgeodeRegenDuration { get; set; } public static ConfigEntry<bool> CFGhalcLaser { get; set; } public static ConfigEntry<int> CFGhalcHP { get; set; } public static ConfigEntry<int> CFGhalcDamage { get; set; } public static ConfigEntry<bool> CFGslamEnable { get; set; } public static ConfigEntry<float> CFGslamCooldown { get; set; } public static ConfigEntry<bool> CFGslamEclipse { get; set; } public static ConfigEntry<int> CFGslamStocks { get; set; } public static ConfigEntry<float> CFGslamWindup1 { get; set; } public static ConfigEntry<float> CFGslamWindup2 { get; set; } public static ConfigEntry<float> CFGslamDelayMult { get; set; } public static ConfigEntry<float> CFGslamAbilityDelay { get; set; } public static ConfigEntry<float> CFGslamAimSpeed { get; set; } public static ConfigEntry<int> CFGslamFissures { get; set; } public static ConfigEntry<bool> CFGdashEnable { get; set; } public static ConfigEntry<float> CFGdashCooldown { get; set; } public static ConfigEntry<bool> CFGdashEclipse { get; set; } public static ConfigEntry<float> CFGdashWindup { get; set; } public static ConfigEntry<float> CFGdashLightningDelay { get; set; } public static ConfigEntry<bool> CFGdashArmor { get; set; } public static ConfigEntry<float> CFGdashSlamDelay { get; set; } public static ConfigEntry<bool> CFGofferingEnable { get; set; } public static ConfigEntry<float> CFGofferingCooldown { get; set; } public static ConfigEntry<bool> CFGofferingEclipse { get; set; } public static ConfigEntry<bool> CFGofferingStakeEnable { get; set; } public static ConfigEntry<bool> CFGofferingProjectiles { get; set; } public static ConfigEntry<float> CFGofferingSpikeSpeed { get; set; } public static ConfigEntry<float> CFGofferingStakeSpeed { get; set; } public static ConfigEntry<float> CFGofferingAimSpeed { get; set; } public static ConfigEntry<bool> CFGrainEnable { get; set; } public static ConfigEntry<float> CFGrainCooldown { get; set; } public static ConfigEntry<bool> CFGrainEclipse { get; set; } public static ConfigEntry<float> CFGrainWindup { get; set; } public static ConfigEntry<int> CFGcrystalScatters { get; set; } public static ConfigEntry<int> CFGcrystalCount { get; set; } public static ConfigEntry<float> CFGcrystalDuration { get; set; } public static ConfigEntry<bool> CFGcrystalAutoDetonate { get; set; } public static ConfigEntry<float> CFGcrystalTimer { get; set; } public static ConfigEntry<float> CFGcrystalDamage { get; set; } public static ConfigEntry<bool> CFGcrystalFalloff { get; set; } public static ConfigEntry<int> CFGcrystalFissures { get; set; } public static ConfigEntry<float> CFGcrystalOverchargeRadius { get; set; } public static ConfigEntry<float> CFGcrystalOverchargeDamage { get; set; } public static ConfigEntry<bool> CFGcrystalOverchargeLight { get; set; } public static ConfigEntry<float> CFGlaserCooldown { get; set; } public static ConfigEntry<bool> CFGlaserEclipse { get; set; } public static ConfigEntry<bool> CFGleapEnable { get; set; } public static ConfigEntry<float> CFGleapDelay { get; set; } public static ConfigEntry<float> CFGleapFrequency { get; set; } public static ConfigEntry<float> CFGleapDuration { get; set; } public static ConfigEntry<int> CFGleapMin { get; set; } public static ConfigEntry<int> CFGleapMax { get; set; } public static ConfigEntry<int> CFGleapPlusMin { get; set; } public static ConfigEntry<int> CFGleapPlusMax { get; set; } public static ConfigEntry<bool> CFGlaserEnable { get; set; } public static ConfigEntry<float> CFGlaserDuration { get; set; } public static ConfigEntry<float> CFGlaserDamage { get; set; } public static ConfigEntry<float> CFGlaserTickRate { get; set; } public static ConfigEntry<float> CFGlaserDecayRate { get; set; } public static ConfigEntry<bool> CFGlaserLightEnable { get; set; } public static ConfigEntry<float> CFGlaserLightIntensity { get; set; } public static ConfigEntry<float> CFGlaserLightAutoDisable { get; set; } public static ConfigEntry<float> CFGdevastatorCooldown { get; set; } public static ConfigEntry<bool> CFGdevastatorEclipse { get; set; } public static ConfigEntry<bool> CFGdevastatorOrbEnable { get; set; } public static ConfigEntry<float> CFGdevastatorOrbSpeed { get; set; } public static ConfigEntry<float> CFGdevastatorOrbDuration { get; set; } public static ConfigEntry<float> CFGdevastatorOrbDamage { get; set; } public static ConfigEntry<int> CFGdevastatorOrbCount { get; set; } public static ConfigEntry<bool> CFGdevastatorDebuffEnable { get; set; } public static ConfigEntry<float> CFGdevastatorDebuffInterval { get; set; } public static ConfigEntry<bool> CFGdevastatorDebuffVFX { get; set; } public static ConfigEntry<bool> CFGartifactEnable { get; set; } public static ConfigEntry<bool> CFGforceHardMode { get; set; } public static ConfigEntry<bool> CFGforceEclipse { get; set; } public static ConfigEntry<int> CFGthunderHPBoost { get; set; } public static ConfigEntry<float> CFGthunderLightningDelayMult { get; set; } public static ConfigEntry<bool> CFGthunderPassiveLightning { get; set; } public static ConfigEntry<bool> CFGthunderLightningLine2 { get; set; } public static ConfigEntry<bool> CFGthunderLightningLine3 { get; set; } public static ConfigEntry<float> CFGthunderLightningLineDelayMult { get; set; } public static ConfigEntry<float> CFGthunderLightningLineInterval { get; set; } public static ConfigEntry<float> CFGthunderGeodeBarrier { get; set; } public static ConfigEntry<float> CFGthunderGeodeHeal { get; set; } public static ConfigEntry<bool> CFGthunderGeodeElite { get; set; } public static ConfigEntry<bool> CFGthunderGeodeArmor { get; set; } public static ConfigEntry<bool> CFGthunderGeodeGolems { get; set; } public static ConfigEntry<bool> CFGthunderSlamPatterns { get; set; } public static ConfigEntry<int> CFGthunderSlamScatter2 { get; set; } public static ConfigEntry<int> CFGthunderSlamScatter3 { get; set; } public static ConfigEntry<float> CFGthunderSlamScatterDelay { get; set; } public static ConfigEntry<int> CFGthunderSlamFissures { get; set; } public static ConfigEntry<float> CFGthunderSlamWindupMult { get; set; } public static ConfigEntry<bool> CFGthunderDashParry { get; set; } public static ConfigEntry<float> CFGthunderDashParryDuration { get; set; } public static ConfigEntry<bool> CFGthunderDashParryAll { get; set; } public static ConfigEntry<float> CFGthunderDashWindup { get; set; } public static ConfigEntry<bool> CFGthunderDashEnable { get; set; } public static ConfigEntry<float> CFGthunderOfferingSpeedMult { get; set; } public static ConfigEntry<bool> CFGthunderOfferingProjectiles { get; set; } public static ConfigEntry<int> CFGthunderRainShards { get; set; } public static ConfigEntry<int> CFGthunderRainFissures { get; set; } public static ConfigEntry<float> CFGthunderLaserDuration { get; set; } public static ConfigEntry<float> CFGthunderLeapLightningMult { get; set; } public static ConfigEntry<float> CFGthunderLeapDurationMult { get; set; } public static ConfigEntry<float> CFGthunderLaserCooldownMult { get; set; } public static ConfigEntry<bool> CFGthunderShockwaveEnable { get; set; } public static ConfigEntry<float> CFGthunderShockwaveDelay { get; set; } public static ConfigEntry<float> CFGthunderShockwaveDamage { get; set; } public static ConfigEntry<bool> CFGthunderDevastatorOrbs { get; set; } public static ConfigEntry<bool> CFGauriEnable { get; set; } public static ConfigEntry<float> CFGauriRegen { get; set; } public static ConfigEntry<bool> CFGauriAdaptiveArmor { get; set; } public static ConfigEntry<bool> CFGauriFixedSpawn { get; set; } public static ConfigEntry<bool> CFGauriReducedStats { get; set; } public static ConfigEntry<float> CFGauriDamageMultFS { get; set; } public static ConfigEntry<float> CFGauriSpeedMultFS { get; set; } public static ConfigEntry<float> CFGauriBaseHP { get; set; } public static ConfigEntry<float> CFGauriLevelHP { get; set; } public static ConfigEntry<float> CFGauriBaseArmor { get; set; } public static ConfigEntry<float> CFGauriLevelArmor { get; set; } public static ConfigEntry<bool> CFGauriSwordEnable { get; set; } public static ConfigEntry<float> CFGauriSwordDelay { get; set; } public static ConfigEntry<float> CFGauriSwordInterval { get; set; } public static ConfigEntry<bool> CFGauriCrownEnable { get; set; } public static ConfigEntry<int> CFGauriCrownLasers { get; set; } public static ConfigEntry<int> CFGauriCrownLasersFS { get; set; } public static ConfigEntry<float> CFGauriCrownSpinSpeed { get; set; } public static ConfigEntry<float> CFGauriCrownDuration { get; set; } public static ConfigEntry<float> CFGauriCrownDamage { get; set; } public static ConfigEntry<float> CFGauriCrownDamageDelay { get; set; } public static ConfigEntry<bool> CFGauriCrownBypassArmor { get; set; } public static ConfigEntry<bool> CFGauriBeamEnable { get; set; } public static ConfigEntry<float> CFGauriBeamFrequency { get; set; } public static ConfigEntry<float> CFGauriBeamProjectileDamage { get; set; } public static ConfigEntry<float> CFGauriBeamProjectileSpeed { get; set; } public static ConfigEntry<float> CFGauriBeamProjectileSpread { get; set; } public static ConfigEntry<float> CFGauriBeamProjectileAccuracy { get; set; } public static ConfigEntry<float> CFGauriBeamDuration { get; set; } public static ConfigEntry<float> CFGauriBeamDamage { get; set; } public static ConfigEntry<float> CFGauriBeamRadius { get; set; } public static ConfigEntry<float> CFGauriBeamForce { get; set; } public static ConfigEntry<bool> CFGauriBeamIgnite { get; set; } public static ConfigEntry<bool> CFGcoastEnable { get; set; } public static ConfigEntry<float> CFGcoastSpawnTimer { get; set; } public static ConfigEntry<float> CFGcoastSpawnReduction { get; set; } public static ConfigEntry<float> CFGcoastBaseArmor { get; set; } public static ConfigEntry<float> CFGcoastBeaconArmor { get; set; } public static ConfigEntry<int> CFGcoastBeaconTimer { get; set; } public static ConfigEntry<int> CFGcoastBeaconExtension { get; set; } public static ConfigEntry<float> CFGcoastGoldMult { get; set; } public static ConfigEntry<bool> CFGcoastBonusChest { get; set; } public static ConfigEntry<string> CFGhalcyonStages { get; set; } public static ConfigEntry<float> CFGhalcyonChanceMult { get; set; } public static ConfigEntry<bool> CFGhalcyonStage5 { get; set; } public static ConfigEntry<bool> CFGvoidGeodes { get; set; } public static ConfigEntry<int> CFGvoidGeodeCount { get; set; } public static ConfigEntry<float> CFGvoidLightIntensity { get; set; } public static ConfigEntry<float> CFGvoidLightRange { get; set; } public static void SetupConfig(ConfigFile cfg) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown enableConfigs = cfg.Bind<bool>("!!!IMPORTANT!!!", "Enable Configuration", false, "This mod is balanced around the default config values, and changing them could potentially lead to a less enjoyable experience. Enable at your own risk."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(enableConfigs, new CheckBoxConfig())); enableConfigs.SettingChanged += delegate { UpdateConfigValues(); }; CFGlaserLightAutoDisable = cfg.Bind<float>("!!!IMPORTANT!!!", "Laser Light FPS Threshold", 10f, "Automatically disables the Lunar Gaze Light VFX if your FPS dips below this value while it's active."); ModSettingsManager.AddOption((BaseOption)new SliderOption(CFGlaserLightAutoDisable, new SliderConfig { min = 0f, max = 60f })); CFGlaserLightAutoDisable.SettingChanged += delegate { UpdateConfigValues(); }; CFGlunarRuinEnable = RegisterConfigBool(cfg, "False Son", "Enable Lunar Ruin Changes", defaultValue: true, "Enables the changes to the Lunar Ruin debuff. Also affects the False Son survivor."); CFGgeodeEnable = RegisterConfigBool(cfg, "False Son - Geode Mechanics", "Enable Changes", defaultValue: true, "Enables the changes to the geode mechanics during the False Son fight.", restart: true); knightEnable = RegisterConfigBool(cfg, "False Son - Geode Mechanics", "HalcyonKnight Compatibility", defaultValue: true, "Reduces the stat bonuses granted to Halcyonite during the False Son fight if HalcyonKnight is installed. Will be replaced with stat configuration in the full release.", restart: true); CFGslamEnable = RegisterConfigBool(cfg, "False Son - Fissure Slam", "Enable Changes", defaultValue: true, "Enables the changes to Fissure Slam.", restart: true); CFGdashEnable = RegisterConfigBool(cfg, "False Son - Corrupted Paths", "Enable Changes", defaultValue: true, "Enables the changes to Corrupted Paths.", restart: true); CFGofferingEnable = RegisterConfigBool(cfg, "False Son - Tainted Offering", "Enable Changes", defaultValue: true, "Enables the changes to Tainted Offering.", restart: true); CFGrainEnable = RegisterConfigBool(cfg, "False Son - Lunar Rain", "Enable Changes", defaultValue: true, "Enables the changes to Lunar Rain.", restart: true); CFGleapEnable = RegisterConfigBool(cfg, "False Son - Lunar Gaze", "Enable Leap Changes", defaultValue: true, "Enables the changes to the Lunar Gaze leap.", restart: true); CFGlaserEnable = RegisterConfigBool(cfg, "False Son - Lunar Gaze", "Enable Laser Changes", defaultValue: true, "Enables the changes to the Lunar Gaze laser.", restart: true); CFGlaserLightEnable = RegisterConfigBool(cfg, "False Son - Lunar Gaze", "Enable Laser Light/Shadow VFX", defaultValue: true, "Enables the light emission from the meridian statue during Lunar Gaze. If you're experiencing frame drops or general performance issues, try disabling this."); CFGdevastatorDebuffEnable = RegisterConfigBool(cfg, "False Son - Prime Devastator", "Enable Debuff Changes", defaultValue: true, "Enables the changes to the Prime Devastator debuff.", restart: true); CFGdevastatorOrbEnable = RegisterConfigBool(cfg, "False Son - Prime Devastator", "Enable Orb Changes", defaultValue: true, "Enables the changes to the Prime Devastator orbs.", restart: true); CFGauriEnable = RegisterConfigBool(cfg, "Aurelionite - General Changes", "Enable Changes", defaultValue: true, "Enables the changes to Aurelionite.", restart: true); CFGcoastEnable = RegisterConfigBool(cfg, "Aurelionite - Gilded Coast Mechanics", "Enable Changes", defaultValue: true, "Enables the changes to the Gilded Coast mechanics.", restart: true); CFGhalcyonStages = RegisterConfigString(cfg, "Miscellaneous - Halcyon Shrines", "Guaranteed Spawns", "village,habitat,helminthroost,hollowsummit_wormsworms,hollowsummitnight_wormsworms", "List of stages to get a guaranteed Halcyon Shrine. Does not allow for more than one Halcyon Shrine to spawn per stage, and still uses up scene director credits. Shattered Abodes, Treeborn Colony, Helminth Hatchery, Hollow Summit, and Frozen Summit are selected by default (Hollow/Frozen Summit mod is not required). Stages are separated by commas with no spaces inbetween."); } public static void UpdateConfigValues() { bool flag = enableConfigs != null && enableConfigs.Value; laserLightAutoDisable = ((CFGlaserLightAutoDisable != null) ? CFGlaserLightAutoDisable.Value : 10f); scalingMult = 1.2f; bonusItemEnable = true; adaptiveArmorEnable = true; damageCapEnable = true; freezeImmunityEnable = true; freezeDamage = 1.5f; lunarRuinEnable = !flag || CFGlunarRuinEnable.Value; lunarRuinCap = 1.5f; eclipseCooldownMult = 0.75f; fsBaseHP1 = 1000f; fsLevelHP1 = 300f; fsBaseHP2 = 1100f; fsLevelHP2 = 330f; fsBaseHP3 = 1200f; fsLevelHP3 = 360f; fsBaseArmor = 25f; fsLevelArmor = 0f; lightningRadiusMult = 0.9f; baseLightningDelay = 1.2f; lightningDamage = 0.125f; lightningDelayScaling = true; lightningDamageScaling = true; lightningWarningFX = true; lightningMeridianReduce = true; geodeEnable = !flag || CFGgeodeEnable.Value; geodeBuffs = true; geodeSpeedMult = 0.5f; geodeSpeedDuration = 5f; geodeRegenAmount = 0.05f; geodeRegenDuration = 2f; halcLaser = true; halcHP = 10; halcDamage = 0; slamEnable = !flag || CFGslamEnable.Value; slamCooldown = 5.5f; slamEclipse = true; slamStocks = 1; slamWindup1 = 1.2f; slamWindup2 = 1.8f; slamDelayMult = 1.5f; slamAbilityDelay = 2f; slamFissures = 3; slamAimSpeed = 30f; dashEnable = !flag || CFGdashEnable.Value; dashCooldown = 7f; dashEclipse = true; dashWindup = 0.6f; dashLightningDelay = 0.4f; dashArmor = true; dashSlamDelay = 0.5f; offeringEnable = !flag || CFGofferingEnable == null || CFGofferingEnable.Value; offeringCooldown = 6f; offeringEclipse = true; offeringStakeEnable = true; offeringProjectiles = true; offeringSpikeSpeed = 30f; offeringStakeSpeed = 45f; offeringAimSpeed = 10f; rainEnable = !flag || CFGrainEnable.Value; rainCooldown = 20f; rainEclipse = true; rainWindup = 8f; crystalScatters = 5; crystalCount = 10; crystalDuration = 120f; crystalAutoDetonate = true; crystalDamage = 1.2f; crystalTimer = 2.5f; crystalFalloff = true; crystalFissures = 1; crystalOverchargeDamage = 1.25f; crystalOverchargeRadius = 1.5f; crystalOverchargeLight = true; laserCooldown = 35f; laserEclipse = true; leapEnable = !flag || CFGleapEnable.Value; leapDelay = 1.5f; leapFrequency = 1f; leapDuration = 2.5f; leapMin = 4; leapMax = 5; leapPlusMin = 3; leapPlusMax = 4; laserEnable = !flag || CFGlaserEnable.Value; laserLightEnable = !flag || CFGlaserLightEnable == null || CFGlaserLightEnable.Value; laserDuration = 13f; laserDamage = 3.25f; laserTickRate = 0.25f; laserDecayRate = 0.2f; laserLightIntensity = 6f; devastatorCooldown = 45f; devastatorEclipse = true; devastatorOrbEnable = !flag || CFGdevastatorOrbEnable.Value; devastatorOrbSpeed = 4f; devastatorOrbDuration = 12f; devastatorOrbDamage = 1.5f; devastatorOrbCount = 6; devastatorDebuffEnable = !flag || CFGdevastatorDebuffEnable.Value; devastatorDebuffInterval = 1f; devastatorDebuffVFX = true; artifactEnable = true; forceHardMode = true; forceEclipse = true; thunderHPBoost = 5; thunderLightningDelayMult = 1f; thunderPassiveLightning = true; thunderLightningLine2 = true; thunderLightningLine3 = true; thunderLightningLineInterval = 12f; thunderLightningLineDelayMult = 2f; thunderGeodeBarrier = 0.25f; thunderGeodeHeal = 0f; thunderGeodeElite = true; thunderGeodeArmor = true; thunderGeodeGolems = true; thunderSlamPatterns = true; thunderSlamScatter2 = 5; thunderSlamScatter3 = 6; thunderSlamScatterDelay = 0.6f; thunderSlamWindupMult = 1f; thunderSlamFissures = 5; thunderDashParry = true; thunderDashParryDuration = 0.5f; thunderDashParryAll = false; thunderDashWindup = 0.3f; thunderDashEnable = true; thunderOfferingSpeedMult = 1.25f; thunderOfferingProjectiles = false; thunderRainShards = 8; thunderRainFissures = 3; thunderLeapLightningMult = 1.5f; thunderLeapDurationMult = 1.25f; thunderLaserDuration = 16f; thunderLaserCooldownMult = 1.2f; thunderDevastatorOrbs = true; thunderShockwaveEnable = true; thunderShockwaveDelay = 2f; thunderShockwaveDamage = 4f; auriEnable = !flag || CFGauriEnable.Value; auriRegen = 0.004f; auriAdaptiveArmor = true; auriFixedSpawn = true; auriReducedStats = true; auriDamageMultFS = 0.75f; auriSpeedMultFS = 0.5f; auriBaseHP = 2200f; auriLevelHP = 900f; auriBaseArmor = 20f; auriLevelArmor = 0f; auriSwordEnable = true; auriSwordDelay = 1.2f; auriSwordInterval = 0.3f; auriCrownEnable = true; auriCrownLasers = 18; auriCrownLasersFS = 12; auriCrownSpinSpeed = 50f; auriCrownDuration = 10f; auriCrownDamage = 3f; auriCrownDamageDelay = 1.5f; auriCrownBypassArmor = true; auriBeamEnable = true; auriBeamFrequency = 8f; auriBeamProjectileDamage = 1f; auriBeamProjectileSpeed = 100f; auriBeamProjectileSpread = 15f; auriBeamProjectileAccuracy = 2f; auriBeamDuration = 3f; auriBeamDamage = 1.75f; auriBeamRadius = 3f; auriBeamForce = 3500f; auriBeamIgnite = true; coastEnable = !flag || CFGcoastEnable.Value; coastSpawnTimer = 150f; coastSpawnReduction = 20f; coastBaseArmor = 100f; coastBeaconArmor = 100f; coastBeaconTimer = 75; coastBeaconExtension = 15; coastGoldMult = 1f; coastBonusChest = true; halcyonStages = (flag ? CFGhalcyonStages.Value : "village,habitat,helminthroost,hollowsummit_wormsworms,hollowsummitnight_wormsworms"); halcyonStage5 = true; halcyonChanceMult = 1.15f; voidGeodes = true; voidGeodeCount = 3; voidLightIntensity = 2f; voidLightRange = 15f; } public static ConfigEntry<bool> RegisterConfigBool(ConfigFile cfg, string section, string key, bool defaultValue, string description, bool restart = false) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ConfigEntry<bool> val = cfg.Bind<bool>(section, key, defaultValue, description); CheckBoxConfig val2 = new CheckBoxConfig(); ((BaseOptionConfig)val2).restartRequired = restart; object obj = <>O.<0>__CheckDisabled; if (obj == null) { IsDisabledDelegate val3 = CheckDisabled; <>O.<0>__CheckDisabled = val3; obj = (object)val3; } ((BaseOptionConfig)val2).checkIfDisabled = (IsDisabledDelegate)obj; ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(val, val2)); val.SettingChanged += delegate { UpdateConfigValues(); }; return val; } public static ConfigEntry<float> RegisterConfigFloat(ConfigFile cfg, string section, string key, float defaultValue, string description, float minValue, float maxValue, bool restart = false) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown ConfigEntry<float> val = cfg.Bind<float>(section, key, defaultValue, description); SliderConfig val2 = new SliderConfig(); val2.min = minValue; val2.max = maxValue; ((BaseOptionConfig)val2).restartRequired = restart; object obj = <>O.<0>__CheckDisabled; if (obj == null) { IsDisabledDelegate val3 = CheckDisabled; <>O.<0>__CheckDisabled = val3; obj = (object)val3; } ((BaseOptionConfig)val2).checkIfDisabled = (IsDisabledDelegate)obj; ModSettingsManager.AddOption((BaseOption)new SliderOption(val, val2)); val.SettingChanged += delegate { UpdateConfigValues(); }; return val; } public static ConfigEntry<int> RegisterConfigInt(ConfigFile cfg, string section, string key, int defaultValue, string description, int minValue, int maxValue, bool restart = false) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown ConfigEntry<int> val = cfg.Bind<int>(section, key, defaultValue, description); IntSliderConfig val2 = new IntSliderConfig(); val2.min = minValue; val2.max = maxValue; ((BaseOptionConfig)val2).restartRequired = restart; object obj = <>O.<0>__CheckDisabled; if (obj == null) { IsDisabledDelegate val3 = CheckDisabled; <>O.<0>__CheckDisabled = val3; obj = (object)val3; } ((BaseOptionConfig)val2).checkIfDisabled = (IsDisabledDelegate)obj; ModSettingsManager.AddOption((BaseOption)new IntSliderOption(val, val2)); val.SettingChanged += delegate { UpdateConfigValues(); }; return val; } public static ConfigEntry<string> RegisterConfigString(ConfigFile cfg, string section, string key, string defaultValue, string description, bool restart = false) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ConfigEntry<string> val = cfg.Bind<string>(section, key, defaultValue, description); InputFieldConfig val2 = new InputFieldConfig(); ((BaseOptionConfig)val2).restartRequired = restart; object obj = <>O.<0>__CheckDisabled; if (obj == null) { IsDisabledDelegate val3 = CheckDisabled; <>O.<0>__CheckDisabled = val3; obj = (object)val3; } ((BaseOptionConfig)val2).checkIfDisabled = (IsDisabledDelegate)obj; ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(val, val2)); val.SettingChanged += delegate { UpdateConfigValues(); }; return val; } public static bool CheckDisabled() { if (enableConfigs != null) { return !enableConfigs.Value; } return true; } } } namespace StormboundFalseSon.Modules { public static class Assets { public static AssetBundle mainBundle; public const string bundleName = "StormboundFalseSonAssetBundle.bundle"; public const string assetBundleFolder = "assetbundles"; public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(StormboundFalseSonPlugin.PInfo.Location), "StormboundFalseSonAssetBundle.bundle"); public static void Init() { mainBundle = AssetBundle.LoadFromFile(AssetBundlePath); } } public static class States { internal static List<Type> entityStates = new List<Type>(); internal static void RegisterStates() { entityStates.Add(typeof(DelayedState)); entityStates.Add(typeof(FireGoldLaser)); entityStates.Add(typeof(GeodeRegenerate)); } } public static class DamageTypes { public static ModdedDamageType stormboundLightning = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLunarRuin = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLaser = DamageAPI.ReserveDamageType(); public static ModdedDamageType aurelioniteLaser = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLaserTargeting = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLaserCrystal = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundDevastatorCrystal = DamageAPI.ReserveDamageType(); } public static class Buffs { internal static List<BuffDef> buffDefs = new List<BuffDef>(); internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden, bool ignoreNectar) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance<BuffDef>(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; val.ignoreGrowthNectar = ignoreNectar; buffDefs.Add(val); return val; } } public static class Effects { private static GameObject tester = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Vagrant.VagrantTrackingBombExplosion_prefab).WaitForCompletion(); public static List<EffectDef> effectDefs = new List<EffectDef>(); internal static void RegisterEffects() { FireGoldLaser.tracerEffectPrefab = CreateAurelioniteTracer(); CoreChanges.lightningWarningEffect = CreateLightningWarning(); FalseSonChanges.rainWarningPrefab = CreateRainWarning(); FalseSonChanges.rainOverchargePrefab = CreateOverchargeWarning(); FalseSonChanges.lunarSpikeExplosion = CreateCrystalExplosion(); } private static GameObject CreateHalcyoniteTether() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject("RoR2/DLC2/Elites/EliteBead/EliteBeadTether.prefab", "StormboundTetherEffect", new Color(1f, 1f, 0f, 1f), new Color(1f, 1f, 0f, 1f), 1f, 1000f); } private static GameObject CreateCrystalExplosion() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject("RoR2/Base/Vagrant/VagrantTrackingBombExplosion.prefab", "StormboundCrystalExplosionEffect", new Color(1f, 0f, 0.4f, 1f), new Color(1f, 0f, 0.4f, 1f), 1f, 1000f, colorMesh: false, "", parentToTransform: false, recolor: false); val.GetComponent<EffectComponent>().applyScale = true; return val; } private static GameObject CreateOverchargeWarning() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject("RoR2/DLC2/FalseSonBoss/LunarRainExplosionWarningVFX.prefab", "StormboundOverchargeWarningEffect", new Color(1f, 0f, 0.25f, 1f), new Color(1f, 0f, 0.25f, 1f), 1f, 1000f); val.GetComponent<EffectComponent>().applyScale = true; DestroyOnParticleEnd component = val.GetComponent<DestroyOnParticleEnd>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } DestroyOnTimer val2 = val.AddComponent<DestroyOnTimer>(); val2.duration = Configs.crystalTimer + 0.3f; return val; } private static GameObject CreateRainWarning() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject("RoR2/DLC2/FalseSonBoss/LunarRainExplosionWarningVFX.prefab", "StormboundRainWarningEffect", new Color(1f, 0f, 0.4f, 1f), new Color(1f, 0f, 0.4f, 1f), 1f, 1000f, colorMesh: false, "", parentToTransform: false, recolor: false); val.GetComponent<EffectComponent>().applyScale = true; DestroyOnParticleEnd component = val.GetComponent<DestroyOnParticleEnd>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } DestroyOnTimer val2 = val.AddComponent<DestroyOnTimer>(); val2.duration = Configs.crystalTimer + 0.2f; return val; } private static GameObject CreateLightningWarning() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject("RoR2/DLC2/meridian/DisableSkillsLightning/LightningStrikePredictionEffect.prefab", "StormboundLightningPredictionEffect", new Color(1f, 0.4f, 0f, 0.5f), new Color(1f, 0.5f, 0f, 1f), 1f, 1000f, colorMesh: false); } private static GameObject CreateAurelioniteTracer() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneTracer("RoR2/Base/Huntress/TracerHuntressSnipe.prefab", "TracerStormboundAurelioniteLaser", Color.red, new Color(1f, 0.04f, 0.04f, 1f), 2f); Object.Destroy((Object)(object)((Component)val.transform.Find("TracerHead")).gameObject); Main.DumpComponents(val); return val; } private static GameObject CloneObject(string originalObjectName, string newObjectName, Color color1, Color color2, float scaleMult = 1f, float colorTemp = 0f, bool colorMesh = true, string soundName = "", bool parentToTransform = false, bool recolor = true) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)originalObjectName).WaitForCompletion(); if ((Object)(object)val == (Object)null) { Log.Warning(originalObjectName + " is null!"); return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, newObjectName, false); if ((Object)(object)val2.GetComponent<EffectComponent>() == (Object)null) { val2.AddComponent<EffectComponent>(); } if ((Object)(object)val2.GetComponent<VFXAttributes>() == (Object)null) { val2.AddComponent<VFXAttributes>(); } val2.GetComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; val2.GetComponent<VFXAttributes>().DoNotPool = true; if (recolor) { val2.Recolor(color1, color2, scaleMult, colorTemp, colorMesh); } CreateEffectFromObject(val2, soundName, parentToTransform); return val2; } private static GameObject CloneTracer(string originalTracerName, string newTracerName, Color color1, Color color2, float widthMult = 1f, float? speed = null, float? length = null) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)originalTracerName).WaitForCompletion(); if ((Object)(object)val == (Object)null) { Log.Warning(originalTracerName + " is null!"); return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, newTracerName, false); if (!Object.op_Implicit((Object)(object)val2.GetComponent<EffectComponent>())) { val2.AddComponent<EffectComponent>(); } if (!Object.op_Implicit((Object)(object)val2.GetComponent<VFXAttributes>())) { val2.AddComponent<VFXAttributes>(); } val2.GetComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; val2.GetComponent<VFXAttributes>().DoNotPool = true; if (!Object.op_Implicit((Object)(object)val2.GetComponent<NetworkIdentity>())) { val2.AddComponent<NetworkIdentity>(); } val2.GetComponent<Tracer>().speed = (speed.HasValue ? speed.Value : val2.GetComponent<Tracer>().speed); val2.GetComponent<Tracer>().length = (length.HasValue ? length.Value : val2.GetComponent<Tracer>().length); val2.Recolor(color1, color2, widthMult); CreateAndAddEffectDef(val2); return val2; } private static void Recolor(this GameObject thingToColor, Color color1, Color color2, float widthMult = 1f, float colorTemp = 0f, bool colorMesh = true) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) bool flag = true; LineRenderer[] componentsInChildren = thingToColor.GetComponentsInChildren<LineRenderer>(); foreach (LineRenderer val in componentsInChildren) { bool flag2 = true; val.startColor = color1; val.endColor = color2; if (widthMult != 1f) { val.widthMultiplier *= widthMult; } } ParticleSystem[] componentsInChildren2 = thingToColor.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val2 in componentsInChildren2) { MainModule main = val2.main; MinMaxCurve startSize = ((MainModule)(ref main)).startSize; ((MainModule)(ref main)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * widthMult); ((MainModule)(ref main)).startColor = new MinMaxGradient(color1); TrailModule trails = val2.trails; if (((TrailModule)(ref trails)).enabled) { Gradient val3 = new Gradient(); GradientColorKey[] array = (GradientColorKey[])(object)new GradientColorKey[2]; array[0].color = color1; array[0].time = 0f; array[1].color = color2; array[1].time = 1f; GradientAlphaKey[] array2 = (GradientAlphaKey[])(object)new GradientAlphaKey[2]; array2[0].alpha = color1.a; array2[0].time = 0f; array2[1].alpha = color2.a; array2[1].time = 1f; val3.SetKeys(array, array2); ((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(val3); } } Light[] componentsInChildren3 = thingToColor.GetComponentsInChildren<Light>(); foreach (Light val4 in componentsInChildren3) { if (colorTemp > 0f) { val4.colorTemperature = colorTemp; val4.useColorTemperature = true; } else { val4.useColorTemperature = false; } val4.color = color1; Transform transform = ((Component)val4).transform; transform.localScale *= widthMult; } ParticleSystemRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val5 in componentsInChildren4) { ((Renderer)val5).material.SetColor("_MainColor", color1); ((Renderer)val5).material.SetColor("_Color", color1); ((Renderer)val5).material.SetColor("_TintColor", color2); } if (colorMesh) { MeshRenderer[] componentsInChildren5 = thingToColor.GetComponentsInChildren<MeshRenderer>(); foreach (MeshRenderer val6 in componentsInChildren5) { ((Renderer)val6).material.SetColor("_MainColor", color1); ((Renderer)val6).material.SetColor("_Color", color1); ((Renderer)val6).material.SetColor("_TintColor", color2); } } } internal static void AddEffectDef(EffectDef effectDef) { effectDefs.Add(effectDef); } internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab, bool donotPool = false) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (donotPool) { VFXAttributes val = effectPrefab.GetComponent<VFXAttributes>(); if ((Object)(object)val == (Object)null) { val = effectPrefab.AddComponent<VFXAttributes>(); } val.DoNotPool = true; } EffectDef val2 = new EffectDef(effectPrefab); AddEffectDef(val2); return val2; } internal static void CreateEffectFromObject(GameObject newEffect, string soundName, bool parentToTransform) { //IL_0032: 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) newEffect.AddComponent<DestroyOnTimer>().duration = 6f; newEffect.AddComponent<NetworkIdentity>(); if (!Object.op_Implicit((Object)(object)newEffect.GetComponent<VFXAttributes>())) { newEffect.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; } EffectComponent component = newEffect.GetComponent<EffectComponent>(); if (!Object.op_Implicit((Object)(object)component)) { component = newEffect.AddComponent<EffectComponent>(); component.applyScale = true; component.effectIndex = (EffectIndex)(-1); component.parentToReferencedTransform = parentToTransform; component.positionAtReferencedTransform = true; component.soundName = soundName; } CreateAndAddEffectDef(newEffect); } } public static class EnemiesPlusUtils { public static void ReorderSkillDrivers(this GameObject master, AISkillDriver targetSkill, int targetIdx) { AISkillDriver[] components = master.GetComponents<AISkillDriver>(); master.ReorderSkillDrivers(components, Array.IndexOf(components, targetSkill), targetIdx); } public static void ReorderSkillDrivers(this GameObject master, AISkillDriver[] skills, int currentIdx, int targetIdx) { if (currentIdx < 0 || currentIdx >= skills.Length) { Log.Error($"{currentIdx} index not found or out of range. Must be less than {skills.Length}"); return; } string targetName = skills[currentIdx].customName; if (targetIdx < 0 || targetIdx >= skills.Length) { Log.Error($"Unable to reorder skilldriver {targetName} into position {targetIdx}. target must be less than {skills.Length}"); } else { if (targetIdx == currentIdx) { return; } Dictionary<string, string> dictionary = skills.Where((AISkillDriver s) => (Object)(object)s.nextHighPriorityOverride != (Object)null).ToDictionary((AISkillDriver s) => s.customName, (AISkillDriver s) => s.nextHighPriorityOverride.customName); if (targetIdx > currentIdx) { master.AddComponentCopy<AISkillDriver>(skills[currentIdx]); Object.DestroyImmediate((Object)(object)skills[currentIdx]); } for (int num = targetIdx; num < skills.Length; num++) { if (num != currentIdx) { master.AddComponentCopy<AISkillDriver>(skills[num]); Object.DestroyImmediate((Object)(object)skills[num]); } } skills = master.GetComponents<AISkillDriver>(); AISkillDriver val = ((IEnumerable<AISkillDriver>)skills).FirstOrDefault((Func<AISkillDriver, bool>)((AISkillDriver s) => s.customName == targetName)); if (!dictionary.Any()) { return; } foreach (AISkillDriver val2 in skills) { string target = ""; if (val2.customName != null) { target = val2.customName; } if (Object.op_Implicit((Object)(object)val2) && dictionary.TryGetValue(val2.customName, out target)) { AISkillDriver val3 = ((IEnumerable<AISkillDriver>)skills).FirstOrDefault((Func<AISkillDriver, bool>)((AISkillDriver s) => s.customName == target)); if (!((Object)(object)val3 == (Object)null)) { val2.nextHighPriorityOverride = val3; } } } } } public static T GetCopyOf<T>(this Component comp, T other) where T : Component { Type type = ((object)comp).GetType(); if (type != ((object)other).GetType()) { return default(T); } BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; PropertyInfo[] properties = type.GetProperties(bindingAttr); PropertyInfo[] array = properties; foreach (PropertyInfo propertyInfo in array) { if (propertyInfo.CanWrite) { try { propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null); } catch { } } } FieldInfo[] fields = type.GetFields(bindingAttr); FieldInfo[] array2 = fields; foreach (FieldInfo fieldInfo in array2) { fieldInfo.SetValue(comp, fieldInfo.GetValue(other)); } return (T)(object)((comp is T) ? comp : null); } public static T AddComponentCopy<T>(this GameObject go, T toAdd) where T : Component { return ((Component)(object)go.AddComponent<T>()).GetCopyOf(toAdd); } } public static class Projectiles { internal static GameObject auriBeam; public static GameObject baseBeam = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Titan.TitanRockProjectile_prefab).WaitForCompletion(); internal static List<GameObject> fsOrbList = new List<GameObject>(); public static GameObject baseOrb = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.PrimeDevastatorProjectile_prefab).WaitForCompletion(); internal static List<GameObject> projectilePrefabs = new List<GameObject>(); internal static void RegisterProjectiles() { CreateAurelioniteBeam(); projectilePrefabs.Add(auriBeam); CreateDevastatorProjectiles(); for (int i = 0; i < fsOrbList.Count; i++) { projectilePrefabs.Add(fsOrbList[i]); } } private static void CreateDevastatorProjectiles() { //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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) for (int i = 0; i < Configs.devastatorOrbCount; i++) { string text = $"fsOrb{i + 1}"; GameObject val = PrefabAPI.InstantiateClone(baseOrb, text, true); if (fsOrbList.Count <= i) { fsOrbList.Add(val); } else { fsOrbList[i] = val; } ProjectileOwnerOrbiter val2 = fsOrbList[i].GetComponent<ProjectileOwnerOrbiter>(); if ((Object)(object)val2 == (Object)null) { val2 = fsOrbList[i].AddComponent<ProjectileOwnerOrbiter>(); } float num = 65f / (float)Configs.devastatorOrbCount; float num2 = (float)Configs.devastatorOrbCount / (float)(i + 1); val2.radius = num2 + num * (float)(i + 1); val2.offset.y = 2f; val2.initialDegreesFromOwnerForward = 340f; val2.degreesPerSecond = 360f / Configs.devastatorOrbSpeed; DestroyOnTimer val3 = fsOrbList[i].GetComponent<DestroyOnTimer>(); if ((Object)(object)val3 == (Object)null) { val3 = fsOrbList[i].AddComponent<DestroyOnTimer>(); } val3.duration = Configs.devastatorOrbDuration; PrimeDevastatorProjectileController component = fsOrbList[i].GetComponent<PrimeDevastatorProjectileController>(); if ((Object)(object)component != (Object)null) { } ProjectileDamage val4 = fsOrbList[i].GetComponent<ProjectileDamage>(); if ((Object)(object)val4 == (Object)null) { val4 = fsOrbList[i].AddComponent<ProjectileDamage>(); } DamageTypeCombo damageType = val4.damageType; DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.stormboundDevastatorCrystal); val4.damageType = damageType; ProjectileImpactExplosion val5 = fsOrbList[i].GetComponent<ProjectileImpactExplosion>(); if ((Object)(object)val5 == (Object)null) { val5 = fsOrbList[i].AddComponent<ProjectileImpactExplosion>(); } ((ProjectileExplosion)val5).blastRadius = 2.5f; SphereCollider component2 = fsOrbList[i].GetComponent<SphereCollider>(); if ((Object)(object)component2 != (Object)null) { component2.radius = 2.25f; } Light val6 = fsOrbList[i].AddComponent<Light>(); val6.color = Color.cyan; val6.bounceIntensity = 0.5f; val6.intensity = 12f; val6.range = 15f; } if (Configs.devastatorOrbCount > fsOrbList.Count) { Log.Warning("Orb List size is " + fsOrbList.Count + ", intended size was " + Configs.devastatorOrbCount + ". Readjusting intended size."); Configs.devastatorOrbCount = fsOrbList.Count; } } private static void CreateAurelioniteBeam() { auriBeam = PrefabAPI.InstantiateClone(baseBeam, "auriBeam", true); Rigidbody val = auriBeam.GetComponent<Rigidbody>(); if (!Object.op_Implicit((Object)(object)val)) { val = auriBeam.AddComponent<Rigidbody>(); } ProjectileImpactExplosion val2 = default(ProjectileImpactExplosion); if (auriBeam.TryGetComponent<ProjectileImpactExplosion>(ref val2)) { ((ProjectileExplosion)val2).blastRadius = 1.5f; ((ProjectileExplosion)val2).explosionEffect = null; val2.lifetimeExpiredSound = null; val2.lifetime = 3f; } ProjectileDirectionalTargetFinder val3 = default(ProjectileDirectionalTargetFinder); if (auriBeam.TryGetComponent<ProjectileDirectionalTargetFinder>(ref val3)) { Object.DestroyImmediate((Object)(object)val3); } ProjectileSteerTowardTarget val4 = default(ProjectileSteerTowardTarget); if (auriBeam.TryGetComponent<ProjectileSteerTowardTarget>(ref val4)) { Object.DestroyImmediate((Object)(object)val4); } ProjectileController component = auriBeam.GetComponent<ProjectileController>(); component.rigidbody = val; component.rigidbody.useGravity = false; component.rigidbody.mass = 1f; component.procCoefficient = 0.8f; component.startSound = ""; component.shouldPlaySounds = false; } private static void InitializeImpactExplosion(ProjectileImpactExplosion projectileImpactExplosion) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) ((ProjectileExplosion)projectileImpactExplosion).blastDamageCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastProcCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastRadius = 1f; ((ProjectileExplosion)projectileImpactExplosion).bonusBlastForce = Vector3.zero; ((ProjectileExplosion)projectileImpactExplosion).childrenCount = 0; ((ProjectileExplosion)projectileImpactExplosion).childrenDamageCoefficient = 0f; ((ProjectileExplosion)projectileImpactExplosion).childrenProjectilePrefab = null; projectileImpactExplosion.destroyOnEnemy = true; projectileImpactExplosion.destroyOnWorld = true; projectileImpactExplosion.detonateOnEnemy = true; projectileImpactExplosion.impactOnWorld = true; ((ProjectileExplosion)projectileImpactExplosion).falloffModel = (FalloffModel)0; ((ProjectileExplosion)projectileImpactExplosion).fireChildren = false; projectileImpactExplosion.lifetime = 0f; projectileImpactExplosion.lifetimeAfterImpact = 0f; projectileImpactExplosion.lifetimeRandomOffset = 0f; projectileImpactExplosion.offsetForLifetimeExpiredSound = 0f; projectileImpactExplosion.timerAfterImpact = false; ((Component)projectileImpactExplosion).GetComponent<ProjectileDamage>().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1); } } public class Skills { public class AISkillDriverData { public GameObject masterPrefab; public string customName; public SkillSlot skillSlot; public float minDistance = 0f; public float maxDistance = float.PositiveInfinity; public int desiredIndex = 0; public float moveInputScale = 1f; public MovementType movementType; public AimType aimType; public TargetType targetType; public bool ignoreNodeGraph = false; public float maxHealthFraction = float.PositiveInfinity; public float minHealthFraction = float.NegativeInfinity; public float maxTargetHealthFraction = float.PositiveInfinity; public float minTargetHealthFraction = float.NegativeInfinity; public bool requireReady = false; public SkillDef requiredSkillDef = null; public bool activationRequiresAimTargetLoS = false; public bool activationRequiresAimConfirmation = false; public bool activationRequiresTargetLoS = false; public bool selectionRequiresAimTarget = false; public bool selectionRequiresOnGround = false; public bool selectionRequiresTargetLoS = false; public bool selectionRequiresTargetNonFlier = false; public int maxTimesSelected = -1; public float driverUpdateTimerOverride = -1f; public bool noRepeat = false; public AISkillDriver nextHighPriorityOverride = null; public bool shouldSprint = false; public float aimVectorMaxSpeedOverride = -1f; public ButtonPressType buttonPressType = (ButtonPressType)0; } public static AISkillDriver CreateAISkillDriver(AISkillDriverData data) { //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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) if (data == null || (Object)(object)data.masterPrefab == (Object)null) { Log.Error("Could not create AISkillDriver"); return null; } AISkillDriver val = data.masterPrefab.AddComponent<AISkillDriver>(); val.customName = data.customName; val.skillSlot = data.skillSlot; val.minDistance = data.minDistance; val.maxDistance = data.maxDistance; val.moveInputScale = data.moveInputScale; val.movementType = data.movementType; val.aimType = data.aimType; val.moveTargetType = data.targetType; val.ignoreNodeGraph = data.ignoreNodeGraph; val.maxUserHealthFraction = data.maxHealthFraction; val.minUserHealthFraction = data.minHealthFraction; val.maxTargetHealthFraction = data.maxTargetHealthFraction; val.minTargetHealthFraction = data.minTargetHealthFraction; val.requireSkillReady = data.requireReady; val.requiredSkill = data.requiredSkillDef; val.activationRequiresAimConfirmation = data.activationRequiresAimConfirmation; val.activationRequiresAimTargetLoS = data.activationRequiresAimTargetLoS; val.activationRequiresTargetLoS = data.activationRequiresTargetLoS; val.selectionRequiresAimTarget = data.selectionRequiresAimTarget; val.selectionRequiresOnGround = data.selectionRequiresOnGround; val.selectionRequiresTargetLoS = data.selectionRequiresTargetLoS; val.selectionRequiresTargetNonFlier = data.selectionRequiresTargetNonFlier; val.maxTimesSelected = data.maxTimesSelected; val.driverUpdateTimerOverride = data.driverUpdateTimerOverride; val.noRepeat = data.noRepeat; val.nextHighPriorityOverride = data.nextHighPriorityOverride; val.shouldSprint = data.shouldSprint; val.aimVectorMaxSpeedOverride = data.aimVectorMaxSpeedOverride; val.buttonPressType = data.buttonPressType; data.masterPrefab.ReorderSkillDrivers(val, data.desiredIndex); return val; } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.StormboundFalseSon"; public void Initialize() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown Assets.Init(); Effects.RegisterEffects(); States.RegisterStates(); Projectiles.RegisterProjectiles(); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.effectDefs.Add(Effects.effectDefs.ToArray()); contentPack.entityStateTypes.Add(States.entityStates.ToArray()); contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray()); contentPack.buffDefs.Add(Buffs.buffDefs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } } namespace StormboundFalseSon.Changes { public class Main { public class StormboundSkillManager : MonoBehaviour { public GenericSkill[] skills = (GenericSkill[])(object)new GenericSkill[4] { new GenericSkill(), new GenericSkill(), new GenericSkill(), new GenericSkill() }; public float[] timers = new float[4]; public float[] durations = new float[4]; public int[] stocks = new int[4] { 1, 1, 1, 1 }; public bool[] blocks = new bool[4]; public int[] ready = new int[4]; public float[] recharge = new float[4]; public void FixedUpdate() { for (int i = 0; i < 4; i++) { if (blocks[i]) { if (timers[i] > 0f) { timers[i] -= Time.fixedDeltaTime; recharge[i] += Time.fixedDeltaTime; } else { UnblockSkill(i); } } } } public void RegisterSkills(SkillLocator locator, int index = 4) { if (index == 0 || index == 4) { skills[0] = locator.primary; } if (index == 1 || index == 4) { skills[1] = locator.secondary; } if (index == 2 || index == 4) { skills[2] = locator.utility; } if (index == 3 || index == 4) { skills[3] = locator.special; } } public void BlockSkill(int index, float duration, SkillLocator locator) { if ((Object)(object)skills[index] == (Object)null) { Log.Message("invalid skill, attempting to register."); RegisterSkills(locator, index); if ((Object)(object)skills[index] == (Object)null) { Log.Message("register failed, skill does not exist."); return; } } if (duration <= 0f) { return; } if (!blocks[index]) { blocks[index] = true; ready[index] = 0; recharge[index] = skills[index].rechargeStopwatch; stocks[index] = skills[index].maxStock; if (skills[index].stock >= 1) { ready[index] = skills[index].stock; } skills[index].OverrideMaxStock(0); skills[index].RemoveAllStocks(); skills[index].rechargeStopwatch = 0f; } timers[index] = Mathf.Max(duration, timers[index]); } public void UnblockSkill(int index) { if ((Object)(object)skills[index] == (Object)null) { Log.Message("invalid skill"); return; } skills[index].OverrideMaxStock(stocks[index]); if (recharge[index] >= skills[index].CalculateFinalRechargeInterval()) { int num = 1; while (recharge[index] >= skills[index].CalculateFinalRechargeInterval()) { ready[index]++; recharge[index] -= skills[index].CalculateFinalRechargeInterval(); num++; } } if (ready[index] <= 0) { skills[index].RemoveAllStocks(); } else { skills[index].stock = Math.Min(stocks[index], ready[index]); } skills[index].rechargeStopwatch = recharge[index]; blocks[index] = false; recharge[index] = 0f; timers[index] = 0f; ready[index] = 0; } } public static float strikeSpeed; public static int scalingLevel = 0; public static int currentPhase = 0; private CoreChanges coreChanges; private FalseSonChanges falseSonChanges; private LaserChanges laserChanges; private GeodeChanges geodeChanges; private AurelioniteChanges aurelioniteChanges; private GildedCoastChanges gildedCoastChanges; private VoidFieldsChanges voidFieldsChanges; public List<LightningStrikePoint> lightningPoints; public BullseyeSearch enemyFinder = new BullseyeSearch(); public static DotIndex devastatorDotIndex; private static GameObject laserPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Titan.LaserTitanGold_prefab).WaitForCompletion(); public static bool hardMode = false; private static GameObject fs1BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBody_prefab).WaitForCompletion(); private static GameObject fs2BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyLunarShard_prefab).WaitForCompletion(); private static GameObject fs3BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyBrokenLunarShard_prefab).WaitForCompletion(); public static GameObject fs1MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossMaster_prefab).WaitForCompletion(); public static GameObject fs2MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardMaster_prefab).WaitForCompletion(); public static GameObject fs3MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardBrokenMaster_prefab).WaitForCompletion(); public AISkillDriver fs2pillarDriver; public static BuffDef StormboundDevastatorDebuff; public static BuffDef LaserTargetDebuff; public static BuffDef LaserGoldDebuff; public static BuffDef LaserCrystalDebuff; public static BuffDef FalseSonBossBuff; public static BuffDef AuriArmorBuff; public static BuffDef GeodeRegenBuff; public static BuffDef GeodeSpeedBuff; public static BuffDef HiddenLightningInvincibility; private static Sprite crystalIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_DLC2_FalseSon.texEnergizedCoreBuffIcon_png).WaitForCompletion(); private static Sprite auriIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_DLC2_Elites_EliteAurelionite.texBuffAurelioniteBlessingIcon_png).WaitForCompletion(); private static Sprite targetIcon; private static Sprite oldIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Merc.texBuffMercExposeIcon_tif).WaitForCompletion(); private static Sprite devastatorIcon; private static Sprite regenIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Croco.texBuffRegenBoostIcon_tif).WaitForCompletion(); private static Sprite speedIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Common.texMovespeedBuffIcon_tif).WaitForCompletion(); internal static bool HasHalcyonKnight => Chainloader.PluginInfos.ContainsKey("Onyx.HalcyonKnight"); public void Initialize() { //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown CreateBuffs(); SetupAIFixes(); Sprite val = Assets.mainBundle.LoadAsset<Sprite>("Assets/texStormboundModIcon.png"); if ((Object)(object)val == (Object)null) { Log.Error("Asset Load Failed!"); } else { ModSettingsManager.SetModIcon(val); } CharacterBody component = fs1BodyPrefab.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null) { component.baseMaxHealth = Configs.fsBaseHP1; component.levelMaxHealth = Configs.fsLevelHP1; component.baseArmor = Configs.fsBaseArmor; component.levelArmor = Configs.fsLevelArmor; } CharacterBody component2 = fs2BodyPrefab.GetComponent<CharacterBody>(); if ((Object)(object)component2 != (Object)null) { component2.baseMaxHealth = Configs.fsBaseHP2; component2.levelMaxHealth = Configs.fsLevelHP2; component2.baseArmor = Configs.fsBaseArmor; component2.levelArmor = Configs.fsLevelArmor; } CharacterBody component3 = fs2BodyPrefab.GetComponent<CharacterBody>(); if ((Object)(object)component3 != (Object)null) { component3.baseMaxHealth = Configs.fsBaseHP3; component3.levelMaxHealth = Configs.fsLevelHP3; component3.baseArmor = Configs.fsBaseArmor; component3.levelArmor = Configs.fsLevelArmor; } fs1MasterPrefab.AddComponent<StormboundSkillManager>(); fs2MasterPrefab.AddComponent<StormboundSkillManager>(); fs3MasterPrefab.AddComponent<StormboundSkillManager>(); devastatorDotIndex = DotAPI.RegisterDotDef(Configs.devastatorDebuffInterval, 0.1f, (DamageColorIndex)16, StormboundDevastatorDebuff, (CustomDotBehaviour)null, (CustomDotVisual)null); if (Configs.devastatorDebuffEnable && Configs.devastatorDebuffVFX) { CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(IL_UpdateVisualEffect); } coreChanges = new CoreChanges(); coreChanges.Initialize(); falseSonChanges = new FalseSonChanges(); falseSonChanges.Initialize(); if (Configs.laserEnable) { laserChanges = new LaserChanges(); laserChanges.Initialize(); } if (Configs.geodeEnable) { geodeChanges = new GeodeChanges(); geodeChanges.Initialize(); } if (Configs.auriEnable) { aurelioniteChanges = new AurelioniteChanges(); aurelioniteChanges.Initialize(); } if (Configs.coastEnable) { gildedCoastChanges = new GildedCoastChanges(); gildedCoastChanges.Initialize(); } if (Configs.voidGeodes) { voidFieldsChanges = new VoidFieldsChanges(); voidFieldsChanges.Initialize(); } } private void SetupAIFixes() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0586: 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_0593: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) Skills.AISkillDriverData data = new Skills.AISkillDriverData { masterPrefab = fs2MasterPrefab, customName = "moveAroundPillars", skillSlot = (SkillSlot)0, requireReady = false, maxDistance = 40f, targetType = (TargetType)3, movementType = (MovementType)0, aimType = (AimType)1, shouldSprint = true, desiredIndex = 7, driverUpdateTimerOverride = -1f }; Skills.CreateAISkillDriver(data); Skills.AISkillDriverData data2 = new Skills.AISkillDriverData { masterPrefab = fs3MasterPrefab, customName = "moveAroundPillars", skillSlot = (SkillSlot)0, requireReady = false, maxDistance = 40f, targetType = (TargetType)3, movementType = (MovementType)0, aimType = (AimType)1, shouldSprint = true, desiredIndex = 7, driverUpdateTimerOverride = -1f }; Skills.CreateAISkillDriver(data2); AISkillDriver val = null; AISkillDriver[] components = fs1MasterPrefab.GetComponents<AISkillDriver>(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { string customName = val2.customName; Log.Debug("False Son p1 " + customName); if (customName == "FissureSlam" && Configs.slamEnable) { val2.minDistance = 0f; val2.maxDistance = 40f; val2.ignoreNodeGraph = true; val2.activationRequiresTargetLoS = false; val2.driverUpdateTimerOverride = -1f; } if (customName == "TaintedOffering" && Configs.offeringEnable) { val2.minDistance = 30f; val2.maxDistance = 150f; } if (customName == "Corrupted Paths (Step Brothers)") { val = val2; } } AISkillDriver[] components2 = fs2MasterPrefab.GetComponents<AISkillDriver>(); AISkillDriver[] array2 = components2; foreach (AISkillDriver val3 in array2) { string customName2 = val3.customName; Log.Debug("False Son p2 " + customName2); if (customName2 == "FissureSlam" && Configs.slamEnable) { val3.minDistance = 0f; val3.maxDistance = 40f; val3.ignoreNodeGraph = true; val3.activationRequiresTargetLoS = false; val3.selectionRequiresTargetLoS = false; val3.movementType = (MovementType)1; val3.shouldSprint = true; val3.driverUpdateTimerOverride = -1f; } if (customName2 == "Follow Last Known Target") { val3.moveTargetType = (TargetType)3; val3.aimType = (AimType)1; val3.shouldSprint = true; val3.movementType = (MovementType)1; val3.ignoreNodeGraph = true; val3.resetCurrentEnemyOnNextDriverSelection = false; val3.activationRequiresTargetLoS = false; } if (customName2 == "SwatAwayPlayers" && Configs.slamEnable) { if ((Object)(object)val != (Object)null && hardMode) { val3.maxDistance = val.maxDistance; val3.minDistance = val.minDistance; val3.activationRequiresTargetLoS = val.activationRequiresTargetLoS; val3.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS; val3.aimType = val.aimType; val3.movementType = val.movementType; val3.moveTargetType = val.moveTargetType; val3.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride; val3.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride; val3.selectionRequiresTargetLoS = false; } else { val3.maxDistance = 120f; val3.minDistance = 0f; val3.activationRequiresTargetLoS = false; val3.activationRequiresAimTargetLoS = false; val3.aimType = (AimType)2; val3.movementType = (MovementType)0; val3.moveTargetType = (TargetType)0; val3.selectionRequiresTargetLoS = false; } } if (customName2 == "Corrupted Paths (Step Brothers)") { val3.maxDistance = 0f; val3.minDistance = 0f; } if (customName2 == "Lunar Rain" && Configs.rainEnable) { val3.driverUpdateTimerOverride = Configs.rainWindup; } } AISkillDriver[] components3 = fs3MasterPrefab.GetComponents<AISkillDriver>(); AISkillDriver[] array3 = components3; foreach (AISkillDriver val4 in array3) { string customName3 = val4.customName; Log.Debug("False Son p3 " + customName3); if (customName3 == "FissureSlam" && Configs.slamEnable) { val4.minDistance = 0f; val4.maxDistance = 40f; val4.ignoreNodeGraph = true; val4.activationRequiresTargetLoS = false; val4.selectionRequiresTargetLoS = false; val4.movementType = (MovementType)1; val4.shouldSprint = true; val4.driverUpdateTimerOverride = -1f; } if (customName3 == "Follow Last Known Target") { val4.moveTargetType = (TargetType)3; val4.aimType = (AimType)1; val4.shouldSprint = true; val4.movementType = (MovementType)1; val4.ignoreNodeGraph = true; val4.resetCurrentEnemyOnNextDriverSelection = false; val4.activationRequiresTargetLoS = false; } if (customName3 == "SwatAwayPlayers" && Configs.slamEnable) { if ((Object)(object)val != (Object)null && hardMode) { val4.maxDistance = val.maxDistance; val4.minDistance = val.minDistance; val4.activationRequiresTargetLoS = val.activationRequiresTargetLoS; val4.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS; val4.aimType = val.aimType; val4.movementType = val.movementType; val4.moveTargetType = val.moveTargetType; val4.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride; val4.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride; val4.selectionRequiresTargetLoS = false; } else { val4.maxDistance = 120f; val4.minDistance = 0f; val4.activationRequiresTargetLoS = false; val4.activationRequiresAimTargetLoS = false; val4.aimType = (AimType)2; val4.movementType = (MovementType)0; val4.moveTargetType = (TargetType)0; val4.selectionRequiresTargetLoS = false; } } if (customName3 == "Lunar Rain" && Configs.rainEnable) { val4.driverUpdateTimerOverride = Configs.rainWindup; } } fs1MasterPrefab.GetComponent<BaseAI>().aimVectorMaxSpeed = 360f; fs1MasterPrefab.GetComponent<BaseAI>().aimVectorMaxSpeed = 360f; } private void CreateBuffs() { //IL_005f: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) targetIcon = Assets.mainBundle.LoadAsset<Sprite>("Assets/texLaserTargetIconAlt.png"); devastatorIcon = Assets.mainBundle.LoadAsset<Sprite>("Assets/texPrimeDevastatorIconAlt.png"); if ((Object)(object)targetIcon == (Object)null || (Object)(object)devastatorIcon == (Object)null) { Log.Error("Asset Load Failed!"); } StormboundDevastatorDebuff = Buffs.AddNewBuff("BloonStormboundDevastatorDebuff", devastatorIcon, Color.white, canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: true); LaserTargetDebuff = Buffs.AddNewBuff("BloonLaserTargetDebuff", targetIcon, Color.white, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true); LaserCrystalDebuff = Buffs.AddNewBuff("BloonLaserCrystalDebuff", crystalIcon, Color.white, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true); LaserGoldDebuff = Buffs.AddNewBuff("BloonLaserGoldDebuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/CritOnUse/texBuffFullCritIcon.tif").WaitForCompletion(), Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: true); FalseSonBossBuff = Buffs.AddNewBuff("BloonFalseSonBossBuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/CritOnUse/texBuffFullCritIcon.tif").WaitForCompletion(), Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: true); AuriArmorBuff = Buffs.AddNewBuff("BloonAuriArmorBuff", auriIcon, Color.white, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: false); GeodeRegenBuff = Buffs.AddNewBuff("BloonGeodeRegenBuff", regenIcon, Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true); GeodeSpeedBuff = Buffs.AddNewBuff("BloonGeodeSpeedBuff", speedIcon, Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true); HiddenLightningInvincibility = Buffs.AddNewBuff("BloonHiddenLightningInvincibility", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/CritOnUse/texBuffFullCritIcon.tif").WaitForCompletion(), Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: true); } public void IL_UpdateVisualEffect(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "TeslaField"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody self) => self.HasBuff(StormboundDevastatorDebuff))); val.Emit(OpCodes.Or); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } if (val.TryGotoNext(val3, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ShockDamageEnergized"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody self) => self.HasBuff(StormboundDevastatorDebuff))); val.Emit(OpCodes.Or); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } public static void SetAlpha(GameObject thingToColor, float alpha) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) LineRenderer[] componentsInChildren = thingToColor.GetComponentsInChildren<LineRenderer>(); foreach (LineRenderer val in componentsInChildren) { Color startColor = val.startColor; startColor.a = alpha; val.startColor = startColor; Color endColor = val.endColor; endColor.a = alpha; val.endColor = endColor; } ParticleSystem[] componentsInChildren2 = thingToColor.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val2 in componentsInChildren2) { MainModule main = val2.main; MinMaxGradient startColor2 = ((MainModule)(ref main)).startColor; Color colorMin = ((MinMaxGradient)(ref startColor2)).colorMin; colorMin.a = alpha; ((MainModule)(ref main)).startColor = new MinMaxGradient(colorMin); TrailModule trails = val2.trails; if (((TrailModule)(ref trails)).enabled) { MinMaxGradient colorOverLifetime = ((TrailModule)(ref trails)).colorOverLifetime; Color colorMin2 = ((MinMaxGradient)(ref colorOverLifetime)).colorMin; colorMin2.a = alpha; ((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(colorMin2); } } Light[] componentsInChildren3 = thingToColor.GetComponentsInChildren<Light>(); foreach (Light val3 in componentsInChildren3) { Color color = val3.color; color.a = alpha; } ParticleSystemRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleS