using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.VoidBarnacle.Weapon; using EntityStates.VoidRaidCrab; using EntityStates.VoidRaidCrab.Joint; using EntityStates.VoidRaidCrab.Weapon; using FathomlessVoidling.Components; using FathomlessVoidling.Controllers; using FathomlessVoidling.EntityStates; using FathomlessVoidling.EntityStates.Barnacle; using FathomlessVoidling.EntityStates.Haunt; using FathomlessVoidling.EntityStates.Primary; using FathomlessVoidling.EntityStates.Secondary; using FathomlessVoidling.EntityStates.Special; using FathomlessVoidling.EntityStates.Utility; using FathomlessVoidling.Hooks; using HG.Reflection; using Microsoft.CodeAnalysis; using On.EntityStates.VoidBarnacle.Weapon; using On.EntityStates.VoidRaidCrab; using On.RoR2; using On.RoR2.Projectile; using On.RoR2.VoidRaidCrab; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.EntityLogic; using RoR2.Mecanim; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.VoidRaidCrab; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using RoR2BepInExPack.GameAssetPathsBetter; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Playables; using UnityEngine.Rendering.PostProcessing; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.Timeline; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: NetworkCompatibility(/*Could not decode attribute arguments.*/)] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyInformationalVersion("1.0.0+1b7754b368dfaa4e10a93fa7c139d0dbe8221ce1")] [assembly: AssemblyProduct("FathomlessVoidling")] [assembly: AssemblyTitle("FathomlessVoidling")] [assembly: AssemblyCompany("FathomlessVoidling")] [assembly: AssemblyConfiguration("Release")] [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] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace FathomlessVoidling { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } private static string getLogPrefix(string callerPath, string callerMemberName, int callerLineNumber) { int num = callerPath.LastIndexOf("FathomlessVoidling"); if (num >= 0) { callerPath = callerPath.Substring(num + "FathomlessVoidling".Length + 1); } return $"{callerPath}:{callerLineNumber} ({callerMemberName}) "; } internal static void Error(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogError((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Error_NoCallerPrefix(object data) { _logSource.LogError(data); } internal static void Fatal(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogFatal((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Fatal_NoCallerPrefix(object data) { _logSource.LogFatal(data); } internal static void Info(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogInfo((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Info_NoCallerPrefix(object data) { _logSource.LogInfo(data); } internal static void Message(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogMessage((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Message_NoCallerPrefix(object data) { _logSource.LogMessage(data); } internal static void Warning(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogWarning((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Warning_NoCallerPrefix(object data) { _logSource.LogWarning(data); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Nuxlar.FathomlessVoidling", "FathomlessVoidling", "1.0.6")] public class Main : BaseUnityPlugin { public const string PluginGUID = "Nuxlar.FathomlessVoidling"; public const string PluginAuthor = "Nuxlar"; public const string PluginName = "FathomlessVoidling"; public const string PluginVersion = "1.0.6"; public static ModdedDamageType gravityDamageType = DamageAPI.ReserveDamageType(); public static Material abyssalTerrainMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matDCTerrainFloorInfiniteTower_mat).WaitForCompletion(); public static Material abyssalPillarMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matDCTerrainGiantColumnsInfiniteTower_mat).WaitForCompletion(); public static Material abyssalColumnMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matDCTerrainSmallColumnInfiniteTower_mat).WaitForCompletion(); public static Material abyssalBoulderMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matDCBoulderInfiniteTower_mat).WaitForCompletion(); public static Material abyssalBridgeMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matDCTerrainWallsInfiniteTower_mat).WaitForCompletion(); public static Material abyssalRuinMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matTrimSheetLemurianRuinsHeavyInfiniteTower_mat).WaitForCompletion(); public static Material abyssalChainMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matTrimSheetLemurianMetalLightInfiniteTower_mat).WaitForCompletion(); public static Material abyssalStalagmiteMat = Addressables.LoadAssetAsync((object)RoR2_DLC1_itdampcave.matDCStalagmiteInfiniteTower_mat).WaitForCompletion(); public static GameObject spawnEffect; public static CharacterSpawnCard jointCard = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.cscVoidRaidCrabJoint_asset).WaitForCompletion(); public static SpawnCard bigVoidlingCard = (SpawnCard)(object)Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.cscVoidRaidCrab_asset).WaitForCompletion(); public static TimelineAsset introTimeline = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabIntroTimeiline_playable).WaitForCompletion(); public static GameObject chargeVoidRain; public static GameObject voidRainTracer = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.TracerVoidRaidCrabTripleBeamSmall_prefab).WaitForCompletion(); public static GameObject voidRainExplosion = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabTripleBeamExplosion_prefab).WaitForCompletion(); public static GameObject voidRainWarning = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.MultiBeamRayIndicator_prefab).WaitForCompletion(); public static GameObject voidRainPortalEffect; public static GameObject eyeMissileProjectile; public static GameObject eyeBlastChargeEffect; public static GameObject eyeBlastMuzzleFlash; public static GameObject raidTeleportEffect; public static LoopSoundDef lsdVoidMegaCrabDeathBomb = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidMegaCrab.lsdVoidMegaCrabDeathBomb_asset).WaitForCompletion(); public static GameObject chargeWardWipeChargeEffect = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabWardWipeChargeup_prefab).WaitForCompletion(); public static GameObject fireWardWipeMuzzleFlash = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabWardWipeMuzzleflash_prefab).WaitForCompletion(); public static BuffDef bdWardWipeFog = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.bdVoidRaidCrabWardWipeFog_asset).WaitForCompletion(); public static InteractableSpawnCard iscSafeWard = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.iscVoidRaidSafeWard_asset).WaitForCompletion(); public static SkillDef sdWardWipe; public static SkillDef sdSingularity; private static SkillDef sdMaze; private static SkillDef sdMultiBeam; public static GameObject barnacleMuzzleFlash = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleMuzzleflash_prefab).WaitForCompletion(); public static GameObject gravityBulletChargeEffect; public static GameObject gravityBulletProjectile; public static GameObject gravityBombProjectile; public static SpawnCard voidlingHauntCard = (SpawnCard)(object)ScriptableObject.CreateInstance(); public static GameObject groundedGravityEffect; public static GameObject airborneGravityEffect; public static GameObject mazePortalEffect; public static GameObject mazeMuzzleEffect; public static GameObject mazeLaserPrefab; public static GameObject mazeWarningPrefab; public static GameObject mazeChargeUpPrefab; public static GameObject mazeImpactEffect; public static GameObject wSingularityProjectile; public static SpawnCard locusPortalCard = Addressables.LoadAssetAsync((object)RoR2_DLC1_PortalVoid.iscVoidPortal_asset).WaitForCompletion(); private static CharacterBody jointBody; private static CharacterBody bossBody; public static bool infernoEnabled = false; internal static Main Instance { get; private set; } public static string PluginDirectory { get; private set; } public static bool RooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public void Awake() { Instance = this; infernoEnabled = Chainloader.PluginInfos.ContainsKey("HIFU.Inferno"); Log.Init(((BaseUnityPlugin)this).Logger); ModConfig.Init(); AddContent(); LoadAssets(); CreateVoidlingHaunt(); CreateNewEyeMissiles(); CreateGravityProjectiles(); CreateSingularityProjectile(); TweakBigVoidling(); TweakBigVoidlingMaster(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(TweaksAfterLoad)); new ConnectHooks(); } private void TweaksAfterLoad() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) CharacterBody obj = jointBody; obj.bodyFlags = (BodyFlags)(obj.bodyFlags | 0x4810); CharacterBody obj2 = bossBody; obj2.bodyFlags = (BodyFlags)(obj2.bodyFlags | 0x4810); bossBody.baseNameToken = "[ Voidling ]"; bossBody.subtitleNameToken = "Augur of the Abyss"; jointBody = null; bossBody = null; GameObject obj3 = Addressables.LoadAssetAsync((object)RoR2_Base_moon.FrogInteractable_prefab).WaitForCompletion(); PurchaseInteraction component = obj3.GetComponent(); component.costType = (CostTypeIndex)0; component.cost = 0; obj3.GetComponent().maxPets = 1; } private void AddContent() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_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_002a: 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_003a: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_007a: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); } public static List GetPlayerBodies() { List list = new List(); foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.master)) { CharacterBody body = instance.master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { list.Add(body); } } } return list; } private static void CreateNewEyeMissiles() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabImpact1_prefab).WaitForCompletion(); GameObject val2 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMissileGhost_prefab).WaitForCompletion(); GameObject val3 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMissileProjectile_prefab).WaitForCompletion(); val3 = PrefabAPI.InstantiateClone(val3, "FathomlessEyeProjectile", true); val2 = PrefabAPI.InstantiateClone(val2, "FathomlessEyeProjectileGhost", false); val = PrefabAPI.InstantiateClone(val, "FathomlessEyeProjectileImpact", false); val3.GetComponent().ghostPrefab = val2; val3.AddComponent(); val3.GetComponent().desiredForwardSpeed = 125f; ProjectileImpactExplosion obj = val3.AddComponent(); ((ProjectileExplosion)obj).blastRadius = 6f; obj.impactEffect = val; obj.destroyOnWorld = true; obj.lifetime = 5f; ((ProjectileExplosion)obj).blastDamageCoefficient = 1f; ((ProjectileExplosion)obj).falloffModel = (FalloffModel)2; Object.Destroy((Object)(object)val3.GetComponent()); ProjectileSteerTowardTarget component = val3.GetComponent(); component.rotationSpeed = 10f; ((Behaviour)component).enabled = false; ProjectileDirectionalTargetFinder component2 = val3.GetComponent(); component2.lookCone = 360f; component2.lookRange = 100f; Transform transform = val3.transform; transform.localScale *= 4f; Transform val4 = val2.transform.Find("FlashRing"); if (Object.op_Implicit((Object)(object)val4)) { MainModule main = ((Component)val4).GetComponent().main; ((MainModule)(ref main)).duration = ((MainModule)(ref main)).duration * 3f; ((MainModule)(ref main)).startLifetimeMultiplier = ((MainModule)(ref main)).startLifetimeMultiplier * 3f; } foreach (Transform item in val2.transform) { item.localScale *= 4f; } foreach (Transform item2 in val.transform) { item2.localScale *= 4f; } ContentAddition.AddEffect(val); ContentAddition.AddProjectile(val3); eyeMissileProjectile = val3; } private static void TweakBigVoidlingMaster() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) GameObject obj = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMaster_prefab).WaitForCompletion(); Object.Destroy((Object)(object)obj.GetComponent()); foreach (AISkillDriver item in obj.GetComponents().ToList()) { switch (item.customName) { case "Channel Gauntlet 1": case "Channel Gauntlet 2": case "GravityBump": Object.Destroy((Object)(object)item); break; case "FireMissiles": item.movementType = (MovementType)1; ((Behaviour)item).enabled = true; item.noRepeat = true; item.buttonPressType = (ButtonPressType)0; item.activationRequiresAimConfirmation = false; item.nextHighPriorityOverride = null; break; case "FireMultiBeam": item.movementType = (MovementType)1; item.aimType = (AimType)1; item.skillSlot = (SkillSlot)1; ((Behaviour)item).enabled = true; item.maxUserHealthFraction = float.PositiveInfinity; item.activationRequiresAimConfirmation = false; item.noRepeat = true; item.buttonPressType = (ButtonPressType)0; item.nextHighPriorityOverride = null; break; case "SpinBeam": item.movementType = (MovementType)1; item.aimType = (AimType)1; item.skillSlot = (SkillSlot)2; item.maxUserHealthFraction = float.PositiveInfinity; item.buttonPressType = (ButtonPressType)0; item.driverUpdateTimerOverride = 1f; item.nextHighPriorityOverride = null; item.activationRequiresAimConfirmation = false; break; case "Vacuum Attack": item.movementType = (MovementType)1; item.aimType = (AimType)1; ((Behaviour)item).enabled = false; item.maxUserHealthFraction = float.PositiveInfinity; item.buttonPressType = (ButtonPressType)0; item.driverUpdateTimerOverride = 1f; item.nextHighPriorityOverride = null; break; case "WardWipe": item.movementType = (MovementType)1; item.aimType = (AimType)1; ((Behaviour)item).enabled = false; item.maxUserHealthFraction = float.PositiveInfinity; item.buttonPressType = (ButtonPressType)0; item.driverUpdateTimerOverride = 1f; item.nextHighPriorityOverride = null; item.requiredSkill = null; break; case "LookAtTarget": item.movementType = (MovementType)1; break; } } } private static void CreateGravityProjectiles() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) groundedGravityEffect = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabGravityBumpExplosionGround_prefab).WaitForCompletion(); groundedGravityEffect.GetComponent().soundName = "Play_voidDevastator_death"; airborneGravityEffect = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabGravityBumpExplosionAir_prefab).WaitForCompletion(); airborneGravityEffect.GetComponent().soundName = "Play_voidDevastator_death"; Material val = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabGravityBumpSphere_mat).WaitForCompletion(); Material val2 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabGravityBumpGem_mat).WaitForCompletion(); Material sharedMaterial = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabParticleBlue_mat).WaitForCompletion(); Material sharedMaterial2 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabGravityBumpWarning_mat).WaitForCompletion(); GameObject val3 = Addressables.LoadAssetAsync((object)RoR2_Base_Nullifier.NullifierPreBombGhost_prefab).WaitForCompletion(); GameObject val4 = Addressables.LoadAssetAsync((object)RoR2_Base_Nullifier.NullifierExplosion_prefab).WaitForCompletion(); Addressables.LoadAssetAsync((object)RoR2_Base_Nullifier.NullifierBombProjectile_prefab).WaitForCompletion(); Material[] sharedMaterials = (Material[])(object)new Material[2] { val, val2 }; GameObject obj = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleImpactExplosion_prefab).WaitForCompletion(); GameObject obj2 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleCharge_prefab).WaitForCompletion(); GameObject val5 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleBullet_prefab).WaitForCompletion(); GameObject val6 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleBulletGhost_prefab).WaitForCompletion(), "GravityBulletGhostNux", false); ((Renderer)((Component)val6.transform.GetChild(3)).GetComponent()).sharedMaterials = sharedMaterials; ((Component)val6.transform.Find("Point Light")).GetComponent().color = new Color(6f / 85f, 6f / 85f, 1f, 1f); ((Renderer)((Component)val6.transform.Find("Flames")).GetComponent()).sharedMaterial = sharedMaterial; gravityBulletChargeEffect = PrefabAPI.InstantiateClone(obj2, "GravityBulletChargeEffectNux", false); Transform child = gravityBulletChargeEffect.transform.GetChild(0); ((Renderer)((Component)child.Find("Fire")).GetComponent()).sharedMaterial = sharedMaterial; ((Component)child.Find("Point Light")).GetComponent().color = new Color(0.6627451f, 47f / 51f, 50f / 51f, 1f); ((Renderer)((Component)child.Find("Sphere")).GetComponent()).sharedMaterials = sharedMaterials; GameObject val7 = PrefabAPI.InstantiateClone(obj, "GravityBulletExplosionEffectNux", false); ((Component)val7.transform.Find("Point Light")).GetComponent().color = new Color(9f / 85f, 41f / 85f, 0.972549f, 1f); ((Renderer)((Component)val7.transform.Find("ExplosionSphere, Stars (1)")).GetComponent()).sharedMaterial = val; gravityBulletProjectile = PrefabAPI.InstantiateClone(val5, "GravityBulletNux", true); gravityBulletProjectile.GetComponent().ghostPrefab = val6; gravityBulletProjectile.GetComponent().impactEffect = val7; ContentAddition.AddEffect(val7); ContentAddition.AddProjectile(gravityBulletProjectile); GameObject obj3 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_Nullifier.NullifierPreBombProjectile_prefab).WaitForCompletion(), "GravityPreBombProjectileNux", true); GameObject val8 = PrefabAPI.InstantiateClone(val3, "GravityPreBombGhostNux", false); GameObject val9 = PrefabAPI.InstantiateClone(val4, "GravityBombExplosionEffectNux", false); ProjectileController component = obj3.GetComponent(); component.ghostPrefab = val8; component.cannotBeDeleted = true; ProjectileImpactExplosion component2 = obj3.GetComponent(); ((ProjectileExplosion)component2).blastRadius = 10f; component2.impactEffect = val9; component2.lifetime = 2f; ((ProjectileExplosion)component2).childrenProjectilePrefab = null; gravityBombProjectile = obj3; Transform transform = gravityBombProjectile.transform; transform.localScale *= 2f; Transform transform2 = val8.transform; transform2.localScale *= 2f; ((Renderer)((Component)val8.transform.Find("Vacuum Radial")).GetComponent()).sharedMaterial = sharedMaterial2; Transform obj4 = val8.transform.Find("Sphere"); obj4.localScale *= 2f; ObjectScaleCurve component3 = ((Component)obj4).GetComponent(); component3.timeMax = 2f; component3.baseScale = new Vector3(4f, 4f, 4f); ((Renderer)((Component)obj4).GetComponent()).sharedMaterials = sharedMaterials; ((Renderer)((Component)val8.transform.Find("Vacuum Stars")).GetComponent()).sharedMaterial = sharedMaterial; ParticleSystem[] componentsInChildren = ((Component)val8.transform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main = componentsInChildren[i].main; ((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * 1.5f; ((MainModule)(ref main)).duration = ((MainModule)(ref main)).duration * 2f; ((MainModule)(ref main)).startLifetimeMultiplier = ((MainModule)(ref main)).startLifetimeMultiplier * 2f; } ((Renderer)((Component)val9.transform.Find("Vacuum Stars")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)val9.transform.Find("Vacuum Radial")).GetComponent()).sharedMaterial = sharedMaterial2; Transform obj5 = val9.transform.Find("Sphere"); ((Renderer)((Component)obj5).GetComponent()).sharedMaterial = val; Transform transform3 = ((Component)obj5).transform; transform3.localScale *= 2f; componentsInChildren = ((Component)val9.transform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main2 = componentsInChildren[i].main; ((MainModule)(ref main2)).startSizeMultiplier = ((MainModule)(ref main2)).startSizeMultiplier * 1.2f; } ContentAddition.AddEffect(val9); ContentAddition.AddProjectile(gravityBombProjectile); } private static void CreateVoidlingHaunt() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) SpawnCard spawnCard = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidBarnacle.cscVoidBarnacle_asset).WaitForCompletion(); DirectorCard val = new DirectorCard { selectionWeight = 1, spawnCard = spawnCard }; GameObject obj = Addressables.LoadAssetAsync((object)RoR2_Base_BrotherHaunt.BrotherHauntMaster_prefab).WaitForCompletion(); GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_BrotherHaunt.BrotherHauntBody_prefab).WaitForCompletion(), "VoidlingHauntNux", true); GameObject val3 = PrefabAPI.InstantiateClone(obj, "VoidlingHauntNuxMaster", true); GameObject val4 = new GameObject("Barnacle Director"); val4.SetActive(false); val4.transform.parent = val2.transform; CombatDirector obj2 = val4.AddComponent(); DirectorCardCategorySelection val5 = ScriptableObject.CreateInstance(); val5.AddCategory("BarnacleMania", 4f); val5.AddCard(0, val); obj2.customName = "Barnacle Director"; obj2.expRewardCoefficient = 0.2f; obj2.minSeriesSpawnInterval = 0.1f; obj2.maxSeriesSpawnInterval = 1f; obj2.minRerollSpawnInterval = 4.333333f; obj2.maxRerollSpawnInterval = 8.333333f; obj2.creditMultiplier = 0.3f; obj2.targetPlayers = true; obj2.monsterCards = val5; obj2.teamIndex = (TeamIndex)4; obj2.monsterCredit = 150f; obj2.onSpawnedServer = new OnSpawnedServer(); obj2.moneyWaveIntervals = (RangeFloat[])(object)new RangeFloat[1] { new RangeFloat { min = 1f, max = 1f } }; val2.GetComponent().baseNameToken = "Voidling Haunt"; val3.GetComponent().bodyPrefab = val2; SkillDef val6 = ScriptableObject.CreateInstance(); val6.skillName = "Gravity Well Nux"; ((Object)val6).name = "Gravity Well Nux"; val6.skillNameToken = "Gravity Well Nux"; val6.activationState = new SerializableEntityStateType(typeof(VoidlingHauntManager)); val6.activationStateMachineName = "Weapon"; val6.interruptPriority = (InterruptPriority)9; val6.baseMaxStock = 1; val6.baseRechargeInterval = 60f; val6.rechargeStock = 1; val6.requiredStock = 1; val6.stockToConsume = 1; val6.dontAllowPastMaxStocks = true; val6.beginSkillCooldownOnSkillEnd = true; val6.canceledFromSprinting = false; val6.forceSprintDuringState = false; val6.fullRestockOnAssign = false; val6.resetCooldownTimerOnUse = false; val6.isCombatSkill = true; val6.mustKeyPress = false; val6.cancelSprintingOnActivation = false; ContentAddition.AddSkillDef(val6); Object.Destroy((Object)(object)val2.GetComponent()); EntityStateMachine component = val2.GetComponent(); component.initialStateType = new SerializableEntityStateType(typeof(VoidlingHauntManager)); component.mainStateType = new SerializableEntityStateType(typeof(VoidlingHauntManager)); SkillLocator component2 = val2.GetComponent(); GenericSkill val7 = val2.AddComponent(); val7.skillName = "VHauntNuxPrimary"; SkillFamily val8 = ScriptableObject.CreateInstance(); ((Object)val8).name = "VHauntNuxPrimaryFamily"; val8.variants = (Variant[])(object)new Variant[1] { new Variant { skillDef = val6 } }; val7._skillFamily = val8; ContentAddition.AddSkillFamily(val8); component2.primary = val7; ContentAddition.AddBody(val2); ContentAddition.AddMaster(val3); voidlingHauntCard.prefab = val3; voidlingHauntCard.sendOverNetwork = true; voidlingHauntCard.nodeGraphType = (GraphType)1; } private static void TweakBigVoidling() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabBody_prefab).WaitForCompletion(); ModelLocator component = val.GetComponent(); CharacterBody component2 = val.GetComponent(); component2.baseMaxHealth = 1000f; bossBody = component2; FogDamageController component3 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.healthFractionPerSecond = 0.01f; component3.healthFractionRampCoefficientPerSecond = 0.1f; } SkillLocator component4 = val.GetComponent(); component4.primary.skillFamily.variants[0].skillDef.activationState = new SerializableEntityStateType(typeof(ChargeEyeBlast)); component4.secondary.skillFamily.variants = (Variant[])(object)new Variant[1] { new Variant { skillDef = sdMultiBeam } }; component4.utility.skillFamily.variants = (Variant[])(object)new Variant[1] { new Variant { skillDef = sdMaze } }; List list = val.GetComponents().ToList(); for (int i = 0; i < list.Count; i++) { EntityStateMachine val2 = list[i]; if (val2.customName == "Body") { val2.initialStateType = new SerializableEntityStateType(typeof(BetterSpawnState)); } } Animator component5 = ((Component)component.modelTransform).gameObject.GetComponent(); component5.applyRootMotion = true; component5.avatar = AvatarBuilder.BuildGenericAvatar(((Component)component5).gameObject, "ROOT"); GameObject gameObject = ((Component)component.modelTransform).gameObject; PrintController obj = gameObject.AddComponent(); obj.printTime = 8.5f; obj.disableWhenFinished = true; obj.startingPrintHeight = -20f; obj.maxPrintHeight = 200f; obj.startingPrintBias = -10f; obj.maxPrintBias = 0f; obj.animateFlowmapPower = false; obj.startingFlowmapPower = 0f; obj.maxFlowmapPower = 0f; obj.printCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); ((Component)obj).gameObject.SetActive(true); gameObject.AddComponent(); foreach (SurfaceDefProvider item in ((Component)gameObject.transform.Find("VoidRaidCrabArmature").Find("ROOT").Find("LegBase")).GetComponentsInChildren().ToList()) { ((Component)item).gameObject.layer = (int)(ref LayerIndex.defaultLayer); } } private static void LoadAssets() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_06dd: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_07b0: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08bd: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_08f5: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_0992: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09c3: Unknown result type (might be due to invalid IL or missing references) //IL_09ce: Unknown result type (might be due to invalid IL or missing references) //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_0a02: Unknown result type (might be due to invalid IL or missing references) //IL_0a1f: Unknown result type (might be due to invalid IL or missing references) //IL_0a24: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a4d: Unknown result type (might be due to invalid IL or missing references) //IL_0a52: Unknown result type (might be due to invalid IL or missing references) //IL_0a6f: Unknown result type (might be due to invalid IL or missing references) //IL_0a74: Unknown result type (might be due to invalid IL or missing references) Addressables.LoadAssetAsync((object)RoR2_DLC1_voidraid.voidraid_asset).WaitForCompletion().blockOrbitalSkills = false; raidTeleportEffect = Addressables.LoadAssetAsync((object)RoR2_DLC1_gauntlets.VoidRaidCrabGauntletTeleportEffect_prefab).WaitForCompletion(); raidTeleportEffect.GetComponent().soundName = "Play_voidRaid_fog_explode"; MainModule main = ((Component)raidTeleportEffect.transform.Find("OmniSparks")).GetComponent().main; MinMaxGradient startColor = ((MainModule)(ref main)).startColor; MainModule main2 = ((Component)raidTeleportEffect.transform.Find("Sphere, Brief")).GetComponent().main; MainModule main3 = ((Component)raidTeleportEffect.transform.Find("Sphere, Long")).GetComponent().main; ((MainModule)(ref main2)).startColor = startColor; ((MainModule)(ref main3)).startColor = startColor; Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidSafeWard_prefab).WaitForCompletion().GetComponent() .radius = 16f; Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabSpinBeamSphere1_mat).WaitForCompletion(); Material sharedMaterial = Addressables.LoadAssetAsync((object)RoR2_DLC1_PortalVoid.matPortalVoidCenter_mat).WaitForCompletion(); mazeChargeUpPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamChargeUp_prefab).WaitForCompletion(), "MazeChargeUpEffectNux", false); ParticleSystem[] componentsInChildren = ((Component)mazeChargeUpPrefab.transform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main4 = componentsInChildren[i].main; ((MainModule)(ref main4)).startSizeMultiplier = ((MainModule)(ref main4)).startSizeMultiplier * 1.5f; } mazeImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.LaserImpactEffect_prefab).WaitForCompletion(), "MazeImpactEffectNux", false); componentsInChildren = ((Component)mazeImpactEffect.transform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main5 = componentsInChildren[i].main; ((MainModule)(ref main5)).startSizeMultiplier = ((MainModule)(ref main5)).startSizeMultiplier / 2f; } ContentAddition.AddEffect(mazeImpactEffect); PostProcessProfile sharedProfile = Addressables.LoadAssetAsync((object)RoR2_Base_title_PostProcessing.ppLocalNullifier_asset).WaitForCompletion(); ((ParameterOverride)(object)Addressables.LoadAssetAsync((object)RoR2_DLC1_voidraid.ppSceneVoidRaidStageStarry_asset).WaitForCompletion().GetSetting() .fogColorStart).value = new Color(0.2687f, 0.2429f, 0.2429f, 0.075f); mazeLaserPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamVFX_prefab).WaitForCompletion(), "MazeLaserVFXNux"); mazeLaserPrefab.AddComponent(); Transform obj = mazeLaserPrefab.transform.Find("Mesh, Additive"); obj.localScale *= 3f; obj.localPosition = new Vector3(0f, 0f, 50.16f); Transform child = mazeLaserPrefab.transform.Find("Point Light, End").GetChild(0); ((Component)child).gameObject.SetActive(true); ((Component)child).GetComponent().sharedProfile = sharedProfile; componentsInChildren = ((Component)mazeLaserPrefab.transform).GetComponentsInChildren(); foreach (ParticleSystem val in componentsInChildren) { if (((Object)((Component)val).gameObject).name != "MuzzleRayParticles") { MainModule main6 = val.main; ((MainModule)(ref main6)).startSizeMultiplier = ((MainModule)(ref main6)).startSizeMultiplier * 3f; } } mazeWarningPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamVFX_prefab).WaitForCompletion(), "MazeWarningVFXNux"); for (int num = mazeWarningPrefab.transform.childCount - 1; num >= 0; num--) { Transform child2 = mazeWarningPrefab.transform.GetChild(num); if (((Object)child2).name != "Mesh, Additive" && ((Object)child2).name != "Mesh, Transparent") { Object.Destroy((Object)(object)((Component)child2).gameObject); } } VfxKillBehavior component = mazeWarningPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } DestroyOnTimer component2 = mazeWarningPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.duration = 2f; } Material sharedMaterial2 = Addressables.LoadAssetAsync((object)RoR2_DLC1_voidstage.matVoidBoostPath_mat).WaitForCompletion(); Material sharedMaterial3 = Addressables.LoadAssetAsync((object)RoR2_Base_Common.matVoidDeathBombAreaIndicatorFront_mat).WaitForCompletion(); Transform val2 = mazeWarningPrefab.transform.Find("Mesh, Additive"); if (Object.op_Implicit((Object)(object)val2)) { val2.localScale *= 3f; val2.localPosition = new Vector3(0f, 0f, 50.16f); MeshRenderer component3 = ((Component)val2).GetComponent(); ((Renderer)((Component)val2.GetChild(0)).GetComponent()).sharedMaterial = sharedMaterial3; ObjectScaleCurve obj2 = ((Component)val2).gameObject.AddComponent(); obj2.resetOnAwake = true; obj2.timeMax = 1f; obj2.curveX = AnimationCurve.Linear(0f, 0f, 1f, 1f); obj2.curveY = AnimationCurve.Linear(0f, 0f, 1f, 1f); obj2.curveZ = AnimationCurve.Linear(0f, 1f, 1f, 1f); obj2.overallCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f); if (Object.op_Implicit((Object)(object)component3)) { ((Renderer)component3).sharedMaterial = sharedMaterial2; } } GameObject val3 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamChargeUp_prefab).WaitForCompletion(), "MazeMuzzleEffectNux", false); val3.transform.eulerAngles = new Vector3(90f, 0f, 0f); componentsInChildren = ((Component)val3.transform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main7 = componentsInChildren[i].main; ((MainModule)(ref main7)).duration = ((MainModule)(ref main7)).duration * 1.25f; } mazeMuzzleEffect = val3; GameObject val4 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidMegaCrab.VoidMegaCrabSpawnEffect_prefab).WaitForCompletion(), "MazePortalEffectNux", false); val4.GetComponent().duration = 5f; componentsInChildren = val4.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main8 = componentsInChildren[i].main; ((MainModule)(ref main8)).startSizeMultiplier = ((MainModule)(ref main8)).startSizeMultiplier * 2f; ((MainModule)(ref main8)).startLifetimeMultiplier = ((MainModule)(ref main8)).startLifetimeMultiplier * 4f; } ((Renderer)((Component)val4.transform.Find("Ring").GetChild(0)).GetComponent()).sharedMaterial = sharedMaterial; mazePortalEffect = val4; ContentAddition.AddEffect(mazePortalEffect); eyeBlastMuzzleFlash = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMuzzleflashEyeMissiles_prefab).WaitForCompletion(), "EyeBlastMuzzleFlashNux", false); ContentAddition.AddEffect(eyeBlastMuzzleFlash); eyeBlastChargeEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabChargeEyeMissiles_prefab).WaitForCompletion(), "EyeBlastChargeEffectNux", false); componentsInChildren = ((Component)eyeBlastChargeEffect.transform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main9 = componentsInChildren[i].main; ((MainModule)(ref main9)).startSizeMultiplier = ((MainModule)(ref main9)).startSizeMultiplier * 2f; } voidRainPortalEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_Nullifier.NullifierSpawnEffect_prefab).WaitForCompletion(), "VoidRainPortalEffect", false); ((Renderer)((Component)voidRainPortalEffect.transform.Find("Ring").GetChild(0)).GetComponent()).sharedMaterial = sharedMaterial; ContentAddition.AddEffect(voidRainPortalEffect); Transform val5 = voidRainWarning.transform.Find("HitIndicator"); if (Object.op_Implicit((Object)(object)val5)) { Transform val6 = voidRainWarning.transform.Find("FurthestHitRecipient"); if (Object.op_Implicit((Object)(object)val6)) { val5.SetParent(val6); val5.localPosition = Vector3.zero; } } chargeVoidRain = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabTripleBeamChargeUp_prefab).WaitForCompletion(), "ChargeVoidRainNuxEffect", false); componentsInChildren = ((Component)chargeVoidRain.transform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main10 = componentsInChildren[i].main; ((MainModule)(ref main10)).startSizeMultiplier = ((MainModule)(ref main10)).startSizeMultiplier * 1.5f; ((MainModule)(ref main10)).duration = ((MainModule)(ref main10)).duration * 7f; ((MainModule)(ref main10)).startLifetimeMultiplier = ((MainModule)(ref main10)).startLifetimeMultiplier * 7f; } spawnEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpawnEffect_prefab).WaitForCompletion(), "FathomlessVoidlingSpawnEffect", false); spawnEffect.transform.localScale = new Vector3(15f, 15f, 15f); spawnEffect.GetComponent().duration = 12f; componentsInChildren = ((Component)spawnEffect.transform.GetChild(0).GetChild(1)).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main11 = componentsInChildren[i].main; ((MainModule)(ref main11)).duration = ((MainModule)(ref main11)).duration * 1.75f; } ContentAddition.AddEffect(spawnEffect); GameObject obj3 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabJointBody_prefab).WaitForCompletion(); obj3.AddComponent(); obj3.AddComponent(); CharacterBody component4 = obj3.GetComponent(); component4.baseMaxHealth = ModConfig.jointBaseHealth.Value; component4.levelMaxHealth = ModConfig.jointLevelHealth.Value; component4.baseRegen = 0f; component4.levelRegen = 0f; jointBody = component4; obj3.GetComponent().initialStateType = new SerializableEntityStateType(typeof(JointSpawnState)); sdWardWipe = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.RaidCrabWardWipe_asset).WaitForCompletion(); sdWardWipe.activationState = new SerializableEntityStateType(typeof(ChargeWardWipeNux)); sdSingularity = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.RaidCrabVacuumAttack_asset).WaitForCompletion(); sdSingularity.activationState = new SerializableEntityStateType(typeof(WanderingSingularity)); sdSingularity.interruptPriority = (InterruptPriority)2; if (ModConfig.singularityCooldown.Value > 0f) { sdSingularity.baseRechargeInterval = ModConfig.singularityCooldown.Value; } sdMaze = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.RaidCrabSpinBeam_asset).WaitForCompletion(); sdMaze.activationState = new SerializableEntityStateType(typeof(EnterMaze)); sdMaze.baseRechargeInterval = ModConfig.mazeCooldown.Value; sdMaze.interruptPriority = (InterruptPriority)2; sdMultiBeam = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.RaidCrabMultiBeam_asset).WaitForCompletion(); sdMultiBeam.activationState = new SerializableEntityStateType(typeof(ChargeVoidRain)); sdMultiBeam.baseRechargeInterval = ModConfig.multiBeamCooldown.Value; } private static void CreateSingularityProjectile() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.KillSphereVfxPlaceholder_prefab).WaitForCompletion(); val = PrefabAPI.InstantiateClone(val, "WSingularitySphere", false); GameObject val2 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSuckLoopFX_prefab).WaitForCompletion(); val2 = PrefabAPI.InstantiateClone(val2, "WSingularityCenter", false); GameObject val3 = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMissileProjectile_prefab).WaitForCompletion(); val3 = PrefabAPI.InstantiateClone(val3, "WSingularityProjectile", true); GameObject val4 = Addressables.LoadAssetAsync((object)RoR2_Base_LunarWisp.LunarWispTrackingBombGhost_prefab).WaitForCompletion(); val4 = PrefabAPI.InstantiateClone(val4, "WSingularityGhost", false); LoopSoundDef flightSoundLoop = Addressables.LoadAssetAsync((object)RoR2_DLC1_VoidRaidCrab.lsdVoidRaidCrabVacuumAttack_asset).WaitForCompletion(); Object.Destroy((Object)(object)val.GetComponent()); Object.Destroy((Object)(object)val2.GetComponent()); val.transform.localScale = new Vector3(20f, 20f, 20f); foreach (Transform item in val4.transform) { Object.Destroy((Object)(object)((Component)item).gameObject); } val2.transform.parent = val4.transform; val.transform.parent = val4.transform; ((Component)val.transform.GetChild(1).GetChild(1)).gameObject.SetActive(false); val2.GetComponent().vfxIntensity = (VFXIntensity)0; val.GetComponent().vfxIntensity = (VFXIntensity)0; foreach (Transform item2 in val3.transform) { Object.Destroy((Object)(object)((Component)item2).gameObject); } Object.Destroy((Object)(object)val3.GetComponent()); Object.Destroy((Object)(object)val3.GetComponent()); val3.AddComponent(); SphereCollider val5 = val3.AddComponent(); val5.radius = 19f; ((Collider)val5).isTrigger = true; val3.GetComponent().useGravity = false; ProjectileDirectionalTargetFinder component = val3.GetComponent(); component.allowTargetLoss = false; component.lookCone = 360f; component.lookRange = 1000f; ProjectileController component2 = val3.GetComponent(); component2.ghostPrefab = val4; component2.cannotBeDeleted = true; component2.flightSoundLoop = flightSoundLoop; component2.myColliders = (Collider[])(object)new Collider[1] { (Collider)val5 }; ProjectileSimple component3 = val3.GetComponent(); component3.desiredForwardSpeed = 15f; component3.lifetime = 30f; component3.enableVelocityOverLifetime = true; component3.velocityOverLifetime = AnimationCurve.Linear(0f, 1f, 1f, 0.5f); val3.transform.localScale = Vector3.one; ContentAddition.AddProjectile(val3); wSingularityProjectile = val3; } public static void CreateTube(Transform parent) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("WallHolder"); val.transform.parent = parent; val.transform.position = Vector3.zero; val.transform.localPosition = new Vector3(-2.5f, 0f, 0f); GameObject val2 = GameObject.CreatePrimitive((PrimitiveType)2); ((Renderer)val2.GetComponent()).material = Addressables.LoadAssetAsync((object)RoR2_DLC1_GameModes_InfiniteTowerRun_ITAssets.matITSafeWardAreaIndicator1_mat).WaitForCompletion(); Object.Destroy((Object)(object)val2.GetComponent()); MeshCollider colliderToIgnore = val2.AddComponent(); val2.transform.localScale = new Vector3(115f, 1250f, 115f); ((Object)val2).name = "Cheese Deterrent"; val2.transform.SetParent(val.transform); val2.transform.localPosition = Vector3.zero; val2.layer = LayerIndex.world.intVal; GameObject val3 = new GameObject("DisableCollisions"); val3.transform.parent = val2.transform; val3.transform.localScale = new Vector3(0.0091f, 0.0008f, 0.0091f); val3.layer = LayerIndex.entityPrecise.intVal; val3.AddComponent().colliderToIgnore = (Collider)(object)colliderToIgnore; SphereCollider component = val3.GetComponent(); component.radius = 85f; ((Collider)component).isTrigger = true; GameObject val4 = new GameObject("MazeSpawnPointController"); val4.transform.parent = parent; val4.transform.position = Vector3.zero; val4.AddComponent(); } } public static class ModConfig { internal static ConfigFile FVConfig; public static ConfigEntry enableFog; public static ConfigEntry jointBaseHealth; public static ConfigEntry jointLevelHealth; public static ConfigEntry mazeCooldown; public static ConfigEntry multiBeamCooldown; public static ConfigEntry singularityCooldown; public static ConfigEntry hauntP1Cooldown; public static ConfigEntry hauntP2Cooldown; public static ConfigEntry gravityBombChance; public static ConfigEntry eyeBlastMissileCount; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Init() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown if (Main.RooInstalled) { InitRoO(); } FVConfig = new ConfigFile(Paths.ConfigPath + "\\com.Nuxlar.FathomlessVoidling.cfg", true); enableFog = FVConfig.BindOption("General", "Enable Fog", defaultValue: false, "Enables void fog in Void Locus.", restartRequired: false); jointBaseHealth = FVConfig.BindOptionSteppedSlider("Stats", "Base Health", 1500f, 25f, "Base health for joints", 500f, 3000f); jointLevelHealth = FVConfig.BindOptionSteppedSlider("Stats", "Level Health", 425f, 25f, "Health gained per level for joints", 100f, 1000f); eyeBlastMissileCount = FVConfig.BindOptionSlider("Skills", "Eye Blast Missile Count", 6, "Number of missiles fired per wave during Eye Blast", 1f, 20f, restartRequired: false); mazeCooldown = FVConfig.BindOptionSteppedSlider("Skills", "Maze Cooldown", 45f, 1f, "Cooldown for Maze attack", 10f, 90f); multiBeamCooldown = FVConfig.BindOptionSteppedSlider("Skills", "Portal Beam Cooldown", 15f, 1f, "Cooldown for Portal Beam attack", 5f, 30f); singularityCooldown = FVConfig.BindOptionSteppedSlider("Skills", "Singularity Cooldown", 60f, 1f, "Cooldown for Wandering Singularity attack", 10f, 90f); hauntP1Cooldown = FVConfig.BindOptionSteppedSlider("Haunt", "P1 Cooldown", 30f, 1f, "Gravity bomb downtime in Phase 1", 5f, 120f, restartRequired: false); hauntP2Cooldown = FVConfig.BindOptionSteppedSlider("Haunt", "P2/P3 Cooldown", 20f, 1f, "Gravity bomb downtime in Phase 2/3", 5f, 120f); gravityBombChance = FVConfig.BindOptionSteppedSlider("Haunt", "Gravity Bomb Chance", 0.15f, 0.01f, "Chance per second to fire a gravity bomb during uptime (higher chance = much more bombs)", 0.01f, 1f, restartRequired: false); WipeConfig(); } private static void WipeConfig() { ((Dictionary)typeof(ConfigFile).GetProperty("OrphanedEntries", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(FVConfig)).Clear(); FVConfig.Save(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void InitRoO() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0063: 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_007c: Expected O, but got Unknown try { ModSettingsManager.SetModDescription("Fathomless Voidling", "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); byte[] array = File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)Main.Instance).Info.Location), "icon.png")); Texture2D val = new Texture2D(256, 256); ImageConversion.LoadImage(val, array); ModSettingsManager.SetModIcon(Sprite.Create(val, new Rect(0f, 0f, 256f, 256f), new Vector2(0.5f, 0.5f)), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } catch (Exception data) { Log.Error(data, "C:\\Users\\romym\\OneDrive\\Desktop\\RoR2Mods\\FathomlessVoidling2\\FathomlessVoidling\\ModConfig.cs", "InitRoO", 135); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static ConfigEntry BindOption(this ConfigFile myConfig, string section, string name, T defaultValue, string description = "", bool restartRequired = true) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown if ((defaultValue is int || defaultValue is float) ? true : false) { return myConfig.BindOptionSlider(section, name, defaultValue, description, 0f, 20f, restartRequired); } if (string.IsNullOrEmpty(description)) { description = name; } if (restartRequired) { description += " (restart required)"; } ConfigEntry val = myConfig.Bind(section, name, defaultValue, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty())); if (Main.RooInstalled) { TryRegisterOption(val, restartRequired); } return val; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static ConfigEntry BindOptionSlider(this ConfigFile myConfig, string section, string name, T defaultValue, string description = "", float min = 0f, float max = 20f, bool restartRequired = true) { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown if (!(defaultValue is int) && !(defaultValue is float)) { return myConfig.BindOption(section, name, defaultValue, description, restartRequired); } if (string.IsNullOrEmpty(description)) { description = name; } string text = description; T val = defaultValue; description = text + " (Default: " + val?.ToString() + ")"; if (restartRequired) { description += " (restart required)"; } AcceptableValueBase val2 = (AcceptableValueBase)((typeof(T) == typeof(int)) ? ((object)new AcceptableValueRange((int)min, (int)max)) : ((object)new AcceptableValueRange(min, max))); ConfigEntry val3 = myConfig.Bind(section, name, defaultValue, new ConfigDescription(description, val2, Array.Empty())); if (Main.RooInstalled) { TryRegisterOptionSlider(val3, min, max, restartRequired); } return val3; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static ConfigEntry BindOptionSteppedSlider(this ConfigFile myConfig, string section, string name, T defaultValue, float increment = 1f, string description = "", float min = 0f, float max = 20f, bool restartRequired = true) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown if (string.IsNullOrEmpty(description)) { description = name; } string text = description; T val = defaultValue; description = text + " (Default: " + val?.ToString() + ")"; if (restartRequired) { description += " (restart required)"; } ConfigEntry val2 = myConfig.Bind(section, name, defaultValue, new ConfigDescription(description, (AcceptableValueBase)(object)new AcceptableValueRange(min, max), Array.Empty())); if (Main.RooInstalled) { TryRegisterOptionSteppedSlider(val2, increment, min, max, restartRequired); } return val2; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void TryRegisterOption(ConfigEntry entry, bool restartRequired) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown if (entry is ConfigEntry val) { ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(val, new InputFieldConfig { submitOn = (SubmitEnum)6, restartRequired = restartRequired }), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } else if (entry is ConfigEntry val2) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(val2, restartRequired), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } else if (entry is ConfigEntry val3) { ModSettingsManager.AddOption((BaseOption)new KeyBindOption(val3, restartRequired), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } else if (typeof(T).IsEnum) { ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)entry, restartRequired), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void TryRegisterOptionSlider(ConfigEntry entry, float min, float max, bool restartRequired) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown if (entry is ConfigEntry val) { ModSettingsManager.AddOption((BaseOption)new IntSliderOption(val, new IntSliderConfig { min = (int)min, max = (int)max, formatString = "{0:0.00}", restartRequired = restartRequired }), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } else if (entry is ConfigEntry val2) { ModSettingsManager.AddOption((BaseOption)new SliderOption(val2, new SliderConfig { min = min, max = max, FormatString = "{0:0.00}", restartRequired = restartRequired }), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void TryRegisterOptionSteppedSlider(ConfigEntry entry, float increment, float min, float max, bool restartRequired) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown if (entry is ConfigEntry val) { ModSettingsManager.AddOption((BaseOption)new StepSliderOption(val, new StepSliderConfig { increment = increment, min = min, max = max, FormatString = "{0:0.00}", restartRequired = restartRequired }), "Nuxlar.FathomlessVoidling", "FathomlessVoidling"); } } } } namespace FathomlessVoidling.Hooks { public class ConnectHooks { [CompilerGenerated] private static class <>O { public static hook_RequestFog <0>__PreventFog; public static Action <1>__SpawnCauldrons; public static hook_AttemptToSpawnAllEligiblePortals <2>__SpawnVoidMoonPortal; } public ConnectHooks() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown GlobalEventManager.onServerDamageDealt += ApplyGravityDamageType; SceneDirector.Start += new hook_Start(TweakBossDirector); HealthComponent.SendDamageDealt += new hook_SendDamageDealt(ThresholdCheck); CharacterMaster.OnBodyStart += new hook_OnBodyStart(FixPipReviveBug); LegController.RegenerateServer += new hook_RegenerateServer(PreventJointRegen); VoidRaidGauntletController.Start += new hook_Start(ArenaTweaks); VoidRaidGauntletController.RpcActivateDonut += new hook_RpcActivateDonut(DeactivateDonutRoof); VoidRaidGauntletController.TryOpenGauntlet += new hook_TryOpenGauntlet(BlockGauntletInPhase3); ProjectileDirectionalTargetFinder.SearchForTarget += new hook_SearchForTarget(TweakSingularitySearch); ChargeFire.OnEnter += new hook_OnEnter(LazyMf); DeathState.OnEnter += new hook_OnEnter(FixDeathState); DeathState.OnExit += new hook_OnExit(KillJointsOnDeath); object obj = <>O.<0>__PreventFog; if (obj == null) { hook_RequestFog val = PreventFog; <>O.<0>__PreventFog = val; obj = (object)val; } VoidStageMissionController.RequestFog += (hook_RequestFog)obj; Stage.onServerStageBegin += SpawnCauldrons; object obj2 = <>O.<2>__SpawnVoidMoonPortal; if (obj2 == null) { hook_AttemptToSpawnAllEligiblePortals val2 = SpawnVoidMoonPortal; <>O.<2>__SpawnVoidMoonPortal = val2; obj2 = (object)val2; } TeleporterInteraction.AttemptToSpawnAllEligiblePortals += (hook_AttemptToSpawnAllEligiblePortals)obj2; } private void ArenaTweaks(orig_Start orig, VoidRaidGauntletController self) { orig.Invoke(self); int num = -1; List list = self.followingDonuts.ToList(); for (int i = 0; i < list.Count; i++) { DonutInfo obj = list[i]; if (((Object)obj.root).name == "RaidBB") { list.RemoveAt(i); } if (((Object)obj.root).name == "RaidDC") { num = i; } } self.followingDonuts = list.ToArray(); if (num == -1 || !Object.op_Implicit((Object)(object)self.followingDonuts[num].root)) { return; } MeshRenderer[] componentsInChildren = self.followingDonuts[num].root.GetComponentsInChildren(); foreach (MeshRenderer val in componentsInChildren) { GameObject gameObject = ((Component)val).gameObject; Transform parent = gameObject.transform.parent; if (!((Object)(object)gameObject != (Object)null)) { continue; } if ((Object)(object)parent != (Object)null) { if (((Object)gameObject).name.Contains("Mesh") && ((Object)parent).name.Contains("Ruin") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalRuinMat; } if (((Object)gameObject).name.Contains("RuinBowl") && ((Object)parent).name.Contains("RuinMarker") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalRuinMat; } } if ((((Object)gameObject).name.Contains("TerrainHG") || ((Object)gameObject).name.Contains("GiantStoneSlab")) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalTerrainMat; } if (((Object)gameObject).name.Contains("HeroPillar") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalPillarMat; } if (((Object)gameObject).name.Contains("Bridge") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalBridgeMat; } if (((Object)gameObject).name.Contains("Column") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalColumnMat; } if ((((Object)gameObject).name.Contains("Boulder") || ((Object)gameObject).name.Contains("mdlGeyser") || ((Object)gameObject).name.Contains("Pebble") || (((Object)gameObject).name.Contains("GiantRock") && !((Object)gameObject).name.Contains("Slab"))) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalBoulderMat; } if (((Object)gameObject).name.Contains("Stalagmite") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalStalagmiteMat; } if ((((Object)gameObject).name.Contains("Ruin") || ((Object)gameObject).name.Contains("Chain")) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial = Main.abyssalRuinMat; } } } private void DeactivateDonutRoof(orig_RpcActivateDonut orig, VoidRaidGauntletController self, int donutIndex) { orig.Invoke(self, donutIndex); DonutInfo currentDonut = self.currentDonut; object obj; if (currentDonut == null) { obj = null; } else { GameObject root = currentDonut.root; obj = ((root != null) ? root.transform : null); } Transform val = (Transform)obj; if (!Object.op_Implicit((Object)(object)val)) { return; } if (((Object)val).name == "RaidDC") { Transform val2 = val.Find("HOLDER: ROOF"); if (Object.op_Implicit((Object)(object)val2) && ((Component)val2).gameObject.activeSelf) { ((Component)val2).gameObject.SetActive(false); } } Transform val3 = val.Find("HOLDER: Scripting"); if (!Object.op_Implicit((Object)(object)val3)) { return; } Transform val4 = val3.Find("CombatDirector"); if (Object.op_Implicit((Object)(object)val4)) { CombatDirector component = ((Component)val4).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } } private bool BlockGauntletInPhase3(orig_TryOpenGauntlet orig, VoidRaidGauntletController self, Vector3 entrancePosition, NetworkInstanceId bossMasterId) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) FathomlessMissionController instance = FathomlessMissionController.instance; if (instance != null && instance.GetCurrentPhase() == 2) { return false; } return orig.Invoke(self, entrancePosition, bossMasterId); } private void PreventJointRegen(orig_RegenerateServer orig, LegController self) { } private void FixPipReviveBug(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (!body.isPlayerControlled) { return; } Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "voidraid" && body.HasBuff(Buffs.Immune)) { GameObject val = GameObject.Find("VoidRaidCrabBody(Clone)"); if (Object.op_Implicit((Object)(object)val)) { val.GetComponent().OnEnable(); } } } private void LazyMf(orig_OnEnter orig, ChargeFire self) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "voidraid") { ((EntityState)self).outer.SetState((EntityState)(object)new ChargeGravityBullet()); } else { orig.Invoke(self); } } private void FixDeathState(orig_OnEnter orig, DeathState self) { //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) if (((Object)((EntityState)self).characterBody).name == "VoidRaidCrabBody(Clone)") { self.animationStateName = "ChargeWipe"; self.animationPlaybackRateParam = "Wipe.playbackRate"; self.addPrintController = false; orig.Invoke(self); PrintController obj = ((Component)self.modelTransform).gameObject.AddComponent(); obj.printTime = self.printDuration; ((Behaviour)obj).enabled = true; obj.startingPrintHeight = 200f; obj.maxPrintHeight = 500f; obj.startingPrintBias = self.startingPrintBias; obj.maxPrintBias = self.maxPrintBias; obj.disableWhenFinished = false; obj.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); Transform val = ((EntityState)self).characterBody.transform.Find("WallHolder"); if (Object.op_Implicit((Object)(object)val)) { Object.Destroy((Object)(object)((Component)val).gameObject); } CharacterBody val2 = FathomlessMissionController.instance?.hauntBody; if (Object.op_Implicit((Object)(object)val2)) { val2.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } else { orig.Invoke(self); } } private void KillJointsOnDeath(orig_OnExit orig, DeathState self) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown orig.Invoke(self); if (((Object)((EntityState)self).characterBody).name != "VoidRaidCrabBody(Clone)") { return; } if (Object.op_Implicit((Object)(object)VoidRaidGauntletController.instance)) { VoidRaidGauntletController.instance.SpawnOutroPortal(); } foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)4).ToList()) { CharacterBody component = ((Component)item).GetComponent(); if (Object.op_Implicit((Object)(object)component) && !(((Object)component).name != "VoidRaidCrabJointBody(Clone)")) { EntityStateMachine val = ((IEnumerable)((Component)component).GetComponents()).FirstOrDefault((Func)((EntityStateMachine e) => e.customName == "Body")); if (Object.op_Implicit((Object)(object)val)) { val.SetState((EntityState)new DeathState()); } } } } private void TriggerWardWipe() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown FathomlessMissionController instance = FathomlessMissionController.instance; if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.voidlingBody)) { CharacterBody voidlingBody = instance.voidlingBody; voidlingBody.RemoveBuff(Buffs.HiddenInvincibility); voidlingBody.healthComponent.TakeDamage(new DamageInfo { damage = 100000000f, position = voidlingBody.corePosition }); voidlingBody.AddBuff(Buffs.HiddenInvincibility); EntityStateMachine val = ((Component)voidlingBody).gameObject.GetComponents().First((EntityStateMachine esm) => esm.customName == "Body"); voidlingBody.skillLocator.special.SetSkillOverride((object)val, Main.sdWardWipe, (SkillOverridePriority)4); voidlingBody.skillLocator.special.AddOneStock(); if (Object.op_Implicit((Object)(object)instance.wardWipeDriver)) { ((Behaviour)instance.wardWipeDriver).enabled = true; } if (Object.op_Implicit((Object)(object)instance.singularityDriver)) { ((Behaviour)instance.singularityDriver).enabled = false; } if (Object.op_Implicit((Object)(object)instance.mazeDriver)) { ((Behaviour)instance.mazeDriver).enabled = false; } if (Object.op_Implicit((Object)(object)instance.fireMissileDriver)) { ((Behaviour)instance.fireMissileDriver).enabled = false; } if (Object.op_Implicit((Object)(object)instance.multibeamDriver)) { ((Behaviour)instance.multibeamDriver).enabled = false; } } } private void OnJointThreshold(HealthComponent hc, CharacterBody body, JointThresholdController jtc, float thresholdFraction, int phase) { body.AddBuff(Buffs.Immune); hc.health = hc.fullHealth * thresholdFraction; jtc.reachedThreshold = true; FathomlessMissionController instance = FathomlessMissionController.instance; if (Object.op_Implicit((Object)(object)instance)) { if (phase == 0 && Object.op_Implicit((Object)(object)instance.singularityDriver) && !((Behaviour)instance.singularityDriver).enabled) { ((Behaviour)instance.singularityDriver).enabled = true; } if (phase == 1 && Object.op_Implicit((Object)(object)instance.mazeDriver) && !((Behaviour)instance.mazeDriver).enabled) { ((Behaviour)instance.mazeDriver).enabled = true; body.skillLocator.special.AddOneStock(); } } if (JointThresholdController.AllJointsReachedThreshold()) { TriggerWardWipe(); } } private void OnJointFinalThreshold(DamageReport damageReport, HealthComponent hc, CharacterBody body, JointThresholdController jtc) { //IL_0052: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) damageReport.damageDealt = 0f; hc.health = 1f; body.AddBuff(Buffs.Immune); jtc.reachedThreshold = true; if (!JointThresholdController.AllJointsReachedThreshold()) { return; } FathomlessMissionController instance = FathomlessMissionController.instance; if (instance != null) { CharacterBody voidlingBody = instance.voidlingBody; if (voidlingBody != null) { voidlingBody.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)4).ToList()) { CharacterBody component = ((Component)item).GetComponent(); if (Object.op_Implicit((Object)(object)component) && ((Object)component).name == "VoidRaidCrabJointBody(Clone)") { component.SetBuffCount(Buffs.Immune.buffIndex, 0); component.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } } private void ThresholdCheck(orig_SendDamageDealt orig, DamageReport damageReport) { if (Object.op_Implicit((Object)(object)damageReport.victim)) { HealthComponent component = ((Component)damageReport.victim).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { CharacterBody body = component.body; if (Object.op_Implicit((Object)(object)body) && ((Object)body).name == "VoidRaidCrabJointBody(Clone)") { JointThresholdController component2 = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component2) && !component2.reachedThreshold) { int num = FathomlessMissionController.instance?.GetCurrentPhase() ?? (-1); if (component2.nextCleansePercent > 0f && component.health <= component.fullHealth * component2.nextCleansePercent) { component2.CleanseDebuffs(); component2.nextCleansePercent -= 0.05f; } if (num >= 0 && num <= 1) { float thresholdForPhase = component2.GetThresholdForPhase(num); if (thresholdForPhase > 0f && component.health <= component.fullHealth * thresholdForPhase) { OnJointThreshold(component, body, component2, thresholdForPhase, num); } } else if (num == 2 && component.health <= 0f) { OnJointFinalThreshold(damageReport, component, body, component2); } } } } } orig.Invoke(damageReport); } private void TweakBossDirector(orig_Start orig, SceneDirector self) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "voidraid") { ((Component)GameObject.Find("Weather, Void Raid Starry Night Variant").transform.Find("Directional Light")).GetComponent().intensity = 1.4f; GameObject val = GameObject.Find("EncounterPhases"); GameObject gameObject = ((Component)val.transform.GetChild(0)).gameObject; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)gameObject)) { DelayedEvent component = gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } gameObject.AddComponent(); Transform val2 = val.transform.GetChild(1).Find("Music"); if (Object.op_Implicit((Object)(object)val2)) { ((Object)val2).name = "Phase2Music"; val2.SetParent(gameObject.transform); } ((Component)val.transform.GetChild(1)).gameObject.SetActive(false); ((Component)val.transform.GetChild(2)).gameObject.SetActive(false); Transform transform = new GameObject().transform; transform.position = new Vector3(0f, -15f, 0f); SpawnInfo val3 = default(SpawnInfo); val3.explicitSpawnPosition = transform; val3.spawnCard = Main.bigVoidlingCard; gameObject.GetComponent().spawns = (SpawnInfo[])(object)new SpawnInfo[1] { val3 }; Transform child = GameObject.Find("RaidVoid").transform.GetChild(5); ((Component)child.GetChild(1)).GetComponent().playableAsset = (PlayableAsset)(object)Main.introTimeline; Transform child2 = child.GetChild(2); child2.position = new Vector3(-110.27766f, 15f, -300f); child2.GetChild(0).position = new Vector3(-50f, 28.9719f, -396.993f); } } orig.Invoke(self); } private static FogRequest PreventFog(orig_RequestFog orig, VoidStageMissionController self, IZone zone) { if (ModConfig.enableFog.Value) { return orig.Invoke(self, zone); } return null; } private static void SpawnVoidMoonPortal(orig_AttemptToSpawnAllEligiblePortals orig, TeleporterInteraction self) { //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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown if (self.beginContextString.Contains("LUNAR")) { List list = self.portalSpawners.ToList(); PortalSpawner val = list.Find((PortalSpawner x) => (Object)(object)x.portalSpawnCard == (Object)(object)Main.locusPortalCard); if ((Object)(object)val != (Object)null) { list.Remove(val); self.portalSpawners = list.ToArray(); } if (!NetworkServer.active) { return; } DirectorCore instance = DirectorCore.instance; DirectorPlacementRule val2 = new DirectorPlacementRule { minDistance = 10f, maxDistance = 40f, placementMode = (PlacementMode)1, position = ((Component)self).transform.position, spawnOnTarget = ((Component)self).transform }; DirectorSpawnRequest val3 = new DirectorSpawnRequest(Main.locusPortalCard, val2, self.rng); GameObject val4 = instance.TrySpawnObject(val3); if (Object.op_Implicit((Object)(object)val4)) { NetworkServer.Spawn(val4); Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "PORTAL_VOID_OPEN" }); } } orig.Invoke(self); } private static void SpawnCauldrons(Stage stage) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (!(stage.sceneDef.cachedName == "voidstage")) { return; } AsyncOperationHandle handle1 = Addressables.LoadAssetAsync((object)RoR2_Base_LunarCauldrons.LunarCauldron__RedToWhite_Variant_prefab); if (handle1.IsValid()) { handle1.Completed += delegate(AsyncOperationHandle result) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (result.IsDone && Object.op_Implicit((Object)(object)result.Result)) { GameObject obj5 = Object.Instantiate(result.Result, new Vector3(-142.67f, 29.94f, 242.74f), Quaternion.identity); obj5.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj5); } Addressables.Release(handle1); }; } AsyncOperationHandle handle2 = Addressables.LoadAssetAsync((object)RoR2_Base_LunarCauldrons.LunarCauldron__GreenToRed_Variant_prefab); if (handle2.IsValid()) { handle2.Completed += delegate(AsyncOperationHandle result) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) if (result.IsDone && Object.op_Implicit((Object)(object)result.Result)) { GameObject obj3 = Object.Instantiate(result.Result, new Vector3(-136.76f, 29.94f, 246.51f), Quaternion.identity); obj3.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj3); GameObject obj4 = Object.Instantiate(result.Result, new Vector3(-149.74f, 29.93f, 239.7f), Quaternion.identity); obj4.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj4); } Addressables.Release(handle2); }; } AsyncOperationHandle val = Addressables.LoadAssetAsync((object)RoR2_Base_LunarCauldrons.LunarCauldron__WhiteToGreen_prefab); if (!val.IsValid()) { return; } val.Completed += delegate(AsyncOperationHandle result) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) if (result.IsDone && Object.op_Implicit((Object)(object)result.Result)) { GameObject obj = Object.Instantiate(result.Result, new Vector3(-157.41f, 29.97f, 237.12f), Quaternion.identity); obj.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj); GameObject obj2 = Object.Instantiate(result.Result, new Vector3(-126.63f, 29.93f, 249.1f), Quaternion.identity); obj2.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj2); } Addressables.Release(handle2); }; } private void TweakSingularitySearch(orig_SearchForTarget orig, ProjectileDirectionalTargetFinder self) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)self).gameObject).name != "WSingularityProjectile(Clone)") { orig.Invoke(self); return; } self.bullseyeSearch.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref self.bullseyeSearch.teamMaskFilter)).RemoveTeam(((Component)self).GetComponent().teamIndex); self.bullseyeSearch.filterByLoS = self.testLoS; self.bullseyeSearch.searchOrigin = self.transform.position; self.bullseyeSearch.searchDirection = self.transform.forward; self.bullseyeSearch.maxDistanceFilter = self.lookRange; self.bullseyeSearch.sortMode = self.sortMode; self.bullseyeSearch.maxAngleFilter = self.lookCone; self.bullseyeSearch.RefreshCandidates(); HurtBox val = (from hurtBox in self.bullseyeSearch.GetResults() where Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && hurtBox.healthComponent.body.isPlayerControlled select hurtBox).FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { self.SetTarget(val); } else { orig.Invoke(self); } } private void ApplyGravityDamageType(DamageReport obj) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) if (!DamageAPI.HasModdedDamageType(obj.damageInfo, Main.gravityDamageType) || !Object.op_Implicit((Object)(object)obj.victimBody)) { return; } CharacterDirection component = ((Component)obj.victimBody).GetComponent(); CharacterMotor component2 = ((Component)obj.victimBody).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { float num = 3500f; float num2 = 5000f; bool flag = false; bool num3 = (double)Random.value > 0.5; Vector3 val = Vector3.Cross(component.forward, Vector3.up); if (!num3) { val *= -1f; } Vector3 val2 = Vector3.up * -1f * num + val * num; Vector3 val3 = Vector3.up * num2 + val * num2; EffectData val4 = new EffectData { origin = obj.victimBody.transform.position }; GameObject val5; if (component2.isGrounded) { component2.ApplyForce(val3, true, flag); val5 = Main.groundedGravityEffect; val4.rotation = Util.QuaternionSafeLookRotation(val3); } else { component2.ApplyForce(val2, true, flag); val5 = Main.airborneGravityEffect; val4.rotation = Util.QuaternionSafeLookRotation(val2); } EffectManager.SpawnEffect(val5, val4, true); } } } } namespace FathomlessVoidling.EntityStates { public class BetterSpawnState : BaseState { public float duration = 8f; public float delay = 1f; public float camDuration = 7f; public string spawnSoundString = "Play_voidRaid_spawn"; public GameObject spawnEffectPrefab = Main.spawnEffect; public string animationLayerName = "Body"; public string animationStateName = "Spawn"; public string animationPlaybackRateParam = "Spawn.playbackRate"; public bool doLegs = true; public CharacterSpawnCard jointSpawnCard = Main.jointCard; private string leg1Name = "FrontLegL"; private string leg2Name = "FrontLegR"; private string leg3Name = "MidLegL"; private string leg4Name = "MidLegR"; private string leg5Name = "BackLegL"; private string leg6Name = "BackLegR"; private bool activatedEye; private bool disabledCam; private bool spawnedTube; public override void OnEnter() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_01fe: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(spawnSoundString, GameObject.Find("SpawnCamera")); if (Object.op_Implicit((Object)(object)spawnEffectPrefab)) { EffectManager.SpawnEffect(spawnEffectPrefab, new EffectData { origin = new Vector3(0f, 10f, 0f), scale = 4f, rotation = Quaternion.identity }, false); } ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); ((Component)((EntityState)this).modelLocator.modelTransform.Find("VoidRaidCrabArmature/ROOT/HeadBase/eyeballRoot")).gameObject.SetActive(false); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } if (!NetworkServer.active) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest(Main.voidlingHauntCard, new DirectorPlacementRule { placementMode = (PlacementMode)0, position = Vector3.zero }, RoR2Application.rng); val.teamIndexOverride = ((BaseState)this).GetTeam(); val.ignoreTeamMemberLimit = true; SpawnResult val2 = Main.voidlingHauntCard.DoSpawn(Vector3.zero, Quaternion.identity, val); if (Object.op_Implicit((Object)(object)FathomlessMissionController.instance) && Object.op_Implicit((Object)(object)val2.spawnedInstance)) { FathomlessMissionController.instance.hauntBody = val2.spawnedInstance.GetComponent().GetBody(); } if (doLegs && Object.op_Implicit((Object)(object)jointSpawnCard) && Object.op_Implicit((Object)(object)modelChildLocator)) { DirectorPlacementRule placementRule = new DirectorPlacementRule { placementMode = (PlacementMode)0, spawnOnTarget = ((EntityState)this).GetModelTransform() }; SpawnJointBodyForLegServer(leg1Name, modelChildLocator, placementRule); SpawnJointBodyForLegServer(leg2Name, modelChildLocator, placementRule); SpawnJointBodyForLegServer(leg3Name, modelChildLocator, placementRule); SpawnJointBodyForLegServer(leg4Name, modelChildLocator, placementRule); SpawnJointBodyForLegServer(leg5Name, modelChildLocator, placementRule); SpawnJointBodyForLegServer(leg6Name, modelChildLocator, placementRule); if (Main.infernoEnabled && Object.op_Implicit((Object)(object)Run.instance) && DifficultyCatalog.GetDifficultyDef(Run.instance.selectedDifficulty).nameToken == "INFERNO_NAME" && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterDirection.turnSpeed = 0f; } } } private void SpawnJointBodyForLegServer(string legName, ChildLocator childLocator, DirectorPlacementRule placementRule) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown DirectorCore instance = DirectorCore.instance; GameObject val = ((instance != null) ? instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)jointSpawnCard, placementRule, Run.instance.stageRng) { summonerBodyObject = ((EntityState)this).gameObject }) : null); Transform val2 = childLocator.FindChild(legName); if (!Object.op_Implicit((Object)(object)val) && !Object.op_Implicit((Object)(object)val2)) { return; } CharacterMaster component = val.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } LegController component2 = ((Component)val2).GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { return; } component2.SetJointMaster(component, ((Component)val2).GetComponent()); if ((Object)(object)component.GetBodyObject() != (Object)null) { GameObject bodyObject = component.GetBodyObject(); component.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); LegControllerNetworkHelper legControllerNetworkHelper = default(LegControllerNetworkHelper); if (bodyObject.TryGetComponent(ref legControllerNetworkHelper)) { legControllerNetworkHelper.CallRpcMirrorLegJoints(((Component)((EntityState)this).characterBody).gameObject, legName); } else { Debug.Log((object)"BetterSpawnState.SpawnJointBodyForLegServer : no lcnh"); } } else { Debug.Log((object)"BetterSpawnState.SpawnJointBodyForLegServer : no charbody to send to lcnh"); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= delay && !spawnedTube) { spawnedTube = true; Main.CreateTube(((EntityState)this).characterBody.transform); } if (((EntityState)this).fixedAge >= 4.5f && !activatedEye) { ((Component)((EntityState)this).modelLocator.modelTransform.Find("VoidRaidCrabArmature/ROOT/HeadBase/eyeballRoot")).gameObject.SetActive(true); activatedEye = true; } if (((EntityState)this).fixedAge >= camDuration && !disabledCam) { GameObject.Find("Forced Camera").SetActive(false); disabledCam = true; } if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class JointSpawnState : BaseState { public float duration = 4.5f; private bool visible; private CharacterModel characterModel; public override void OnEnter() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.master.isBoss = true; ((EntityState)this).characterBody.SetBuffCount(Buffs.HiddenInvincibility.buffIndex, 1); characterModel = ((Component)((EntityState)this).GetModelTransform()).GetComponent(); if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount + 1; obj.invisibilityCount = invisibilityCount; } } public override void FixedUpdate() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if ((double)((EntityState)this).fixedAge >= (double)duration && !visible) { if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount - 1; obj.invisibilityCount = invisibilityCount; } visible = true; } if (!((double)((EntityState)this).fixedAge < (double)duration) && ((EntityState)this).isAuthority) { ((EntityState)this).characterBody.SetBuffCount(Buffs.HiddenInvincibility.buffIndex, 0); ((EntityState)this).outer.SetNextStateToMain(); } } } } namespace FathomlessVoidling.EntityStates.Utility { public class BaseMazeAttackState : BaseState { public static string headTransformNameInChildLocator = "Head"; public static string muzzleTransformNameInChildLocator = "EyeMuzzle"; public float beamDuration = 3f; public float beamDelay = 2f; public bool randomBeams; public Transform headTransform; public Transform muzzleTransform; protected Animator modelAnimator { get; private set; } protected List beamVfxInstances { get; private set; } public override void OnEnter() { ((BaseState)this).OnEnter(); modelAnimator = ((EntityState)this).GetModelAnimator(); headTransform = ((BaseState)this).FindModelChild(headTransformNameInChildLocator); muzzleTransform = ((BaseState)this).FindModelChild(muzzleTransformNameInChildLocator); beamVfxInstances = new List(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)((Component)modelAnimator).GetComponent()).enabled = true; } if (((EntityState)this).characterBody.inventory.GetItemCountEffective(Items.MinHealthPercentage) == 5) { randomBeams = true; } else { randomBeams = false; } } public override void OnExit() { DestroyBeamVFXInstance(); ((EntityState)this).OnExit(); } protected GameObject CreateBeamVFXInstance(GameObject beamVfxPrefab, Transform parent) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) GameObject obj = Object.Instantiate(beamVfxPrefab); obj.transform.SetParent(parent, true); obj.transform.SetPositionAndRotation(parent.position, Quaternion.LookRotation(parent.forward)); return obj; } protected void DestroyBeamVFXInstance() { if (beamVfxInstances.Count() == 0) { return; } foreach (GameObject beamVfxInstance in beamVfxInstances) { VfxKillBehavior.KillVfxObject(beamVfxInstance); } beamVfxInstances.Clear(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ChargeWardWipeNux : BaseWardWipeState { public float duration = 8f; public GameObject chargeEffectPrefab = Main.chargeWardWipeChargeEffect; public string muzzleName = "Pupil"; public string animationLayerName = "Body"; public string animationStateName = "ChargeWipe"; public string animationPlaybackRateParam = "Wipe.playbackRate"; public string enterSoundString = "Play_voidRaid_fog_chargeUp"; public LoopSoundDef loopSound = Main.lsdVoidMegaCrabDeathBomb; public InteractableSpawnCard safeWardSpawnCard = Main.iscSafeWard; public AnimationCurve safeWardSpawnCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 10f, 5.555556f, 5.555556f, 0f, 0.3333333f), new Keyframe(0.9f, 15f, 5.555556f, 5.555556f, 0.3333333f, 0f) }) { preWrapMode = (WrapMode)8, postWrapMode = (WrapMode)8 }; public float minDistanceBetweenConsecutiveWards = 200f; public float maxDistanceBetweenConsecutiveWards = 600f; public float maxDistanceToInitialWard = 600f; public float loopSoundDelay = 2.65f; private float loopSoundStopwatch; private bool loopSoundFired; private GameObject chargeEffectInstance; private List loopPtrs = new List(); public override void OnEnter() { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)FathomlessMissionController.instance) && NetworkServer.active) { if (Object.op_Implicit((Object)(object)FathomlessMissionController.instance.hauntBody)) { ((VoidlingHauntManager)(object)((Component)FathomlessMissionController.instance.hauntBody).GetComponent().state).WardWipeOverride(); } else { Debug.LogWarning((object)"FathomlessVoidling.ChargeWardWipeNux: FathomlessMissionController does not have a HauntBody!"); } } ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator) && Object.op_Implicit((Object)(object)chargeEffectPrefab)) { Transform val = modelChildLocator.FindChild(muzzleName) ?? ((EntityState)this).characterBody.coreTransform; if (Object.op_Implicit((Object)(object)val)) { chargeEffectInstance = Object.Instantiate(chargeEffectPrefab, val.position, val.rotation); chargeEffectInstance.transform.parent = val; ScaleParticleSystemDuration component = chargeEffectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = duration; } } } base.fogDamageController = ((EntityState)this).GetComponent(); ((Behaviour)base.fogDamageController).enabled = true; base.safeWards = new List(); if (Object.op_Implicit((Object)(object)FathomlessMissionController.instance) && Object.op_Implicit((Object)(object)FathomlessMissionController.instance.wardWipeDriver)) { ((Behaviour)FathomlessMissionController.instance.wardWipeDriver).enabled = false; } } public override void FixedUpdate() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); loopSoundStopwatch += Time.fixedDeltaTime; if (!loopSoundFired && loopSoundStopwatch >= loopSoundDelay) { loopSoundFired = true; foreach (CharacterBody playerBody in Main.GetPlayerBodies()) { loopPtrs.Add(LoopSoundManager.PlaySoundLoopLocal(((Component)playerBody).gameObject, loopSound)); } } if (NetworkServer.active && Object.op_Implicit((Object)(object)safeWardSpawnCard)) { float num = safeWardSpawnCurve.Evaluate(((EntityState)this).fixedAge / duration); DirectorPlacementRule val = null; while ((float)base.safeWards.Count < Mathf.Floor(num)) { if (val == null) { val = new DirectorPlacementRule { placementMode = (PlacementMode)1, maxDistance = maxDistanceToInitialWard, minDistance = 0f, spawnOnTarget = ((EntityState)this).gameObject.transform, preventOverhead = true }; } if (base.safeWards.Count > 0) { val.maxDistance = maxDistanceBetweenConsecutiveWards; val.minDistance = minDistanceBetweenConsecutiveWards; val.spawnOnTarget = base.safeWards[base.safeWards.Count - 1].transform; val.placementMode = (PlacementMode)1; } GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)safeWardSpawnCard, val, Run.instance.stageRng)); if (Object.op_Implicit((Object)(object)val2)) { NetworkServer.Spawn(val2); if (Object.op_Implicit((Object)(object)base.fogDamageController)) { base.fogDamageController.AddSafeZone(val2.GetComponent()); } base.safeWards.Add(val2); } else { Debug.LogError((object)"FathomlessVoidling: Unable to spawn safe ward instance. Are there any ground nodes?"); } } } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireWardWipeNux()); } } public override void OnExit() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) foreach (SoundLoopPtr loopPtr in loopPtrs) { LoopSoundManager.StopSoundLoopLocal(loopPtr); } EntityState.Destroy((Object)(object)chargeEffectInstance); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class EnterMaze : BaseMazeAttackState { public string animLayerName = "Body"; public string animStateName = "ChargeGravityBump"; public string animPlaybackRateParamName = "GravityBump.playbackRate"; public float baseDuration = 2f; private float duration; public override void OnEnter() { base.OnEnter(); duration = baseDuration; if (!string.IsNullOrEmpty(animLayerName) && !string.IsNullOrEmpty(animStateName)) { if (!string.IsNullOrEmpty(animPlaybackRateParamName)) { ((EntityState)this).PlayAnimation(animLayerName, animStateName, animPlaybackRateParamName, duration, 0f); } else { ((EntityState)this).PlayAnimation(animLayerName, animStateName); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!((double)((EntityState)this).fixedAge < (double)duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MazeAttack()); } } } public class ExitMaze : BaseMazeAttackState { public string animLayerName = "Body"; public string animStateName = "FireGravityBumpRight"; public string animPlaybackRateParamName = "GravityBump.playbackRate"; public float baseDuration = 2f; private float duration; public override void OnEnter() { base.OnEnter(); duration = baseDuration; if (!string.IsNullOrEmpty(animLayerName) && !string.IsNullOrEmpty(animStateName)) { if (!string.IsNullOrEmpty(animPlaybackRateParamName)) { ((EntityState)this).PlayAnimation(animLayerName, animStateName, animPlaybackRateParamName, duration, 0f); } else { ((EntityState)this).PlayAnimation(animLayerName, animStateName); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!((double)((EntityState)this).fixedAge < (double)duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class FireWardWipeNux : BaseWardWipeState { public float duration = 6f; public string muzzleName = "Root"; public GameObject muzzleFlashPrefab = Main.fireWardWipeMuzzleFlash; public string animationLayerName = "Body"; public string animationStateName = "FireWipe"; public string animationPlaybackRateParam = "Wipe.playbackRate"; public string enterSoundString; public SkillDef skillDefToReplaceAtStocksEmpty = Main.sdSingularity; public SkillDef nextSkillDef = Main.sdSingularity; public BuffDef requiredBuffToKill = Main.bdWardWipeFog; public float teleportDelay = 0.55f; private float teleportStopwatch; private bool teleportFired; public override void OnEnter() { //IL_00e6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)muzzleFlashPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, muzzleName, false); } if (Object.op_Implicit((Object)(object)nextSkillDef)) { ((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).outer, nextSkillDef, (SkillOverridePriority)4); } if (!Object.op_Implicit((Object)(object)base.fogDamageController)) { return; } if (NetworkServer.active) { foreach (CharacterBody affectedBody in base.fogDamageController.GetAffectedBodies()) { if (affectedBody.isPlayerControlled && affectedBody.HasBuff(requiredBuffToKill)) { affectedBody.master.TrueKill(((EntityState)this).gameObject, ((EntityState)this).gameObject, DamageTypeCombo.op_Implicit((DamageType)65536)); } } } ((Behaviour)base.fogDamageController).enabled = false; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); teleportStopwatch += Time.fixedDeltaTime; if (!teleportFired && teleportStopwatch >= teleportDelay) { teleportFired = true; NextDonut(); } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } private void KillBarnacles() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)4).ToList()) { CharacterBody component = ((Component)item).GetComponent(); if (Object.op_Implicit((Object)(object)component) && ((Object)component).name == "VoidBarnacleBody(Clone)") { component.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } } private void NextDonut() { //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)VoidRaidGauntletController.instance) || !NetworkServer.active) { return; } VoidRaidGauntletController.instance.previousGauntlet = VoidRaidGauntletController.instance.currentGauntlet; VoidRaidGauntletController.instance.previousDonut = VoidRaidGauntletController.instance.currentDonut; if (VoidRaidGauntletController.instance.previousDonut != null && Object.op_Implicit((Object)(object)VoidRaidGauntletController.instance.previousDonut.combatDirector)) { VoidRaidGauntletController.instance.previousDonut.combatDirector.monsterCredit = 0f; ((Behaviour)VoidRaidGauntletController.instance.previousDonut.combatDirector).enabled = false; } int num = VoidRaidGauntletController.instance.gauntletIndex % VoidRaidGauntletController.instance.followingDonuts.Length; VoidRaidGauntletController.instance.currentDonut = VoidRaidGauntletController.instance.followingDonuts[num]; VoidRaidGauntletController.instance.currentGauntlet = VoidRaidGauntletController.instance.gauntlets[VoidRaidGauntletController.instance.gauntletIndex % VoidRaidGauntletController.instance.gauntlets.Length]; VoidRaidGauntletController instance = VoidRaidGauntletController.instance; instance.gauntletIndex++; VoidRaidGauntletController.instance.CallRpcTryShuffleData(VoidRaidGauntletController.instance.rngSeed); if (Object.op_Implicit((Object)(object)VoidRaidGauntletController.instance.currentDonut.root)) { VoidRaidGauntletController.instance.currentDonut.root.SetActive(true); VoidRaidGauntletController.instance.CallRpcActivateDonut(num); } if ((Object)(object)SceneInfo.instance != (Object)null && !string.IsNullOrEmpty(VoidRaidGauntletController.instance.currentGauntlet?.gateName)) { SceneInfo.instance.SetGateState(VoidRaidGauntletController.instance.currentGauntlet.gateName, true); VoidRaidGauntletController.instance.CallRpcActivateGate(VoidRaidGauntletController.instance.currentGauntlet?.gateName); } if (Object.op_Implicit((Object)(object)VoidRaidGauntletController.instance.previousDonut?.combatDirector)) { ((Behaviour)VoidRaidGauntletController.instance.previousDonut.combatDirector).enabled = false; } Vector3 position = VoidRaidGauntletController.instance.currentDonut.root.transform.Find("HOLDER: Terrain").Find("RaidTerrainHG").position; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(position.x, position.y - 15f, position.z); TeleportHelper.TeleportBody(((EntityState)this).characterBody, val, false); if (Object.op_Implicit((Object)(object)FathomlessMissionController.instance) && Object.op_Implicit((Object)(object)FathomlessMissionController.instance.hauntBody)) { TeleportHelper.TeleportBody(FathomlessMissionController.instance.hauntBody, val, false); } List playerBodies = Main.GetPlayerBodies(); if (playerBodies.Count > 0) { foreach (CharacterBody item in playerBodies) { Vector3? val2 = TeleportHelper.FindSafeTeleportDestination(VoidRaidGauntletController.instance.currentDonut.returnPoint.position, item, Run.instance.runRNG); if (val2.HasValue) { TeleportBodyArgs val3 = default(TeleportBodyArgs); ((TeleportBodyArgs)(ref val3)).body = item; val3.targetPosition = val2.Value; val3.forceOutOfVehicle = true; val3.teleportMinions = true; val3.resetStateMachines = true; TeleportBodyArgs val4 = val3; if (Util.HasEffectiveAuthority(((Component)item).gameObject)) { TeleportHelper.TeleportBody(val4); } else { item.CallRpcTeleportWithLocalAuthority(val4); } GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)item).gameObject); teleportEffectPrefab = Main.raidTeleportEffect; if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, val2.Value, Quaternion.identity, true); } } } } KillBarnacles(); } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).skillLocator.special.UnsetSkillOverride((object)((EntityState)this).outer, Main.sdWardWipe, (SkillOverridePriority)4); if (NetworkServer.active) { PhasedInventorySetter component = ((Component)((EntityState)this).characterBody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AdvancePhase(); } } JointThresholdController.RemoveImmunityFromAllJoints(); FathomlessMissionController instance = FathomlessMissionController.instance; if (!Object.op_Implicit((Object)(object)instance)) { return; } int currentPhase = instance.GetCurrentPhase(); if (Object.op_Implicit((Object)(object)instance.wardWipeDriver)) { ((Behaviour)instance.wardWipeDriver).enabled = false; } if (Object.op_Implicit((Object)(object)instance.singularityDriver)) { ((Behaviour)instance.singularityDriver).enabled = true; } if (Object.op_Implicit((Object)(object)instance.mazeDriver)) { ((Behaviour)instance.mazeDriver).enabled = currentPhase >= 2; } if (Object.op_Implicit((Object)(object)instance.fireMissileDriver)) { ((Behaviour)instance.fireMissileDriver).enabled = true; } if (Object.op_Implicit((Object)(object)instance.multibeamDriver)) { ((Behaviour)instance.multibeamDriver).enabled = true; } if (currentPhase == 1) { GameObject val = GameObject.Find("EncounterPhases"); if (Object.op_Implicit((Object)(object)val)) { Transform val2 = val.transform.GetChild(0).Find("Phase2Music"); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.SetActive(true); } } } if (currentPhase == 2) { ((EntityState)this).skillLocator.special.AddOneStock(); ((EntityState)this).skillLocator.utility.AddOneStock(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class MazeAttack : BaseMazeAttackState { public static GameObject beamVfxPrefab = Main.mazeLaserPrefab; public static float beamRadius = 24f; public static float beamMaxDistance = 400f; public static float beamDpsCoefficient = 40f; public static float beamTickFrequency = 30f; public static int waveCount = 3; public static GameObject beamImpactEffectPrefab = Main.mazeImpactEffect; public static GameObject portalEffectPrefab = Main.mazePortalEffect; public static GameObject chargeEffectPrefab = Main.mazeChargeUpPrefab; public static GameObject muzzleEffectPrefab = Main.mazeMuzzleEffect; public static GameObject warningBeamVfxPrefab = Main.mazeWarningPrefab; public static LoopSoundDef loopSound = SpinBeamAttack.loopSound; public static string chargeSoundString = "Play_voidRaid_superLaser_chargeUp"; public static string fireSoundString = "Play_voidRaid_superLaser_start"; public static string endSoundString = "Play_voidRaid_superLaser_end"; private float duration; private float fireStopwatch; private float delayStopwatch; private float beamTickTimer; private bool beamsFiring; private int lastFiredAxis = -1; private int wavesFired; private List loopPtrs = new List(); private List chargeEffectInstances = new List(); private List warningVfxInstances = new List(); private GameObject eyeEffectInstance; private Transform targetedAnchor; private Quaternion originalAnchorRotation; private List> positionMatrix = new List> { new List { 1, 1 }, new List { 1, 1 }, new List { 1, 1 }, new List { 1, 1 } }; private List> selectedAnchors = new List>(); private Random rng; private Xoroshiro128Plus rngRng; public override void OnEnter() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_00fd: 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) base.OnEnter(); int num = (int)(Run.instance.GetStartTimeUtc().Ticks ^ (Run.instance.stageClearCount << 16)); rng = new Random(num); rngRng = new Xoroshiro128Plus((ulong)num); wavesFired = 0; duration = (float)waveCount * (beamDelay + beamDuration) + 0.5f; if (Object.op_Implicit((Object)(object)FathomlessMissionController.instance) && NetworkServer.active && randomBeams) { if (Object.op_Implicit((Object)(object)FathomlessMissionController.instance.hauntBody)) { ((VoidlingHauntManager)(object)((Component)FathomlessMissionController.instance.hauntBody).GetComponent().state).MazeOverride(); } else { Debug.LogWarning((object)"FathomlessVoidling.MazeAttack: FathomlessMissionController does not have a HauntBody!"); } } if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelChildLocator()) && Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { Transform val = muzzleTransform ?? ((EntityState)this).characterBody.coreTransform; if (Object.op_Implicit((Object)(object)val)) { eyeEffectInstance = Object.Instantiate(muzzleEffectPrefab, val.position, val.rotation); eyeEffectInstance.transform.parent = val; ScaleParticleSystemDuration component = eyeEffectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = duration; } } } if (Object.op_Implicit((Object)(object)MazeSpawnPointController.instance)) { GetAnchorPoints(); BeginMaze(); } } private void GetAnchorPoints() { selectedAnchors.Clear(); for (int i = 0; i < waveCount; i++) { List item = SelectBeamPositions(randomBeams); selectedAnchors.Add(item); } } public override void FixedUpdate() { //IL_0160: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (wavesFired >= waveCount && ((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitMaze()); } if (!beamsFiring) { delayStopwatch += Time.fixedDeltaTime; } else { fireStopwatch += Time.fixedDeltaTime; } if (beamsFiring) { if ((double)beamTickTimer <= 0.0) { beamTickTimer += 1f / beamTickFrequency; FireBeamBulletAuthority(); } beamTickTimer -= ((EntityState)this).GetDeltaTime(); } if (delayStopwatch >= beamDelay) { delayStopwatch = 0f; foreach (GameObject warningVfxInstance in warningVfxInstances) { EntityState.Destroy((Object)(object)warningVfxInstance); } warningVfxInstances.Clear(); foreach (GameObject chargeEffectInstance in chargeEffectInstances) { Util.PlaySound(fireSoundString, ((Component)chargeEffectInstance.transform.parent).gameObject); GameObject val = CreateBeamVFXInstance(beamVfxPrefab, chargeEffectInstance.transform.parent); loopPtrs.Add(LoopSoundManager.PlaySoundLoopLocal(val, loopSound)); base.beamVfxInstances.Add(val); } beamsFiring = true; } if (fireStopwatch >= beamDuration) { beamsFiring = false; fireStopwatch = 0f; beamTickTimer = 0f; ResetMaze(); } } public override void OnExit() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)targetedAnchor)) { targetedAnchor.rotation = originalAnchorRotation; targetedAnchor = null; } EntityState.Destroy((Object)(object)eyeEffectInstance); base.OnExit(); } private List SelectBeamPositions(bool randomizeBeams) { List list = new List { 0, 1 }; List list2 = new List { 2, 3 }; List list3; if (!randomizeBeams) { if (lastFiredAxis == -1) { if (rng.NextDouble() > 0.5) { list3 = list; lastFiredAxis = 0; } else { list3 = list2; lastFiredAxis = 1; } } else if (lastFiredAxis == 0) { list3 = list2; lastFiredAxis = 1; } else { list3 = list; lastFiredAxis = 0; } } else { list3 = new List { 0, 1, 2, 3 }; } Util.ShuffleList(list3, rngRng); int num = 2; List list4 = new List(); for (int i = 0; i < num; i++) { int num2 = list3[i]; List list5 = positionMatrix[num2]; int num3 = rng.Next(list5.Count); int item = num2 * 2 + num3; list4.Add(item); } return list4; } private void ResetMaze() { //IL_0014: 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) if (Object.op_Implicit((Object)(object)targetedAnchor)) { targetedAnchor.rotation = originalAnchorRotation; targetedAnchor = null; } foreach (GameObject chargeEffectInstance in chargeEffectInstances) { EntityState.Destroy((Object)(object)chargeEffectInstance); } chargeEffectInstances.Clear(); foreach (GameObject beamVfxInstance in base.beamVfxInstances) { Util.PlaySound(endSoundString, beamVfxInstance); VfxKillBehavior.KillVfxObject(beamVfxInstance); } base.beamVfxInstances.Clear(); foreach (SoundLoopPtr loopPtr in loopPtrs) { LoopSoundManager.StopSoundLoopLocal(loopPtr); } if (wavesFired < waveCount) { BeginMaze(); } } private void BeginMaze() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) targetedAnchor = null; List list = selectedAnchors[wavesFired]; wavesFired++; bool flag = false; foreach (int item in list) { Transform val = ((Component)MazeSpawnPointController.instance).transform.Find("MazeAnchor" + item); if (!Object.op_Implicit((Object)(object)val)) { continue; } if (randomBeams && !flag) { flag = true; Vector3 targetPlayerPosition = GetTargetPlayerPosition(val.position); if (targetPlayerPosition != Vector3.zero) { targetedAnchor = val; originalAnchorRotation = val.rotation; Vector3 val2 = targetPlayerPosition - val.position; if (((Vector3)(ref val2)).sqrMagnitude > 0.01f) { val.rotation = Quaternion.LookRotation(val2); } } } EffectManager.SpawnEffect(portalEffectPrefab, new EffectData { origin = val.position, rotation = Util.QuaternionSafeLookRotation(val.forward) }, false); GameObject val3 = CreateBeamVFXInstance(chargeEffectPrefab, val); Util.PlaySound(chargeSoundString, val3); chargeEffectInstances.Add(val3); if (Object.op_Implicit((Object)(object)warningBeamVfxPrefab)) { warningVfxInstances.Add(CreateBeamVFXInstance(warningBeamVfxPrefab, val)); } } } private Vector3 GetTargetPlayerPosition(Vector3 origin) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) BullseyeSearch val = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByDistinctEntity = true, viewer = null, filterByLoS = false, searchOrigin = origin, sortMode = (SortMode)3, maxDistanceFilter = 1000f, minAngleFilter = 0f, maxAngleFilter = 360f }; val.RefreshCandidates(); HurtBox val2 = val.GetResults().FirstOrDefault((Func)((HurtBox hurtBox) => Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && hurtBox.healthComponent.body.isPlayerControlled)); if (Object.op_Implicit((Object)(object)val2)) { return ((Component)val2).transform.position; } return Vector3.zero; } private void FireBeamBulletAuthority() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) if (base.beamVfxInstances.Count == 0) { return; } foreach (GameObject beamVfxInstance in base.beamVfxInstances) { new BulletAttack { origin = beamVfxInstance.transform.position, aimVector = beamVfxInstance.transform.forward, minSpread = 0f, maxSpread = 0f, maxDistance = 400f, hitMask = CommonMasks.bullet, stopperMask = LayerMask.op_Implicit(0), bulletCount = 1u, radius = beamRadius, smartCollision = false, queryTriggerInteraction = (QueryTriggerInteraction)1, procCoefficient = 1f, procChainMask = default(ProcChainMask), owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, damage = beamDpsCoefficient * ((BaseState)this).damageStat / beamTickFrequency, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)0, force = 0f, hitEffectPrefab = beamImpactEffectPrefab, tracerEffectPrefab = null, isCrit = false, HitEffectNormal = false }.Fire(); } } } } namespace FathomlessVoidling.EntityStates.Special { public class WanderingSingularity : BaseState { private float duration; private float baseDuration = 5f; private float windDuration = 2f; private string animLayerName = "Body"; private string animEnterStateName = "SuckEnter"; private string animLoopStateName = "SuckLoop"; private string animExitStateName = "SuckExit"; private string animPlaybackRateParamName = "Suck.playbackRate"; private Transform vacuumOrigin; private bool hasFired; private bool hasPlayedExit; private CentralLegController centralLegController; private SuppressBreaksRequest suppressBreaksRequest; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; centralLegController = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)centralLegController)) { suppressBreaksRequest = centralLegController.SuppressBreaks(); } if (!string.IsNullOrEmpty(animLayerName) && !string.IsNullOrEmpty(animEnterStateName) && !string.IsNullOrEmpty(animPlaybackRateParamName)) { ((EntityState)this).PlayAnimation(animLayerName, animEnterStateName, animPlaybackRateParamName, windDuration, 0f); } if (!string.IsNullOrEmpty(BaseVacuumAttackState.vacuumOriginChildLocatorName)) { vacuumOrigin = ((BaseState)this).FindModelChild(BaseVacuumAttackState.vacuumOriginChildLocatorName); } else { vacuumOrigin = ((EntityState)this).transform; } } public override void FixedUpdate() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge < windDuration) { return; } if (!hasFired) { ((EntityState)this).PlayAnimation(animLayerName, animLoopStateName, animPlaybackRateParamName, windDuration + 2f, 0f); hasFired = true; if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = Main.wSingularityProjectile, position = vacuumOrigin.position, rotation = vacuumOrigin.rotation, owner = ((EntityState)this).gameObject, damage = 1f, force = 0f, crit = false, damageColorIndex = (DamageColorIndex)9, target = null, damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)65600) }); } } if (((EntityState)this).fixedAge >= duration && !hasPlayedExit) { ((EntityState)this).PlayAnimation(animLayerName, animExitStateName, animPlaybackRateParamName, windDuration, 0f); hasPlayedExit = true; } if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration + (double)windDuration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); SuppressBreaksRequest obj = suppressBreaksRequest; if (obj != null) { obj.Dispose(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace FathomlessVoidling.EntityStates.Secondary { public class ChargeVoidRain : BaseState { public float baseDuration = 1f; private string animationLayerName = "Gesture"; private string animationStateName = "ChargeMultiBeam"; private string animationPlaybackRateParam = "MultiBeam.playbackRate"; private GameObject chargeEffectPrefab = Main.chargeVoidRain; private string enterSoundString = "Play_voidRaid_snipe_chargeUp"; private bool isSoundScaledByAttackSpeed; private string muzzleName = "EyeProjectileCenter"; private GameObject chargeEffectInstance; protected float duration { get; private set; } public override void OnEnter() { //IL_0083: 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) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, 6f, 0f); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator) && Object.op_Implicit((Object)(object)chargeEffectPrefab)) { Transform val = modelChildLocator.FindChild(muzzleName) ?? ((EntityState)this).characterBody.coreTransform; if (Object.op_Implicit((Object)(object)val)) { chargeEffectInstance = Object.Instantiate(chargeEffectPrefab, val.position, val.rotation); chargeEffectInstance.transform.parent = val; ScaleParticleSystemDuration component = chargeEffectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = duration; } } } if (!string.IsNullOrEmpty(enterSoundString)) { if (isSoundScaledByAttackSpeed) { Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, base.attackSpeedStat); } else { Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireVoidRain()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class FireVoidRain : BaseState { private float stopwatch; private float missileStopwatch; public static float baseDuration = 6f; public static string muzzleString = BaseMultiBeamState.muzzleName; public static float missileSpawnFrequency = 5f; public static float missileSpawnDelay = 0f; public static float damageCoefficient; public static float maxSpread = 1f; public static GameObject projectilePrefab; public GameObject portalEffect = Main.voidRainPortalEffect; public static GameObject muzzleflashPrefab; private Transform muzzleTransform; private ChildLocator childLocator; public override void OnEnter() { ((BaseState)this).OnEnter(); missileStopwatch -= missileSpawnDelay; muzzleTransform = ((BaseState)this).FindModelChild(BaseMultiBeamState.muzzleName); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent(); } } private void FireBlob(Ray projectileRay, Vector3 beamEnd) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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) EffectManager.SpawnEffect(portalEffect, new EffectData { origin = ((Ray)(ref projectileRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref projectileRay)).direction) }, false); GameObject val = new GameObject("VoidRainProjectile"); val.AddComponent(); val.transform.position = ((Ray)(ref projectileRay)).origin; val.transform.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref projectileRay)).direction); VoidRainInfo voidRainInfo = val.AddComponent(); voidRainInfo.aimRay = projectileRay; voidRainInfo.damageStat = base.damageStat; voidRainInfo.endPos = beamEnd; val.AddComponent(); } public override void FixedUpdate() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; missileStopwatch += Time.fixedDeltaTime; if ((double)missileStopwatch < 1.0 / (double)missileSpawnFrequency) { return; } missileStopwatch -= 1f / missileSpawnFrequency; Transform val = childLocator.FindChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { Ray aimRay = ((BaseState)this).GetAimRay(); Ray val2 = default(Ray); ((Ray)(ref val2)).direction = ((Ray)(ref aimRay)).direction; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(Random.Range(-200f, 200f), Random.Range(75f, 100f), Random.Range(-200f, 200f)); Vector3 origin = val.position + val3; ((Ray)(ref val2)).origin = origin; CalcBeamPathPredictive(val2, out var direction, out var beamEndPoint); if (direction != Vector3.zero) { ((Ray)(ref val2)).direction = direction; FireBlob(val2, beamEndPoint); } else { CalcBeamPath(out var _, out var beamEndPos); ((Ray)(ref val2)).direction = beamEndPos - ((Ray)(ref val2)).origin; FireBlob(val2, beamEndPos); } } if (!((double)stopwatch < (double)baseDuration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (!((EntityState)this).isAuthority) { return; } FathomlessMissionController instance = FathomlessMissionController.instance; if (Object.op_Implicit((Object)(object)instance)) { if (((Behaviour)instance.singularityDriver).enabled && ((EntityState)this).skillLocator.special.IsReady()) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } else if (((Behaviour)instance.mazeDriver).enabled && ((EntityState)this).skillLocator.utility.IsReady()) { ((EntityState)this).skillLocator.utility.ExecuteIfReady(); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } protected void CalcBeamPathPredictive(Ray aimRay, out Vector3 direction, out Vector3 beamEndPoint) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) BullseyeSearch val = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByDistinctEntity = true, viewer = null, filterByLoS = true, searchOrigin = ((Ray)(ref aimRay)).origin, sortMode = (SortMode)3, maxDistanceFilter = 500f, minAngleFilter = 0f, maxAngleFilter = 180f }; val.RefreshCandidates(); HurtBox val2 = val.GetResults().FirstOrDefault((Func)((HurtBox hurtBox) => (Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && hurtBox.healthComponent.body.isPlayerControlled) ? true : false)); if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.healthComponent.body.characterMotor)) { CharacterBody body = val2.healthComponent.body; Vector3 position = ((Component)val2).transform.position; Vector3 velocity = body.characterMotor.velocity; Vector3 val6; if (((Vector3)(ref velocity)).sqrMagnitude > 0f && (!Object.op_Implicit((Object)(object)body) || !body.hasCloakBuff)) { Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(velocity.x, 0f, velocity.z); Vector3 val4 = position + val3; if (Object.op_Implicit((Object)(object)body.characterMotor) && !body.characterMotor.isGrounded && velocity.y > 0f) { Vector3 val5 = position + velocity * 0.5f; val6 = val5 - ((Ray)(ref aimRay)).origin; direction = ((Vector3)(ref val6)).normalized; beamEndPoint = val5; } else { val6 = val4 - ((Ray)(ref aimRay)).origin; direction = ((Vector3)(ref val6)).normalized; beamEndPoint = val4; } } else { val6 = position - ((Ray)(ref aimRay)).origin; direction = ((Vector3)(ref val6)).normalized; beamEndPoint = position; } } else { direction = Vector3.zero; beamEndPoint = Vector3.zero; } } protected void CalcBeamPath(out Ray beamRay, out Vector3 beamEndPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); float num = float.PositiveInfinity; RaycastHit[] array = Physics.RaycastAll(aimRay, 1000f, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)1); Transform root = ((EntityState)this).GetModelTransform().root; for (int i = 0; i < array.Length; i++) { ref RaycastHit reference = ref array[i]; float distance = ((RaycastHit)(ref reference)).distance; if ((double)distance < (double)num && (Object)(object)((Component)((RaycastHit)(ref reference)).collider).transform.root != (Object)(object)root) { num = distance; } } float num2 = Mathf.Min(num, BaseMultiBeamState.beamMaxDistance); beamEndPos = ((Ray)(ref aimRay)).GetPoint(num2); Vector3 position = muzzleTransform.position; beamRay = new Ray(position, beamEndPos - position); } } } namespace FathomlessVoidling.EntityStates.Primary { public class ChargeEyeBlast : BaseState { public float baseDuration = 2f; public GameObject chargeEffectPrefab = Main.eyeBlastChargeEffect; public string muzzleName = "EyeProjectileCenter"; public string enterSoundString = "Play_voidRaid_m1_chargeup"; public string animationLayerName = "Gesture"; public string animationStateName = "ChargeEyeBlast"; public string animationPlaybackRateParam = "Eyeblast.playbackRate"; private float duration; private GameObject chargeEffectInstance; private DirectionOverrideRequest animatorDirectionOverrideRequest; public override void OnEnter() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator) && Object.op_Implicit((Object)(object)chargeEffectPrefab)) { Transform val = modelChildLocator.FindChild(muzzleName) ?? ((EntityState)this).characterBody.coreTransform; if (Object.op_Implicit((Object)(object)val)) { chargeEffectInstance = Object.Instantiate(chargeEffectPrefab, val.position, val.rotation); chargeEffectInstance.transform.parent = val; } } AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); animatorDirectionOverrideRequest = aimAnimator.RequestDirectionOverride((Func)GetAimDirection); if (!string.IsNullOrEmpty(enterSoundString)) { Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, base.attackSpeedStat); } } public override void OnExit() { DirectionOverrideRequest obj = animatorDirectionOverrideRequest; if (obj != null) { obj.Dispose(); } EntityState.Destroy((Object)(object)chargeEffectInstance); ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireEyeBlast()); } } private Vector3 GetAimDirection() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = Quaternion.AngleAxis(Vector3.SignedAngle(Vector3.forward, new Vector3(((Ray)(ref aimRay)).direction.x, 0f, ((Ray)(ref aimRay)).direction.z), Vector3.up), Vector3.up) * Vector3.right; Vector3 val2 = Quaternion.AngleAxis(0f - 60f, val) * ((Ray)(ref aimRay)).direction; return ((Vector3)(ref val2)).normalized; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireEyeBlast : BaseState { public float baseInitialDelay; public static float baseDelayBetweenWaves = 0.5f; public float baseEndDelay; public static int numWaves = 5; public static int numMissilesPerWave = 6; public string muzzleName = "EyeProjectileCenter"; public GameObject muzzleFlashPrefab = Main.eyeBlastMuzzleFlash; public GameObject projectilePrefab = Main.eyeMissileProjectile; public float damageCoefficient = 0.75f; public float force = 1000f; public float minSpreadDegrees; public float rangeSpreadDegrees = 5f; public string fireWaveSoundString; public bool isSoundScaledByAttackSpeed; public string animationLayerName = "Gesture"; public string animationStateName = "ChargeEyeBlast"; public string animationPlaybackRateParam = "Eyeblast.playbackRate"; private float delayBetweenWaves; private float duration; private int numWavesFired; private float timeUntilNextWave; private Transform muzzleTransform; private DirectionOverrideRequest animatorDirectionOverrideRequest; public override void OnEnter() { ((BaseState)this).OnEnter(); numMissilesPerWave = ModConfig.eyeBlastMissileCount.Value; ((EntityState)this).GetComponent(); duration = (baseInitialDelay + Mathf.Max(0f, baseDelayBetweenWaves * (float)(numWaves - 1)) + baseEndDelay) / base.attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration + 3f); timeUntilNextWave = baseInitialDelay / base.attackSpeedStat; delayBetweenWaves = baseDelayBetweenWaves / base.attackSpeedStat; muzzleTransform = ((BaseState)this).FindModelChild(muzzleName); AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { animatorDirectionOverrideRequest = aimAnimator.RequestDirectionOverride((Func)GetAimDirection); } } private Vector3 GetAimDirection() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = Quaternion.AngleAxis(Vector3.SignedAngle(Vector3.forward, new Vector3(((Ray)(ref aimRay)).direction.x, 0f, ((Ray)(ref aimRay)).direction.z), Vector3.up), Vector3.up) * Vector3.right; Vector3 val2 = Quaternion.AngleAxis(0f - 60f, val) * ((Ray)(ref aimRay)).direction; return ((Vector3)(ref val2)).normalized; } public override void FixedUpdate() { //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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); timeUntilNextWave -= ((EntityState)this).GetDeltaTime(); while ((double)timeUntilNextWave < 0.0 && numWavesFired < numMissilesPerWave) { ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f); timeUntilNextWave += delayBetweenWaves; numWavesFired++; EffectManager.SpawnEffect(muzzleFlashPrefab, new EffectData { origin = muzzleTransform.position, rotation = muzzleTransform.rotation }, false); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = Quaternion.AngleAxis(Vector3.SignedAngle(Vector3.forward, new Vector3(((Ray)(ref aimRay)).direction.x, 0f, ((Ray)(ref aimRay)).direction.z), Vector3.up), Vector3.up) * Vector3.right; Vector3 val2 = Quaternion.AngleAxis(0f - 60f, val) * ((Ray)(ref aimRay)).direction; Quaternion rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref val2)).normalized); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = projectilePrefab; val3.position = muzzleTransform.position; val3.owner = ((EntityState)this).gameObject; val3.damage = base.damageStat * damageCoefficient; val3.force = force; FireProjectileInfo val4 = val3; for (int i = 0; i < numMissilesPerWave; i++) { val4.rotation = rotation; val4.crit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); ProjectileManager.instance.FireProjectile(val4); } } } if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { DirectionOverrideRequest obj = animatorDirectionOverrideRequest; if (obj != null) { obj.Dispose(); } ((EntityState)this).OnExit(); if (!((EntityState)this).isAuthority) { return; } FathomlessMissionController instance = FathomlessMissionController.instance; if (Object.op_Implicit((Object)(object)instance)) { if (((Behaviour)instance.singularityDriver).enabled && ((EntityState)this).skillLocator.special.IsReady()) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } else if (((Behaviour)instance.mazeDriver).enabled && ((EntityState)this).skillLocator.utility.IsReady()) { ((EntityState)this).skillLocator.utility.ExecuteIfReady(); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace FathomlessVoidling.EntityStates.Haunt { public class VoidlingHauntManager : BaseState { public static GameObject projectilePrefab = Main.gravityBombProjectile; public static float damageCoefficient = 1f; public float duration = 20f; public float cooldown = 40f; public float chanceToFirePerSecond = ModConfig.gravityBombChance.Value; private float chargeTimer; private float cooldownTimer; private GameObject barnacleDirector; private int phaseNumber; public override void OnEnter() { ((BaseState)this).OnEnter(); Transform val = ((EntityState)this).characterBody.transform.Find("Barnacle Director"); if (Object.op_Implicit((Object)(object)val)) { barnacleDirector = ((Component)val).gameObject; } chargeTimer = 0f; cooldownTimer = cooldown; CheckCurrentPhase(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } chargeTimer -= ((EntityState)this).GetDeltaTime(); if (chargeTimer <= 0f) { cooldownTimer -= ((EntityState)this).GetDeltaTime(); if (!(cooldownTimer <= 0f)) { return; } CheckCurrentPhase(); chargeTimer = duration; cooldownTimer = cooldown; if (!Object.op_Implicit((Object)(object)barnacleDirector)) { return; } if (!barnacleDirector.activeSelf) { barnacleDirector.SetActive(true); return; } CombatDirector component = barnacleDirector.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.monsterCredit += 50f; } } else if ((double)Random.value < (double)chanceToFirePerSecond) { FireProjectile(); } } public void MazeOverride() { CheckCurrentPhase(); chargeTimer = duration; cooldownTimer = cooldown; } public void WardWipeOverride() { CheckCurrentPhase(); chargeTimer = duration; cooldownTimer = cooldown; if (Object.op_Implicit((Object)(object)barnacleDirector)) { CombatDirector component = barnacleDirector.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.monsterCredit += 150f; } } } private void CheckCurrentPhase() { if (!Object.op_Implicit((Object)(object)FathomlessMissionController.instance) || !NetworkServer.active) { return; } int currentPhase = FathomlessMissionController.instance.GetCurrentPhase(); if (currentPhase != -1) { phaseNumber = currentPhase; switch (phaseNumber) { case 0: cooldown = ModConfig.hauntP1Cooldown.Value; break; case 1: cooldown = ModConfig.hauntP2Cooldown.Value; break; } } } private void FireProjectile() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00ab: Unknown result type (might be due to invalid IL or missing references) NodeGraph groundNodes = SceneInfo.instance.groundNodes; if (Object.op_Implicit((Object)(object)groundNodes)) { List list = groundNodes.FindNodesInRange(((EntityState)this).characterBody.corePosition, 25f, 200f, (HullMask)1); NodeIndex val = list[Random.Range(0, list.Count)]; Vector3 position = default(Vector3); groundNodes.GetNodePosition(val, ref position); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.owner = ((EntityState)this).gameObject; val2.damage = 1f; val2.position = position; DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)64); DamageAPI.AddModdedDamageType(ref value, Main.gravityDamageType); val2.damageTypeOverride = value; ProjectileManager.instance.FireProjectile(val2); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } } namespace FathomlessVoidling.EntityStates.Barnacle { public class ChargeGravityBullet : BaseState { public float baseDuration = 1f; public GameObject chargeVfxPrefab = Main.gravityBulletChargeEffect; public string attackSoundEffect = "Play_voidBarnacle_m1_chargeUp"; public string animationLayerName = "Gesture"; public string animationStateName = "ChargeFire"; public string animationPlaybackRateName = "chargeFirePlaybackRate"; private float _chargingDuration; private float _totalDuration; private float _crossFadeDuration; private GameObject _chargeVfxInstance; public override void OnEnter() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); _totalDuration = baseDuration / base.attackSpeedStat; _crossFadeDuration = _totalDuration * 0.25f; _chargingDuration = _totalDuration - _crossFadeDuration; Transform modelTransform = ((EntityState)this).GetModelTransform(); Util.PlayAttackSpeedSound(attackSoundEffect, ((EntityState)this).gameObject, base.attackSpeedStat); if ((Object)(object)modelTransform != (Object)null) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("MuzzleMouth"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)chargeVfxPrefab)) { _chargeVfxInstance = Object.Instantiate(chargeVfxPrefab, val.position, val.rotation, val); ScaleParticleSystemDuration component2 = _chargeVfxInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = _totalDuration; } } } } ((EntityState)this).PlayCrossfade(animationLayerName, animationStateName, animationPlaybackRateName, _chargingDuration, _crossFadeDuration); } public override void Update() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)_chargeVfxInstance)) { Transform transform = _chargeVfxInstance.transform; Ray aimRay = ((BaseState)this).GetAimRay(); transform.forward = ((Ray)(ref aimRay)).direction; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!((double)((EntityState)this).fixedAge < (double)_totalDuration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireGravityBullet()); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)_chargeVfxInstance)) { EntityState.Destroy((Object)(object)_chargeVfxInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireGravityBullet : GenericProjectileBaseState { public int numberOfFireballs = 1; public string animationLayerName = "Gesture"; public string animationStateName = "Fire"; public string animationPlaybackRateName = "firePlaybackRate"; private float _interFireballDuration = 1f; private float _animationDuration; private Transform muzzleTransform; public override void OnEnter() { base.bloom = 1f; base.baseDuration = 1.2f; base.projectilePrefab = Main.gravityBulletProjectile; base.attackSoundString = "Play_voidBarnacle_m1_shoot"; base.damageCoefficient = 0f; base.projectilePitchBonus = -5f; base.minSpread = 0f; base.maxSpread = 1f; base.force = 10f; base.targetMuzzle = "MuzzleMouth"; base.recoilAmplitude = 0f; base.effectPrefab = Main.barnacleMuzzleFlash; base.duration = base.baseDuration / ((BaseState)this).attackSpeedStat; _interFireballDuration = base.duration / (float)numberOfFireballs; _animationDuration = _interFireballDuration; muzzleTransform = ((BaseState)this).FindModelChild(base.targetMuzzle); ((GenericProjectileBaseState)this).OnEnter(); } public override void FixedUpdate() { ((GenericProjectileBaseState)this).FixedUpdate(); if (!((double)base.stopwatch < (double)_animationDuration) && numberOfFireballs > 0) { _animationDuration += _animationDuration; ((GenericProjectileBaseState)this).PlayAnimation(_animationDuration); } } public override void PlayAnimation(float duration) { ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateName, _interFireballDuration, 0f); } public override void FireProjectile() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray val = ((GenericProjectileBaseState)this).ModifyProjectileAimRay(((BaseState)this).GetAimRay()); ((Ray)(ref val)).direction = Util.ApplySpread(((Ray)(ref val)).direction, base.minSpread, base.maxSpread, 1f, 1f, 0f, base.projectilePitchBonus); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = base.projectilePrefab; val2.owner = ((EntityState)this).gameObject; val2.damage = 1f; val2.position = ((Ray)(ref val)).origin; val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction); val2.force = base.force; val2.crit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)64); DamageAPI.AddModdedDamageType(ref value, Main.gravityDamageType); val2.damageTypeOverride = value; ((GenericProjectileBaseState)this).ModifyProjectileInfo(ref val2); ProjectileManager.instance.FireProjectile(val2); if (numberOfFireballs > 1) { base.firedProjectile = false; base.delayBeforeFiringProjectile += _interFireballDuration; } numberOfFireballs--; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace FathomlessVoidling.Controllers { public class FathomlessMissionController : NetworkBehaviour { public CombatSquad bossCombatSquad; public CharacterBody hauntBody; public CharacterMaster voidlingMaster; public AISkillDriver wardWipeDriver; public AISkillDriver singularityDriver; public AISkillDriver mazeDriver; public AISkillDriver fireMissileDriver; public AISkillDriver multibeamDriver; public CharacterBody voidlingBody; public PhasedInventorySetter inventorySetter; public static FathomlessMissionController instance { get; private set; } private void OnEnable() { instance = SingletonHelper.Assign(instance, this); bossCombatSquad = ((Component)this).GetComponent(); bossCombatSquad.onMemberDiscovered += BossCombatSquad_onMemberDiscovered; } private void OnDisable() { instance = SingletonHelper.Unassign(instance, this); bossCombatSquad.onMemberDiscovered -= BossCombatSquad_onMemberDiscovered; } private void BossCombatSquad_onMemberDiscovered(CharacterMaster characterMaster) { voidlingMaster = characterMaster; AISkillDriver[] components = ((Component)characterMaster).GetComponents(); foreach (AISkillDriver val in components) { switch (val.customName) { case "WardWipe": wardWipeDriver = val; break; case "Vacuum Attack": singularityDriver = val; break; case "SpinBeam": mazeDriver = val; break; case "FireMissiles": fireMissileDriver = val; break; case "FireMultiBeam": multibeamDriver = val; break; } } voidlingBody = characterMaster.GetBody(); PhasedInventorySetter component = ((Component)voidlingBody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { inventorySetter = component; } } public int GetCurrentPhase() { if (Object.op_Implicit((Object)(object)inventorySetter)) { return inventorySetter.phaseIndex; } return -1; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class JointThresholdController : NetworkBehaviour { private CharacterBody jointBody; public bool reachedThreshold; public float nextCleansePercent = 0.95f; public static readonly float[] thresholds = new float[2] { 0.75f, 0.5f }; private void Start() { jointBody = ((Component)this).GetComponent(); } public float GetThresholdForPhase(int phase) { if (phase < 0 || phase >= thresholds.Length) { return -1f; } return thresholds[phase]; } public void CleanseDebuffs() { if (NetworkServer.active) { CleanseSystem.CleanseBodyServer(jointBody, true, false, false, false, false, false); } } public void ResetForPhase() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) reachedThreshold = false; jointBody.SetBuffCount(Buffs.Immune.buffIndex, 0); float num = jointBody.healthComponent.health / jointBody.healthComponent.fullHealth; nextCleansePercent = Mathf.Floor(num * 10f) / 10f; if (nextCleansePercent >= num) { nextCleansePercent -= 0.1f; } } public static bool AllJointsReachedThreshold() { foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers((TeamIndex)4)) { CharacterBody component = ((Component)teamMember).GetComponent(); if (Object.op_Implicit((Object)(object)component) && ((Object)component).name == "VoidRaidCrabJointBody(Clone)") { JointThresholdController component2 = ((Component)component).GetComponent(); if (Object.op_Implicit((Object)(object)component2) && !component2.reachedThreshold) { return false; } } } return true; } public static void RemoveImmunityFromAllJoints() { foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)4).ToList()) { CharacterBody component = ((Component)item).GetComponent(); if (Object.op_Implicit((Object)(object)component) && ((Object)component).name == "VoidRaidCrabJointBody(Clone)") { JointThresholdController component2 = ((Component)component).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.ResetForPhase(); } } } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class MazeSpawnPointController : NetworkBehaviour { private static MazeSpawnPointController _instance; private List mazePositions = new List { new Vector3(-258.2f, 15f, 25.5f), new Vector3(83.8f, 15f, 223f), new Vector3(-201f, 15f, -195f), new Vector3(205f, 15f, -101f), new Vector3(-141.3f, 15f, -261.7f), new Vector3(-232.2f, 15f, 93.4f), new Vector3(204.3f, 15f, -130.1f), new Vector3(73f, 15f, 217.3f) }; public static MazeSpawnPointController instance => _instance; private void Start() { //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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < mazePositions.Count; i++) { float num = 0f; switch (i) { case 0: num = 60f; break; case 1: num = 230f; break; case 2: num = 70f; break; case 3: num = 260f; break; case 4: num = 0f; break; case 5: num = 150f; break; case 6: num = -20f; break; case 7: num = 160f; break; } GameObject val = new GameObject("MazeAnchor" + i); val.transform.parent = ((Component)this).transform; val.transform.localPosition = Vector3.zero; val.transform.position = mazePositions[i]; val.transform.eulerAngles = new Vector3(0f, num, 0f); } } private void OnEnable() { if (!Object.op_Implicit((Object)(object)_instance)) { _instance = this; InstanceTracker.Add(this); } } private void OnDisable() { if ((Object)(object)_instance == (Object)(object)this) { _instance = null; InstanceTracker.Remove(this); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } } namespace FathomlessVoidling.Components { public class LegControllerNetworkHelper : NetworkBehaviour { private static int kRpcRpcMirrorLegJoints; [ClientRpc] public void RpcMirrorLegJoints(GameObject voidlingBodyObj, string legName) { if (!Object.op_Implicit((Object)(object)voidlingBodyObj)) { return; } ModelLocator component = voidlingBodyObj.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.modelTransform)) { return; } ChildLocator component2 = ((Component)component.modelTransform).GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { return; } Transform val = component2.FindChild(legName); ChildLocator referenceLocator = default(ChildLocator); if (Object.op_Implicit((Object)(object)val) && ((Component)val).TryGetComponent(ref referenceLocator)) { ChildLocatorMirrorController val2 = default(ChildLocatorMirrorController); if (((Component)this).TryGetComponent(ref val2)) { val2.referenceLocator = referenceLocator; } else { Debug.LogError((object)"LegControllerNetworkHelper.RpcMirrorLegJoints : failed to find clmc"); } } } private void UNetVersion() { } protected static void InvokeRpcRpcMirrorLegJoints(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcMirrorLegJoints called on server."); } else { ((LegControllerNetworkHelper)(object)obj).RpcMirrorLegJoints(reader.ReadGameObject(), reader.ReadString()); } } public void CallRpcMirrorLegJoints(GameObject voidlingBodyObj, string legName) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcMirrorLegJoints called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcMirrorLegJoints); val.Write(((Component)this).GetComponent().netId); val.Write(voidlingBodyObj); val.Write(legName); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcMirrorLegJoints"); } static LegControllerNetworkHelper() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kRpcRpcMirrorLegJoints = 2005037104; NetworkBehaviour.RegisterRpcDelegate(typeof(LegControllerNetworkHelper), kRpcRpcMirrorLegJoints, new CmdDelegate(InvokeRpcRpcMirrorLegJoints)); NetworkCRC.RegisterBehaviour("LegControllerNetworkHelper", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class SingularityComponent : NetworkBehaviour { private SphereCollider collider; public void Start() { collider = ((Component)this).GetComponent(); } private void FixedUpdate() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) ReadOnlyCollection readOnlyInstancesList = CharacterBody.readOnlyInstancesList; float num = 2f; for (int i = 0; i < readOnlyInstancesList.Count; i++) { CharacterBody val = readOnlyInstancesList[i]; if ((int)val.teamComponent.teamIndex == 1 && val.hasEffectiveAuthority) { IDisplacementReceiver component = ((Component)val).GetComponent(); if (component != null) { Vector3 val2 = ((Component)this).transform.position - val.transform.position; component.AddDisplacement(((Vector3)(ref val2)).normalized * (num * Time.fixedDeltaTime)); } } } } public void OnTriggerEnter(Collider other) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Invalid comparison between Unknown and I4 //IL_0083: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Component)other).gameObject.GetComponent())) { HurtBox component = ((Component)other).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component.healthComponent.body) && Object.op_Implicit((Object)(object)component.healthComponent.body.teamComponent) && (int)component.healthComponent.body.teamComponent.teamIndex == 1 && Object.op_Implicit((Object)(object)component.healthComponent)) { component.healthComponent.Suicide(((Component)this).gameObject, ((Component)this).gameObject, DamageTypeCombo.op_Implicit((DamageType)65536)); } } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class StasisMissileComponent : MonoBehaviour { public Quaternion postPauseRotation; private ProjectileSteerTowardTarget steer; private ProjectileSimple projectileSimple; private float stopwatch; private float delayBeforePause = 1f; private float pauseDuration = 1f; private bool hasPaused; private float minSpreadDegrees; private float rangeSpreadDegrees = 10f; public void Start() { projectileSimple = ((Component)this).GetComponent(); steer = ((Component)this).GetComponent(); } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (!((double)stopwatch < (double)delayBeforePause)) { if (!hasPaused) { hasPaused = true; projectileSimple.desiredForwardSpeed = 0f; } if (!((double)stopwatch < (double)delayBeforePause + (double)pauseDuration)) { RecalculateDirection(); } } } private void RecalculateDirection() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) projectileSimple.desiredForwardSpeed = 0f; Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)this).transform.position, ((Component)this).transform.forward); BullseyeSearch val2 = new BullseyeSearch { maxDistanceFilter = 500f, maxAngleFilter = 360f, searchOrigin = ((Ray)(ref val)).origin, searchDirection = ((Ray)(ref val)).direction, filterByLoS = false, sortMode = (SortMode)3, teamMaskFilter = TeamMask.GetEnemyTeams((TeamIndex)4) }; val2.RefreshCandidates(); HurtBox val3 = val2.GetResults().FirstOrDefault((Func)((HurtBox hurtBox) => (Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && hurtBox.healthComponent.body.isPlayerControlled) ? true : false)); if (Object.op_Implicit((Object)(object)val3)) { Quaternion rotation = Util.QuaternionSafeLookRotation(((Component)val3).transform.position - ((Ray)(ref val)).origin) * GetRandomRollPitch(); ((Component)this).transform.rotation = rotation; projectileSimple.desiredForwardSpeed = 125f; ((Behaviour)steer).enabled = true; Object.Destroy((Object)(object)this); } } protected Quaternion GetRandomRollPitch() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_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_0037: Unknown result type (might be due to invalid IL or missing references) return Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.forward) * Quaternion.AngleAxis(minSpreadDegrees + Random.Range(0f, rangeSpreadDegrees), Vector3.left); } } public class VoidRainComponent : NetworkBehaviour { public Ray aimRay; public float damageStat; private float duration = 1f; private float stopwatch; private Vector3 beamEndPos; private GameObject tracerEffectPrefab = Main.voidRainTracer; private Vector3 bonusBlastForce = new Vector3(0f, 100f, 0f); private float blastDamageCoefficient = 1f; private float blastForceMagnitude = 3000f; private float blastRadius = 6f; private float beamMaxDistance = 1000f; private GameObject explosionEffectPrefab = Main.voidRainExplosion; private GameObject warningLaserVfxInstance; private GameObject warningLaserVfxPrefab = Main.voidRainWarning; private RayAttackIndicator warningLaserVfxInstanceRayAttackIndicator; private void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) VoidRainInfo component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { aimRay = component.aimRay; damageStat = component.damageStat; beamEndPos = component.endPos; } if (Object.op_Implicit((Object)(object)warningLaserVfxPrefab)) { warningLaserVfxInstance = Object.Instantiate(warningLaserVfxPrefab); warningLaserVfxInstanceRayAttackIndicator = warningLaserVfxInstance.GetComponent(); UpdateWarningLaser(); } } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (!((double)stopwatch < (double)duration)) { FireLaser(); if (Object.op_Implicit((Object)(object)warningLaserVfxInstance)) { Object.Destroy((Object)(object)warningLaserVfxInstance); } Object.Destroy((Object)(object)((Component)this).gameObject); } } private void FireLaser() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_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_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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown Util.PlaySound("Play_voidRaid_snipe_shoot", ((Component)this).gameObject); new BlastAttack { attacker = ((Component)this).gameObject, inflictor = ((Component)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((Component)this).gameObject), baseDamage = damageStat * blastDamageCoefficient, baseForce = blastForceMagnitude, position = beamEndPos, radius = blastRadius, falloffModel = (FalloffModel)2, bonusForce = bonusBlastForce, damageType = DamageTypeCombo.op_Implicit((DamageType)0) }.Fire(); if (Object.op_Implicit((Object)(object)tracerEffectPrefab)) { EffectData val = new EffectData { origin = beamEndPos, start = ((Ray)(ref aimRay)).origin, scale = blastRadius }; EffectManager.SpawnEffect(tracerEffectPrefab, val, true); EffectManager.SpawnEffect(explosionEffectPrefab, val, true); } } protected void CalcBeamPath(out Ray beamRay, out Vector3 beamEndPos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) float num = float.PositiveInfinity; RaycastHit[] array = Physics.RaycastAll(aimRay, beamMaxDistance, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)1); Transform root = ((Component)this).transform.root; for (int i = 0; i < array.Length; i++) { ref RaycastHit reference = ref array[i]; float distance = ((RaycastHit)(ref reference)).distance; if ((double)distance < (double)num && (Object)(object)((Component)((RaycastHit)(ref reference)).collider).transform.root != (Object)(object)root) { num = distance; } } float num2 = Mathf.Min(num, beamMaxDistance); beamEndPos = ((Ray)(ref aimRay)).GetPoint(num2); Vector3 origin = ((Ray)(ref aimRay)).origin; beamRay = new Ray(origin, beamEndPos - origin); } private void UpdateWarningLaser() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)warningLaserVfxInstanceRayAttackIndicator)) { warningLaserVfxInstanceRayAttackIndicator.attackRange = beamMaxDistance; CalcBeamPath(out var beamRay, out var _); warningLaserVfxInstanceRayAttackIndicator.attackRay = beamRay; } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class VoidRainInfo : MonoBehaviour { public Ray aimRay; public float damageStat; public Vector3 endPos; } }