Decompiled source of OldFathomlessVoidling v0.9.2
plugins/viliger-FathomlessVoidling/FathomlessVoidling.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System.Collections.Generic; using System.Diagnostics; 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 EntityStates; using EntityStates.GrandParentBoss; using EntityStates.Huntress; using EntityStates.ImpBossMonster; using EntityStates.NullifierMonster; using EntityStates.VoidRaidCrab; using EntityStates.VoidRaidCrab.Weapon; using FathomlessVoidling.ModCompat; using FathomlessVoidling.VoidlingEntityStates.Phase1; using FathomlessVoidling.VoidlingEntityStates.Phase3; using HG; using On.EntityStates.VoidRaidCrab; using On.RoR2; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("FathomlessVoidling")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("FathomlessVoidling")] [assembly: AssemblyTitle("FathomlessVoidling")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace FathomlessVoidling { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Nuxlar.FathomlessVoidling", "FathomlessVoidling", "0.9.2")] public class FathomlessVoidling : BaseUnityPlugin { public const string ModName = "FathomlessVoidling"; public const string Version = "0.9.2"; public const string GUID = "com.Nuxlar.FathomlessVoidling"; public static GameObject meteor = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/GrandparentBoulder.prefab").WaitForCompletion(), "VoidMeteor"); private static GameObject meteorGhost = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/GrandparentBoulderGhost.prefab").WaitForCompletion(), "VoidMeteorGhost"); public static GameObject portal = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabSpawnEffect.prefab").WaitForCompletion(); public static GameObject bombPrefab3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerDeathBombProjectile.prefab").WaitForCompletion(); public static GameObject bombPrefab2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierDeathBombProjectile.prefab").WaitForCompletion(); public static GameObject bombPrefab1 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombProjectile.prefab").WaitForCompletion(); private static Material boulderMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Grandparent/matGrandparentBoulderProjectile.mat").WaitForCompletion(); private static Material voidAffixMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/EliteVoid/matEliteVoidOverlay.mat").WaitForCompletion(); public static GameObject deathBombPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion(); public static GameObject spawnEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabSpawnEffect.prefab").WaitForCompletion(); public static GameObject spinBeamVFX = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabSpinBeamVFX.prefab").WaitForCompletion(); public static GameObject r2wCauldron = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarCauldrons/LunarCauldron, RedToWhite Variant.prefab").WaitForCompletion(); public static GameObject g2rCauldron = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarCauldrons/LunarCauldron, GreenToRed Variant.prefab").WaitForCompletion(); public static GameObject w2gCauldron = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarCauldrons/LunarCauldron, WhiteToGreen.prefab").WaitForCompletion(); public static SpawnCard locusPortalCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/PortalVoid/iscVoidPortal.asset").WaitForCompletion(); public static SceneDef voidRaid = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/voidraid/voidraid.asset").WaitForCompletion(); public void Awake() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown ModConfig.InitConfig(((BaseUnityPlugin)this).Config); ModifyBodies(); ModifyMasters(); SetupProjectiles(); AddContent(); CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); Stage.onServerStageBegin += Stage_onServerStageBegin; VoidStageMissionController.RequestFog += new hook_RequestFog(VoidStageMissionController_RequestFog); TeleporterInteraction.AttemptToSpawnAllEligiblePortals += new hook_AttemptToSpawnAllEligiblePortals(TeleporterInteraction_AttemptToSpawnAllEligiblePortals1); BaseVacuumAttackState.OnEnter += new hook_OnEnter(BaseVacuumAttackState_OnEnter); voidRaid.blockOrbitalSkills = false; } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { orig.Invoke(self, body); if (((Object)body).name == "MiniVoidRaidCrabBodyPhase1(Clone)") { AdjustPhase1Skills(body); } if (((Object)body).name == "MiniVoidRaidCrabBodyPhase2(Clone)") { AdjustPhase2Skills(body); } if (((Object)body).name == "MiniVoidRaidCrabBodyPhase3(Clone)") { AdjustPhase3Skills(body); } } private void ModifyMasters() { //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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) ItemDef oobItem2 = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/TeleportWhenOob/TeleportWhenOob.asset").WaitForCompletion(); GameObject master2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase1.prefab").WaitForCompletion(); ModifyAIStates(master2); AddTeleportWhenOOB(master2, oobItem2); GameObject master3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase2.prefab").WaitForCompletion(); ModifyAIStates(master3); AddTeleportWhenOOB(master3, oobItem2); GameObject master4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabMasterPhase3.prefab").WaitForCompletion(); ModifyAIStates(master4); AddTeleportWhenOOB(master4, oobItem2); static void AddTeleportWhenOOB(GameObject master, ItemDef oobItem) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) ref ItemDefInfo[] itemDefInfos = ref master.GetComponent<GivePickupsOnStart>().itemDefInfos; ItemDefInfo val = new ItemDefInfo { count = 1, dontExceedCount = true, itemDef = oobItem }; ArrayUtils.ArrayAppend<ItemDefInfo>(ref itemDefInfos, ref val); } static void ModifyAIStates(GameObject master) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) (from x in master.GetComponents<AISkillDriver>() where (int)x.skillSlot == 0 select x).First(); AISkillDriver obj = (from x in master.GetComponents<AISkillDriver>() where (int)x.skillSlot == 1 select x).First(); AISkillDriver val2 = (from x in master.GetComponents<AISkillDriver>() where (int)x.skillSlot == 2 select x).First(); AISkillDriver val3 = (from x in master.GetComponents<AISkillDriver>() where (int)x.skillSlot == 3 select x).First(); obj.movementType = (MovementType)0; obj.maxUserHealthFraction = 0.9f; obj.minUserHealthFraction = float.NegativeInfinity; obj.requiredSkill = null; obj.maxDistance = 200f; val2.maxUserHealthFraction = float.PositiveInfinity; val2.minUserHealthFraction = float.NegativeInfinity; val2.requiredSkill = null; val2.maxDistance = 400f; val2.minDistance = 0f; val3.maxUserHealthFraction = 0.8f; val3.minUserHealthFraction = float.NegativeInfinity; val3.requiredSkill = null; val3.maxDistance = 400f; val3.minDistance = 0f; } } private void ModifyBodies() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_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) Skills skills = new Skills(); GameObject gameObject = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase1.prefab").WaitForCompletion(); AdjustPhase1Stats(gameObject); skills.CreatePrimary(0, gameObject); skills.CreateSecondary(0, gameObject); skills.CreateUtility(0, gameObject); skills.CreateSpecial(0, gameObject); GameObject gameObject2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase2.prefab").WaitForCompletion(); AdjustPhase2Stats(gameObject2); skills.CreatePrimary(1, gameObject2); skills.CreateSecondary(1, gameObject2); skills.CreateUtility(1, gameObject2); skills.CreateSpecial(1, gameObject2); GameObject gameObject3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase3.prefab").WaitForCompletion(); AdjustPhase3Stats(gameObject3); skills.CreatePrimary(2, gameObject3); skills.CreateSecondary(2, gameObject3); skills.CreateUtility(2, gameObject3); skills.CreateSpecial(2, gameObject3); } private void BaseVacuumAttackState_OnEnter(orig_OnEnter orig, BaseVacuumAttackState self) { orig.Invoke(self); if (((Object)((EntityState)self).characterBody).name == "MiniVoidRaidCrabBodyPhase2(Clone)") { Transform val = VoidRaidGauntletController.instance.currentDonut.root.transform.Find("ReflectionProbe, Center"); if (Object.op_Implicit((Object)(object)val)) { self.vacuumOrigin = val; } } } private void TeleporterInteraction_AttemptToSpawnAllEligiblePortals1(orig_AttemptToSpawnAllEligiblePortals orig, TeleporterInteraction self) { if (self.beginContextString.Contains("LUNAR") && ModConfig.enableAltMoon.Value) { List<PortalSpawner> list = self.portalSpawners.ToList(); PortalSpawner val = list.Find((PortalSpawner x) => (Object)(object)x.portalSpawnCard == (Object)(object)locusPortalCard); if ((Object)(object)val != (Object)null) { list.Remove(val); self.portalSpawners = list.ToArray(); } SpawnLocusPortal(((Component)self).transform, self.rng); } orig.Invoke(self); } private FogRequest VoidStageMissionController_RequestFog(orig_RequestFog orig, VoidStageMissionController self, IZone zone) { if (ModConfig.enableVoidFog.Value) { return orig.Invoke(self, zone); } return null; } private void Stage_onServerStageBegin(Stage stage) { if (stage.sceneDef.cachedName == "voidstage" && ModConfig.enableAltMoon.Value) { SpawnLocusCauldrons(); } } private void SpawnLocusCauldrons() { //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_0038: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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_0154: Unknown result type (might be due to invalid IL or missing references) GameObject obj = Object.Instantiate<GameObject>(r2wCauldron, new Vector3(-142.67f, 29.94f, 242.74f), Quaternion.identity); obj.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj); GameObject obj2 = Object.Instantiate<GameObject>(g2rCauldron, new Vector3(-136.76f, 29.94f, 246.51f), Quaternion.identity); obj2.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj2); GameObject obj3 = Object.Instantiate<GameObject>(g2rCauldron, new Vector3(-149.74f, 29.93f, 239.7f), Quaternion.identity); obj3.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj3); GameObject obj4 = Object.Instantiate<GameObject>(w2gCauldron, new Vector3(-157.41f, 29.97f, 237.12f), Quaternion.identity); obj4.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj4); GameObject obj5 = Object.Instantiate<GameObject>(w2gCauldron, new Vector3(-126.63f, 29.93f, 249.1f), Quaternion.identity); obj5.transform.eulerAngles = new Vector3(0f, 66f, 0f); NetworkServer.Spawn(obj5); } private void SpawnLocusPortal(Transform transform, Xoroshiro128Plus rng) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //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_007a: Expected O, but got Unknown if (NetworkServer.active) { DirectorCore instance = DirectorCore.instance; DirectorPlacementRule val = new DirectorPlacementRule(); val.minDistance = 10f; val.maxDistance = 40f; val.placementMode = (PlacementMode)1; val.position = transform.position; val.spawnOnTarget = transform; DirectorSpawnRequest val2 = new DirectorSpawnRequest(locusPortalCard, val, rng); GameObject val3 = instance.TrySpawnObject(val2); if (Object.op_Implicit((Object)(object)val3)) { NetworkServer.Spawn(val3); Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "PORTAL_VOID_OPEN" }); } } } 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) bool flag = default(bool); ContentAddition.AddEntityState<ChargeRend>(ref flag); ContentAddition.AddEntityState<Disillusion>(ref flag); ContentAddition.AddEntityState<Rend>(ref flag); ContentAddition.AddEntityState<Transpose>(ref flag); ContentAddition.AddEntityState<ChargeCrush>(ref flag); ContentAddition.AddEntityState<Crush>(ref flag); ContentAddition.AddProjectile(meteor); } private void SetupProjectiles() { //IL_003b: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)"Setting Up Projectiles"); ProjectileController component = meteor.GetComponent<ProjectileController>(); component.cannotBeDeleted = true; meteor.transform.localScale = new Vector3(1.75f, 1.75f, 1.75f); meteorGhost.transform.localScale = new Vector3(2f, 2f, 2f); ((Renderer)((Component)meteorGhost.transform.GetChild(0).GetChild(0)).GetComponent<MeshRenderer>()).materials = (Material[])(object)new Material[2] { boulderMat, voidAffixMat }; component.ghost = meteorGhost.GetComponent<ProjectileGhostController>(); component.ghostPrefab = meteorGhost; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabMissileProjectile.prefab").WaitForCompletion().GetComponent<ProjectileSteerTowardTarget>() .rotationSpeed = 180f; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished Setting Up Projectiles"); } private void AdjustPhase1Stats(GameObject gameObject) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Adjusting P1 Stats"); CharacterBody component = gameObject.GetComponent<CharacterBody>(); component.subtitleNameToken = "Augur of the Abyss"; component.baseMaxHealth = ModConfig.baseHealth.Value; component.levelMaxHealth = ModConfig.levelHealth.Value; component.baseDamage = ModConfig.baseDamage.Value; component.levelDamage = ModConfig.levelDamage.Value; component.baseAttackSpeed = ModConfig.baseAtkSpd.Value; component.baseMoveSpeed = ModConfig.baseSpd.Value; component.baseAcceleration = ModConfig.acceleration.Value; component.baseArmor = ModConfig.baseArmor.Value; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished Adjusting P1 Stats"); } private void AdjustPhase2Stats(GameObject gameObject) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Adjusting P2 Stats"); CharacterBody component = gameObject.GetComponent<CharacterBody>(); component.subtitleNameToken = "Augur of the Abyss"; component.baseMaxHealth = ModConfig.baseHealth.Value; component.levelMaxHealth = ModConfig.levelHealth.Value; component.baseDamage = ModConfig.baseDamage.Value; component.levelDamage = ModConfig.levelDamage.Value; component.baseAttackSpeed = ModConfig.baseAtkSpd.Value; component.baseMoveSpeed = ModConfig.baseSpd.Value; component.baseAcceleration = ModConfig.acceleration.Value; component.baseArmor = ModConfig.baseArmor.Value; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished Adjusting P2 Stats"); } private void AdjustPhase3Stats(GameObject gameObject) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Adjusting P3 Stats"); CharacterBody component = gameObject.GetComponent<CharacterBody>(); component.subtitleNameToken = "Augur of the Abyss"; component.baseMaxHealth = ModConfig.baseHealth.Value; component.levelMaxHealth = ModConfig.levelHealth.Value; component.baseDamage = ModConfig.baseDamage.Value; component.levelDamage = ModConfig.levelDamage.Value; component.baseAttackSpeed = ModConfig.baseAtkSpd.Value; component.baseMoveSpeed = ModConfig.baseSpd.Value; component.baseAcceleration = ModConfig.acceleration.Value; component.baseArmor = ModConfig.baseArmor.Value; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished Adjusting P3 Stats"); } private void AdjustPhase1Skills(CharacterBody body) { //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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)"Adjusting P1 Skills"); SkillLocator skillLocator = body.skillLocator; SkillDef skillDef = skillLocator.primary.skillFamily.variants[0].skillDef; SkillDef skillDef2 = skillLocator.secondary.skillFamily.variants[0].skillDef; SkillDef skillDef3 = skillLocator.utility.skillFamily.variants[0].skillDef; SkillDef skillDef4 = skillLocator.special.skillFamily.variants[0].skillDef; skillDef.activationState = new SerializableEntityStateType(typeof(Disillusion)); skillDef2.activationState = new SerializableEntityStateType(typeof(VacuumEnter)); skillDef3.activationState = new SerializableEntityStateType(typeof(Transpose)); skillDef4.activationState = new SerializableEntityStateType(typeof(ChargeRend)); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished Adjusting P1 Skills"); } private void AdjustPhase2Skills(CharacterBody body) { //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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)"Adjusting P2 Skills"); SkillLocator skillLocator = body.skillLocator; SkillDef skillDef = skillLocator.primary.skillFamily.variants[0].skillDef; SkillDef skillDef2 = skillLocator.secondary.skillFamily.variants[0].skillDef; SkillDef skillDef3 = skillLocator.utility.skillFamily.variants[0].skillDef; SkillDef skillDef4 = skillLocator.special.skillFamily.variants[0].skillDef; skillDef.activationState = new SerializableEntityStateType(typeof(Disillusion)); skillDef2.activationState = new SerializableEntityStateType(typeof(VacuumEnter)); skillDef3.activationState = new SerializableEntityStateType(typeof(Transpose)); skillDef4.activationState = new SerializableEntityStateType(typeof(SpinBeamEnter)); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished Adjusting P2 Skills"); } private void AdjustPhase3Skills(CharacterBody body) { //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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)"Adjusting P3 Skills"); SkillLocator skillLocator = body.skillLocator; SkillDef skillDef = skillLocator.primary.skillFamily.variants[0].skillDef; SkillDef skillDef2 = skillLocator.secondary.skillFamily.variants[0].skillDef; SkillDef skillDef3 = skillLocator.utility.skillFamily.variants[0].skillDef; SkillDef skillDef4 = skillLocator.special.skillFamily.variants[0].skillDef; skillDef.activationState = new SerializableEntityStateType(typeof(Disillusion)); skillDef2.activationState = new SerializableEntityStateType(typeof(ChargeCrush)); skillDef3.activationState = new SerializableEntityStateType(typeof(Transpose)); skillDef4.activationState = new SerializableEntityStateType(typeof(SpinBeamEnter)); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished Adjusting P3 Skills"); } } internal class ModConfig { public static ConfigEntry<bool> enableAltMoon; public static ConfigEntry<bool> enableVoidFog; public static ConfigEntry<float> baseHealth; public static ConfigEntry<float> levelHealth; public static ConfigEntry<float> baseDamage; public static ConfigEntry<float> levelDamage; public static ConfigEntry<float> baseArmor; public static ConfigEntry<float> baseAtkSpd; public static ConfigEntry<float> baseSpd; public static ConfigEntry<float> acceleration; public static ConfigEntry<int> primCD; public static ConfigEntry<int> secCD; public static ConfigEntry<int> utilCD; public static ConfigEntry<int> specCD; public static void InitConfig(ConfigFile config) { enableAltMoon = config.Bind<bool>("General", "Alt Moon", true, "Toggle Void Locus as an alternative to the moon. Adds stage 5 Locus portal and item cauldrons."); enableVoidFog = config.Bind<bool>("General", "Pillar Fog", false, "Toggle void pillar fog."); baseHealth = config.Bind<float>("Stats", "Base Health", 1250f, "Vanilla: 2000"); levelHealth = config.Bind<float>("Stats", "Level Health", 350f, "Health gained per level. Vanilla: 600"); baseDamage = config.Bind<float>("Stats", "Base Damage", 15f, "Vanilla: 15"); levelDamage = config.Bind<float>("Stats", "Level Damage", 3f, "Damage gained per level. Vanilla: 3"); baseArmor = config.Bind<float>("Stats", "Base Armor", 30f, "Vanilla: 20"); baseAtkSpd = config.Bind<float>("Stats", "Base Attack Speed", 1.25f, "Vanilla: 1"); baseSpd = config.Bind<float>("Stats", "Base Move Speed", 90f, "Vanilla: 45"); acceleration = config.Bind<float>("Stats", "Acceleration", 45f, "Vanilla: 20"); primCD = config.Bind<int>("Skills", "Primary Cooldown", 10, "Cooldown for Disillusion (Main missile attack)."); secCD = config.Bind<int>("Skills", "Secondary Cooldown", 40, "Cooldown for Secondary (Vacuum, Singularity, Crush)."); utilCD = config.Bind<int>("Skills", "Util Cooldown", 20, "Cooldown for Transpose (Blink)."); specCD = config.Bind<int>("Skills", "Special Cooldown", 30, "Cooldown for Special (Rend, SpinBeam, Reap)."); if (RiskOfOptionsCompat.enabled) { RiskOfOptionsCompat.CreateNewOption(enableAltMoon); RiskOfOptionsCompat.CreateNewOption(enableVoidFog); RiskOfOptionsCompat.CreateNewOption(baseHealth, 1000f, 2000f, 50f); RiskOfOptionsCompat.CreateNewOption(levelHealth, 100f, 500f, 25f); RiskOfOptionsCompat.CreateNewOption(baseDamage, 10f, 20f, 0.5f); RiskOfOptionsCompat.CreateNewOption(levelDamage, 1f, 6f, 0.25f); RiskOfOptionsCompat.CreateNewOption(baseArmor, 20f, 60f, 5f); RiskOfOptionsCompat.CreateNewOption(baseAtkSpd, 0.5f, 2f, 0.25f); RiskOfOptionsCompat.CreateNewOption(baseSpd, 45f, 135f, 5f); RiskOfOptionsCompat.CreateNewOption(acceleration, 20f, 70f, 5f); RiskOfOptionsCompat.CreateNewOption(primCD, 1, 10); RiskOfOptionsCompat.CreateNewOption(secCD, 30, 50); RiskOfOptionsCompat.CreateNewOption(utilCD, 10, 30); RiskOfOptionsCompat.CreateNewOption(specCD, 20, 40); RiskOfOptionsCompat.SetDescription(); } } } public class Skills { public void CreatePrimary(int phase, GameObject gameObject) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = gameObject.GetComponent<SkillLocator>(); GenericSkill val = gameObject.GetComponents<GenericSkill>()[0]; val.skillName = "Disillusion"; SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val2).name = "MiniVoidRaidCrabBodyBaseDisillusionFamily"; val2.variants = (Variant[])(object)new Variant[1]; val._skillFamily = val2; SkillDef val3 = ScriptableObject.CreateInstance<SkillDef>(); ((Object)val3).name = "FathomlessVoidlingSkillPrimary" + phase; val3.activationState = new SerializableEntityStateType(typeof(Disillusion)); val3.skillNameToken = "Disillusion"; val3.activationStateMachineName = "Weapon"; val3.baseMaxStock = 1; val3.baseRechargeInterval = ModConfig.primCD.Value; val3.beginSkillCooldownOnSkillEnd = true; val3.canceledFromSprinting = false; val3.cancelSprintingOnActivation = false; val3.fullRestockOnAssign = true; val3.interruptPriority = (InterruptPriority)2; val3.isCombatSkill = true; val3.mustKeyPress = false; val3.rechargeStock = 1; val3.requiredStock = 1; val3.stockToConsume = 1; val2.variants[0] = new Variant { skillDef = val3 }; ContentAddition.AddSkillDef(val3); ContentAddition.AddSkillFamily(val2); component.primary = val; } public void CreateSecondary(int phase, GameObject gameObject) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = gameObject.GetComponent<SkillLocator>(); GenericSkill val = gameObject.GetComponents<GenericSkill>()[1]; val.skillName = "Singularity"; SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val2).name = "MiniVoidRaidCrabBodyBaseSingularityFamily"; val2.variants = (Variant[])(object)new Variant[1]; val._skillFamily = val2; SkillDef val3 = ScriptableObject.CreateInstance<SkillDef>(); ((Object)val3).name = "FathomlessVoidlingSkillSecondary" + phase; val3.activationState = new SerializableEntityStateType(typeof(VacuumEnter)); val3.skillNameToken = "Singularity"; val3.activationStateMachineName = "Body"; val3.baseMaxStock = 1; val3.baseRechargeInterval = ModConfig.secCD.Value; val3.beginSkillCooldownOnSkillEnd = true; val3.canceledFromSprinting = true; val3.cancelSprintingOnActivation = true; val3.fullRestockOnAssign = true; val3.interruptPriority = (InterruptPriority)3; val3.isCombatSkill = true; val3.mustKeyPress = false; val3.rechargeStock = 1; val3.requiredStock = 1; val3.stockToConsume = 1; val2.variants[0] = new Variant { skillDef = val3 }; ContentAddition.AddSkillDef(val3); ContentAddition.AddSkillFamily(val2); component.secondary = val; } public void CreateUtility(int phase, GameObject gameObject) { //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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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) SkillLocator component = gameObject.GetComponent<SkillLocator>(); GenericSkill val = ((phase == 0) ? gameObject.AddComponent<GenericSkill>() : gameObject.GetComponents<GenericSkill>()[2]); val.skillName = "Transpose"; SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val2).name = "MiniVoidRaidCrabBodyBaseTransposeFamily"; val2.variants = (Variant[])(object)new Variant[1]; val._skillFamily = val2; SkillDef val3 = ScriptableObject.CreateInstance<SkillDef>(); ((Object)val3).name = "FathomlessVoidlingSkillUtility" + phase; val3.activationState = new SerializableEntityStateType(typeof(Transpose)); val3.skillNameToken = "Transpose"; val3.activationStateMachineName = "Body"; val3.baseMaxStock = 1; val3.baseRechargeInterval = ModConfig.utilCD.Value; val3.beginSkillCooldownOnSkillEnd = true; val3.canceledFromSprinting = false; val3.cancelSprintingOnActivation = false; val3.fullRestockOnAssign = true; val3.interruptPriority = (InterruptPriority)1; val3.isCombatSkill = true; val3.mustKeyPress = false; val3.rechargeStock = 1; val3.requiredStock = 1; val3.stockToConsume = 1; val2.variants[0] = new Variant { skillDef = val3 }; ContentAddition.AddSkillDef(val3); ContentAddition.AddSkillFamily(val2); component.utility = val; } public void CreateSpecial(int phase, GameObject gameObject) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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) SkillLocator component = gameObject.GetComponent<SkillLocator>(); GenericSkill val = ((phase == 0) ? gameObject.GetComponents<GenericSkill>()[2] : gameObject.GetComponents<GenericSkill>()[3]); val.skillName = "OmegaBeam"; SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val2).name = "MiniVoidRaidCrabBodyBaseOmegaBeamFamily"; val2.variants = (Variant[])(object)new Variant[1]; val._skillFamily = val2; SkillDef val3 = ScriptableObject.CreateInstance<SkillDef>(); ((Object)val3).name = "FathomlessVoidlingSkillSpecial" + phase; val3.activationState = new SerializableEntityStateType(typeof(Transpose)); val3.skillNameToken = "OmegaBeam"; val3.activationStateMachineName = "Body"; val3.baseMaxStock = 1; val3.baseRechargeInterval = ModConfig.specCD.Value; val3.beginSkillCooldownOnSkillEnd = true; val3.canceledFromSprinting = false; val3.cancelSprintingOnActivation = false; val3.fullRestockOnAssign = true; val3.interruptPriority = (InterruptPriority)2; val3.isCombatSkill = true; val3.mustKeyPress = false; val3.rechargeStock = 1; val3.requiredStock = 1; val3.stockToConsume = 1; val2.variants[0] = new Variant { skillDef = val3 }; ContentAddition.AddSkillDef(val3); ContentAddition.AddSkillFamily(val2); component.special = val; } } } namespace FathomlessVoidling.VoidlingEntityStates { public class ChargeReap : BaseSpinBeamAttackState { public override void OnEnter() { ((BaseSpinBeamAttackState)this).OnEnter(); ((BaseSpinBeamAttackState)this).CreateBeamVFXInstance(SpinBeamWindUp.warningLaserPrefab); Util.PlaySound(SpinBeamWindUp.enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if ((double)((EntityState)this).fixedAge >= (double)((BaseSpinBeamAttackState)this).duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Reap()); } ((BaseSpinBeamAttackState)this).SetHeadYawRevolutions(SpinBeamWindUp.revolutionsCurve.Evaluate(((BaseSpinBeamAttackState)this).normalizedFixedAge)); } } public class Reap : BaseState { private class Predictor { private enum ExtrapolationType { None, Linear, Polar } private Transform bodyTransform; private Transform targetTransform; private Vector3 targetPosition0; private Vector3 targetPosition1; private Vector3 targetPosition2; private int collectedPositions; public bool hasTargetTransform => Object.op_Implicit((Object)(object)targetTransform); public bool isPredictionReady => collectedPositions > 2; public Predictor(Transform bodyTransform) { this.bodyTransform = bodyTransform; } private void PushTargetPosition(Vector3 newTargetPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) targetPosition2 = targetPosition1; targetPosition1 = targetPosition0; targetPosition0 = newTargetPosition; collectedPositions++; } public void SetTargetTransform(Transform newTargetTransform) { //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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_001f: 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) targetTransform = newTargetTransform; targetPosition2 = (targetPosition1 = (targetPosition0 = newTargetTransform.position)); collectedPositions = 1; } public void Update() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)targetTransform)) { PushTargetPosition(targetTransform.position); } } public bool GetPredictedTargetPosition(float time, out Vector3 predictedPosition) { //IL_0001: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0049: 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_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_0058: 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_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_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_011f: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) Vector3 val = targetPosition1 - targetPosition2; Vector3 val2 = targetPosition0 - targetPosition1; val.y = 0f; val2.y = 0f; ExtrapolationType extrapolationType = ((!(val == Vector3.zero) && !(val2 == Vector3.zero)) ? ((!((double)Vector3.Dot(((Vector3)(ref val)).normalized, ((Vector3)(ref val2)).normalized) <= 0.980000019073486)) ? ExtrapolationType.Linear : ExtrapolationType.Polar) : ExtrapolationType.None); float num = 1f / Time.fixedDeltaTime; predictedPosition = targetPosition0; switch (extrapolationType) { case ExtrapolationType.Polar: { Vector3 position = bodyTransform.position; Vector3 val3 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition2 - position)); Vector3 val4 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition1 - position)); Vector3 val5 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition0 - position)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; float num2 = Vector2.SignedAngle(Vector2.op_Implicit(val3), Vector2.op_Implicit(val4)) * num; float num3 = Vector2.SignedAngle(Vector2.op_Implicit(val4), Vector2.op_Implicit(val5)) * num; float num4 = (float)(((double)magnitude2 - (double)magnitude) * (double)num); double num5 = (magnitude3 - magnitude2) * num; float num6 = (float)(((double)num2 + (double)num3) * 0.5); double num7 = num5; float num8 = (float)(((double)num4 + num7) * 0.5); float num9 = magnitude3 + num8 * time; if ((double)num9 < 0.0) { num9 = 0f; } Vector2 val6 = Util.RotateVector2(Vector2.op_Implicit(val5), num6 * time) * (num9 * magnitude3); predictedPosition = position; predictedPosition.x += val6.x; predictedPosition.z += val6.y; break; } case ExtrapolationType.Linear: predictedPosition = targetPosition0 + val2 * (time * num); break; } return true; } } public static int portalBombCount; public static float baseDuration = 4f; private float duration; private float stopwatch; private Vector3 predictedTargetPosition; private GameObject predictiveLaserIndicator; private int counter; private Predictor predictor; private static GameObject areaIndicatorPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(); public override void OnEnter() { //IL_003e: 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_006b: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_008f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); counter++; predictiveLaserIndicator = Object.Instantiate<GameObject>(areaIndicatorPrefab); predictiveLaserIndicator.transform.localScale = new Vector3(ArrowRain.arrowRainRadius, ArrowRain.arrowRainRadius, ArrowRain.arrowRainRadius); duration = baseDuration / base.attackSpeedStat; stopwatch = 0f; BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)((EntityState)this).teamComponent)) { ((TeamMask)(ref val.teamMaskFilter)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); } val.maxDistanceFilter = 500f; val.maxAngleFilter = 360f; Ray aimRay = ((BaseState)this).GetAimRay(); val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.filterByLoS = false; val.sortMode = (SortMode)3; val.RefreshCandidates(); HurtBox val2 = val.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val2)) { predictor = new Predictor(((EntityState)this).transform); predictor.SetTargetTransform(((Component)val2).transform); } } public override void FixedUpdate() { //IL_0089: 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) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; predictor.Update(); if ((double)stopwatch <= 1.0) { predictor.GetPredictedTargetPosition(1f, out predictedTargetPosition); predictiveLaserIndicator.transform.position = predictedTargetPosition; } else { stopwatch = 0f; predictiveLaserIndicator.transform.position = new Vector3(0f, 0f, 0f); ((EntityState)this).outer.SetNextState((EntityState)(object)new ReapLaser { count = counter }); } if (!((double)((EntityState)this).fixedAge < (double)duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class ReapLaser : BaseSpinBeamAttackState { public int count; public Vector3 targetPosition; private Ray aimRay; private float baseDuration = 2f; private float duration; private float beamTickTimer; private SoundLoopPtr loopPtr; public override void OnEnter() { //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) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_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) if (count > 3) { ((EntityState)this).outer.SetNextStateToMain(); } duration = baseDuration / ((BaseState)this).attackSpeedStat; aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).direction = targetPosition - ((Ray)(ref aimRay)).origin; ((BaseSpinBeamAttackState)this).beamVfxInstance = Object.Instantiate<GameObject>(SpinBeamAttack.beamVfxPrefab, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction)); loopPtr = LoopSoundManager.PlaySoundLoopLocal(((EntityState)this).gameObject, SpinBeamAttack.loopSound); Util.PlaySound(SpinBeamAttack.enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { if (((EntityState)this).isAuthority) { if ((double)beamTickTimer <= 0.0) { beamTickTimer += 1f / SpinBeamAttack.beamTickFrequency; FireBeamBulletAuthority(); } beamTickTimer -= Time.fixedDeltaTime; } } public override void OnExit() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) LoopSoundManager.StopSoundLoopLocal(loopPtr); VfxKillBehavior.KillVfxObject(((BaseSpinBeamAttackState)this).beamVfxInstance); ((BaseSpinBeamAttackState)this).beamVfxInstance = null; ((EntityState)this).outer.SetNextState((EntityState)(object)new Reap()); } private void FireBeamBulletAuthority() { //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_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_0027: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_00fd: 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) new BulletAttack { origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = 0f, maxDistance = 400f, hitMask = CommonMasks.bullet, stopperMask = LayerMask.op_Implicit(0), bulletCount = 1u, radius = SpinBeamAttack.beamRadius, smartCollision = false, queryTriggerInteraction = (QueryTriggerInteraction)1, procCoefficient = 1f, procChainMask = default(ProcChainMask), owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, damage = SpinBeamAttack.beamDpsCoefficient * ((BaseState)this).damageStat / SpinBeamAttack.beamTickFrequency, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)0, force = 0f, hitEffectPrefab = SpinBeamAttack.beamImpactEffectPrefab, tracerEffectPrefab = null, isCrit = false, HitEffectNormal = false }.Fire(); } } } namespace FathomlessVoidling.VoidlingEntityStates.Phase3 { public class ChargeCrush : BaseState { private float duration; [SerializeField] public float baseDuration = 3.3f; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "SuckEnter", "Suck.playbackRate", 3.3f, 0f); } public override void FixedUpdate() { //IL_001f: 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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration)) { Util.PlaySound(((BaseFireMultiBeam)new FireMultiBeamSmall()).enterSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(new FireMissiles().muzzleFlashPrefab, ((EntityState)this).gameObject, BaseMultiBeamState.muzzleName, false); ((EntityState)this).PlayAnimation("Body", "SuckExit", "Suck.playbackRate", 3.3f, 0f); ((EntityState)this).outer.SetNextState((EntityState)(object)new Crush()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Crush : BaseState { private float stopwatch; private float missileStopwatch; public static float baseDuration = 6f; public static string muzzleString = BaseMultiBeamState.muzzleName; public static float missileSpawnFrequency = 6f; public static float missileSpawnDelay = 0f; public static float damageCoefficient; public static float maxSpread = 1f; public static GameObject projectilePrefab; public static GameObject muzzleflashPrefab; private ChildLocator childLocator; public override void OnEnter() { ((BaseState)this).OnEnter(); missileStopwatch -= missileSpawnDelay; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)childLocator)) { childLocator.FindChild(muzzleString); } } } private void FireBlob(Ray projectileRay, float bonusPitch, float bonusYaw) { //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_000d: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_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_00d6: Unknown result type (might be due to invalid IL or missing references) EffectManager.SpawnEffect(FathomlessVoidling.portal, new EffectData { origin = ((Ray)(ref projectileRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref projectileRay)).direction) }, false); FireProjectileInfo val = default(FireProjectileInfo); val.position = ((Ray)(ref projectileRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref projectileRay)).direction); val.crit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); val.damage = base.damageStat * (new FireSecondaryProjectile().damageCoefficient * 2f); val.owner = ((EntityState)this).gameObject; val.force = new FireSecondaryProjectile().force * 2f; ((FireProjectileInfo)(ref val)).speedOverride = 100f; val.projectilePrefab = FathomlessVoidling.meteor; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } public override void FixedUpdate() { //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_0083: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) ((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 projectileRay = default(Ray); ((Ray)(ref projectileRay)).direction = ((Ray)(ref aimRay)).direction; float num = 1000f; float num2 = Random.Range(-100f, 100f); float num3 = Random.Range(50f, 75f); float num4 = Random.Range(-100f, 100f); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(num2, num3, num4); Vector3 origin = val.position + val2; ((Ray)(ref projectileRay)).origin = origin; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val3, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { ((Ray)(ref projectileRay)).direction = ((RaycastHit)(ref val3)).point - ((Ray)(ref projectileRay)).origin; } FireBlob(projectileRay, 0f, 0f); } if (!((double)stopwatch < (double)baseDuration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace FathomlessVoidling.VoidlingEntityStates.Phase1 { public class ChargeRend : BaseMultiBeamState { [SerializeField] public float baseDuration = new ChargeMultiBeam().baseDuration; [SerializeField] public GameObject chargeEffectPrefab = new ChargeMultiBeam().chargeEffectPrefab; [SerializeField] public GameObject warningLaserVfxPrefab = new ChargeMultiBeam().warningLaserVfxPrefab; [SerializeField] public string muzzleName = new ChargeMultiBeam().muzzleName; [SerializeField] public string enterSoundString = new ChargeMultiBeam().enterSoundString; [SerializeField] public bool isSoundScaledByAttackSpeed = new ChargeMultiBeam().isSoundScaledByAttackSpeed; [SerializeField] public string animationLayerName = new ChargeMultiBeam().animationLayerName; [SerializeField] public string animationStateName = new ChargeMultiBeam().animationStateName; [SerializeField] public string animationPlaybackRateParam = new ChargeMultiBeam().animationPlaybackRateParam; private float duration; private GameObject chargeEffectInstance; private GameObject warningLaserVfxInstance; private RayAttackIndicator warningLaserVfxInstanceRayAttackIndicator; private bool warningLaserEnabled { get { return Object.op_Implicit((Object)(object)warningLaserVfxInstance); } set { if (value != warningLaserEnabled) { if (!value) { EntityState.Destroy((Object)(object)warningLaserVfxInstance); warningLaserVfxInstance = null; warningLaserVfxInstanceRayAttackIndicator = null; } else if (Object.op_Implicit((Object)(object)warningLaserVfxPrefab)) { warningLaserVfxInstance = Object.Instantiate<GameObject>(warningLaserVfxPrefab); warningLaserVfxInstanceRayAttackIndicator = warningLaserVfxInstance.GetComponent<RayAttackIndicator>(); UpdateWarningLaser(); } } } } 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) ((BaseMultiBeamState)this).OnEnter(); duration = baseDuration / ((BaseState)this).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<GameObject>(chargeEffectPrefab, val.position, val.rotation); chargeEffectInstance.transform.parent = val; ScaleParticleSystemDuration component = chargeEffectInstance.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = duration; } } } if (!string.IsNullOrEmpty(enterSoundString)) { if (isSoundScaledByAttackSpeed) { Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); } else { Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } } warningLaserEnabled = true; } public override void OnExit() { warningLaserEnabled = false; 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 Rend()); } } public override void Update() { ((EntityState)this).Update(); UpdateWarningLaser(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)6; } private void UpdateWarningLaser() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)warningLaserVfxInstanceRayAttackIndicator)) { warningLaserVfxInstanceRayAttackIndicator.attackRange = BaseMultiBeamState.beamMaxDistance; Ray attackRay = default(Ray); Vector3 val = default(Vector3); ((BaseMultiBeamState)this).CalcBeamPath(ref attackRay, ref val); warningLaserVfxInstanceRayAttackIndicator.attackRay = attackRay; } } } public class Disillusion : BaseState { private class Predictor { private enum ExtrapolationType { None, Linear, Polar } private Transform bodyTransform; private Transform targetTransform; private Vector3 targetPosition0; private Vector3 targetPosition1; private Vector3 targetPosition2; private int collectedPositions; public bool hasTargetTransform => Object.op_Implicit((Object)(object)targetTransform); public bool isPredictionReady => collectedPositions > 2; public Predictor(Transform bodyTransform) { this.bodyTransform = bodyTransform; } private void PushTargetPosition(Vector3 newTargetPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) targetPosition2 = targetPosition1; targetPosition1 = targetPosition0; targetPosition0 = newTargetPosition; collectedPositions++; } public void SetTargetTransform(Transform newTargetTransform) { //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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_001f: 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) targetTransform = newTargetTransform; targetPosition2 = (targetPosition1 = (targetPosition0 = newTargetTransform.position)); collectedPositions = 1; } public void Update() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)targetTransform)) { PushTargetPosition(targetTransform.position); } } public bool GetPredictedTargetPosition(float time, out Vector3 predictedPosition) { //IL_0001: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0049: 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_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_0058: 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_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_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_011f: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) Vector3 val = targetPosition1 - targetPosition2; Vector3 val2 = targetPosition0 - targetPosition1; val.y = 0f; val2.y = 0f; ExtrapolationType extrapolationType = ((!(val == Vector3.zero) && !(val2 == Vector3.zero)) ? ((!((double)Vector3.Dot(((Vector3)(ref val)).normalized, ((Vector3)(ref val2)).normalized) <= 0.980000019073486)) ? ExtrapolationType.Linear : ExtrapolationType.Polar) : ExtrapolationType.None); float num = 1f / Time.fixedDeltaTime; predictedPosition = targetPosition0; switch (extrapolationType) { case ExtrapolationType.Polar: { Vector3 position = bodyTransform.position; Vector3 val3 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition2 - position)); Vector3 val4 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition1 - position)); Vector3 val5 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition0 - position)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; float num2 = Vector2.SignedAngle(Vector2.op_Implicit(val3), Vector2.op_Implicit(val4)) * num; float num3 = Vector2.SignedAngle(Vector2.op_Implicit(val4), Vector2.op_Implicit(val5)) * num; float num4 = (float)(((double)magnitude2 - (double)magnitude) * (double)num); double num5 = (magnitude3 - magnitude2) * num; float num6 = (float)(((double)num2 + (double)num3) * 0.5); double num7 = num5; float num8 = (float)(((double)num4 + num7) * 0.5); float num9 = magnitude3 + num8 * time; if ((double)num9 < 0.0) { num9 = 0f; } Vector2 val6 = Util.RotateVector2(Vector2.op_Implicit(val5), num6 * time) * (num9 * magnitude3); predictedPosition = position; predictedPosition.x += val6.x; predictedPosition.z += val6.y; break; } case ExtrapolationType.Linear: predictedPosition = targetPosition0 + val2 * (time * num); break; } return true; } } public static int portalBombCount; public static float baseDuration = 4f; public static float damageCoefficient; public static float procCoefficient; public static float randomRadius; public static float force; public static float minimumDistanceBetweenBombs; private GameObject bombPrefab; private float duration; private float fireTimer; private float stopwatch; private float fireInterval; private Vector3 predictedTargetPosition; private Predictor predictor; public override void OnEnter() { //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; switch (((Object)((EntityState)this).characterBody).name) { case "MiniVoidRaidCrabBodyPhase3(Clone)": bombPrefab = FathomlessVoidling.bombPrefab3; break; case "MiniVoidRaidCrabBodyPhase2(Clone)": bombPrefab = FathomlessVoidling.bombPrefab2; break; case "MiniVoidRaidCrabBodyPhase1(Clone)": bombPrefab = FathomlessVoidling.bombPrefab1; break; } fireInterval = duration / 5f; fireTimer = 0f; stopwatch = 0f; BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)((EntityState)this).teamComponent)) { ((TeamMask)(ref val.teamMaskFilter)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); } val.maxDistanceFilter = 1000f; val.maxAngleFilter = 360f; Ray aimRay = ((BaseState)this).GetAimRay(); val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.filterByLoS = false; val.sortMode = (SortMode)3; val.RefreshCandidates(); HurtBox val2 = val.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val2)) { predictor = new Predictor(((EntityState)this).transform); predictor.SetTargetTransform(((Component)val2).transform); } } private void FireBomb(Vector3 point) { //IL_0007: 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_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_0029: 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) ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = bombPrefab, position = point, rotation = Quaternion.identity, owner = ((EntityState)this).gameObject, damage = 0f, force = 0f, crit = ((EntityState)this).characterBody.RollCrit() }); } public override void FixedUpdate() { //IL_005b: 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_00af: 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_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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: 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_01bf: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; predictor.Update(); if ((double)stopwatch <= 1.0) { predictor.GetPredictedTargetPosition(1f, out predictedTargetPosition); } else { stopwatch = 0f; FireBomb(predictedTargetPosition); } fireTimer -= Time.fixedDeltaTime; if ((double)fireTimer <= 0.0) { fireTimer += fireInterval; EffectManager.SimpleMuzzleFlash(new FireMissiles().muzzleFlashPrefab, ((EntityState)this).gameObject, new FireMissiles().muzzleName, false); Util.PlayAttackSpeedSound(new FireMissiles().fireWaveSoundString, ((EntityState)this).gameObject, base.attackSpeedStat); Ray aimRay = ((BaseState)this).GetAimRay(); Quaternion val = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = new FireMissiles().projectilePrefab; val2.position = ((BaseState)this).FindModelChild(new FireMissiles().muzzleName).position; val2.owner = ((EntityState)this).gameObject; val2.damage = base.damageStat * new FireMissiles().damageCoefficient; val2.force = new FireMissiles().force; FireProjectileInfo val3 = val2; for (int i = 0; i < new FireMissiles().numMissilesPerWave; i++) { val3.rotation = val * new FireMissiles().GetRandomRollPitch(); val3.crit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); ProjectileManager.instance.FireProjectile(val3); } EffectManager.SimpleMuzzleFlash(FirePortalBomb.muzzleflashEffectPrefab, ((EntityState)this).gameObject, new FireMissiles().muzzleName, true); } if (!((double)((EntityState)this).fixedAge < (double)duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class Rend : BaseState { private Transform muzzleTransform; private float stopwatch; private float missileStopwatch; public float baseDuration = 4f; public static string muzzleString = BaseMultiBeamState.muzzleName; public static float missileSpawnFrequency = 6f; public static float missileSpawnDelay = 0f; public static float damageCoefficient; public static float maxSpread = 1f; public static float blastDamageCoefficient = 1f; public static float blastForceMagnitude = 3000f; public static float blastRadius = 6f; public static Vector3 blastBonusForce = new Vector3(0f, 100f, 0f); public static string muzzleName = "EyeProjectileCenter"; public static string animationLayerName = "Gesture"; public static string animationStateName = "FireMultiBeamFinale"; public static string animationPlaybackRateParam = "MultiBeam.playbackRate"; public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/TracerVoidRaidCrabTripleBeamSmall.prefab").WaitForCompletion(); public static GameObject explosionEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabTripleBeamExplosion.prefab").WaitForCompletion(); public static GameObject muzzleEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabTripleBeamMuzzleflash.prefab").WaitForCompletion(); private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); missileStopwatch -= missileSpawnDelay; duration = baseDuration / base.attackSpeedStat; muzzleTransform = ((BaseState)this).FindModelChild(muzzleName); } private void FireBlob() { //IL_0020: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f); Util.PlaySound(((BaseFireMultiBeam)new FireMultiBeamSmall()).enterSoundString, ((EntityState)this).gameObject); CalcBeamPath(out var beamRay, out var beamEndPos); beamEndPos += new Vector3(Random.Range(-15f, 15f), Random.Range(-10f, 10f), Random.Range(-15f, 15f)); new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * (blastDamageCoefficient / 2f), baseForce = blastForceMagnitude, position = beamEndPos, radius = blastRadius, falloffModel = (FalloffModel)2, bonusForce = blastBonusForce, damageType = DamageTypeCombo.op_Implicit((DamageType)0) }.Fire(); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { int num = component.FindChildIndex(BaseMultiBeamState.muzzleName); if (Object.op_Implicit((Object)(object)tracerEffectPrefab)) { EffectData val = new EffectData { origin = beamEndPos, start = ((Ray)(ref beamRay)).origin, scale = blastRadius }; val.SetChildLocatorTransformReference(((EntityState)this).gameObject, num); EffectManager.SpawnEffect(tracerEffectPrefab, val, true); EffectManager.SpawnEffect(explosionEffectPrefab, val, true); } } } OnFireBeam(((Ray)(ref beamRay)).origin, beamEndPos); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; missileStopwatch += Time.fixedDeltaTime; if ((double)missileStopwatch >= 1.0 / (double)missileSpawnFrequency) { missileStopwatch -= 1f / missileSpawnFrequency; FireBlob(); if (!((double)stopwatch < (double)baseDuration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public void OnFireBeam(Vector3 beamStart, Vector3 beamEnd) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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) ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = new FireMultiBeamFinale().projectilePrefab, position = beamEnd + Vector3.up * new FireMultiBeamFinale().projectileVerticalSpawnOffset, owner = ((EntityState)this).gameObject, damage = base.damageStat * (new FireMultiBeamFinale().projectileDamageCoefficient / 6f), crit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master) }); } public 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, BaseMultiBeamState.beamMaxDistance, 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); } } public class Transpose : BlinkState { public int blinkDistance = 500; public float duration = 2f; private float stopwatch; public override void OnEnter() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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) base.modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)base.modelTransform)) { base.animator = ((Component)base.modelTransform).GetComponent<Animator>(); base.characterModel = ((Component)base.modelTransform).GetComponent<CharacterModel>(); base.hurtboxGroup = ((Component)base.modelTransform).GetComponent<HurtBoxGroup>(); } if (Object.op_Implicit((Object)(object)base.characterModel)) { CharacterModel characterModel = base.characterModel; characterModel.invisibilityCount++; } if (Object.op_Implicit((Object)(object)base.hurtboxGroup)) { HurtBoxGroup hurtboxGroup = base.hurtboxGroup; int hurtBoxesDeactivatorCounter = hurtboxGroup.hurtBoxesDeactivatorCounter + 1; hurtboxGroup.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((Behaviour)((EntityState)this).rigidbodyMotor).enabled = false; } InputBankTest inputBank = ((EntityState)this).inputBank; inputBank.moveVector *= (float)blinkDistance; CalculateBlinkDestination(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); } private void CreateBlinkEffect(Vector3 origin1) { //IL_0000: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown Util.PlaySound(((BaseFireMultiBeam)new FireMultiBeamFinale()).enterSoundString, ((EntityState)this).gameObject); EffectManager.SpawnEffect(FathomlessVoidling.deathBombPrefab, new EffectData { rotation = Util.QuaternionSafeLookRotation(base.blinkDestination - base.blinkStart), origin = origin1, scale = 75f }, false); } public override void FixedUpdate() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; if (!((double)stopwatch < (double)duration) && ((EntityState)this).isAuthority) { ((EntityState)this).rigidbodyMotor.AddDisplacement(base.blinkDestination); ((EntityState)this).outer.SetNextStateToMain(); } } private void CalculateBlinkDestination() { //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 b