Decompiled source of SpawnerArmExtras v7.2.0
SpawnerArmExtras.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using Sandbox; using ThornClient.Core; using ThornClient.Core.ConfigurableElements; using ULTRAKILL.Cheats; using ULTRAKILL.Enemy; using ULTRAKILL.Portal; using Unity.AI.Navigation; using UnityEngine; using UnityEngine.AI; using UnityEngine.AddressableAssets; using UnityEngine.ProBuilder; using UnityEngine.SceneManagement; using plog.Models; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SpawnerArmExtras")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("7.2.0.0")] [assembly: AssemblyInformationalVersion("7.2.0+d3c37fbc6cd42851830b145413c1fa41dbc0345a")] [assembly: AssemblyProduct("SpawnerArmExtras")] [assembly: AssemblyTitle("SpawnerArmExtras")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("7.2.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SpawnerArmExtras { public class BlackHoleFromMortar : MonoBehaviour { public EnemyIdentifier source = null; public void Update() { if ((Object)(object)source == (Object)null) { ((Component)this).GetComponent<BlackHoleProjectile>().Explode(); } } } [HarmonyPatch(typeof(BlackHoleProjectile), "Explode")] public class BlackHoleFromMortarPatch { public static void Prefix(BlackHoleProjectile __instance) { BlackHoleFromMortar component = ((Component)__instance).GetComponent<BlackHoleFromMortar>(); if (!((Object)(object)component == (Object)null) && !((Object)(object)component.source == (Object)null)) { MortarLauncher component2 = ((Component)component.source).GetComponent<MortarLauncher>(); if (component2 != null) { component2.cooldown = 2f; } } } } public class DashblockSpawned : MonoBehaviour { public Deathcatcher deathcatcher; public static int count; public void Awake() { deathcatcher = ((Component)this).GetComponent<Deathcatcher>(); } public void FixedUpdate() { ((Behaviour)deathcatcher).enabled = false; } public void Update() { if (count >= 1) { MonoSingleton<NewMovement>.Instance.EmptyStamina(); } } public void Start() { Recolor(); count++; } public void OnDestroy() { count--; count = Mathf.Max(count, 0); if (count == 0) { MonoSingleton<NewMovement>.Instance.FullStamina(); } } public void Recolor() { //IL_0058: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) MeshRenderer component = ((Component)((Component)this).transform.Find("Model/Deathcatcher_Animated/Deathcatcher_Open")).GetComponent<MeshRenderer>(); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)EnemyAssets.Textures["Dashblock"]); DistantSprite componentInChildren = ((Component)this).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren).GetComponent<SpriteRenderer>().color = new Color(0f, 1f, 0f, 0.502f); Transform child = ((Component)componentInChildren).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(0f, 0.5f, 0f, 0.502f); Color color = default(Color); ((Color)(ref color))..ctor(0f, 1f, 0f, 1f); Transform val = ((Component)this).transform.Find("Model/ParticleEffects/Effects"); ((Component)val.Find("Glow (Red)")).GetComponent<SpriteRenderer>().color = color; ((Component)val.Find("Point Light")).GetComponent<Light>().color = color; } } public class DisarmerSpawned : MonoBehaviour { public Deathcatcher deathcatcher; public static int count; public void Awake() { deathcatcher = ((Component)this).GetComponent<Deathcatcher>(); } public void FixedUpdate() { ((Behaviour)deathcatcher).enabled = false; } public void Start() { Recolor(); count++; SetAllArms((VariantOption)2); } public void OnDestroy() { count--; count = Mathf.Max(count, 0); if (count == 0) { SetAllArms((VariantOption)0); } } public void Recolor() { //IL_0058: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) MeshRenderer component = ((Component)((Component)this).transform.Find("Model/Deathcatcher_Animated/Deathcatcher_Open")).GetComponent<MeshRenderer>(); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)EnemyAssets.Textures["Disarmer"]); DistantSprite componentInChildren = ((Component)this).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren).GetComponent<SpriteRenderer>().color = new Color(0.75f, 0.25f, 1f, 0.502f); Transform child = ((Component)componentInChildren).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(0.35f, 0f, 0.5f, 0.502f); Color color = default(Color); ((Color)(ref color))..ctor(0.75f, 0.25f, 1f, 1f); Transform val = ((Component)this).transform.Find("Model/ParticleEffects/Effects"); ((Component)val.Find("Glow (Red)")).GetComponent<SpriteRenderer>().color = color; ((Component)val.Find("Point Light")).GetComponent<Light>().color = color; } public void SetAllArms(VariantOption variantOption) { //IL_0012: 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_001e: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) ForcedLoadout forcedLoadout = MonoSingleton<FistControl>.Instance.forcedLoadout; forcedLoadout.arm.blueVariant = variantOption; forcedLoadout.arm.redVariant = variantOption; forcedLoadout.arm.greenVariant = variantOption; MonoSingleton<FistControl>.Instance.ResetFists(); } } public class JumpblockSpawned : MonoBehaviour { public Deathcatcher deathcatcher; public static int count; public void Awake() { deathcatcher = ((Component)this).GetComponent<Deathcatcher>(); } public void FixedUpdate() { ((Behaviour)deathcatcher).enabled = false; } public void Start() { Recolor(); count++; } public void OnDestroy() { count--; count = Mathf.Max(count, 0); } public void Recolor() { //IL_0058: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) MeshRenderer component = ((Component)((Component)this).transform.Find("Model/Deathcatcher_Animated/Deathcatcher_Open")).GetComponent<MeshRenderer>(); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)EnemyAssets.Textures["Jumpblock"]); DistantSprite componentInChildren = ((Component)this).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren).GetComponent<SpriteRenderer>().color = new Color(1f, 1f, 0f, 0.502f); Transform child = ((Component)componentInChildren).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(0.5f, 0.5f, 0f, 0.502f); Color color = default(Color); ((Color)(ref color))..ctor(1f, 1f, 0f, 1f); Transform val = ((Component)this).transform.Find("Model/ParticleEffects/Effects"); ((Component)val.Find("Glow (Red)")).GetComponent<SpriteRenderer>().color = color; ((Component)val.Find("Point Light")).GetComponent<Light>().color = color; } } [HarmonyPatch(typeof(NewMovement))] public class JumpPatch { [HarmonyPrefix] [HarmonyPatch(typeof(NewMovement), "Jump")] [HarmonyPriority(600)] public static bool JumpPrefix() { if (JumpblockSpawned.count >= 1) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(NewMovement), "WallJump")] [HarmonyPriority(600)] public static bool WallJumpPrefix(WallCheck wcInstance) { if (JumpblockSpawned.count >= 1) { return false; } return true; } } public class NullifierChecker : MonoBehaviour { public void FixedUpdate() { if (NullifierSpawned.count > 0) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class NullifierSpawned : MonoBehaviour { public Deathcatcher deathcatcher; public static int count; public void Awake() { deathcatcher = ((Component)this).GetComponent<Deathcatcher>(); } public void FixedUpdate() { ((Behaviour)deathcatcher).enabled = false; } public void Start() { Recolor(); count++; SetAllWeapons((VariantOption)2); } public void OnDestroy() { count--; count = Mathf.Max(count, 0); if (count == 0) { SetAllWeapons((VariantOption)0); } } public void Recolor() { //IL_0058: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) MeshRenderer component = ((Component)((Component)this).transform.Find("Model/Deathcatcher_Animated/Deathcatcher_Open")).GetComponent<MeshRenderer>(); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)EnemyAssets.Textures["Nullifier"]); DistantSprite componentInChildren = ((Component)this).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren).GetComponent<SpriteRenderer>().color = new Color(0f, 0.25f, 1f, 0.502f); Transform child = ((Component)componentInChildren).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(0f, 0f, 0.5f, 0.502f); Color color = default(Color); ((Color)(ref color))..ctor(0f, 0.25f, 1f, 1f); Transform val = ((Component)this).transform.Find("Model/ParticleEffects/Effects"); ((Component)val.Find("Glow (Red)")).GetComponent<SpriteRenderer>().color = color; ((Component)val.Find("Point Light")).GetComponent<Light>().color = color; } public void SetAllWeapons(VariantOption variantOption) { //IL_0013: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) ForcedLoadout forcedLoadout = MonoSingleton<GunSetter>.Instance.forcedLoadout; SetAllVariants(forcedLoadout.revolver, variantOption); SetAllVariants(forcedLoadout.shotgun, variantOption); SetAllVariants(forcedLoadout.nailgun, variantOption); SetAllVariants(forcedLoadout.railcannon, variantOption); SetAllVariants(forcedLoadout.rocketLauncher, variantOption); SetAllVariants(forcedLoadout.altRevolver, variantOption); SetAllVariants(forcedLoadout.altShotgun, variantOption); SetAllVariants(forcedLoadout.altNailgun, variantOption); MonoSingleton<GunSetter>.Instance.ResetWeapons(false); } public void SetAllVariants(VariantSetting variantSetting, VariantOption variantOption) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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) variantSetting.blueVariant = variantOption; variantSetting.greenVariant = variantOption; variantSetting.redVariant = variantOption; } } public class DisgraceSpawned : MonoBehaviour { public bool dashing = false; public float dashCooldown = 0f; public float dashCooldownMax = 0.6f; public float randomizedSpeed; public Color red = new Color(0.9f, 0.5f, 0.6f); public Color green = new Color(0.5f, 0.9f, 0.6f); public Transform mf; public Follow follow; public AlwaysLookAtCamera looker; public SkinnedMeshRenderer renderer; public EnemyIdentifier eid; public float difficultySpeedModifier; public void Start() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) mf = ((Component)this).transform.Find("MaliciousFace"); follow = ((Component)this).gameObject.AddComponent<Follow>(); follow.speed = 12f; looker = ((Component)mf).gameObject.AddComponent<AlwaysLookAtCamera>(); mf.localScale = new Vector3(0.1f, 0.0875f, 0.0005f); randomizedSpeed = Random.Range(-1.6f, 1.6f); renderer = ((Component)this).GetComponentInChildren<SkinnedMeshRenderer>(); eid = ((Component)this).GetComponent<EnemyIdentifier>(); for (int i = 0; i < ((Component)this).transform.parent.childCount; i++) { Transform child = ((Component)this).transform.parent.GetChild(i); if (((Object)child).name.Contains("Leg")) { ((Component)child).gameObject.SetActive(false); } } int difficulty = eid.difficulty; if (1 == 0) { } float num = difficulty switch { 4 => 1f, 3 => 0.9f, 2 => 0.75f, 1 => 0.5f, 0 => 0.4f, _ => 1.15f, }; if (1 == 0) { } difficultySpeedModifier = num; dashCooldownMax /= difficultySpeedModifier; } public IEnumerator Dash(int times) { yield return (object)new WaitForSeconds(0.01f); if (times > 0) { Vector3 distance = ((Component)mf).transform.position - ((Component)MonoSingleton<NewMovement>.Instance).transform.position; Transform transform = ((Component)this).transform; transform.position -= 0.1f * distance; ((MonoBehaviour)this).StartCoroutine(Dash(times - 1)); } else { Object.Instantiate<GameObject>(EnemyAssets.Prefabs["Explosion"], ((Component)this).transform.position, ((Component)this).transform.rotation); dashing = false; dashCooldown = 0f; } } public void Update() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) if (eid.dead) { Object.Destroy((Object)(object)this); } if (!dashing) { dashCooldown += Time.deltaTime; } NewMovement instance = MonoSingleton<NewMovement>.Instance; Vector3 val = ((Component)mf).transform.position - ((Component)instance).transform.position; float num = Vector3.Dot(((Vector3)(ref val)).normalized, ((Component)instance.cc).transform.forward); if (((Vector3)(ref val)).magnitude <= 12f && dashCooldown >= dashCooldownMax && !dashing && !BlindEnemies.Blind && !EnemyIgnorePlayer.Active && !eid.dead) { dashing = true; ((MonoBehaviour)this).StartCoroutine(Dash(10)); } if (num > 0.9f) { follow.speed = (3f + randomizedSpeed * 0.375f) * difficultySpeedModifier; ((Renderer)renderer).material.color = red; } else { follow.speed = (8f + randomizedSpeed) * difficultySpeedModifier; ((Renderer)renderer).material.color = green; } if (eid.dead) { ((Renderer)renderer).material.color = ((Renderer)renderer).material.color / 3f; } if (BlindEnemies.Blind || EnemyIgnorePlayer.Active) { ((Behaviour)follow).enabled = false; ((Behaviour)looker).enabled = false; } else { ((Behaviour)follow).enabled = true; ((Behaviour)looker).enabled = true; } } } public class FlangerBeam : MonoBehaviour { public float angularSpeed = 180f; public float angularSpeedIncrease = 0.25f; public float radialSpeed = 4f; public float radialSpeedIncrease = 0.25f; public GameObject damageZone; public Vector3 startPoint; public float angle; public float radius = 0f; public void Awake() { damageZone = ((Component)((Component)this).transform.Find("DamageZone")).gameObject; } public void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) startPoint = ((Component)this).transform.position; } public void Update() { //IL_00ac: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) if (damageZone.activeInHierarchy) { angularSpeed += angularSpeedIncrease * Time.deltaTime; angle += angularSpeed * Time.deltaTime; radialSpeed += radialSpeedIncrease * Time.deltaTime; radius += radialSpeed * Time.deltaTime; float num = angle * (MathF.PI / 180f); float num2 = radius * Mathf.Cos(num); float num3 = radius * Mathf.Sin(num); ((Component)this).transform.position = startPoint + num2 * -((Component)this).transform.right + num3 * -((Component)this).transform.up; } } } public class FlangerSpawned : MonoBehaviour { public float cooldown = 2f; public float cooldownMax = 4f; public float flashPreAttackTime = 0.5f; public bool didFlash = false; public float beamAngularSpeed = 180f; public float beamAngularSpeedIncrease = 0.25f; public float beamRadialSpeed = 4f; public float beamRadialSpeedIncrease = 0.25f; public float difficultySpeedModifier = 1f; public bool finishedSetup = false; public bool difficultyStarted = false; public Transform model; public EnemyIdentifier eid; public Drone drone; public DroneFlesh droneFlesh; public void Awake() { eid = ((Component)this).GetComponent<EnemyIdentifier>(); if (!finishedSetup) { SetupWeaknesses(); RemoveParts(); SetupModel(); } else { RetextureModel(); } } public void SetupWeaknesses() { eid.weaknesses = Array.Empty<string>(); eid.weaknessMultipliers = Array.Empty<float>(); } public void RemoveParts() { drone = ((Component)this).GetComponent<Drone>(); droneFlesh = ((Component)this).GetComponent<DroneFlesh>(); ((Behaviour)drone).enabled = false; ((Behaviour)droneFlesh).enabled = false; ((Component)((Component)this).transform.Find("HardDamageBeam")).gameObject.SetActive(false); ((Component)((Component)this).transform.Find("Particle System")).gameObject.SetActive(false); } public void SetupModel() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0098: 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_00c3: 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) model = ((Component)this).transform.Find("Gib_Eyeball"); model.localScale = 3.175f * Vector3.one; ParticleSystem component = ((Component)((Component)this).transform.Find("Particle System (1)")).GetComponent<ParticleSystem>(); MainModule main = component.main; MinMaxGradient startColor = ((MainModule)(ref main)).startColor; ((MinMaxGradient)(ref startColor)).color = new Color(1f, 0.6f, 0.2f, 1f); ((MainModule)(ref main)).startColor = startColor; Transform val = ((Component)this).transform.Find("AlwaysLookAtCamera/Square"); val.localScale = 6.25f * Vector3.one; SpriteRenderer component2 = ((Component)val).GetComponent<SpriteRenderer>(); component2.color = new Color(1f, 0.4f, 0f, component2.color.a); AlwaysLookAtCamera val2 = ((Component)this).gameObject.AddComponent<AlwaysLookAtCamera>(); val2.overrideTarget = ((Component)MonoSingleton<NewMovement>.Instance).transform; val2.dontRotateIfBlind = true; RetextureModel(); } public void RetextureModel() { MeshRenderer component = ((Component)model).GetComponent<MeshRenderer>(); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)EnemyAssets.Textures["Flanger"]); ((Renderer)component).material.EnableKeyword("ENEMY"); } public void Start() { drone.difficulty = Enemy.InitializeDifficulty(eid); drone.bsm = MonoSingleton<BloodsplatterManager>.Instance; drone.gz = GoreZone.ResolveGoreZone(((Component)this).transform); drone.kib = ((Component)this).GetComponent<KeepInBounds>(); StartDifficulty(); MeshRenderer component = ((Component)((Component)this).transform.Find("Gib_Eyeball")).GetComponent<MeshRenderer>(); ((Renderer)component).material.EnableKeyword("ENEMY"); } public void StartDifficulty() { if (!difficultyStarted) { difficultyStarted = true; difficultySpeedModifier = GetDifficultyModifier(eid.difficulty); cooldownMax /= difficultySpeedModifier; cooldown = 0.5f * cooldownMax; } } public static float GetDifficultyModifier(int difficulty) { if (1 == 0) { } float result = difficulty switch { 4 => 1f, 3 => 0.8f, 2 => 0.7f, 1 => 0.5f, 0 => 0.4f, _ => 1.1f, }; if (1 == 0) { } return result; } public float GetEidSpeedModifier() { float num = 1f; float num2 = Mathf.Max(OptionsManager.radianceTier, eid.radianceTier); if (eid.speedBuff || OptionsManager.forceRadiance) { num *= eid.speedBuffModifier * ((num2 > 1f) ? (0.75f + num2 / 4f) : num2); } if (eid.puppet) { num *= 0.75f; } return num; } public void Update() { cooldown += Time.deltaTime * GetEidSpeedModifier(); if ((Object)(object)eid == (Object)null || eid.health <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } bool flag = !BlindEnemies.Blind && !EnemyIgnorePlayer.Active; float num = flashPreAttackTime / difficultySpeedModifier / GetEidSpeedModifier(); if (!didFlash && cooldown >= cooldownMax - num && flag) { Flash(); } if (cooldown >= cooldownMax && didFlash && flag) { didFlash = false; cooldown = 0f; ShootOrangeBeamThis(); } ((Behaviour)drone).enabled = false; ((Behaviour)droneFlesh).enabled = false; } public void Flash() { //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_0028: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) Transform transform = Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.unparryableFlash, ((Component)this).transform.position, Quaternion.identity).transform; transform.localScale *= 25f; transform.LookAt(((Component)MonoSingleton<NewMovement>.Instance).transform); ((Component)transform).GetComponent<AudioSource>().volume = 0.5f; didFlash = true; Vector3 val = ((Component)MonoSingleton<NewMovement>.Instance).transform.position - ((Component)this).transform.position; transform.localPosition += 3f * ((Vector3)(ref val)).normalized; } public GameObject ShootOrangeBeamThis() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return ShootOrangeBeam(((Component)this).transform.position, difficultySpeedModifier, GetEidSpeedModifier(), beamAngularSpeed, beamAngularSpeedIncrease, beamRadialSpeed, beamRadialSpeedIncrease); } public static GameObject ShootOrangeBeam(Vector3 position, float difficultySpeedModifier, float eidSpeedModifier, float? angularSpeed = null, float? angularSpeedIncrease = null, float? radialSpeed = null, float? radialSpeedIncrease = null) { //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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["GeryonUpArrowBeam"], ((Component)MonoSingleton<NewMovement>.Instance).transform.position, Quaternion.identity); Vector3 val2 = ((Component)MonoSingleton<NewMovement>.Instance).transform.position - position; val.transform.rotation = Quaternion.LookRotation(Vector3.down, val2); val.transform.localScale = new Vector3(0.4f, 0.4f, 1f); HurtZone componentInChildren = val.GetComponentInChildren<HurtZone>(true); componentInChildren.affected = (AffectedSubjects)1; componentInChildren.enemyDamageOverride = 0f; float num = 1f / difficultySpeedModifier / eidSpeedModifier; RemoveOnTime val3 = val.AddComponent<RemoveOnTime>(); val3.time = 12f * num; ScaleTransform component = val.GetComponent<ScaleTransform>(); component.speed = 0.125f / num; Screenshaker componentInChildren2 = val.GetComponentInChildren<Screenshaker>(true); componentInChildren2.amount = 1f; Light componentInChildren3 = val.GetComponentInChildren<Light>(true); componentInChildren3.intensity *= 0.2f; FlangerBeam flangerBeam = val.AddComponent<FlangerBeam>(); float valueOrDefault = angularSpeed.GetValueOrDefault(); if (!angularSpeed.HasValue) { valueOrDefault = flangerBeam.angularSpeed; angularSpeed = valueOrDefault; } valueOrDefault = angularSpeedIncrease.GetValueOrDefault(); if (!angularSpeedIncrease.HasValue) { valueOrDefault = flangerBeam.angularSpeedIncrease; angularSpeedIncrease = valueOrDefault; } valueOrDefault = radialSpeed.GetValueOrDefault(); if (!radialSpeed.HasValue) { valueOrDefault = flangerBeam.radialSpeed; radialSpeed = valueOrDefault; } valueOrDefault = radialSpeedIncrease.GetValueOrDefault(); if (!radialSpeedIncrease.HasValue) { valueOrDefault = flangerBeam.radialSpeedIncrease; radialSpeedIncrease = valueOrDefault; } flangerBeam.angularSpeed = angularSpeed.Value / num; flangerBeam.angularSpeedIncrease = angularSpeedIncrease.Value / num; flangerBeam.radialSpeed = radialSpeed.Value / num; flangerBeam.radialSpeedIncrease = radialSpeedIncrease.Value / num; val.AddComponent<RemoveOnRespawn>(); return val; } } public class FuchsiaSetValues : MonoBehaviour { public float cycleOffsetTime = 0f; public float lasersRotation = 0f; public bool pushForceFollowsRotation = false; public int laserEnvironmentMask = 16777664; } public class FuchsiaSpawned : MonoBehaviour { public Transform lasersTransform; public Transform[] lasers = (Transform[])(object)new Transform[2]; public Transform[] lasersMelee = (Transform[])(object)new Transform[2]; public bool rotatingLasers = true; public int laserEnvironmentMask = 16777664; public FuchsiaState state = FuchsiaState.Nothing; public float nextCycleTime = 0f; public float cycleOffsetTime = 0f; public float timeModulo; public bool telegraphing = true; [SerializeField] private bool canPushUp = false; [SerializeField] private bool canPushDown = true; public Transform model; public Transform wings; public Transform crown; public bool finishedSetup = false; public bool difficultyStarted = false; public float meleeTriggerDistance = 16f; public bool alreadyInMeleeZone = false; public float meleeZoneEndDistance = 16f; public float meleePushDistance = 18f; public bool pushForceFollowsRotation = false; public float pushForce = 65f; public float prePushDelay = 0.5f; public float pushDuration = 0.3f; public float preMeleeFireDelay = 0.35f; public float meleeFireDuration = 0.25f; public float postMeleeFireDelay = 0.2f; public float didntDoMeleeTime = 0.2f; public float pushStartTimepoint; public float meleeFireStartTimepoint; public bool didMeleePushAction = false; public bool parried = false; public bool checkingForParry = false; public bool unparriableAttack = false; public float difficultySpeedModifier = 1f; public EnemyIdentifier eid; public Rigidbody rigidbody; public Enemy enemy; public AlwaysLookAtCamera looker; public RealTypeSaver realTypeSaver; public BoxCollider collider; public Drone drone; public DroneFlesh droneFlesh; public Vector3 originalPosition; public Quaternion originalRotation; public bool originalTransformSet = false; public float LasersRotation { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) Quaternion localRotation = lasersTransform.localRotation; return ((Quaternion)(ref localRotation)).eulerAngles.z; } set { //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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) Transform obj = lasersTransform; Quaternion localRotation = lasersTransform.localRotation; float x = ((Quaternion)(ref localRotation)).eulerAngles.x; localRotation = lasersTransform.localRotation; obj.localRotation = Quaternion.Euler(x, ((Quaternion)(ref localRotation)).eulerAngles.y, value); } } public float CycleOffsetTime { get { return cycleOffsetTime; } set { cycleOffsetTime = value; } } public bool CanPushUp { get { return canPushUp; } set { AllowPushUp(value); } } public bool CanPushDown { get { return canPushDown; } set { AllowPushDown(value); } } public bool PushForceFollowsRotation { get { return pushForceFollowsRotation; } set { pushForceFollowsRotation = value; } } public int LaserEnvironmentMask { get { return laserEnvironmentMask; } set { laserEnvironmentMask = value; } } public void Awake() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) eid = ((Component)this).GetComponent<EnemyIdentifier>(); enemy = ((Component)this).GetComponent<Enemy>(); realTypeSaver = ((Component)this).GetComponent<RealTypeSaver>(); collider = ((Component)this).GetComponent<BoxCollider>(); rigidbody = ((Component)this).GetComponent<Rigidbody>(); SetupWeaknesses(); if (!originalTransformSet) { originalPosition = ((Component)this).transform.position; originalRotation = ((Component)this).transform.rotation; originalTransformSet = true; } if (!finishedSetup) { RemoveParts(); AddParts(); SetupLasers(); AddLooker(); finishedSetup = true; } else { RetextureAll(); } Telegraph(telegraphing: true); CheckSetValues(); } public void CheckSetValues() { FuchsiaSetValues component = ((Component)this).GetComponent<FuchsiaSetValues>(); if (!((Object)(object)component == (Object)null)) { CycleOffsetTime = component.cycleOffsetTime; LasersRotation = component.lasersRotation; PushForceFollowsRotation = component.pushForceFollowsRotation; LaserEnvironmentMask = component.laserEnvironmentMask; } } public void SetupWeaknesses() { eid.weaknesses[0] = "nail"; eid.weaknessMultipliers[0] = 1.25f; Util.ArrayAdd(ref eid.weaknesses, "explosion"); Util.ArrayAdd(ref eid.weaknessMultipliers, 0.75f); Util.ArrayAdd(ref eid.weaknesses, "railcannon"); Util.ArrayAdd(ref eid.weaknessMultipliers, 1.65f); eid.immuneToFriendlyFire = true; } public void RemoveParts() { drone = ((Component)this).GetComponent<Drone>(); droneFlesh = ((Component)this).GetComponent<DroneFlesh>(); ((Behaviour)drone).enabled = false; ((Behaviour)droneFlesh).enabled = false; ((Component)((Component)this).transform.Find("HardDamageBeam")).gameObject.SetActive(false); ((Component)((Component)this).transform.Find("Particle System")).gameObject.SetActive(false); ((Component)((Component)this).transform.Find("Particle System (1)")).gameObject.SetActive(false); ((Component)((Component)this).transform.Find("AlwaysLookAtCamera")).gameObject.SetActive(false); } public void AddParts() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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) model = ((Component)this).transform.Find("Gib_Eyeball"); model.localScale = 3.81f * Vector3.one; Transform transform = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["Virtue"], model).transform; ((Component)transform).gameObject.SetActive(false); transform.localPosition = Vector3.zero; DisableVirtue(transform); Transform val = transform.Find("DivineOrthos"); val.localScale = 6f * Vector3.one; val.localRotation = Quaternion.Euler(90f, 0f, 0f); Transform[] componentsInChildren = ((Component)val).GetComponentsInChildren<Transform>(true); foreach (Transform val2 in componentsInChildren) { if (((Object)val2).name != "Wings" && (Object)(object)val2 != (Object)(object)val) { ((Component)val2).gameObject.SetActive(false); } else if (((Object)val2).name == "Wings") { wings = val2; } } ((Component)transform).gameObject.SetActive(true); AllowPushUp(CanPushUp); crown = Object.Instantiate<Transform>(EnemyAssets.Prefabs["Virtue"].transform.Find("DivineOrthos/Orthos_Root/Crown"), model); crown.localScale = 0.08f * Vector3.one; crown.localPosition = new Vector3(-0.02f, -0.04f, 0.2f); AllowPushDown(CanPushDown); RetextureAll(); } public void DisableVirtue(Transform virtue) { ((Component)virtue).gameObject.layer = LayerMask.NameToLayer("Default"); ((Component)virtue).tag = "Untagged"; ((Behaviour)((Component)virtue).GetComponent<EnemySpawnableInstance>()).enabled = false; ((Behaviour)((Component)virtue).GetComponent<EnemyIdentifier>()).enabled = false; ((Behaviour)((Component)virtue).GetComponent<Enemy>()).enabled = false; ((Behaviour)((Component)virtue).GetComponent<Drone>()).enabled = false; ((Collider)((Component)virtue).GetComponent<SphereCollider>()).enabled = false; ((Collider)((Component)virtue).GetComponent<SphereCollider>()).isTrigger = true; ((Behaviour)((Component)virtue).GetComponent<AudioSource>()).enabled = false; ((Behaviour)((Component)virtue).GetComponent<KeepInBounds>()).enabled = false; ((Behaviour)((Component)virtue).GetComponent<PortalAwareRenderer>()).enabled = false; Collider component = ((Component)virtue.Find("Sphere")).GetComponent<Collider>(); component.enabled = false; Object.Destroy((Object)(object)((Component)virtue).GetComponent<EnemySpawnableInstance>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<EnemyIdentifier>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<Enemy>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<Drone>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<SphereCollider>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<Rigidbody>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<AudioSource>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<KeepInBounds>()); Object.Destroy((Object)(object)((Component)virtue).GetComponent<PortalAwareRenderer>()); Object.Destroy((Object)(object)((Component)virtue.Find("Sphere")).gameObject); Object.Destroy((Object)(object)((Component)virtue.Find("ParticleEffects")).gameObject); Object.Destroy((Object)(object)((Component)virtue.Find("SpawnEffect Projectile")).gameObject); } public void RetextureAll() { RetextureMeshRenderer(model, EnemyAssets.Textures["Fuchsia"]); RetextureMeshRenderer(crown, EnemyAssets.Textures["FuchsiaCrown"]); RetextureSkinnedMeshRenderer(wings, EnemyAssets.Textures["FuchsiaWings"]); } public void RetextureMeshRenderer(Transform tr, Texture2D texture) { if (!((Object)(object)tr == (Object)null)) { MeshRenderer component = ((Component)tr).GetComponent<MeshRenderer>(); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)texture); ((Renderer)component).material.EnableKeyword("ENEMY"); } } public void RetextureSkinnedMeshRenderer(Transform tr, Texture2D texture) { if (!((Object)(object)tr == (Object)null)) { SkinnedMeshRenderer component = ((Component)tr).GetComponent<SkinnedMeshRenderer>(); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)texture); } } public void SetupLasers() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) lasersTransform = new GameObject("Lasers").transform; lasersTransform.SetParent(((Component)this).transform); lasersTransform.localPosition = new Vector3(0f, 0f, 0.8f); lasersTransform.localRotation = Quaternion.identity; lasers[0] = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["ProvidenceBeam"], lasersTransform).transform; lasers[1] = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["ProvidenceBeam"], lasersTransform).transform; lasersMelee[0] = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["ProvidenceBeam"], lasersTransform).transform; lasersMelee[1] = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["ProvidenceBeam"], lasersTransform).transform; ConfigureLaserBeam(lasers[0], "Laser 0"); ConfigureLaserBeam(lasers[1], "Laser 1"); ConfigureLaserBeam(lasersMelee[0], "Melee Laser 0"); ConfigureLaserBeam(lasersMelee[1], "Melee Laser 1"); Renderer[] componentsInChildren = ((Component)lasersTransform).GetComponentsInChildren<Renderer>(true); foreach (Renderer item in componentsInChildren) { eid.buffUnaffectedRenderers.Add(item); } MeleeUnfire(); } public void ConfigureLaserBeam(Transform laser, string laserName, bool startup = false) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) ((Object)laser).name = laserName; ContinuousBeam component = ((Component)laser).GetComponent<ContinuousBeam>(); component.canHitEnemy = false; component.safeEnemyType = (EnemyType)1; component.beamWidth = 3f; component.originalWidth = 3f; component.startup = startup; component.startUpSpeed = 300f; Object.Destroy((Object)(object)((Component)component).GetComponent<DestroyOnCheckpointRestart>()); } public void AddLooker() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) looker = ((Component)this).gameObject.AddComponent<AlwaysLookAtCamera>(); looker.overrideTarget = ((Component)MonoSingleton<NewMovement>.Instance).transform; ((Behaviour)looker).enabled = false; ((Component)this).transform.rotation = originalRotation; } public void Start() { //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) lasersTransform.localScale = 0.25f * Vector3.one; eid.hookIgnore = true; drone.difficulty = Enemy.InitializeDifficulty(eid); drone.bsm = MonoSingleton<BloodsplatterManager>.Instance; drone.gz = GoreZone.ResolveGoreZone(((Component)this).transform); drone.kib = ((Component)this).GetComponent<KeepInBounds>(); MeshRenderer component = ((Component)((Component)this).transform.Find("Gib_Eyeball")).GetComponent<MeshRenderer>(); ((Renderer)component).material.EnableKeyword("ENEMY"); StartDifficulty(); ((MonoBehaviour)this).StartCoroutine(StartFiring()); } public IEnumerator StartIdling() { yield return (object)new WaitForSeconds(1f); Idle(); yield return (object)new WaitForSeconds(0.1f); UpdateLaserEnvironmentMask(); } public IEnumerator StartFiring() { yield return (object)new WaitForSeconds(1f); Fire(); yield return (object)new WaitForSeconds(0.1f); UpdateLaserEnvironmentMask(); } public void StartDifficulty() { if (!difficultyStarted) { difficultyStarted = true; difficultySpeedModifier = GetDifficultyModifier(eid.difficulty); prePushDelay /= difficultySpeedModifier; pushDuration /= difficultySpeedModifier; preMeleeFireDelay /= difficultySpeedModifier; meleeFireDuration /= difficultySpeedModifier; postMeleeFireDelay /= difficultySpeedModifier; didntDoMeleeTime /= difficultySpeedModifier; } } public float GetDifficultyModifier(int difficulty) { if (1 == 0) { } float result = difficulty switch { 4 => 1f, 3 => 0.8f, 2 => 0.65f, 1 => 0.45f, 0 => 0.3f, _ => 1.15f, }; if (1 == 0) { } return result; } public void Update() { if ((Object)(object)eid == (Object)null || eid.health <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if (checkingForParry && !enemy.parryable && !unparriableAttack) { parried = true; } if (((Behaviour)drone).enabled) { ((Behaviour)drone).enabled = false; } if (((Behaviour)droneFlesh).enabled) { ((Behaviour)droneFlesh).enabled = false; } } public void FixedUpdate() { //IL_008e: 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_00fa: Unknown result type (might be due to invalid IL or missing references) timeModulo = (Time.fixedTime - cycleOffsetTime) * GetEidSpeedModifier() % (MathF.PI * 2f); if (rotatingLasers) { RotateLasers(); } if (!rigidbody.isKinematic) { rigidbody.isKinematic = true; } switch (state) { case FuchsiaState.Idle: ((Behaviour)looker).enabled = false; ((Component)this).transform.rotation = originalRotation; if (Time.fixedTime >= nextCycleTime) { Fire(); } else { CheckMelee(); } break; case FuchsiaState.Firing: ((Behaviour)looker).enabled = false; ((Component)this).transform.rotation = originalRotation; CheckMelee(); break; case FuchsiaState.MeleePushing: MeleePushingMove(); break; case FuchsiaState.MeleeFiring: ((Component)this).transform.position = originalPosition; MeleeFireMoveLasers(); break; case FuchsiaState.MeleeStart: break; } } public void Idle() { nextCycleTime = Time.fixedTime - cycleOffsetTime - (Time.fixedTime - cycleOffsetTime) % MathF.PI + MathF.PI / 2f + cycleOffsetTime; state = FuchsiaState.Idle; } public void RotateLasers() { //IL_000b: 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) lasers[0].localRotation = GetLaserRotation(); lasers[1].localRotation = GetLaserRotation(firstLaser: false); } public Quaternion GetLaserRotation(bool firstLaser = true) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) float num = ((!firstLaser) ? (45f * Mathf.Sin(MathF.PI + timeModulo)) : (45f * Mathf.Sin(timeModulo))); return Quaternion.Euler(num, 0f, 0f); } public float GetEidSpeedModifier() { float num = 1f; float num2 = Mathf.Max(OptionsManager.radianceTier, eid.radianceTier); if (eid.speedBuff || OptionsManager.forceRadiance) { num *= eid.speedBuffModifier * ((num2 > 1f) ? (0.75f + num2 / 4f) : num2); } if (eid.puppet) { num *= 0.75f; } return num; } public void Fire() { MeleeUnfire(); if (telegraphing) { Telegraph(telegraphing: false); } state = FuchsiaState.Firing; ((Component)lasers[0]).gameObject.SetActive(true); ((Component)lasers[1]).gameObject.SetActive(true); UpdateLaserEnvironmentMask(); } public void Unfire() { ((Component)lasers[0]).gameObject.SetActive(false); ((Component)lasers[1]).gameObject.SetActive(false); } public void UpdateLaserEnvironmentMask() { //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) ContinuousBeam[] componentsInChildren = ((Component)lasersTransform).GetComponentsInChildren<ContinuousBeam>(true); foreach (ContinuousBeam val in componentsInChildren) { val.environmentMask = LayerMask.op_Implicit(LaserEnvironmentMask); } } public void Telegraph(bool telegraphing) { this.telegraphing = telegraphing; Transform[] array = lasers; foreach (Transform val in array) { ((Component)val).gameObject.SetActive(true); ((Behaviour)((Component)val).GetComponent<ContinuousBeam>()).enabled = !telegraphing; ((Renderer)((Component)val).GetComponent<LineRenderer>()).enabled = !telegraphing; ((Component)val.Find("Ring (1)")).gameObject.SetActive(!telegraphing); } } public void AllowPushUp(bool newValue = true) { canPushUp = newValue; Transform obj = wings; if (obj != null) { ((Component)obj).gameObject.SetActive(newValue); } UpdateRealType(); } public void AllowPushDown(bool newValue = true) { canPushDown = newValue; Transform obj = crown; if (obj != null) { ((Component)obj).gameObject.SetActive(newValue); } UpdateRealType(); } public void UpdateRealType() { RealType realType = RealType.FuchsiaPushUpPushDown; if (CanPushUp && !CanPushDown) { realType = RealType.FuchsiaPushUp; } else if (!CanPushUp && CanPushDown) { realType = RealType.FuchsiaPushDown; } else if (!CanPushUp && !CanPushDown) { realType = RealType.Fuchsia; } realTypeSaver.realType = realType; GameObject[] activateOnDeath = eid.activateOnDeath; foreach (GameObject val in activateOnDeath) { if (((Object)val).name == "RealTypeSaver") { RealTypeSaver component = val.GetComponent<RealTypeSaver>(); component.realType = realType; break; } } } public void CheckMelee() { if (IsInDistance(meleeTriggerDistance) && IsInView() && !alreadyInMeleeZone) { alreadyInMeleeZone = true; ((MonoBehaviour)this).StartCoroutine(MeleeFull()); } else if (!IsInDistance(meleeZoneEndDistance)) { alreadyInMeleeZone = false; } } public bool IsInDistance(float targetDistance) { //IL_0007: 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) float num = Vector3.Distance(((Component)this).transform.position, ((Component)MonoSingleton<NewMovement>.Instance).transform.position); if (num > targetDistance || BlindEnemies.Blind || EnemyIgnorePlayer.Active) { return false; } return true; } public bool IsInView() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)MonoSingleton<NewMovement>.Instance).transform.position - ((Component)this).transform.position; bool flag = Physics.Raycast(((Component)this).transform.position, val, ((Vector3)(ref val)).magnitude, LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)1))); return !flag; } public void MeleePushingMove() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) float num = Time.fixedTime - pushStartTimepoint; float num2 = 0.5f * pushDuration; if (num < num2) { ((Component)this).transform.position = Vector3.Lerp(originalPosition, ((Component)MonoSingleton<NewMovement>.Instance).transform.position, num / num2); } else if (num >= num2) { if (!didMeleePushAction) { MeleePushAction(); didMeleePushAction = true; } ((Component)this).transform.position = Vector3.Lerp(((Component)MonoSingleton<NewMovement>.Instance).transform.position, originalPosition, (num - num2) / num2); } } public IEnumerator MeleeFull() { Unfire(); state = FuchsiaState.MeleeStart; looker.speed = 0f; ((Behaviour)looker).enabled = true; if (!unparriableAttack) { enemy.parryable = true; } checkingForParry = true; ParryFlash(); yield return (object)new WaitForSeconds(prePushDelay); checkingForParry = false; enemy.parryable = false; ((Collider)collider).enabled = false; bool startedMeleePush = MeleePushStart(); bool parriedThis = parried; parried = false; if (startedMeleePush) { ((Component)this).transform.LookAt(((Component)MonoSingleton<NewMovement>.Instance).transform); yield return (object)new WaitForSeconds(pushDuration); ((Collider)collider).enabled = true; looker.speed = 40f; yield return (object)new WaitForSeconds(preMeleeFireDelay); didMeleePushAction = false; MeleeFire(); yield return (object)new WaitForSeconds(meleeFireDuration); MeleeUnfire(); ((Behaviour)looker).enabled = false; ((Component)this).transform.rotation = originalRotation; yield return (object)new WaitForSeconds(postMeleeFireDelay); } else { yield return (object)new WaitForSeconds(didntDoMeleeTime); ((Collider)collider).enabled = true; didMeleePushAction = false; ((Behaviour)looker).enabled = false; ((Component)this).transform.rotation = originalRotation; } unparriableAttack = parriedThis && eid.difficulty >= 2 && !unparriableAttack; RotateLasers(); Fire(); } public void ParryFlash() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_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) Transform transform = Object.Instantiate<GameObject>((!unparriableAttack) ? MonoSingleton<DefaultReferenceManager>.Instance.parryableFlash : MonoSingleton<DefaultReferenceManager>.Instance.unparryableFlash, lasersTransform.position, lasersTransform.rotation, lasersTransform).transform; transform.localScale *= 12.5f; transform.localPosition += 0.3f * Vector3.forward; } public bool MeleePushStart() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if ((!parried && !IsInDistance(meleePushDistance)) || !IsInView()) { return false; } pushStartTimepoint = Time.fixedTime; originalPosition = ((Component)this).transform.position; state = FuchsiaState.MeleePushing; return true; } public void MeleePushAction() { //IL_000d: 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) Rigidbody val = MonoSingleton<NewMovement>.Instance.Rigidbody; val.velocity = Vector3.zero; if (CanPushUp && !CanPushDown) { MeleePushDirection(); } else if (CanPushDown && !CanPushUp) { MeleePushDirection(up: false); } else if (CanPushUp && CanPushDown) { if (((Component)val).transform.position.y + 1.5f >= originalPosition.y) { MeleePushDirection(); } else { MeleePushDirection(up: false); } } else { MonoSingleton<NewMovement>.Instance.GetHurt(20, true, 1f, false, false, 0.35f, false); } } public void MeleePushDirection(bool up = true) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (MonoSingleton<NewMovement>.Instance.gc.heavyFall) { MonoSingleton<NewMovement>.Instance.fallSpeed = 0f; MonoSingleton<NewMovement>.Instance.gc.heavyFall = false; } float num = (up ? pushForce : (0f - pushForce)); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, num, 0f); if (pushForceFollowsRotation) { val = originalRotation * val; } MonoSingleton<NewMovement>.Instance.Rigidbody.AddForce(val, (ForceMode)2); } public void MeleeFire() { //IL_0038: 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) Unfire(); state = FuchsiaState.MeleeFiring; meleeFireStartTimepoint = Time.fixedTime; rotatingLasers = false; lasersMelee[0].localRotation = Quaternion.Euler(22.5f, 0f, 0f); lasersMelee[1].localRotation = Quaternion.Euler(-22.5f, 0f, 0f); ((Component)lasersMelee[0]).gameObject.SetActive(true); ((Component)lasersMelee[1]).gameObject.SetActive(true); ((Component)lasersMelee[0]).GetComponent<ContinuousBeam>().damage = 20f; ((Component)lasersMelee[1]).GetComponent<ContinuousBeam>().damage = 20f; UpdateLaserEnvironmentMask(); } public void MeleeUnfire() { ((Component)lasersMelee[0]).GetComponent<ContinuousBeam>().damage = 0f; ((Component)lasersMelee[1]).GetComponent<ContinuousBeam>().damage = 0f; ((Component)lasersMelee[0]).gameObject.SetActive(false); ((Component)lasersMelee[1]).gameObject.SetActive(false); rotatingLasers = true; } public void MeleeFireMoveLasers() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) float num = Time.fixedTime - meleeFireStartTimepoint; float num2 = 0.33f * meleeFireDuration; if (num < num2) { lasersMelee[0].rotation = Quaternion.Lerp(lasersMelee[0].rotation, ((Component)this).transform.rotation, num / num2); lasersMelee[1].rotation = Quaternion.Lerp(lasersMelee[1].rotation, ((Component)this).transform.rotation, num / num2); } else if (num >= num2) { lasersMelee[0].rotation = ((Component)this).transform.rotation; lasersMelee[1].rotation = ((Component)this).transform.rotation; } else if (num >= 2f * num2 && (((Component)lasersMelee[0]).gameObject.activeSelf || ((Component)lasersMelee[1]).gameObject.activeSelf)) { Unfire(); } } } public enum FuchsiaState { Nothing, Idle, Firing, MeleeStart, MeleePushing, MeleeFiring } public class EnragerTarget : MonoBehaviour { } public class IdolStart : MonoBehaviour { public Idol idol; public EnemyIdentifier targetOnAwake; public void Start() { idol = ((Component)this).GetComponent<Idol>(); if (((Object)this).name.Contains("Enrager")) { StartEnrager(); } else if (((Object)this).name.Contains("Lumen")) { StartLumen(); } else if (((Object)this).name.Contains("Puppeteer")) { StartPuppeteer(); } else if (((Object)this).name.Contains("Sander")) { StartSander(); } else if (((Object)this).name.Contains("Scorch")) { StartScorch(); } PostStart(); } public void PostStart() { RealTypeSaver component = ((Component)this).GetComponent<RealTypeSaver>(); RealType realType; if ((Object)(object)component != (Object)null) { realType = component.realType; } else { Transform val = Util.FindParentWithNameContaining("Spawned", ((Component)this).transform); if ((Object)(object)val == (Object)null) { return; } realType = IdollikePatch.GetIdolType(((Object)val).name); } if (!RealTypeSaver.IdollikeTypes.Contains(realType)) { return; } Transform val2 = ((Component)this).transform.Find("SpawnEffect Idol"); if ((Object)(object)val2 != (Object)null) { SpawnEffectPitch orAddComponent = ComponentExtensions.GetOrAddComponent<SpawnEffectPitch>((Component)(object)val2); SpawnEffectPitch spawnEffectPitch = orAddComponent; if (1 == 0) { } float pitchMultiplier = realType switch { RealType.Enrager => 1.2f, RealType.Lumen => 1.2f, RealType.Puppeteer => 0.8f, RealType.Sander => 0.8f, RealType.Scorch => 1.2f, _ => 1f, }; if (1 == 0) { } spawnEffectPitch.pitchMultiplier = pitchMultiplier; } } public void StartEnrager() { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) Transform val = Util.FindParentWithNameContaining("EnragerSpawned", ((Component)idol).transform); if (!((Object)(object)val == (Object)null)) { if (idol.eid.overrideFullName == "IDOL") { idol.eid.overrideFullName = "ENRAGER"; } Util.UpdateEnemyHealthbar(idol.eid); ComponentExtensions.GetOrAddComponent<RealTypeSaver>((Component)(object)idol).realType = RealType.Enrager; ComponentExtensions.GetOrAddComponent<PuppetName>((Component)(object)idol).puppetName = ((Object)idol).name; ((Component)idol.halo).gameObject.SetActive(false); EnemySimplifier componentInChildren = ((Component)idol).GetComponentInChildren<EnemySimplifier>(); GameObject val2 = Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.enrageEffect, ((Component)componentInChildren).transform.parent); val2.transform.localPosition = new Vector3(0f, 0.5f, 0f); val2.transform.localScale = 0.667f * Vector3.one; MeshRenderer component = ((Component)componentInChildren).GetComponent<MeshRenderer>(); ((Renderer)component).material.color = new Color(1f, 0.35f, 0f); idol.beam.endColor = new Color(1f, 0.75f, 0f); idol.beam.startColor = Color.red; DistantSprite componentInChildren2 = ((Component)idol).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren2).GetComponent<SpriteRenderer>().color = new Color(0.6557f, 0f, 0f, 0.502f); Transform child = ((Component)componentInChildren2).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(1f, 0.2f, 0f, 0.749f); } } public void StartLumen() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) Transform val = Util.FindParentWithNameContaining("LumenSpawned", ((Component)idol).transform); if (!((Object)(object)val == (Object)null)) { if (idol.eid.overrideFullName == "IDOL") { idol.eid.overrideFullName = "LUMEN"; } Util.UpdateEnemyHealthbar(idol.eid); ComponentExtensions.GetOrAddComponent<RealTypeSaver>((Component)(object)idol).realType = RealType.Lumen; ComponentExtensions.GetOrAddComponent<PuppetName>((Component)(object)idol).puppetName = ((Object)idol).name; Collider component = ((Component)idol).GetComponent<Collider>(); Vector3 val2; if (!Object.op_Implicit((Object)(object)component)) { val2 = ((Component)idol).transform.position; } else { Bounds bounds = component.bounds; val2 = ((Bounds)(ref bounds)).center; } Vector3 val3 = val2; Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.radianceEffect, val3, Quaternion.identity); ((Renderer)idol.beam).material = idol.radiantBeam; idol.halo.sprite = idol.radiantHalo; idol.halo.color = Color.white; EnemySimplifier componentInChildren = ((Component)idol).GetComponentInChildren<EnemySimplifier>(); MeshRenderer component2 = ((Component)componentInChildren).GetComponent<MeshRenderer>(); ((Renderer)component2).material.color = new Color(0.6f, 0.5f, 1.5f); idol.beam.endColor = new Color(0.6f, 0.6f, 1f); idol.beam.startColor = new Color(0.6f, 0.6f, 1f); DistantSprite componentInChildren2 = ((Component)idol).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren2).GetComponent<SpriteRenderer>().color = new Color(0.7f, 0.5f, 1f, 0.502f); Transform child = ((Component)componentInChildren2).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(0.4f, 0.3f, 1f, 0.749f); } } public void StartPuppeteer() { //IL_00d0: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) Transform val = Util.FindParentWithNameContaining("PuppeteerSpawned", ((Component)idol).transform); if (!((Object)(object)val == (Object)null)) { if (idol.eid.overrideFullName == "IDOL") { idol.eid.overrideFullName = "PUPPETEER"; } Util.UpdateEnemyHealthbar(idol.eid); ComponentExtensions.GetOrAddComponent<RealTypeSaver>((Component)(object)idol).realType = RealType.Puppeteer; ComponentExtensions.GetOrAddComponent<PuppetName>((Component)(object)idol).puppetName = ((Object)idol).name; ComponentExtensions.GetOrAddComponent<PuppeteerSpawned>((Component)(object)idol); EnemySimplifier componentInChildren = ((Component)idol).GetComponentInChildren<EnemySimplifier>(); MeshRenderer component = ((Component)componentInChildren).GetComponent<MeshRenderer>(); ((Renderer)component).material.color = new Color(1f, 0f, 0.35f); idol.beam.endColor = new Color(1f, 0f, 0.35f); idol.beam.startColor = new Color(1f, 0f, 0.6f); idol.halo.color = new Color(1f, 0.65f, 0.85f); idol.haloColor = new Color(1f, 0.65f, 0.85f); DistantSprite componentInChildren2 = ((Component)idol).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren2).GetComponent<SpriteRenderer>().color = new Color(0.8f, 0f, 0.6f, 0.502f); Transform child = ((Component)componentInChildren2).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(1f, 0f, 0.3f, 0.749f); } } public void StartSander() { //IL_00c4: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) Transform val = Util.FindParentWithNameContaining("SanderSpawned", ((Component)idol).transform); if (!((Object)(object)val == (Object)null)) { if (idol.eid.overrideFullName == "IDOL") { idol.eid.overrideFullName = "SANDER"; } Util.UpdateEnemyHealthbar(idol.eid); ComponentExtensions.GetOrAddComponent<RealTypeSaver>((Component)(object)idol).realType = RealType.Sander; ComponentExtensions.GetOrAddComponent<PuppetName>((Component)(object)idol).puppetName = ((Object)idol).name; EnemySimplifier componentInChildren = ((Component)idol).GetComponentInChildren<EnemySimplifier>(); MeshRenderer component = ((Component)componentInChildren).GetComponent<MeshRenderer>(); ((Renderer)component).material.color = new Color(1f, 0.9f, 0.55f); idol.beam.endColor = new Color(1f, 0.9f, 0.55f); idol.beam.startColor = new Color(1f, 0.9f, 0.55f); idol.halo.color = new Color(1f, 0.9f, 0.55f); idol.haloColor = new Color(1f, 0.9f, 0.55f); DistantSprite componentInChildren2 = ((Component)idol).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren2).GetComponent<SpriteRenderer>().color = new Color(1f, 0.9f, 0.55f, 0.502f); Transform child = ((Component)componentInChildren2).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(1f, 0.9f, 0.55f, 0.749f); SandifySelf(); } } private void SandifySelf() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) EnemyIdentifier eid = idol.eid; if (eid.puppet) { eid.InstaKill(); return; } EnemyIdentifierIdentifier[] componentsInChildren = ((Component)eid).GetComponentsInChildren<EnemyIdentifierIdentifier>(); EnemyIdentifierIdentifier[] array = componentsInChildren; Bounds bounds; foreach (EnemyIdentifierIdentifier val in array) { GameObject val2 = Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.sandDrip, ((Component)val).transform.position, ((Component)val).transform.rotation); Collider component = ((Component)val).GetComponent<Collider>(); if (Object.op_Implicit((Object)(object)component)) { Transform transform = val2.transform; bounds = component.bounds; transform.localScale = ((Bounds)(ref bounds)).size; } val2.transform.SetParent(((Component)val).transform, true); } Collider component2 = ((Component)eid).GetComponent<Collider>(); Vector3 val3; if (Object.op_Implicit((Object)(object)component2)) { bounds = component2.bounds; val3 = ((Bounds)(ref bounds)).center; } else { val3 = ((Component)idol).transform.position; } Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.sandificationEffect, val3, Quaternion.identity); } public void StartScorch() { //IL_00d0: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) Transform val = Util.FindParentWithNameContaining("ScorchSpawned", ((Component)idol).transform); if (!((Object)(object)val == (Object)null)) { if (idol.eid.overrideFullName == "IDOL") { idol.eid.overrideFullName = "SCORCH"; } Util.UpdateEnemyHealthbar(idol.eid); ComponentExtensions.GetOrAddComponent<RealTypeSaver>((Component)(object)idol).realType = RealType.Scorch; ComponentExtensions.GetOrAddComponent<PuppetName>((Component)(object)idol).puppetName = ((Object)idol).name; ComponentExtensions.GetOrAddComponent<ScorchSpawned>((Component)(object)idol); EnemySimplifier componentInChildren = ((Component)idol).GetComponentInChildren<EnemySimplifier>(); MeshRenderer component = ((Component)componentInChildren).GetComponent<MeshRenderer>(); ((Renderer)component).material.color = new Color(1f, 0.8f, 0f); idol.beam.endColor = new Color(1f, 0.8f, 0f); idol.beam.startColor = new Color(1f, 0.8f, 0f); idol.halo.color = new Color(1f, 0.8f, 0f); idol.haloColor = new Color(1f, 0.8f, 0f); DistantSprite componentInChildren2 = ((Component)idol).GetComponentInChildren<DistantSprite>(); ((Component)componentInChildren2).GetComponent<SpriteRenderer>().color = new Color(1f, 0.8f, 0f, 0.502f); Transform child = ((Component)componentInChildren2).transform.GetChild(0); ((Component)child).GetComponent<SpriteRenderer>().color = new Color(1f, 0.8f, 0f, 0.749f); } } } public class LumenTarget : MonoBehaviour { } public class PuppeteerSetValues : MonoBehaviour { public bool killPuppetsOnDeath = true; public float cooldownMultiplier = 1f; } public class PuppeteerSpawned : MonoBehaviour { public bool KillPuppetsOnDeath = true; public float CooldownMultiplier = 1f; public Idol idol; public float cooldown = 6f; public float cooldownMax = 6f; public List<CaughtEnemy> caughtEnemies = new List<CaughtEnemy>(); public void Awake() { idol = ((Component)this).GetComponent<Idol>(); int difficulty = idol.difficulty; if (1 == 0) { } float num = difficulty switch { 4 => 6f, 3 => 8f, 2 => 9.5f, 1 => 11f, 0 => 13f, _ => 6f, }; if (1 == 0) { } cooldownMax = num; CheckSetValues(); cooldown = cooldownMax * CooldownMultiplier; } public void CheckSetValues() { PuppeteerSetValues component = ((Component)this).GetComponent<PuppeteerSetValues>(); if (!((Object)(object)component == (Object)null)) { KillPuppetsOnDeath = component.killPuppetsOnDeath; CooldownMultiplier = component.cooldownMultiplier; } } public void Update() { if ((Object)(object)idol == (Object)null || (Object)(object)idol.target == (Object)null) { cooldown = cooldownMax * CooldownMultiplier; return; } cooldown += Time.deltaTime; if (!(cooldown < cooldownMax * CooldownMultiplier)) { cooldown = 0f; SpawnPuppet(idol.target); } } public void SpawnPuppet(EnemyIdentifier eid) { int num = AddCaughtEnemy(eid); if (num != -1) { InstantiatePuppetSpawnable(num); } } public int AddCaughtEnemy(EnemyIdentifier eid) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown if ((Object)(object)MonoSingleton<EnemyTracker>.Instance == (Object)null) { Plugin.Logger.LogWarning((object)"EnemyTracker instance not found. Cannot track enemy death."); } else { if (MonoSingleton<EnemyTracker>.Instance.spawnedEnemies.TryGetValue(((Object)eid).GetInstanceID(), out var value)) { CaughtEnemy val = new CaughtEnemy(eid, value); GameObject[] activateOnDeath = val.original.activateOnDeath; foreach (GameObject val2 in activateOnDeath) { if (((Object)val2).name == "RealTypeSaver") { RealType realType = val2.GetComponent<RealTypeSaver>().realType; if (EnemyAssets.SpawnableObjects.ContainsKey(realType) && (Object)(object)EnemyAssets.SpawnableObjects[realType] != (Object)null) { ((SavedGeneric)val.savedEnemy).Spawnable = EnemyAssets.SpawnableObjects[realType]; } } } caughtEnemies.Add(val); return caughtEnemies.IndexOf(val); } Plugin.Logger.LogWarning((object)("Enemy " + ((Object)eid).name + " not found in spawned enemies. Cannot track death.")); } return -1; } public void InstantiatePuppetSpawnable(int puppetIndex) { //IL_003e: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) SavedEnemy savedEnemy = caughtEnemies[puppetIndex].savedEnemy; SpawnableInstance val = SpawnableObjectExtensions.InstantiateSpawnable(((SavedGeneric)savedEnemy).Spawnable, (SavedGeneric)(object)savedEnemy, ((Component)this).transform.parent, true); ((Component)val).transform.position = caughtEnemies[puppetIndex].position; ((Component)val).transform.rotation = caughtEnemies[puppetIndex].rotation; val.ApplyAlterOptions((IEnumerable<AlterOption>)(object)new AlterOption[1] { new AlterOption { targetKey = "puppeted", useBool = true, boolValue = true } }); if (idol.eid.healthBuff || idol.eid.speedBuff || idol.eid.damageBuff) { EnemyIdentifier componentInChildren = ((Component)val).GetComponentInChildren<EnemyIdentifier>(true); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.radianceTier = idol.eid.radianceTier; if (idol.eid.healthBuff) { componentInChildren.healthBuff = true; componentInChildren.healthBuffRequests++; componentInChildren.healthBuffModifier = idol.eid.healthBuffModifier; } if (idol.eid.speedBuff) { componentInChildren.speedBuff = true; componentInChildren.speedBuffRequests++; componentInChildren.speedBuffModifier = idol.eid.speedBuffModifier; } if (idol.eid.damageBuff) { componentInChildren.damageBuff = true; componentInChildren.damageBuffRequests++; componentInChildren.damageBuffModifier = idol.eid.damageBuffModifier; } } } caughtEnemies[puppetIndex].UpdatePuppet(((Component)val).gameObject); } public void KillPuppets() { if (caughtEnemies == null || caughtEnemies.Count == 0) { return; } foreach (CaughtEnemy caughtEnemy in caughtEnemies) { if (caughtEnemy != null && !((Object)(object)caughtEnemy.puppet == (Object)null)) { EnemyIdentifier componentInChildren = caughtEnemy.puppet.GetComponentInChildren<EnemyIdentifier>(); if (!((Object)(object)componentInChildren == (Object)null)) { componentInChildren.InstaKill(); } } } } } public class SanderTarget : MonoBehaviour { } public class ScorchLava : MonoBehaviour { public static List<ScorchLava> allScorchLavas = new List<ScorchLava>(); public ScorchSpawned scorch; public Collider collider; public Transform lava; public Transform lavaReverse; public Vector3 lavaSize = new Vector3(1000f, 1000f, 100f); public float minDistance; public Vector3 positionOffset = Vector3.zero; public int renderQueue; public void Awake() { Collider val = default(Collider); if (((Component)this).TryGetComponent<Collider>(ref val)) { collider = val; } } public void Start() { lava = MakeLava(); lavaReverse = MakeLava(reverse: true); allScorchLavas.Add(this); } public Transform MakeLava(bool reverse = false) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0080: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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) Vector3 val = ((!reverse) ? (((Component)this).transform.position + positionOffset + Vector3.forward * (minDistance + lavaSize.z * 0.5f)) : (((Component)this).transform.position - positionOffset - Vector3.forward * (minDistance + lavaSize.z * 0.5f))); Transform transform = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["Lava"], val, Quaternion.identity).transform; transform.localScale = lavaSize; HurtZone componentInChildren = ((Component)transform).GetComponentInChildren<HurtZone>(true); componentInChildren.affected = (AffectedSubjects)1; componentInChildren.enemyDamageOverride = 0f; componentInChildren.setDamage = 6f; componentInChildren.hurtCooldown = 0.2f; componentInChildren.ignoreInvincibility = true; Material material = ((Renderer)((Component)transform).GetComponent<MeshRenderer>()).material; material.DisableKeyword("_FOG_ON"); material.mainTextureScale = new Vector2(10f, 10f); material.renderQueue = renderQueue; return transform; } public void OnDestroy() { allScorchLavas.Remove(this); Object.Destroy((Object)(object)((Component)lava).gameObject); Object.Destroy((Object)(object)((Component)lavaReverse).gameObject); } public void Update() { //IL_000b: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)MonoSingleton<NewMovement>.Instance).transform.position - GetPosition(); Vector3 val2 = ((((Vector3)(ref val)).magnitude != 0f) ? ((Vector3)(ref val)).normalized : Vector3.forward); float num = Mathf.Max(((Vector3)(ref val)).magnitude, minDistance + lavaSize.z * 0.5f); Vector3 val3 = val2 * num; lava.position = GetPosition() + val3; lava.rotation = Quaternion.LookRotation(val2); lavaReverse.position = GetPosition() - val3; lavaReverse.rotation = Quaternion.LookRotation(-val2); UpdateAllScorchLavas(); } public Vector3 GetPosition() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_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_0055: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)collider == (Object)null || positionOffset != Vector3.zero) { return ((Component)this).transform.position + positionOffset; } Bounds bounds = collider.bounds; return ((Bounds)(ref bounds)).center; } public void UpdateAllScorchLavas() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) float num = -1f; ScorchLava scorchLava = null; foreach (ScorchLava allScorchLava in allScorchLavas) { if (((Component)allScorchLava).gameObject.activeInHierarchy && ((Behaviour)allScorchLava).enabled) { float num2 = Vector3.Distance(allScorchLava.GetPosition(), ((Component)MonoSingleton<NewMovement>.Instance).transform.position); if (num2 < num || num < 0f) { num = num2; scorchLava = allScorchLava; } } } if ((Object)(object)scorchLava == (Object)null) { return; } foreach (ScorchLava allScorchLava2 in allScorchLavas) { if ((Object)(object)allScorchLava2 == (Object)(object)scorchLava) { ((Component)allScorchLava2.lava).gameObject.SetActive(true); ((Component)allScorchLava2.lavaReverse).gameObject.SetActive(true); } else { ((Component)allScorchLava2.lava).gameObject.SetActive(false); ((Component)allScorchLava2.lavaReverse).gameObject.SetActive(false); } } } } public class ScorchSetValues : MonoBehaviour { public float lavaMinDistance = 30f; public Vector3 lavaPositionOffset = Vector3.zero; public int lavaRenderQueue = 3000; } public class ScorchSpawned : MonoBehaviour { public float LavaMinDistance = 30f; public Vector3 LavaPositionOffset = Vector3.zero; public int LavaRenderQueue = 3000; public float flashDelay = 0.9f; public Idol idol; public ScorchLava lava; public void Awake() { idol = ((Component)this).GetComponent<Idol>(); CheckSetValues(); EnemyIdentifier val = ((Component)this).GetComponent<IdolStart>()?.targetOnAwake; if ((Object)(object)val != (Object)null) { SetTarget(val); } } public void CheckSetValues() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) ScorchSetValues component = ((Component)this).GetComponent<ScorchSetValues>(); if (!((Object)(object)component == (Object)null)) { LavaMinDistance = component.lavaMinDistance; LavaPositionOffset = component.lavaPositionOffset; LavaRenderQueue = component.lavaRenderQueue; } } public void Update() { if ((Object)(object)lava != (Object)null) { EnemyIdentifier target = idol.target; if (target != null && target.dead) { UnsetTarget(idol.target); } } } public void Flash(Vector3 position, bool parryable = true, float strength = 1f) { //IL_001a: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) Transform transform = Object.Instantiate<GameObject>(parryable ? MonoSingleton<DefaultReferenceManager>.Instance.parryableFlash : MonoSingleton<DefaultReferenceManager>.Instance.unparryableFlash, position, ((Component)this).transform.rotation).transform; transform.LookAt(((Component)MonoSingleton<NewMovement>.Instance).transform); transform.localScale *= 25f * strength; AudioSource component = ((Component)transform).GetComponent<AudioSource>(); if (component != null) { component.volume *= strength; } AudioSourceExtensions.SetPitch(component, 1.25f); } public void SetTarget(EnemyIdentifier target) { if (Object.op_Implicit((Object)(object)target)) { ((MonoBehaviour)this).StartCoroutine(TargetCoroutine(target)); } } public IEnumerator TargetCoroutine(EnemyIdentifier target) { ScorchLava thisLava = AddLava(target); float timeBetweenFlashes = 0.333f * flashDelay; Flash(((Component)this).transform.position + 5f * Vector3.up, parryable: true, 0.95f); yield return (object)new WaitForSeconds(timeBetweenFlashes); if ((Object)(object)idol.target != (Object)(object)target) { yield break; } Vector3 point1 = ((Component)this).transform.position + 5f * Vector3.up; Vector3 point2 = ((Component)target).transform.position + 5f * Vector3.up; Flash((point1 + point2) / 2f, parryable: true, 0.95f); yield return (object)new WaitForSeconds(timeBetweenFlashes); if (!((Object)(object)idol.target != (Object)(object)target)) { Flash(((Component)target).transform.position + 5f * Vector3.up, parryable: false, 0.95f); yield return (object)new WaitForSeconds(flashDelay - 2f * timeBetweenFlashes); if (!((Object)(object)idol.target != (Object)(object)target)) { ((Behaviour)thisLava).enabled = true; lava = thisLava; } } } public ScorchLava AddLava(EnemyIdentifier target) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) ScorchLava orAddComponent = ComponentExtensions.GetOrAddComponent<ScorchLava>((Component)(object)target); orAddComponent.minDistance = LavaMinDistance; orAddComponent.positionOffset = LavaPositionOffset; orAddComponent.renderQueue = LavaRenderQueue; orAddComponent.scorch = this; ((Behaviour)orAddComponent).enabled = false; return orAddComponent; } public void UnsetTarget(EnemyIdentifier target) { if (Object.op_Implicit((Object)(object)target)) { ScorchLava component = ((Component)target).GetComponent<ScorchLava>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } lava = null; } } } public class FromOneTimeParry : MonoBehaviour { public OneTimeParry source; public Enemy enemy; public void Awake() { source = null; } public void Update() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)source != (Object)null) { ((Component)this).transform.position = ((Component)source).transform.position; } if ((Object)(object)enemy == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class OneTimeParry : MonoBehaviour { public Landmine mine; public GameObject deactivateOnParry; public Enemy enemy; public float subtractHealth; public void Start() { //IL_0017: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0192: 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) mine = Object.Instantiate<GameObject>(EnemyAssets.Prefabs["Landmine"], ((Component)this).transform.position, ((Component)this).transform.rotation).GetComponent<Landmine>(); ((Component)mine).transform.localScale = Vector3.one; FromOneTimeParry fromOneTimeParry = ((Component)mine).gameObject.AddComponent<FromOneTimeParry>(); fromOneTimeParry.source = this; fromOneTimeParry.enemy = enemy; Rigidbody component = ((Component)mine).gameObject.GetComponent<Rigidbody>(); component.isKinematic = true; mine.activated = true; AudioSource component2 = ((Component)mine).gameObject.GetComponent<AudioSource>(); component2.volume = 0f; mine.activatedBeep = null; Object.Destroy((Object)(object)((Component)mine).gameObject.GetComponent<MeshCollider>()); Object.Destroy((Object)(object)((Component)mine).gameObject.GetComponent<ProBuilderMesh>()); Object.Destroy((Object)(object)((Component)mine).gameObject.GetComponent<MeshRenderer>()); Object.Destroy((Object)(object)((Component)mine).gameObject.GetComponent<MeshFilter>()); Object.Destroy((Object)(object)((Component)((Component)mine).transform.Find("LightCylinder")).gameObject); ((Component)((Component)mine).transform.Find("ParryZone")).gameObject.SetActive(true); Transform val = ((Component)mine).transform.Find("ParryZone/V2Flash"); ((Component)val).gameObject.AddComponent<AlwaysLookAtCamera>(); val.position = ((Component)mine).transform.position; val.localScale *= 3f; } public void Update() { if (mine.parried) { ((MonoBehaviour)this).StartCoroutine(GotParried()); } } public IEnumerator GotParried() { yield return (object)new WaitForSeconds(0.1f); Object.Destroy((Object)(object)((Component)mine).gameObject); deactivateOnParry.SetActive(false); Enemy obj = enemy; if (obj != null) { obj.health -= subtractHealth; } Enemy obj2 = enemy; if (obj2 != null) { EnemyIdentifier eid = obj2.eid; if (eid != null) { eid.health -= subtractHealth; } } Enemy obj3 = enemy; if (obj3 != null && obj3.health <= 0f) { Enemy obj4 = enemy; if (obj4 != null) { EnemyIdentifier eid2 = obj4.eid; if (eid2 != null) { eid2.SimpleDamage(0f); } } } Object.Destroy((Object)(object)this); } } public class OutdoorsDelayed : MonoBehaviour { public int layer = 24; } public class PhaserSpawned : MonoBehaviour { public static bool IsLastBeamFromPhaser; public float cooldown = 2f; public float cooldownMax = 4f; public float beamDelay = 0.55f; public float flashPreAttackTime = 0.5f; public bool didFlash = false; public float difficultySpeedModifier = 1f; public bool finishedSetup = false; public bool difficultyStarted = false; public Transform model; public EnemyIdentifier eid; public Drone drone; public DroneFlesh droneFlesh; public